27#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS)
125 helper.
Value = value;
136 helper.
Count = count;
147 SpellCastTargets(
Unit* caster,
uint32 targetMask,
uint64 targetGuid,
uint64 itemTargetGuid,
uint64 srcTransportGuid,
uint64 destTransportGuid,
Position srcPos,
Position destPos,
float elevation,
float missileSpeed, std::string targetString);
160 m_dst._transportGUID = dest;
161 m_dst._position = destPos;
163 m_dst._transportOffset = destPos;
166 m_src._transportGUID = src;
167 m_src._position = srcPos;
169 m_src._transportOffset = srcPos;
201 void SetSrc(
float x,
float y,
float z);
464 void cast(
bool skipCheck =
false);
465 void finish(
bool ok =
true);
766#ifdef MAP_BASED_RAND_GEN
std::list< Condition * > ConditionList
#define MAX_SPELL_EFFECTS
@ SPELL_CUSTOM_ERROR_NONE
@ SPELL_EFFECT_HANDLE_LAUNCH_TARGET
@ SPELL_EFFECT_HANDLE_LAUNCH
@ SPELL_EFFECT_HANDLE_HIT
@ SPELL_EFFECT_HANDLE_HIT_TARGET
@ CAST_FLAG_ADJUST_MISSILE
@ CAST_FLAG_HEAL_PREDICTION
@ CAST_FLAG_POWER_LEFT_SELF
@ CAST_FLAG_HAS_TRAJECTORY
void(Spell::* pEffect)(SpellEffIndex effIndex)
@ TARGET_FLAG_DEST_LOCATION
@ TARGET_FLAG_SOURCE_LOCATION
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
@ UNIT_FIELD_CHANNEL_SPELL
SpellDestination const * GetSrc() const
void SetItemTarget(Item *item)
void RemoveObjectTarget()
WorldObject * GetObjectTarget() const
uint64 GetGOTargetGUID() const
uint64 GetObjectTargetGUID() const
uint64 GetCorpseTargetGUID() const
void ModDst(Position const &pos)
GameObject * GetGOTarget() const
void SetTradeItemTarget(Player *caster)
Corpse * GetCorpseTarget() const
uint64 m_objectTargetGUID
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
void SetSpeed(float speed)
void SetSrc(float x, float y, float z)
void SetTargetFlag(SpellCastTargetFlags flag)
SpellDestination const * GetDst() const
float GetElevation() const
void Initialize(uint32 flags, uint64 target, uint64 itemTarget, uint64 dest, WorldLocation destPos, uint64 src, WorldLocation srcPos)
void SetTargetMask(uint32 newMask)
void SetGOTarget(GameObject *target)
void UpdateTradeSlotItem()
void SetUnitTarget(Unit *target)
void Read(ByteBuffer &data, Unit *caster)
WorldObject * m_objectTarget
Item * GetItemTarget() const
uint32 GetTargetMask() const
void SetElevation(float elevation)
uint32 GetItemTargetEntry() const
Unit * GetUnitTarget() const
void Update(Unit *caster)
uint64 GetUnitTargetGUID() const
uint64 GetItemTargetGUID() const
void ModSrc(Position const &pos)
std::string const & GetTargetString()
void Write(ByteBuffer &data)
Position const * GetSrcPos() const
WorldLocation const * GetDstPos() const
virtual bool IsDeletable() const
virtual void Abort(uint64 e_time)
virtual bool Execute(uint64 e_time, uint32 p_time)
void SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
SpellInfo const * GetSpellInfo() const
void CallScriptAfterCastHandlers()
void HandleHolyPower(Player *caster)
void EffectHealPct(SpellEffIndex effIndex)
GameObject * SearchSpellFocus()
void EffectPowerBurn(SpellEffIndex effIndex)
void EffectSummonRaFFriend(SpellEffIndex effIndex)
void EffectDismissPet(SpellEffIndex effIndex)
GameObject * gameObjTarget
void EffectModifyThreatPercent(SpellEffIndex effIndex)
void PrepareTriggersExecutedOnHit()
void EffectInebriate(SpellEffIndex effIndex)
bool m_referencedFromCurrentSpell
void EffectDurabilityDamage(SpellEffIndex effIndex)
void EffectMilling(SpellEffIndex effIndex)
void EffectApplyAura(SpellEffIndex effIndex)
void EffectEnchantItemTmp(SpellEffIndex effIndex)
void EffectGiveCurrency(SpellEffIndex effIndex)
void EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
void EffectTameCreature(SpellEffIndex effIndex)
void EffectJump(SpellEffIndex effIndex)
void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *properties, uint32 numSummons)
void EffectDamageFromMaxHealthPCT(SpellEffIndex effIndex)
void cast(bool skipCheck=false)
void EffectSummonType(SpellEffIndex effIndex)
void EffectActivateSpec(SpellEffIndex effIndex)
void SendChannelStart(uint32 duration)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, Opcodes opcode=SMSG_CAST_FAILED)
SpellCastTargets m_targets
void EffectLearnSpell(SpellEffIndex effIndex)
void EffectOpenLock(SpellEffIndex effIndex)
void setState(uint32 state)
void EffectNULL(SpellEffIndex effIndex)
void SendPetCastResult(SpellCastResult result)
void EffectDisEnchant(SpellEffIndex effIndex)
void EffectPlayMusic(SpellEffIndex effIndex)
void SearchChainTargets(std::list< WorldObject * > &targets, uint32 chainTargets, WorldObject *target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, ConditionList *condList, bool isChainHeal)
void EffectResurrectNew(SpellEffIndex effIndex)
void EffectAddFarsight(SpellEffIndex effIndex)
void EffectStuck(SpellEffIndex effIndex)
void EffectSendEvent(SpellEffIndex effIndex)
void EffectStealBeneficialBuff(SpellEffIndex effIndex)
void EffectQuestStart(SpellEffIndex effIndex)
void SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 &processedEffectMask)
void SelectExplicitTargets()
TriggerCastFlags _triggeredCastFlags
bool IsAutoRepeat() const
void SetSpellValue(SpellValueMod mod, int32 value)
void prepareDataForTriggerSystem(AuraEffect const *triggeredByAura)
void EffectSummonPet(SpellEffIndex effIndex)
void EffectForceCast(SpellEffIndex effIndex)
void EffectLearnSkill(SpellEffIndex effIndex)
void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject *obj)
SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType &skillid, int32 &reqSkillValue, int32 &skillValue)
void EffectJumpDest(SpellEffIndex effIndex)
void EffectDummy(SpellEffIndex effIndex)
SpellEffectHandleMode effectHandleMode
bool IsValidDeadOrAliveTarget(Unit const *target) const
void EffectDodge(SpellEffIndex effIndex)
uint32 GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList *condList) const
void EffectThreat(SpellEffIndex effIndex)
bool IsNeedSendToClient() const
void EffectEnergizePct(SpellEffIndex effIndex)
SpellResearchData const * m_researchData
void CallScriptObjectAreaTargetSelectHandlers(std::list< WorldObject * > &targets, SpellEffIndex effIndex)
void EffectEnchantItemPerm(SpellEffIndex effIndex)
void SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
SpellDestination m_destTargets[MAX_SPELL_EFFECTS]
void EffectPullTowards(SpellEffIndex effIndex)
void EffectTitanGrip(SpellEffIndex effIndex)
bool IsInterruptable() const
void _handle_finish_phase()
void PrepareTargetProcessing()
void EffectActivateObject(SpellEffIndex effIndex)
void SetExecutedCurrently(bool yes)
Spell(Unit *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID=0, bool skipCheck=false)
void EffectChargeDest(SpellEffIndex effIndex)
uint8 m_delayAtDamageCount
void EffectPickPocket(SpellEffIndex effIndex)
void SendChannelUpdate(uint32 time)
void EffectProspecting(SpellEffIndex effIndex)
void EffectResurrectWithAura(SpellEffIndex effIndex)
std::list< HitTriggerSpell > HitTriggerSpellList
void EffectSummonPlayer(SpellEffIndex effIndex)
SpellCastResult CheckItems()
void prepare(SpellCastTargets const *targets, AuraEffect const *triggeredByAura=NULL)
void EffectEnchantHeldItem(SpellEffIndex effIndex)
std::list< GOTargetInfo > m_UniqueGOTargetInfo
WeaponAttackType m_attackType
void EffectDurabilityDamagePCT(SpellEffIndex effIndex)
void SendInterrupted(uint8 result)
void EffectRemoveAura(SpellEffIndex effIndex)
uint64 m_originalCasterGUID
void EffectDuel(SpellEffIndex effIndex)
LogHelperMap m_effectExecuteData
int32 GetCastTime() const
bool UpdateChanneledTargetList()
void TriggerGlobalCooldown()
void SearchTargets(SEARCHER &searcher, uint32 containerMask, Unit *referer, Position const *pos, float radius)
void ExecuteLogEffectOpenLock(uint8 effIndex, Object *obj)
void EffectPersistentAA(SpellEffIndex effIndex)
void EffectCreateAreaTrigger(SpellEffIndex effIndex)
void AddGOTarget(GameObject *target, uint32 effectMask)
void EffectSummonDeadPet(SpellEffIndex effIndex)
void EffectBlock(SpellEffIndex effIndex)
void HandleThreatSpells()
void EffectParry(SpellEffIndex effIndex)
void SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, WorldObject *target, uint32 effMask)
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit *target, uint32 powerType, uint32 powerTaken, float gainMultiplier)
void EffectCastButtons(SpellEffIndex effIndex)
void CancelGlobalCooldown()
void EffectTeleportUnits(SpellEffIndex effIndex)
int32 CalculateDamage(uint8 i, Unit const *target) const
void EffectKillCreditPersonal(SpellEffIndex effIndex)
void EffectGameObjectDamage(SpellEffIndex effIndex)
void EffectEnchantItemPrismatic(SpellEffIndex effIndex)
void EffectInterruptCast(SpellEffIndex effIndex)
void EffectHealthLeech(SpellEffIndex effIndex)
void PrepareScriptHitHandlers()
DiminishingLevels m_diminishLevel
void CallScriptOnCastHandlers()
void AddDestTarget(SpellDestination const &dest, uint32 effIndex)
std::map< uint32, SpellLogHelper > LogHelperMap
void EffectCharge(SpellEffIndex effIndex)
void SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void EffectTriggerMissileSpell(SpellEffIndex effIndex)
void EffectApplyAreaAura(SpellEffIndex effIndex)
float m_damageMultipliers[3]
void EffectUnlearnSpecialization(SpellEffIndex effIndex)
bool HaveTargetsForEffect(uint8 effect) const
void HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i, SpellEffectHandleMode mode)
void EffectDispel(SpellEffIndex effIndex)
void _handle_immediate_phase()
void EffectDiscoverTaxi(SpellEffIndex effIndex)
SpellCastResult CheckCasterAuras() const
void EffectLearnPetSpell(SpellEffIndex effIndex)
void DoAllEffectOnLaunchTarget(TargetInfo &targetInfo, float *multiplier)
void CallScriptBeforeCastHandlers()
int32 m_periodicPowerCost
void SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
void EffectCreateItem2(SpellEffIndex effIndex)
void EffectKillCredit(SpellEffIndex effIndex)
void EffectPowerDrain(SpellEffIndex effIndex)
void EffectSummonChangeItem(SpellEffIndex effIndex)
SpellCustomErrors m_customError
bool CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMode mode)
Spell(Spell const &right)=delete
void SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void CallScriptObjectTargetSelectHandlers(WorldObject *&target, SpellEffIndex effIndex)
void EffectSpecCount(SpellEffIndex effIndex)
void EffectLeap(SpellEffIndex effIndex)
void EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
void EffectRechargeManaGem(SpellEffIndex effIndex)
void EffectSchoolDMG(SpellEffIndex effIndex)
void EffectSkill(SpellEffIndex effIndex)
void EffectReputation(SpellEffIndex effIndex)
void EffectDestroyItem(SpellEffIndex effIndex)
PathGenerator m_preGeneratedPath
HitTriggerSpellList m_hitTriggerSpells
int32 m_periodicPowerTimer
void EffectHealMechanical(SpellEffIndex effIndex)
bool CheckEffectTarget(Unit const *target, uint32 eff) const
void SetDelayStart(uint64 m_time)
void EffectAddExtraAttacks(SpellEffIndex effIndex)
void EffectUnlockGuildVaultTab(SpellEffIndex effIndex)
SpellCastResult CheckPower()
SpellInfo const * m_triggeredByAuraSpell
uint64 handle_delayed(uint64 t_offset)
void SearchAreaTargets(std::list< WorldObject * > &targets, float range, Position const *position, Unit *referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList *condList)
uint8 m_channelTargetEffectMask
void SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
CurrentSpellTypes GetCurrentContainer() const
std::list< TargetInfo > m_UniqueTargetInfo
SpellMissInfo DoSpellHitOnUnit(Unit *unit, uint32 effectMask, bool scaleAura)
void AddUnitTarget(Unit *target, uint32 effectMask, bool checkIfValid=true, bool implicit=true)
SpellSchoolMask m_spellSchoolMask
std::set< Aura * > UsedSpellMods
std::list< SpellScript * > m_loadedScripts
void EffectQuestClear(SpellEffIndex effIndex)
void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject *obj)
void EffectPlaySound(SpellEffIndex effIndex)
void SelectImplicitTrajTargets()
void SelectSpellTargets()
void EffectEnergize(SpellEffIndex effIndex)
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit *victim, uint32 spellId)
void ExecuteLogEffectResurrect(uint8 effIndex, Unit *target)
bool IsChannelActive() const
void EffectUntrainTalents(SpellEffIndex effIndex)
SpellCastResult CheckPetCast(Unit *target)
bool IsNextMeleeSwingSpell() const
void EffectWeaponDmg(SpellEffIndex effIndex)
void EffectEnvironmentalDMG(SpellEffIndex effIndex)
SpellCastResult CheckCast(bool strict)
Unit * GetOriginalCaster() const
void EffectForceDeselect(SpellEffIndex effIndex)
void SetAutoRepeat(bool rep)
void EffectCreateItem(SpellEffIndex effIndex)
void EffectRenamePet(SpellEffIndex effIndex)
void EffectUnused(SpellEffIndex effIndex)
SpellCastResult CallScriptCheckCastHandlers()
void EffectRedirectThreat(SpellEffIndex effIndex)
void EffectLeapBack(SpellEffIndex effIndex)
std::list< ItemTargetInfo > m_UniqueItemInfo
void SelectEffectTypeImplicitTargets(uint8 effIndex)
void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry)
void InitExplicitTargets(SpellCastTargets const &targets)
void EffectApplyGlyph(SpellEffIndex effIndex)
void EffectPull(SpellEffIndex effIndex)
void CallScriptBeforeHitHandlers()
void EffectGameObjectRepair(SpellEffIndex effIndex)
void EffectFeedPet(SpellEffIndex effIndex)
void CalculateJumpSpeeds(uint8 i, float dist, float &speedxy, float &speedz)
void EffectDestroyAllTotems(SpellEffIndex effIndex)
WorldLocation * destTarget
void EffectResurrect(SpellEffIndex effIndex)
void EffectCreateTamedPet(SpellEffIndex effIndex)
void EffectSendTaxi(SpellEffIndex effIndex)
void EffectInstaKill(SpellEffIndex effIndex)
void EffectHealBattlePetPct(SpellEffIndex effIndex)
void EffectBattlePetsUnlock(SpellEffIndex effIndex)
uint8 m_applyMultiplierMask
void DoTriggersOnSpellHit(Unit *unit, uint32 effMask)
void EffectCreateRandomItem(SpellEffIndex effIndex)
void SetReferencedFromCurrent(bool yes)
void EffectRemoveTalent(SpellEffIndex effIndex)
bool CanExecuteTriggersOnHit(uint32 effMask, SpellInfo const *triggeredByAura=NULL) const
void EffectKnockBack(SpellEffIndex effIndex)
void EffectSummonObject(SpellEffIndex effIndex)
void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry)
void CheckEffectExecuteData() const
void update(uint32 difftime)
int32 GetPowerCost() const
uint64 GetDelayStart() const
void EffectBind(SpellEffIndex effIndex)
void SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
bool CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToCheck)
DiminishingGroup m_diminishGroup
void EffectTriggerSpell(SpellEffIndex effIndex)
void EffectDualWield(SpellEffIndex effIndex)
void EffectDistract(SpellEffIndex effIndex)
void SendLoot(uint64 guid, LootType loottype)
void EffectSummonObjectWild(SpellEffIndex effIndex)
uint64 GetDelayMoment() const
void AddItemTarget(Item *item, uint32 effectMask)
void EffectHealMaxHealth(SpellEffIndex effIndex)
void EffectSelfResurrect(SpellEffIndex effIndex)
UsedSpellMods m_appliedMods
void EffectQuestComplete(SpellEffIndex effIndex)
SpellValue *const m_spellValue
void EffectSanctuary(SpellEffIndex effIndex)
void EffectGameObjectSetDestructionState(SpellEffIndex effIndex)
void SendResurrectRequest(Player *target)
void SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void DoCreateItem(uint32 i, uint32 itemtype)
void EffectAddComboPoints(SpellEffIndex effIndex)
void EffectScriptEffect(SpellEffIndex effIndex)
void EffectPlayMovie(SpellEffIndex effIndex)
bool IsAutoActionResetSpell() const
void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit *victim, int32 itemId, int32 slot)
void EffectHeal(SpellEffIndex effIndex)
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit *victim, uint32 attCount)
void EffectSkinning(SpellEffIndex effIndex)
Spell & operator=(Spell const &right)=delete
void EffectDispelMechanic(SpellEffIndex effIndex)
WorldObject * SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList *condList=NULL)
void finish(bool ok=true)
SpellCastResult CheckRange(bool strict)
void EffectActivateRune(SpellEffIndex effIndex)
SpellInfo const *const m_spellInfo
int32 GetPowerType() const
bool HasGlobalCooldown() const
void EffectSkinPlayerCorpse(SpellEffIndex effIndex)
void FinishTargetProcessing()
void EffectTaunt(SpellEffIndex effIndex)
void EffectTradeSkill(SpellEffIndex effIndex)
void CallScriptOnHitHandlers()
void EffectProficiency(SpellEffIndex effIndex)
SpellCastResult CheckRuneCost(uint32 runeCostID)
void EffectTransmitted(SpellEffIndex effIndex)
void TakeRunePower(bool didHit)
void EffectSpiritHeal(SpellEffIndex effIndex)
SpellCastResult CheckArenaAndRatedBattlegroundCastRules()
void EffectQuestFail(SpellEffIndex effIndex)
void CallScriptAfterHitHandlers()
void DoAllEffectOnTarget(TargetInfo *target)
bool CanAutoCast(Unit *target)
void SetCurrentCastedSpell(Spell *pSpell)
Position const * _position
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
bool operator()(WorldObject *target)
bool operator()(WorldObject *target)
WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
WorldObjectSpellNearbyTargetCheck(float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
bool operator()(WorldObject *target)
Position const * _position
~WorldObjectSpellTargetCheck()
SpellInfo const * _spellInfo
ConditionList * _condList
WorldObjectSpellTargetCheck(Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
ConditionSourceInfo * _condSrcInfo
bool operator()(WorldObject *target)
SpellTargetCheckTypes _targetSelectionType
bool operator()(WorldObject *target)
WorldObjectSpellTrajTargetCheck(float range, Position const *position, Unit *caster, SpellInfo const *spellInfo)
SpellInfo const * triggeredSpell
SpellInfo const * triggeredByAura
SpellMissInfo missCondition
SpellMissInfo reflectResult
WorldLocation _transportOffset
std::list< SpellLogExtraAttacksHelper > ExtraAttacks
void AddCreatedItem(uint32 id)
void AddTarget(ObjectGuid guid)
std::list< ObjectGuid > Targets
std::list< uint32 > PetFeed
std::list< SpellLogEnergizeHelper > Energizes
void AddExtraAttacks(ObjectGuid guid, uint32 count)
std::list< uint32 > CreatedItems
void AddPetFeed(uint32 entry)
void AddEnergize(ObjectGuid guid, float multiplier, uint32 value, uint32 powerType)
uint32 fragmentCurrencyId
SpellValue(SpellInfo const *proto)
int32 EffectBasePoints[MAX_SPELL_EFFECTS]
uint32 MaxAffectedTargets