AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellEffectInfo Class Reference

#include "SpellInfo.h"

Classes

struct  StaticData
 

Public Member Functions

 SpellEffectInfo ()
 
 SpellEffectInfo (SpellEntry const *spellEntry, SpellInfo const *spellInfo, uint8 effIndex)
 
bool IsEffect () const
 
bool IsEffect (SpellEffects effectName) const
 
bool IsAura () const
 
bool IsAura (AuraType aura) const
 
bool IsTargetingArea () const
 
bool IsAreaAuraEffect () const
 
bool IsFarUnitTargetEffect () const
 
bool IsFarDestTargetEffect () const
 
bool IsUnitOwnedAuraEffect () const
 
int32 CalcValue (Unit const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
 
int32 CalcBaseValue (int32 value) const
 
float CalcValueMultiplier (Unit *caster, Spell *spell=nullptr) const
 
float CalcDamageMultiplier (Unit *caster, Spell *spell=nullptr) const
 
bool HasRadius () const
 
float CalcRadius (Unit *caster=nullptr, Spell *=nullptr) const
 
uint32 GetProvidedTargetMask () const
 
uint32 GetMissingTargetMask (bool srcSet=false, bool destSet=false, uint32 mask=0) const
 
SpellEffectImplicitTargetTypes GetImplicitTargetType () const
 
SpellTargetObjectTypes GetUsedTargetObjectType () const
 

Public Attributes

uint32 Effect
 
uint32 ApplyAuraName
 
uint32 Amplitude
 
int32 DieSides
 
float RealPointsPerLevel
 
int32 BasePoints
 
float PointsPerComboPoint
 
float ValueMultiplier
 
float DamageMultiplier
 
float BonusMultiplier
 
int32 MiscValue
 
int32 MiscValueB
 
Mechanics Mechanic
 
SpellImplicitTargetInfo TargetA
 
SpellImplicitTargetInfo TargetB
 
SpellRadiusEntry const * RadiusEntry
 
uint32 ChainTarget
 
uint32 ItemType
 
uint32 TriggerSpell
 
flag96 SpellClassMask
 
std::list< Condition * > * ImplicitTargetConditions
 

Private Attributes

SpellInfo const * _spellInfo
 
uint8 _effIndex
 

Static Private Attributes

static std::array< StaticData, TOTAL_SPELL_EFFECTS_data
 

Detailed Description

Constructor & Destructor Documentation

◆ SpellEffectInfo() [1/2]

SpellEffectInfo::SpellEffectInfo ( )
inline
275 : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
@ MECHANIC_NONE
Definition SharedDefines.h:1325
Mechanics Mechanic
Definition SpellInfo.h:265
float BonusMultiplier
Definition SpellInfo.h:262
float ValueMultiplier
Definition SpellInfo.h:260
float PointsPerComboPoint
Definition SpellInfo.h:259
int32 MiscValueB
Definition SpellInfo.h:264
std::list< Condition * > * ImplicitTargetConditions
Definition SpellInfo.h:273
uint32 TriggerSpell
Definition SpellInfo.h:271
float DamageMultiplier
Definition SpellInfo.h:261
uint32 Effect
Definition SpellInfo.h:253
SpellInfo const * _spellInfo
Definition SpellInfo.h:250
int32 MiscValue
Definition SpellInfo.h:263
uint8 _effIndex
Definition SpellInfo.h:251
uint32 ApplyAuraName
Definition SpellInfo.h:254
int32 BasePoints
Definition SpellInfo.h:258
uint32 ChainTarget
Definition SpellInfo.h:269
float RealPointsPerLevel
Definition SpellInfo.h:257
uint32 ItemType
Definition SpellInfo.h:270
int32 DieSides
Definition SpellInfo.h:256
SpellRadiusEntry const * RadiusEntry
Definition SpellInfo.h:268
uint32 Amplitude
Definition SpellInfo.h:255

◆ SpellEffectInfo() [2/2]

SpellEffectInfo::SpellEffectInfo ( SpellEntry const *  spellEntry,
SpellInfo const *  spellInfo,
uint8  effIndex 
)
327{
328 _spellInfo = spellInfo;
329 _effIndex = effIndex;
330 Effect = spellEntry->Effect[effIndex];
331 ApplyAuraName = spellEntry->EffectApplyAuraName[effIndex];
332 Amplitude = spellEntry->EffectAmplitude[effIndex];
333 DieSides = spellEntry->EffectDieSides[effIndex];
334 RealPointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
335 BasePoints = spellEntry->EffectBasePoints[effIndex];
336 PointsPerComboPoint = spellEntry->EffectPointsPerComboPoint[effIndex];
337 ValueMultiplier = spellEntry->EffectValueMultiplier[effIndex];
338 DamageMultiplier = spellEntry->EffectDamageMultiplier[effIndex];
339 BonusMultiplier = spellEntry->EffectBonusMultiplier[effIndex];
340 MiscValue = spellEntry->EffectMiscValue[effIndex];
341 MiscValueB = spellEntry->EffectMiscValueB[effIndex];
342 Mechanic = Mechanics(spellEntry->EffectMechanic[effIndex]);
343 TargetA = SpellImplicitTargetInfo(spellEntry->EffectImplicitTargetA[effIndex]);
344 TargetB = SpellImplicitTargetInfo(spellEntry->EffectImplicitTargetB[effIndex]);
345 RadiusEntry = spellEntry->EffectRadiusIndex[effIndex] ? sSpellRadiusStore.LookupEntry(spellEntry->EffectRadiusIndex[effIndex]) : nullptr;
346 ChainTarget = spellEntry->EffectChainTarget[effIndex];
347 ItemType = spellEntry->EffectItemType[effIndex];
348 TriggerSpell = spellEntry->EffectTriggerSpell[effIndex];
349 SpellClassMask = spellEntry->EffectSpellClassMask[effIndex];
350 ImplicitTargetConditions = nullptr;
351}
DBCStorage< SpellRadiusEntry > sSpellRadiusStore(SpellRadiusfmt)
Mechanics
Definition SharedDefines.h:1324
flag96 SpellClassMask
Definition SpellInfo.h:272
SpellImplicitTargetInfo TargetA
Definition SpellInfo.h:266
SpellImplicitTargetInfo TargetB
Definition SpellInfo.h:267
Definition SpellInfo.h:217

References _effIndex, _spellInfo, Amplitude, ApplyAuraName, BasePoints, BonusMultiplier, ChainTarget, DamageMultiplier, DieSides, Effect, SpellEntry::Effect, SpellEntry::EffectAmplitude, SpellEntry::EffectApplyAuraName, SpellEntry::EffectBasePoints, SpellEntry::EffectBonusMultiplier, SpellEntry::EffectChainTarget, SpellEntry::EffectDamageMultiplier, SpellEntry::EffectDieSides, SpellEntry::EffectImplicitTargetA, SpellEntry::EffectImplicitTargetB, SpellEntry::EffectItemType, SpellEntry::EffectMechanic, SpellEntry::EffectMiscValue, SpellEntry::EffectMiscValueB, SpellEntry::EffectPointsPerComboPoint, SpellEntry::EffectRadiusIndex, SpellEntry::EffectRealPointsPerLevel, SpellEntry::EffectSpellClassMask, SpellEntry::EffectTriggerSpell, SpellEntry::EffectValueMultiplier, ImplicitTargetConditions, ItemType, Mechanic, MiscValue, MiscValueB, PointsPerComboPoint, RadiusEntry, RealPointsPerLevel, SpellClassMask, sSpellRadiusStore, TargetA, TargetB, TriggerSpell, and ValueMultiplier.

Member Function Documentation

◆ CalcBaseValue()

int32 SpellEffectInfo::CalcBaseValue ( int32  value) const
524{
525 if (DieSides == 0)
526 return value;
527 else
528 return value - 1;
529}

References DieSides.

◆ CalcDamageMultiplier()

float SpellEffectInfo::CalcDamageMultiplier ( Unit caster,
Spell spell = nullptr 
) const
540{
541 float multiplier = DamageMultiplier;
542 if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
543 modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell);
544 return multiplier;
545}
@ SPELLMOD_DAMAGE_MULTIPLIER
Definition SpellDefines.h:96
Definition Player.h:1081
Player * GetSpellModOwner() const
Definition Unit.cpp:16629

References _spellInfo, DamageMultiplier, Unit::GetSpellModOwner(), SpellInfo::Id, and SPELLMOD_DAMAGE_MULTIPLIER.

◆ CalcRadius()

float SpellEffectInfo::CalcRadius ( Unit caster = nullptr,
Spell spell = nullptr 
) const
553{
554 if (!HasRadius())
555 return 0.0f;
556
557 float radius = RadiusEntry->RadiusMin;
558 if (caster)
559 {
560 radius += RadiusEntry->RadiusPerLevel * caster->GetLevel();
561 radius = std::min(radius, RadiusEntry->RadiusMax);
562 if (Player* modOwner = caster->GetSpellModOwner())
563 modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
564 }
565
566 return radius;
567}
@ SPELLMOD_RADIUS
Definition SpellDefines.h:82
bool HasRadius() const
Definition SpellInfo.cpp:547
uint32 Id
Definition SpellInfo.h:320
uint8 GetLevel() const
Definition Unit.h:1033
float RadiusPerLevel
Definition DBCStructure.h:1787
float RadiusMax
Definition DBCStructure.h:1788
float RadiusMin
Definition DBCStructure.h:1786

References _spellInfo, Unit::GetLevel(), Unit::GetSpellModOwner(), HasRadius(), SpellInfo::Id, RadiusEntry, SpellRadiusEntry::RadiusMax, SpellRadiusEntry::RadiusMin, SpellRadiusEntry::RadiusPerLevel, and SPELLMOD_RADIUS.

◆ CalcValue()

int32 SpellEffectInfo::CalcValue ( Unit const *  caster = nullptr,
int32 const *  basePoints = nullptr,
Unit const *  target = nullptr 
) const
410{
411 float basePointsPerLevel = RealPointsPerLevel;
412 int32 basePoints = bp ? *bp : BasePoints;
413 int32 randomPoints = int32(DieSides);
414
415 // base amount modification based on spell lvl vs caster lvl
416 // xinef: added basePointsPerLevel check
417 if (caster && basePointsPerLevel != 0.0f)
418 {
419 int32 level = int32(caster->GetLevel());
420 if (level > int32(_spellInfo->MaxLevel) && _spellInfo->MaxLevel > 0)
421 level = int32(_spellInfo->MaxLevel);
422 else if (level < int32(_spellInfo->BaseLevel))
423 level = int32(_spellInfo->BaseLevel);
424
425 // xinef: if base level is greater than spell level, reduce by base level (eg. pilgrims foods)
426 level -= int32(std::max(_spellInfo->BaseLevel, _spellInfo->SpellLevel));
427 basePoints += int32(level * basePointsPerLevel);
428 }
429
430 // roll in a range <1;EffectDieSides> as of patch 3.3.3
431 switch (randomPoints)
432 {
433 case 0:
434 break;
435 case 1:
436 basePoints += 1;
437 break; // range 1..1
438 default:
439 // range can have positive (1..rand) and negative (rand..1) values, so order its for irand
440 int32 randvalue = (randomPoints >= 1)
441 ? irand(1, randomPoints)
442 : irand(randomPoints, 1);
443
444 basePoints += randvalue;
445 break;
446 }
447
448 float value = float(basePoints);
449
450 // random damage
451 if (caster)
452 {
453 // bonus amount from combo points
454 if (uint8 comboPoints = caster->GetComboPoints())
455 {
456 value += PointsPerComboPoint * comboPoints;
457 }
458
459 value = caster->ApplyEffectModifiers(_spellInfo, _effIndex, value);
460
461 // amount multiplication based on caster's level
462 if (!caster->IsControlledByPlayer() &&
463 _spellInfo->SpellLevel && _spellInfo->SpellLevel != caster->GetLevel() &&
465 {
466 bool canEffectScale = false;
467 switch (Effect)
468 {
481 canEffectScale = true;
482 break;
483 default:
484 break;
485 }
486
487 switch (ApplyAuraName)
488 {
490 case SPELL_AURA_DUMMY:
498 canEffectScale = true;
499 break;
500 default:
501 break;
502 }
503
505 canEffectScale = false;
506
507 if (canEffectScale)
508 {
509 CreatureTemplate const* cInfo = caster->ToCreature()->GetCreatureTemplate();
510
511 CreatureBaseStats const* pCBS = sObjectMgr->GetCreatureBaseStats(caster->GetLevel(), caster->getClass());
512 float CBSPowerCreature = pCBS->BaseDamage[cInfo->expansion];
513 CreatureBaseStats const* spellCBS = sObjectMgr->GetCreatureBaseStats(_spellInfo->SpellLevel, caster->getClass());
514 float CBSPowerSpell = spellCBS->BaseDamage[cInfo->expansion];
515 value *= CBSPowerCreature / CBSPowerSpell;
516 }
517 }
518 }
519
520 return int32(value);
521}
std::int32_t int32
Definition Define.h:103
std::uint8_t uint8
Definition Define.h:109
#define sObjectMgr
Definition ObjectMgr.h:1636
int32 irand(int32 min, int32 max)
Definition Random.cpp:37
@ SPELL_EFFECT_DUMMY
Definition SharedDefines.h:781
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition SharedDefines.h:855
@ SPELL_EFFECT_POWER_BURN
Definition SharedDefines.h:840
@ SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE
Definition SharedDefines.h:926
@ SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE
Definition SharedDefines.h:920
@ SPELL_EFFECT_HEALTH_LEECH
Definition SharedDefines.h:787
@ SPELL_EFFECT_WEAPON_DAMAGE
Definition SharedDefines.h:836
@ SPELL_EFFECT_HEAL
Definition SharedDefines.h:788
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
Definition SharedDefines.h:899
@ SPELL_EFFECT_POWER_DRAIN
Definition SharedDefines.h:786
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition SharedDefines.h:780
@ SPELL_EFFECT_FORCE_CAST_WITH_VALUE
Definition SharedDefines.h:919
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
Definition SharedDefines.h:401
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
@ SPELL_AURA_DAMAGE_SHIELD
Definition SpellAuraDefines.h:78
@ SPELL_AURA_PERIODIC_MANA_LEECH
Definition SpellAuraDefines.h:127
@ SPELL_AURA_PERIODIC_HEAL
Definition SpellAuraDefines.h:71
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
Definition SpellAuraDefines.h:290
@ SPELL_AURA_SCHOOL_ABSORB
Definition SpellAuraDefines.h:132
@ SPELL_AURA_PERIODIC_LEECH
Definition SpellAuraDefines.h:116
@ SPELL_AURA_PROC_TRIGGER_DAMAGE
Definition SpellAuraDefines.h:106
#define sSpellMgr
Definition SpellMgr.h:825
uint32 BaseLevel
Definition SpellInfo.h:359
uint32 MaxLevel
Definition SpellInfo.h:358
uint32 SpellLevel
Definition SpellInfo.h:360
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:415
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition SpellInfo.h:393
Definition CreatureData.h:303
float BaseDamage[MAX_EXPANSIONS]
Definition CreatureData.h:309
Definition CreatureData.h:186
uint32 expansion
Definition CreatureData.h:197

References _effIndex, _spellInfo, ApplyAuraName, Unit::ApplyEffectModifiers(), CreatureBaseStats::BaseDamage, SpellInfo::BaseLevel, BasePoints, DieSides, Effect, SpellInfo::Effects, CreatureTemplate::expansion, Unit::getClass(), Unit::GetComboPoints(), Creature::GetCreatureTemplate(), Unit::GetLevel(), SpellInfo::HasAttribute(), irand(), Unit::IsControlledByPlayer(), SpellInfo::MaxLevel, PointsPerComboPoint, RealPointsPerLevel, sObjectMgr, SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL, SPELL_AURA_DAMAGE_SHIELD, SPELL_AURA_DUMMY, SPELL_AURA_PERIODIC_DAMAGE, SPELL_AURA_PERIODIC_HEAL, SPELL_AURA_PERIODIC_LEECH, SPELL_AURA_PERIODIC_MANA_LEECH, SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE, SPELL_AURA_PROC_TRIGGER_DAMAGE, SPELL_AURA_SCHOOL_ABSORB, SPELL_EFFECT_DUMMY, SPELL_EFFECT_FORCE_CAST_WITH_VALUE, SPELL_EFFECT_HEAL, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_NORMALIZED_WEAPON_DMG, SPELL_EFFECT_POWER_BURN, SPELL_EFFECT_POWER_DRAIN, SPELL_EFFECT_SCHOOL_DAMAGE, SPELL_EFFECT_SCRIPT_EFFECT, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_WEAPON_DAMAGE, SpellInfo::SpellLevel, sSpellMgr, and Object::ToCreature().

Referenced by spell_dragonblight_corrosive_spit::AfterApply(), spell_dragonblight_corrosive_spit::PeriodicTick(), spell_lich_king_whisper::Validate(), and spell_dragonblight_corrosive_spit::Validate().

◆ CalcValueMultiplier()

float SpellEffectInfo::CalcValueMultiplier ( Unit caster,
Spell spell = nullptr 
) const
532{
533 float multiplier = ValueMultiplier;
534 if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
535 modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_VALUE_MULTIPLIER, multiplier, spell);
536 return multiplier;
537}
@ SPELLMOD_VALUE_MULTIPLIER
Definition SpellDefines.h:103

References _spellInfo, Unit::GetSpellModOwner(), SpellInfo::Id, SPELLMOD_VALUE_MULTIPLIER, and ValueMultiplier.

◆ GetImplicitTargetType()

SpellEffectImplicitTargetTypes SpellEffectInfo::GetImplicitTargetType ( ) const
599{
600 return _data[Effect].ImplicitTargetType;
601}
static std::array< StaticData, TOTAL_SPELL_EFFECTS > _data
Definition SpellInfo.h:608

References _data, and Effect.

◆ GetMissingTargetMask()

uint32 SpellEffectInfo::GetMissingTargetMask ( bool  srcSet = false,
bool  destSet = false,
uint32  mask = 0 
) const
575{
576 uint32 effImplicitTargetMask = GetTargetFlagMask(GetUsedTargetObjectType());
578
579 // remove all flags covered by effect target mask
580 if (providedTargetMask & TARGET_FLAG_UNIT_MASK)
581 effImplicitTargetMask &= ~(TARGET_FLAG_UNIT_MASK);
582 if (providedTargetMask & TARGET_FLAG_CORPSE_MASK)
583 effImplicitTargetMask &= ~(TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK);
584 if (providedTargetMask & TARGET_FLAG_GAMEOBJECT_ITEM)
586 if (providedTargetMask & TARGET_FLAG_GAMEOBJECT)
587 effImplicitTargetMask &= ~(TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM);
588 if (providedTargetMask & TARGET_FLAG_ITEM)
589 effImplicitTargetMask &= ~(TARGET_FLAG_ITEM | TARGET_FLAG_GAMEOBJECT_ITEM);
590 if (dstSet || providedTargetMask & TARGET_FLAG_DEST_LOCATION)
591 effImplicitTargetMask &= ~(TARGET_FLAG_DEST_LOCATION);
592 if (srcSet || providedTargetMask & TARGET_FLAG_SOURCE_LOCATION)
593 effImplicitTargetMask &= ~(TARGET_FLAG_SOURCE_LOCATION);
594
595 return effImplicitTargetMask;
596}
std::uint32_t uint32
Definition Define.h:107
@ TARGET_FLAG_GAMEOBJECT
Definition SpellInfo.h:57
@ TARGET_FLAG_ITEM
Definition SpellInfo.h:50
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition SpellInfo.h:60
@ TARGET_FLAG_DEST_LOCATION
Definition SpellInfo.h:52
@ TARGET_FLAG_SOURCE_LOCATION
Definition SpellInfo.h:51
@ TARGET_FLAG_UNIT_MASK
Definition SpellInfo.h:68
@ TARGET_FLAG_CORPSE_MASK
Definition SpellInfo.h:71
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
Definition SpellInfo.cpp:31
SpellTargetObjectTypes GetUsedTargetObjectType() const
Definition SpellInfo.cpp:603
SpellTargetObjectTypes GetObjectType() const
Definition SpellInfo.cpp:80

References SpellImplicitTargetInfo::GetObjectType(), GetTargetFlagMask(), GetUsedTargetObjectType(), TARGET_FLAG_CORPSE_MASK, TARGET_FLAG_DEST_LOCATION, TARGET_FLAG_GAMEOBJECT, TARGET_FLAG_GAMEOBJECT_ITEM, TARGET_FLAG_ITEM, TARGET_FLAG_SOURCE_LOCATION, TARGET_FLAG_UNIT_MASK, TargetA, and TargetB.

◆ GetProvidedTargetMask()

uint32 SpellEffectInfo::GetProvidedTargetMask ( ) const

◆ GetUsedTargetObjectType()

SpellTargetObjectTypes SpellEffectInfo::GetUsedTargetObjectType ( ) const
604{
605 return _data[Effect].UsedTargetObjectType;
606}

References _data, and Effect.

Referenced by GetMissingTargetMask().

◆ HasRadius()

bool SpellEffectInfo::HasRadius ( ) const
548{
549 return RadiusEntry != nullptr;
550}

References RadiusEntry.

Referenced by CalcRadius().

◆ IsAreaAuraEffect()

bool SpellEffectInfo::IsAreaAuraEffect ( ) const
379{
386 return true;
387 return false;
388}
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
Definition SharedDefines.h:813
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition SharedDefines.h:906
@ SPELL_EFFECT_APPLY_AREA_AURA_PET
Definition SharedDefines.h:897
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
Definition SharedDefines.h:843
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition SharedDefines.h:907
@ SPELL_EFFECT_APPLY_AREA_AURA_OWNER
Definition SharedDefines.h:921

References Effect, SPELL_EFFECT_APPLY_AREA_AURA_ENEMY, SPELL_EFFECT_APPLY_AREA_AURA_FRIEND, SPELL_EFFECT_APPLY_AREA_AURA_OWNER, SPELL_EFFECT_APPLY_AREA_AURA_PARTY, SPELL_EFFECT_APPLY_AREA_AURA_PET, and SPELL_EFFECT_APPLY_AREA_AURA_RAID.

Referenced by IsUnitOwnedAuraEffect().

◆ IsAura() [1/2]

bool SpellEffectInfo::IsAura ( ) const
364{
366}
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
Definition SharedDefines.h:805
bool IsUnitOwnedAuraEffect() const
Definition SpellInfo.cpp:404

References ApplyAuraName, Effect, IsUnitOwnedAuraEffect(), and SPELL_EFFECT_PERSISTENT_AREA_AURA.

Referenced by IsAura().

◆ IsAura() [2/2]

bool SpellEffectInfo::IsAura ( AuraType  aura) const
369{
370 return IsAura() && ApplyAuraName == uint32(aura);
371}
bool IsAura() const
Definition SpellInfo.cpp:363

References ApplyAuraName, and IsAura().

◆ IsEffect() [1/2]

bool SpellEffectInfo::IsEffect ( ) const
354{
355 return Effect != 0;
356}

References Effect.

◆ IsEffect() [2/2]

bool SpellEffectInfo::IsEffect ( SpellEffects  effectName) const
359{
360 return Effect == effectName;
361}

References Effect.

◆ IsFarDestTargetEffect()

bool SpellEffectInfo::IsFarDestTargetEffect ( ) const
400{
402}
@ SPELL_EFFECT_TELEPORT_UNITS
Definition SharedDefines.h:783

References Effect, and SPELL_EFFECT_TELEPORT_UNITS.

◆ IsFarUnitTargetEffect()

bool SpellEffectInfo::IsFarUnitTargetEffect ( ) const
391{
396 /*|| (Effect == SPELL_EFFECT_SKIN_PLAYER_CORPSE) Xinef: This is not Far Unit Target Effect*/;
397}
@ SPELL_EFFECT_SUMMON_RAF_FRIEND
Definition SharedDefines.h:930
@ SPELL_EFFECT_SUMMON_PLAYER
Definition SharedDefines.h:863
@ SPELL_EFFECT_RESURRECT
Definition SharedDefines.h:796
@ SPELL_EFFECT_RESURRECT_NEW
Definition SharedDefines.h:891

References Effect, SPELL_EFFECT_RESURRECT, SPELL_EFFECT_RESURRECT_NEW, SPELL_EFFECT_SUMMON_PLAYER, and SPELL_EFFECT_SUMMON_RAF_FRIEND.

◆ IsTargetingArea()

bool SpellEffectInfo::IsTargetingArea ( ) const
374{
375 return TargetA.IsArea() || TargetB.IsArea();
376}
bool IsArea() const
Definition SpellInfo.cpp:65

References SpellImplicitTargetInfo::IsArea(), TargetA, and TargetB.

◆ IsUnitOwnedAuraEffect()

bool SpellEffectInfo::IsUnitOwnedAuraEffect ( ) const
405{
407}
@ SPELL_EFFECT_APPLY_AURA
Definition SharedDefines.h:784
bool IsAreaAuraEffect() const
Definition SpellInfo.cpp:378

References Effect, IsAreaAuraEffect(), and SPELL_EFFECT_APPLY_AURA.

Referenced by IsAura().

Member Data Documentation

◆ _data

std::array< SpellEffectInfo::StaticData, TOTAL_SPELL_EFFECTS > SpellEffectInfo::_data
staticprivate
651{
652 TARGET_FLAG_NONE = 0x00000000,
653 TARGET_FLAG_UNUSED_1 = 0x00000001, // not used
654 TARGET_FLAG_UNIT = 0x00000002, // pguid
655 TARGET_FLAG_UNIT_RAID = 0x00000004, // not sent, used to validate target (if raid member)
656 TARGET_FLAG_UNIT_PARTY = 0x00000008, // not sent, used to validate target (if party member)
657 TARGET_FLAG_ITEM = 0x00000010, // pguid
658 TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // pguid, 3 float
659 TARGET_FLAG_DEST_LOCATION = 0x00000040, // pguid, 3 float
660 TARGET_FLAG_UNIT_ENEMY = 0x00000080, // not sent, used to validate target (if enemy)
661 TARGET_FLAG_UNIT_ALLY = 0x00000100, // not sent, used to validate target (if ally)
662 TARGET_FLAG_CORPSE_ENEMY = 0x00000200, // pguid
663 TARGET_FLAG_UNIT_DEAD = 0x00000400, // not sent, used to validate target (if dead creature)
664 TARGET_FLAG_GAMEOBJECT = 0x00000800, // pguid, used with TARGET_GAMEOBJECT_TARGET
665 TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid
666 TARGET_FLAG_STRING = 0x00002000, // string
667 TARGET_FLAG_GAMEOBJECT_ITEM = 0x00004000, // not sent, used with TARGET_GAMEOBJECT_ITEM_TARGET
668 TARGET_FLAG_CORPSE_ALLY = 0x00008000, // pguid
669 TARGET_FLAG_UNIT_MINIPET = 0x00010000, // pguid, used to validate target (if non combat pet)
670 TARGET_FLAG_GLYPH_SLOT = 0x00020000, // used in glyph spells
671 TARGET_FLAG_DEST_TARGET = 0x00040000, // sometimes appears with DEST_TARGET spells (may appear or not for a given spell)
672 TARGET_FLAG_UNUSED20 = 0x00080000, // uint32 counter, loop { vec3 - screen position (?), guid }, not used so far
673 TARGET_FLAG_UNIT_PASSENGER = 0x00100000, // guessed, used to validate target (if vehicle passenger)
674
680};
681
683{
691};
692
694{
701};
702
704{
714 // only for effect target type
717};
718
720{
730};
731
733{
745};
746
748{
752};
753
754// Spell clasification
756{
779};
780
782{
783 SPELL_ATTR0_CU_ENCHANT_PROC = 0x00000001,
784 SPELL_ATTR0_CU_CONE_BACK = 0x00000002,
785 SPELL_ATTR0_CU_CONE_LINE = 0x00000004,
786 SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
788 SPELL_ATTR0_CU_AURA_CC = 0x00000020,
790 SPELL_ATTR0_CU_NO_PVP_FLAG = 0x00000080,
791 SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
792 SPELL_ATTR0_CU_CHARGE = 0x00000200,
793 SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,
794 SPELL_ATTR0_CU_IGNORE_EVADE = 0x00000800,
795 SPELL_ATTR0_CU_NEGATIVE_EFF0 = 0x00001000,
796 SPELL_ATTR0_CU_NEGATIVE_EFF1 = 0x00002000,
797 SPELL_ATTR0_CU_NEGATIVE_EFF2 = 0x00004000,
798 SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
803 SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
808 SPELL_ATTR0_CU_POSITIVE_EFF0 = 0x02000000,
809 SPELL_ATTR0_CU_POSITIVE_EFF1 = 0x04000000,
810 SPELL_ATTR0_CU_POSITIVE_EFF2 = 0x08000000,
816
819};
820
822
824{
825private:
826 Targets _target;
827public:
828 SpellImplicitTargetInfo() : _target(Targets(0)) {}
830
831 bool IsArea() const;
832 SpellTargetSelectionCategories GetSelectionCategory() const;
833 SpellTargetReferenceTypes GetReferenceType() const;
834 SpellTargetObjectTypes GetObjectType() const;
835 SpellTargetCheckTypes GetCheckType() const;
836 SpellTargetDirectionTypes GetDirectionType() const;
837 float CalcDirectionAngle() const;
838
839 Targets GetTarget() const;
840 uint32 GetExplicitTargetMask(bool& srcSet, bool& dstSet) const;
841
842private:
843 struct StaticData
844 {
845 SpellTargetObjectTypes ObjectType; // type of object returned by target type
846 SpellTargetReferenceTypes ReferenceType; // defines which object is used as a reference when selecting target
847 SpellTargetSelectionCategories SelectionCategory;
848 SpellTargetCheckTypes SelectionCheckType; // defines selection criteria
849 SpellTargetDirectionTypes DirectionType; // direction for cone and dest targets
850 };
851
852 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
853};
854
855class SpellEffectInfo
856{
857 SpellInfo const* _spellInfo;
859public:
864 float RealPointsPerLevel;
867 float ValueMultiplier;
868 float DamageMultiplier;
869 float BonusMultiplier;
880 std::list<Condition*>* ImplicitTargetConditions;
881
886 SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
887
888 bool IsEffect() const;
889 bool IsEffect(SpellEffects effectName) const;
890 bool IsAura() const;
891 bool IsAura(AuraType aura) const;
892 bool IsTargetingArea() const;
893 bool IsAreaAuraEffect() const;
894 bool IsFarUnitTargetEffect() const;
895 bool IsFarDestTargetEffect() const;
896 bool IsUnitOwnedAuraEffect() const;
897
898 int32 CalcValue(Unit const* caster = nullptr, int32 const* basePoints = nullptr, Unit const* target = nullptr) const;
899 int32 CalcBaseValue(int32 value) const;
900 float CalcValueMultiplier(Unit* caster, Spell* spell = nullptr) const;
901 float CalcDamageMultiplier(Unit* caster, Spell* spell = nullptr) const;
902
903 bool HasRadius() const;
904 float CalcRadius(Unit* caster = nullptr, Spell* = nullptr) const;
905
907 uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
908
911
912private:
913 struct StaticData
914 {
915 SpellEffectImplicitTargetTypes ImplicitTargetType; // defines what target can be added to effect target list if there's no valid target type provided for effect
916 SpellTargetObjectTypes UsedTargetObjectType; // defines valid target object type for spell effect
917 };
918
919 static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
920};
921
923{
924friend class SpellMgr;
925
926public:
927 uint32 Id;
928 SpellCategoryEntry const* CategoryEntry;
929 uint32 Dispel;
930 uint32 Mechanic;
931 uint32 Attributes;
932 uint32 AttributesEx;
933 uint32 AttributesEx2;
934 uint32 AttributesEx3;
935 uint32 AttributesEx4;
936 uint32 AttributesEx5;
937 uint32 AttributesEx6;
938 uint32 AttributesEx7;
939 uint32 AttributesCu;
940 uint32 Stances;
941 uint32 StancesNot;
943 uint32 TargetCreatureType;
944 uint32 RequiresSpellFocus;
945 uint32 FacingCasterFlags;
946 uint32 CasterAuraState;
947 uint32 TargetAuraState;
948 uint32 CasterAuraStateNot;
949 uint32 TargetAuraStateNot;
950 uint32 CasterAuraSpell;
951 uint32 TargetAuraSpell;
952 uint32 ExcludeCasterAuraSpell;
953 uint32 ExcludeTargetAuraSpell;
954 SpellCastTimesEntry const* CastTimeEntry;
955 uint32 RecoveryTime;
956 uint32 CategoryRecoveryTime;
957 uint32 StartRecoveryCategory;
958 uint32 StartRecoveryTime;
959 uint32 InterruptFlags;
960 uint32 AuraInterruptFlags;
961 uint32 ChannelInterruptFlags;
963 uint32 ProcChance;
964 uint32 ProcCharges;
965 uint32 MaxLevel;
966 uint32 BaseLevel;
967 uint32 SpellLevel;
968 SpellDurationEntry const* DurationEntry;
970 uint32 ManaCost;
971 uint32 ManaCostPerlevel;
972 uint32 ManaPerSecond;
973 uint32 ManaPerSecondPerLevel;
974 uint32 ManaCostPercentage;
975 uint32 RuneCostID;
976 SpellRangeEntry const* RangeEntry;
977 float Speed;
978 uint32 StackAmount;
979 std::array<uint32, 2> Totem;
980 std::array<int32, MAX_SPELL_REAGENTS> Reagent;
981 std::array<uint32, MAX_SPELL_REAGENTS> ReagentCount;
982 int32 EquippedItemClass;
983 int32 EquippedItemSubClassMask;
984 int32 EquippedItemInventoryTypeMask;
985 std::array<uint32, 2> TotemCategory;
986 std::array<uint32, 2> SpellVisual;
987 uint32 SpellIconID;
988 uint32 ActiveIconID;
989 uint32 SpellPriority;
990 std::array<char const*, 16> SpellName;
991 std::array<char const*, 16> Rank;
992 uint32 MaxTargetLevel;
993 uint32 MaxAffectedTargets;
994 uint32 SpellFamilyName;
995 flag96 SpellFamilyFlags;
996 uint32 DmgClass;
997 uint32 PreventionType;
998 int32 AreaGroupId;
999 uint32 SchoolMask;
1000 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> Effects;
1001 uint32 ExplicitTargetMask;
1002 SpellChainNode const* ChainEntry;
1003
1004 // Mine
1005 AuraStateType _auraState;
1006 SpellSpecificType _spellSpecific;
1007 bool _isStackableWithRanks;
1008 bool _isSpellValid;
1009 bool _isCritCapable;
1010 bool _requireCooldownInfo;
1011
1012 SpellInfo(SpellEntry const* spellEntry);
1013 ~SpellInfo();
1014
1015 uint32 GetCategory() const;
1016 bool HasEffect(SpellEffects effect) const;
1017 bool HasEffectMechanic(Mechanics mechanic) const;
1018 bool HasAura(AuraType aura) const;
1019 bool HasAnyAura() const;
1020 bool HasAreaAuraEffect() const;
1021
1022 inline bool HasAttribute(SpellAttr0 attribute) const { return (Attributes & attribute) != 0; }
1023 inline bool HasAttribute(SpellAttr1 attribute) const { return (AttributesEx & attribute) != 0; }
1024 inline bool HasAttribute(SpellAttr2 attribute) const { return (AttributesEx2 & attribute) != 0; }
1025 inline bool HasAttribute(SpellAttr3 attribute) const { return (AttributesEx3 & attribute) != 0; }
1026 inline bool HasAttribute(SpellAttr4 attribute) const { return (AttributesEx4 & attribute) != 0; }
1027 inline bool HasAttribute(SpellAttr5 attribute) const { return (AttributesEx5 & attribute) != 0; }
1028 inline bool HasAttribute(SpellAttr6 attribute) const { return (AttributesEx6 & attribute) != 0; }
1029 inline bool HasAttribute(SpellAttr7 attribute) const { return (AttributesEx7 & attribute) != 0; }
1030 inline bool HasAttribute(SpellCustomAttributes customAttribute) const { return (AttributesCu & customAttribute) != 0; }
1031
1032 bool IsExplicitDiscovery() const;
1033 bool IsLootCrafting() const;
1034 bool IsQuestTame() const;
1035 bool IsProfessionOrRiding() const;
1036 bool IsProfession() const;
1037 bool IsPrimaryProfession() const;
1038 bool IsPrimaryProfessionFirstRank() const;
1039 bool IsAbilityLearnedWithProfession() const;
1040 bool IsAbilityOfSkillType(uint32 skillType) const;
1041
1042 bool IsAffectingArea() const;
1043 bool IsTargetingArea() const;
1044 bool NeedsExplicitUnitTarget() const;
1045 bool NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell, uint8 effIndex = MAX_SPELL_EFFECTS) const;
1046 bool IsChannelCategorySpell() const;
1047 bool IsSelfCast() const;
1048
1049 bool IsPassive() const;
1050 bool IsAutocastable() const;
1051 bool ComputeIsCritCapable() const;
1052 bool IsCritCapable() const;
1053 bool RequireCooldownInfo() const;
1054 void SetCritCapable(bool val);
1055 bool ComputeIsStackableWithRanks() const;
1056 bool IsStackableWithRanks() const;
1057 void SetStackableWithRanks(bool val);
1058 bool IsSpellValid() const;
1059 void SetSpellValid(bool val);
1060 bool IsPassiveStackableWithRanks() const;
1061 bool IsMultiSlotAura() const;
1062 bool IsCooldownStartedOnEvent() const;
1063 bool IsDeathPersistent() const;
1064 bool IsRequiringDeadTarget() const;
1065 bool IsAllowingDeadTarget() const;
1066 bool CanBeUsedInCombat() const;
1067 bool IsPositive() const;
1068 bool IsPositiveEffect(uint8 effIndex) const;
1069 bool IsChanneled() const;
1070 [[nodiscard]] bool IsActionAllowedChannel() const;
1071 bool NeedsComboPoints() const;
1072 bool IsBreakingStealth() const;
1073 bool IsRangedWeaponSpell() const;
1074 bool IsAutoRepeatRangedSpell() const;
1075
1076 bool IsAffectedBySpellMods() const;
1077 bool IsAffectedBySpellMod(SpellModifier const* mod) const;
1078
1079 bool CanPierceImmuneAura(SpellInfo const* aura) const;
1080 bool CanDispelAura(SpellInfo const* aura) const;
1081
1082 bool IsSingleTarget() const;
1083 bool IsAuraExclusiveBySpecificWith(SpellInfo const* spellInfo) const;
1084 bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const* spellInfo) const;
1085
1086 SpellCastResult CheckShapeshift(uint32 form) const;
1087 SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player* player = nullptr, bool strict = true) const;
1088 SpellCastResult CheckTarget(Unit const* caster, WorldObject const* target, bool implicit = true) const;
1089 SpellCastResult CheckExplicitTarget(Unit const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const;
1090 bool CheckTargetCreatureType(Unit const* target) const;
1091
1092 // xinef: aura stacking
1093 bool IsStrongerAuraActive(Unit const* caster, Unit const* target) const;
1094 bool IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const;
1095 bool ValidateAttribute6SpellDamageMods(Unit const* caster, const AuraEffect* auraEffect, bool isDot) const;
1096
1097 SpellSchoolMask GetSchoolMask() const;
1098 uint32 GetAllEffectsMechanicMask() const;
1099 uint32 GetEffectMechanicMask(uint8 effIndex) const;
1100 uint32 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const;
1101 Mechanics GetEffectMechanic(uint8 effIndex) const;
1102 bool HasAnyEffectMechanic() const;
1103 uint32 GetDispelMask() const;
1104 static uint32 GetDispelMask(DispelType type);
1105 uint32 GetExplicitTargetMask() const;
1106
1107 AuraStateType GetAuraState() const;
1108 SpellSpecificType GetSpellSpecific() const;
1109
1110 float GetMinRange(bool positive = false) const;
1111 float GetMaxRange(bool positive = false, Unit* caster = nullptr, Spell* spell = nullptr) const;
1112
1113 int32 GetDuration() const;
1114 int32 GetMaxDuration() const;
1115
1116 uint32 GetMaxTicks() const;
1117
1118 uint32 CalcCastTime(Unit* caster = nullptr, Spell* spell = nullptr) const;
1119 uint32 GetRecoveryTime() const;
1120
1121 int32 CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
1122
1123 bool IsRanked() const;
1124 uint8 GetRank() const;
1125 SpellInfo const* GetFirstRankSpell() const;
1126 SpellInfo const* GetLastRankSpell() const;
1127 SpellInfo const* GetNextRankSpell() const;
1128 SpellInfo const* GetPrevRankSpell() const;
1129 SpellInfo const* GetAuraRankForLevel(uint8 level) const;
1130 bool IsRankOf(SpellInfo const* spellInfo) const;
1131 bool IsDifferentRankOf(SpellInfo const* spellInfo) const;
1132 bool IsHighRankOf(SpellInfo const* spellInfo) const;
1133
1134 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& GetEffects() const { return Effects; }
1135 SpellEffectInfo const& GetEffect(SpellEffIndex index) const { ASSERT(index < Effects.size()); return Effects[index]; }
1136
1137 // loading helpers
1138 void _InitializeExplicitTargetMask();
1139 bool _IsPositiveEffect(uint8 effIndex, bool deep) const;
1140 bool _IsPositiveSpell() const;
1141 static bool _IsPositiveTarget(uint32 targetA, uint32 targetB);
1142
1143 AuraStateType LoadAuraState() const;
1144 SpellSpecificType LoadSpellSpecific() const;
1145
1146 // unloading helpers
1147 void _UnloadImplicitTargetConditionLists();
1148
1149 bool CheckElixirStacking(Unit const* caster) const;
1150
1151private:
1152 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
1153 SpellEffectInfo& _GetEffect(SpellEffIndex index) { ASSERT(index < Effects.size()); return Effects[index]; }
1154};
1155
1156#endif // _SPELLINFO_H
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1636
#define AC_GAME_API
Definition Define.h:94
#define ASSERT
Definition Errors.h:68
SpellEffIndex
Definition SharedDefines.h:30
SpellAttr7
Definition SharedDefines.h:640
SpellEffects
Definition SharedDefines.h:778
SpellAttr5
Definition SharedDefines.h:566
Targets
Definition SharedDefines.h:1409
SpellAttr2
Definition SharedDefines.h:455
SpellAttr1
Definition SharedDefines.h:418
SpellAttr3
Definition SharedDefines.h:492
SpellAttr0
Definition SharedDefines.h:381
TotemCategory
Definition SharedDefines.h:3083
AuraStateType
Definition SharedDefines.h:1288
DispelType
Definition SharedDefines.h:1371
SpellCastResult
Definition SharedDefines.h:948
SpellAttr4
Definition SharedDefines.h:529
SpellAttr6
Definition SharedDefines.h:603
SpellSchoolMask
Definition SharedDefines.h:295
AuraType
Definition SpellAuraDefines.h:62
SpellEffectImplicitTargetTypes
Definition SpellInfo.h:141
@ EFFECT_IMPLICIT_TARGET_CASTER
Definition SpellInfo.h:144
@ EFFECT_IMPLICIT_TARGET_NONE
Definition SpellInfo.h:142
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:143
SpellTargetSelectionCategories
Definition SpellInfo.h:76
@ TARGET_SELECT_CATEGORY_CONE
Definition SpellInfo.h:81
@ TARGET_SELECT_CATEGORY_AREA
Definition SpellInfo.h:82
@ TARGET_SELECT_CATEGORY_DEFAULT
Definition SpellInfo.h:78
@ TARGET_SELECT_CATEGORY_NEARBY
Definition SpellInfo.h:80
@ TARGET_SELECT_CATEGORY_NYI
Definition SpellInfo.h:77
@ TARGET_SELECT_CATEGORY_TRAJ
Definition SpellInfo.h:83
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition SpellInfo.h:79
SpellTargetCheckTypes
Definition SpellInfo.h:113
@ TARGET_CHECK_CORPSE
Definition SpellInfo.h:122
@ TARGET_CHECK_PASSENGER
Definition SpellInfo.h:121
@ TARGET_CHECK_PARTY
Definition SpellInfo.h:118
@ TARGET_CHECK_ENEMY
Definition SpellInfo.h:116
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:114
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:115
@ TARGET_CHECK_RAID_CLASS
Definition SpellInfo.h:120
@ TARGET_CHECK_ALLY
Definition SpellInfo.h:117
@ TARGET_CHECK_RAID
Definition SpellInfo.h:119
@ TARGET_FLAG_TRADE_ITEM
Definition SpellInfo.h:58
@ TARGET_FLAG_STRING
Definition SpellInfo.h:59
@ TARGET_FLAG_NONE
Definition SpellInfo.h:45
@ TARGET_FLAG_UNIT_RAID
Definition SpellInfo.h:48
@ TARGET_FLAG_UNIT_ENEMY
Definition SpellInfo.h:53
@ TARGET_FLAG_GLYPH_SLOT
Definition SpellInfo.h:63
@ TARGET_FLAG_CORPSE_ALLY
Definition SpellInfo.h:61
@ TARGET_FLAG_UNIT_MINIPET
Definition SpellInfo.h:62
@ TARGET_FLAG_UNIT_PASSENGER
Definition SpellInfo.h:66
@ TARGET_FLAG_UNUSED20
Definition SpellInfo.h:65
@ TARGET_FLAG_UNIT_ALLY
Definition SpellInfo.h:54
@ TARGET_FLAG_ITEM_MASK
Definition SpellInfo.h:72
@ TARGET_FLAG_UNUSED_1
Definition SpellInfo.h:46
@ TARGET_FLAG_UNIT
Definition SpellInfo.h:47
@ TARGET_FLAG_DEST_TARGET
Definition SpellInfo.h:64
@ TARGET_FLAG_UNIT_DEAD
Definition SpellInfo.h:56
@ TARGET_FLAG_CORPSE_ENEMY
Definition SpellInfo.h:55
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition SpellInfo.h:70
@ TARGET_FLAG_UNIT_PARTY
Definition SpellInfo.h:49
SpellTargetDirectionTypes
Definition SpellInfo.h:126
@ TARGET_DIR_FRONT_RIGHT
Definition SpellInfo.h:132
@ TARGET_DIR_NONE
Definition SpellInfo.h:127
@ TARGET_DIR_BACK
Definition SpellInfo.h:129
@ TARGET_DIR_BACK_RIGHT
Definition SpellInfo.h:133
@ TARGET_DIR_RIGHT
Definition SpellInfo.h:130
@ TARGET_DIR_FRONT_LEFT
Definition SpellInfo.h:135
@ TARGET_DIR_FRONT
Definition SpellInfo.h:128
@ TARGET_DIR_LEFT
Definition SpellInfo.h:131
@ TARGET_DIR_ENTRY
Definition SpellInfo.h:137
@ TARGET_DIR_BACK_LEFT
Definition SpellInfo.h:134
@ TARGET_DIR_RANDOM
Definition SpellInfo.h:136
SpellCustomAttributes
Definition SpellInfo.h:175
@ SPELL_ATTR0_CU_IGNORE_ARMOR
Definition SpellInfo.h:191
@ SPELL_ATTR0_CU_POSITIVE_EFF2
Definition SpellInfo.h:203
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
Definition SpellInfo.h:192
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:194
@ SPELL_ATTR0_CU_ENCHANT_PROC
Definition SpellInfo.h:176
@ SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS
Definition SpellInfo.h:197
@ SPELL_ATTR0_CU_FORCE_SEND_CATEGORY_COOLDOWNS
Definition SpellInfo.h:204
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
Definition SpellInfo.h:184
@ SPELL_ATTR0_CU_POSITIVE
Definition SpellInfo.h:211
@ SPELL_ATTR0_CU_FORCE_AURA_SAVING
Definition SpellInfo.h:205
@ SPELL_ATTR0_CU_NO_PVP_FLAG
Definition SpellInfo.h:183
@ SPELL_ATTR0_CU_DONT_BREAK_STEALTH
Definition SpellInfo.h:182
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
Definition SpellInfo.h:193
@ SPELL_ATTR0_CU_CONE_BACK
Definition SpellInfo.h:177
@ SPELL_ATTR0_CU_SINGLE_AURA_STACK
Definition SpellInfo.h:198
@ SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED
Definition SpellInfo.h:200
@ SPELL_ATTR0_CU_NEGATIVE_EFF2
Definition SpellInfo.h:190
@ SPELL_ATTR0_CU_AURA_CC
Definition SpellInfo.h:181
@ SPELL_ATTR0_CU_NEGATIVE_EFF1
Definition SpellInfo.h:189
@ SPELL_ATTR0_CU_CHARGE
Definition SpellInfo.h:185
@ SPELL_ATTR0_CU_NEGATIVE
Definition SpellInfo.h:210
@ SPELL_ATTR0_CU_NEEDS_AMMO_DATA
Definition SpellInfo.h:195
@ SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY
Definition SpellInfo.h:208
@ SPELL_ATTR0_CU_POSITIVE_EFF0
Definition SpellInfo.h:201
@ SPELL_ATTR0_CU_NEGATIVE_EFF0
Definition SpellInfo.h:188
@ SPELL_ATTR0_CU_POSITIVE_EFF1
Definition SpellInfo.h:202
@ SPELL_ATTR0_CU_BINARY_SPELL
Definition SpellInfo.h:196
@ SPELL_ATTR0_CU_SHARE_DAMAGE
Definition SpellInfo.h:179
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
Definition SpellInfo.h:199
@ SPELL_ATTR0_CU_IGNORE_EVADE
Definition SpellInfo.h:187
@ SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA
Definition SpellInfo.h:206
@ SPELL_ATTR0_CU_ENCOUNTER_REWARD
Definition SpellInfo.h:207
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:186
@ SPELL_ATTR0_CU_CONE_LINE
Definition SpellInfo.h:178
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
Definition SpellInfo.h:180
SpellSpecificType
Definition SpellInfo.h:149
@ SPELL_SPECIFIC_FOOD
Definition SpellInfo.h:163
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition SpellInfo.h:158
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:150
@ SPELL_SPECIFIC_STING
Definition SpellInfo.h:153
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition SpellInfo.h:169
@ SPELL_SPECIFIC_ASPECT
Definition SpellInfo.h:155
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition SpellInfo.h:170
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition SpellInfo.h:159
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
Definition SpellInfo.h:162
@ SPELL_SPECIFIC_PRESENCE
Definition SpellInfo.h:166
@ SPELL_SPECIFIC_CURSE
Definition SpellInfo.h:154
@ SPELL_SPECIFIC_JUDGEMENT
Definition SpellInfo.h:161
@ SPELL_SPECIFIC_DRINK
Definition SpellInfo.h:164
@ SPELL_SPECIFIC_HAND
Definition SpellInfo.h:171
@ SPELL_SPECIFIC_AURA
Definition SpellInfo.h:152
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition SpellInfo.h:157
@ SPELL_SPECIFIC_SCROLL
Definition SpellInfo.h:168
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition SpellInfo.h:160
@ SPELL_SPECIFIC_TRACKER
Definition SpellInfo.h:156
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:151
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition SpellInfo.h:165
@ SPELL_SPECIFIC_CHARM
Definition SpellInfo.h:167
SpellTargetObjectTypes
Definition SpellInfo.h:97
@ TARGET_OBJECT_TYPE_UNIT
Definition SpellInfo.h:101
@ TARGET_OBJECT_TYPE_ITEM
Definition SpellInfo.h:105
@ TARGET_OBJECT_TYPE_CORPSE
Definition SpellInfo.h:106
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
Definition SpellInfo.h:102
@ TARGET_OBJECT_TYPE_NONE
Definition SpellInfo.h:98
@ TARGET_OBJECT_TYPE_DEST
Definition SpellInfo.h:100
@ TARGET_OBJECT_TYPE_GOBJ
Definition SpellInfo.h:103
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
Definition SpellInfo.h:109
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
Definition SpellInfo.h:108
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
Definition SpellInfo.h:104
@ TARGET_OBJECT_TYPE_SRC
Definition SpellInfo.h:99
SpellTargetReferenceTypes
Definition SpellInfo.h:87
@ TARGET_REFERENCE_TYPE_SRC
Definition SpellInfo.h:92
@ TARGET_REFERENCE_TYPE_TARGET
Definition SpellInfo.h:90
@ TARGET_REFERENCE_TYPE_LAST
Definition SpellInfo.h:91
@ TARGET_REFERENCE_TYPE_NONE
Definition SpellInfo.h:88
@ TARGET_REFERENCE_TYPE_CASTER
Definition SpellInfo.h:89
@ TARGET_REFERENCE_TYPE_DEST
Definition SpellInfo.h:93
ProcFlags
Definition SpellMgr.h:104
PowerType
Definition VehicleDefines.h:29
Definition SpellAuraEffects.h:39
Definition Item.h:220
Definition SpellInfo.h:249
float CalcDamageMultiplier(Unit *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:539
float CalcRadius(Unit *caster=nullptr, Spell *=nullptr) const
Definition SpellInfo.cpp:552
int32 CalcValue(Unit const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
Definition SpellInfo.cpp:409
uint32 GetMissingTargetMask(bool srcSet=false, bool destSet=false, uint32 mask=0) const
Definition SpellInfo.cpp:574
bool IsFarUnitTargetEffect() const
Definition SpellInfo.cpp:390
bool IsEffect() const
Definition SpellInfo.cpp:353
bool IsTargetingArea() const
Definition SpellInfo.cpp:373
bool IsFarDestTargetEffect() const
Definition SpellInfo.cpp:399
SpellEffectImplicitTargetTypes GetImplicitTargetType() const
Definition SpellInfo.cpp:598
SpellEffectInfo()
Definition SpellInfo.h:275
float CalcValueMultiplier(Unit *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:531
uint32 GetProvidedTargetMask() const
Definition SpellInfo.cpp:569
int32 CalcBaseValue(int32 value) const
Definition SpellInfo.cpp:523
Definition SpellInfo.h:316
Definition SpellMgr.h:640
Definition Spell.h:287
Definition Totem.h:51
Definition Unit.h:636
Definition Object.h:410
Definition Util.h:451
Definition DBCStructure.h:1757
Definition DBCStructure.h:1765
Definition SpellMgr.h:554
Definition DBCStructure.h:1832
SpellTargetObjectTypes UsedTargetObjectType
Definition SpellInfo.h:309
SpellEffectImplicitTargetTypes ImplicitTargetType
Definition SpellInfo.h:308
Definition DBCStructure.h:1641
Definition Player.h:181
Definition DBCStructure.h:1784
Definition DBCStructure.h:1792
Definition System.cpp:62

Referenced by GetImplicitTargetType(), and GetUsedTargetObjectType().

◆ _effIndex

uint8 SpellEffectInfo::_effIndex
private

Referenced by CalcValue(), and SpellEffectInfo().

◆ _spellInfo

SpellInfo const* SpellEffectInfo::_spellInfo
private

◆ Amplitude

uint32 SpellEffectInfo::Amplitude

Referenced by SpellEffectInfo().

◆ ApplyAuraName

uint32 SpellEffectInfo::ApplyAuraName

◆ BasePoints

int32 SpellEffectInfo::BasePoints

Referenced by CalcValue(), and SpellEffectInfo().

◆ BonusMultiplier

float SpellEffectInfo::BonusMultiplier

Referenced by SpellEffectInfo().

◆ ChainTarget

uint32 SpellEffectInfo::ChainTarget

Referenced by SpellEffectInfo().

◆ DamageMultiplier

float SpellEffectInfo::DamageMultiplier

◆ DieSides

int32 SpellEffectInfo::DieSides

◆ Effect

◆ ImplicitTargetConditions

std::list<Condition*>* SpellEffectInfo::ImplicitTargetConditions

Referenced by SpellEffectInfo().

◆ ItemType

uint32 SpellEffectInfo::ItemType

Referenced by SpellEffectInfo().

◆ Mechanic

Mechanics SpellEffectInfo::Mechanic

Referenced by SpellEffectInfo().

◆ MiscValue

int32 SpellEffectInfo::MiscValue

◆ MiscValueB

int32 SpellEffectInfo::MiscValueB

Referenced by SpellEffectInfo().

◆ PointsPerComboPoint

float SpellEffectInfo::PointsPerComboPoint

Referenced by CalcValue(), and SpellEffectInfo().

◆ RadiusEntry

SpellRadiusEntry const* SpellEffectInfo::RadiusEntry

◆ RealPointsPerLevel

float SpellEffectInfo::RealPointsPerLevel

Referenced by CalcValue(), and SpellEffectInfo().

◆ SpellClassMask

flag96 SpellEffectInfo::SpellClassMask

Referenced by SpellEffectInfo().

◆ TargetA

◆ TargetB

◆ TriggerSpell

uint32 SpellEffectInfo::TriggerSpell

Referenced by SpellEffectInfo().

◆ ValueMultiplier

float SpellEffectInfo::ValueMultiplier

The documentation for this class was generated from the following files: