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
 
ImmunityInfo const * GetImmunityInfo () const
 

Public Attributes

uint8 EffectIndex
 
uint32 Effect
 
AuraType 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
 

Static Private Attributes

static std::array< StaticData, TOTAL_SPELL_EFFECTS_data
 

Detailed Description

Constructor & Destructor Documentation

◆ SpellEffectInfo() [1/2]

SpellEffectInfo::SpellEffectInfo ( )
inline
@ MECHANIC_NONE
Definition SharedDefines.h:1313
@ SPELL_AURA_NONE
Definition SpellAuraDefines.h:63
Mechanics Mechanic
Definition SpellInfo.h:286
float BonusMultiplier
Definition SpellInfo.h:283
float ValueMultiplier
Definition SpellInfo.h:281
float PointsPerComboPoint
Definition SpellInfo.h:280
AuraType ApplyAuraName
Definition SpellInfo.h:275
int32 MiscValueB
Definition SpellInfo.h:285
std::list< Condition * > * ImplicitTargetConditions
Definition SpellInfo.h:294
uint32 TriggerSpell
Definition SpellInfo.h:292
float DamageMultiplier
Definition SpellInfo.h:282
uint32 Effect
Definition SpellInfo.h:274
uint8 EffectIndex
Definition SpellInfo.h:273
SpellInfo const * _spellInfo
Definition SpellInfo.h:271
int32 MiscValue
Definition SpellInfo.h:284
int32 BasePoints
Definition SpellInfo.h:279
uint32 ChainTarget
Definition SpellInfo.h:290
float RealPointsPerLevel
Definition SpellInfo.h:278
uint32 ItemType
Definition SpellInfo.h:291
int32 DieSides
Definition SpellInfo.h:277
SpellRadiusEntry const * RadiusEntry
Definition SpellInfo.h:289
uint32 Amplitude
Definition SpellInfo.h:276

◆ SpellEffectInfo() [2/2]

SpellEffectInfo::SpellEffectInfo ( SpellEntry const *  spellEntry,
SpellInfo const *  spellInfo,
uint8  effIndex 
)
327{
328 _spellInfo = spellInfo;
329 EffectIndex = effIndex;
330 Effect = spellEntry->Effect[effIndex];
331 ApplyAuraName = AuraType(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:1312
AuraType
Definition SpellAuraDefines.h:62
flag96 SpellClassMask
Definition SpellInfo.h:293
SpellImplicitTargetInfo TargetA
Definition SpellInfo.h:287
SpellImplicitTargetInfo TargetB
Definition SpellInfo.h:288
Definition SpellInfo.h:238

References _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, EffectIndex, 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:1084
Player * GetSpellModOwner() const
Definition Unit.cpp:12925

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:344
uint8 GetLevel() const
Definition Unit.h:1103
float RadiusPerLevel
Definition DBCStructure.h:1788
float RadiusMax
Definition DBCStructure.h:1789
float RadiusMin
Definition DBCStructure.h:1787

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, EffectIndex, 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:1712
int32 irand(int32 min, int32 max)
Definition Random.cpp:37
@ SPELL_EFFECT_DUMMY
Definition SharedDefines.h:769
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition SharedDefines.h:843
@ SPELL_EFFECT_POWER_BURN
Definition SharedDefines.h:828
@ SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE
Definition SharedDefines.h:914
@ SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE
Definition SharedDefines.h:908
@ SPELL_EFFECT_HEALTH_LEECH
Definition SharedDefines.h:775
@ SPELL_EFFECT_WEAPON_DAMAGE
Definition SharedDefines.h:824
@ SPELL_EFFECT_HEAL
Definition SharedDefines.h:776
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
Definition SharedDefines.h:887
@ SPELL_EFFECT_POWER_DRAIN
Definition SharedDefines.h:774
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition SharedDefines.h:768
@ SPELL_EFFECT_FORCE_CAST_WITH_VALUE
Definition SharedDefines.h:907
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
Definition SharedDefines.h:389
@ 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:836
uint32 BaseLevel
Definition SpellInfo.h:383
uint32 MaxLevel
Definition SpellInfo.h:382
uint32 SpellLevel
Definition SpellInfo.h:384
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:441
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition SpellInfo.h:417
Definition CreatureData.h:298
float BaseDamage[MAX_EXPANSIONS]
Definition CreatureData.h:304
Definition CreatureData.h:187
uint32 expansion
Definition CreatureData.h:198

References _spellInfo, ApplyAuraName, Unit::ApplyEffectModifiers(), CreatureBaseStats::BaseDamage, SpellInfo::BaseLevel, BasePoints, DieSides, Effect, EffectIndex, 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 SpellInfo::_LoadImmunityInfo(), spell_dragonblight_corrosive_spit::AfterApply(), spell_dragonblight_corrosive_spit::PeriodicTick(), spell_lich_king_whisper::Validate(), spell_dragonblight_corrosive_spit::Validate(), spell_the_cleansing_on_death_cast_on_master::Validate(), and spell_gen_whisper_to_controller::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.

◆ GetImmunityInfo()

ImmunityInfo const * SpellEffectInfo::GetImmunityInfo ( ) const
609{
610 if (!_spellInfo)
611 return nullptr;
612
614}
ImmunityInfo const * GetImmunityInfo(uint8 effIndex) const
Definition SpellInfo.h:527

References _spellInfo, EffectIndex, and SpellInfo::GetImmunityInfo().

◆ GetImplicitTargetType()

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

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:58
@ TARGET_FLAG_ITEM
Definition SpellInfo.h:51
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition SpellInfo.h:61
@ TARGET_FLAG_DEST_LOCATION
Definition SpellInfo.h:53
@ TARGET_FLAG_SOURCE_LOCATION
Definition SpellInfo.h:52
@ TARGET_FLAG_UNIT_MASK
Definition SpellInfo.h:69
@ TARGET_FLAG_CORPSE_MASK
Definition SpellInfo.h:72
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:801
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition SharedDefines.h:894
@ SPELL_EFFECT_APPLY_AREA_AURA_PET
Definition SharedDefines.h:885
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
Definition SharedDefines.h:831
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition SharedDefines.h:895
@ SPELL_EFFECT_APPLY_AREA_AURA_OWNER
Definition SharedDefines.h:909

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:793
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:771

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:918
@ SPELL_EFFECT_SUMMON_PLAYER
Definition SharedDefines.h:851
@ SPELL_EFFECT_RESURRECT
Definition SharedDefines.h:784
@ SPELL_EFFECT_RESURRECT_NEW
Definition SharedDefines.h:879

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:772
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
660{
661 TARGET_FLAG_NONE = 0x00000000,
662 TARGET_FLAG_UNUSED_1 = 0x00000001, // not used
663 TARGET_FLAG_UNIT = 0x00000002, // pguid
664 TARGET_FLAG_UNIT_RAID = 0x00000004, // not sent, used to validate target (if raid member)
665 TARGET_FLAG_UNIT_PARTY = 0x00000008, // not sent, used to validate target (if party member)
666 TARGET_FLAG_ITEM = 0x00000010, // pguid
667 TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // pguid, 3 float
668 TARGET_FLAG_DEST_LOCATION = 0x00000040, // pguid, 3 float
669 TARGET_FLAG_UNIT_ENEMY = 0x00000080, // not sent, used to validate target (if enemy)
670 TARGET_FLAG_UNIT_ALLY = 0x00000100, // not sent, used to validate target (if ally)
671 TARGET_FLAG_CORPSE_ENEMY = 0x00000200, // pguid
672 TARGET_FLAG_UNIT_DEAD = 0x00000400, // not sent, used to validate target (if dead creature)
673 TARGET_FLAG_GAMEOBJECT = 0x00000800, // pguid, used with TARGET_GAMEOBJECT_TARGET
674 TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid
675 TARGET_FLAG_STRING = 0x00002000, // string
676 TARGET_FLAG_GAMEOBJECT_ITEM = 0x00004000, // not sent, used with TARGET_GAMEOBJECT_ITEM_TARGET
677 TARGET_FLAG_CORPSE_ALLY = 0x00008000, // pguid
678 TARGET_FLAG_UNIT_MINIPET = 0x00010000, // pguid, used to validate target (if non combat pet)
679 TARGET_FLAG_GLYPH_SLOT = 0x00020000, // used in glyph spells
680 TARGET_FLAG_DEST_TARGET = 0x00040000, // sometimes appears with DEST_TARGET spells (may appear or not for a given spell)
681 TARGET_FLAG_UNUSED20 = 0x00080000, // uint32 counter, loop { vec3 - screen position (?), guid }, not used so far
682 TARGET_FLAG_UNIT_PASSENGER = 0x00100000, // guessed, used to validate target (if vehicle passenger)
683
689};
690
692{
700};
701
703{
710};
711
713{
723 // only for effect target type
726};
727
729{
739};
740
742{
754};
755
757{
761};
762
763// Spell clasification
765{
788};
789
791{
792 SPELL_ATTR0_CU_ENCHANT_PROC = 0x00000001,
793 SPELL_ATTR0_CU_CONE_BACK = 0x00000002,
794 SPELL_ATTR0_CU_CONE_LINE = 0x00000004,
795 SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
797 SPELL_ATTR0_CU_AURA_CC = 0x00000020,
799 SPELL_ATTR0_CU_NO_PVP_FLAG = 0x00000080,
800 SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
801 SPELL_ATTR0_CU_CHARGE = 0x00000200,
802 SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,
803 SPELL_ATTR0_CU_IGNORE_EVADE = 0x00000800,
804 SPELL_ATTR0_CU_NEGATIVE_EFF0 = 0x00001000,
805 SPELL_ATTR0_CU_NEGATIVE_EFF1 = 0x00002000,
806 SPELL_ATTR0_CU_NEGATIVE_EFF2 = 0x00004000,
807 SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
812 SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
817 SPELL_ATTR0_CU_POSITIVE_EFF0 = 0x02000000,
818 SPELL_ATTR0_CU_POSITIVE_EFF1 = 0x04000000,
819 SPELL_ATTR0_CU_POSITIVE_EFF2 = 0x08000000,
825
828};
829
831
833{
834 DiminishingGroup DiminishGroup = DIMINISHING_NONE;
835 DiminishingReturnsType DiminishReturnType = DRTYPE_NONE;
836 int32 DiminishMaxLevel = 3; // DIMINISHING_LEVEL_IMMUNE
837 int32 DiminishDurationLimit = 0;
838};
839
841{
842 uint32 SchoolImmuneMask = 0;
843 uint32 ApplyHarmfulAuraImmuneMask = 0;
844 uint64 MechanicImmuneMask = 0;
845 uint32 DispelImmuneMask = 0;
846 uint32 DamageSchoolMask = 0;
847
848 boost::container::flat_set<AuraType> AuraTypeImmune;
849 boost::container::flat_set<SpellEffects> SpellEffectImmune;
850};
851
853{
854private:
855 Targets _target;
856public:
857 SpellImplicitTargetInfo() : _target(Targets(0)) {}
859
860 bool IsArea() const;
861 SpellTargetSelectionCategories GetSelectionCategory() const;
862 SpellTargetReferenceTypes GetReferenceType() const;
863 SpellTargetObjectTypes GetObjectType() const;
864 SpellTargetCheckTypes GetCheckType() const;
865 SpellTargetDirectionTypes GetDirectionType() const;
866 float CalcDirectionAngle() const;
867
868 Targets GetTarget() const;
869 uint32 GetExplicitTargetMask(bool& srcSet, bool& dstSet) const;
870
871private:
872 struct StaticData
873 {
874 SpellTargetObjectTypes ObjectType; // type of object returned by target type
875 SpellTargetReferenceTypes ReferenceType; // defines which object is used as a reference when selecting target
876 SpellTargetSelectionCategories SelectionCategory;
877 SpellTargetCheckTypes SelectionCheckType; // defines selection criteria
878 SpellTargetDirectionTypes DirectionType; // direction for cone and dest targets
879 };
880
881 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
882};
883
884class SpellEffectInfo
885{
886 SpellInfo const* _spellInfo;
887public:
893 float RealPointsPerLevel;
896 float ValueMultiplier;
897 float DamageMultiplier;
898 float BonusMultiplier;
909 std::list<Condition*>* ImplicitTargetConditions;
910
915 SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
916
917 bool IsEffect() const;
918 bool IsEffect(SpellEffects effectName) const;
919 bool IsAura() const;
920 bool IsAura(AuraType aura) const;
921 bool IsTargetingArea() const;
922 bool IsAreaAuraEffect() const;
923 bool IsFarUnitTargetEffect() const;
924 bool IsFarDestTargetEffect() const;
925 bool IsUnitOwnedAuraEffect() const;
926
927 int32 CalcValue(Unit const* caster = nullptr, int32 const* basePoints = nullptr, Unit const* target = nullptr) const;
928 int32 CalcBaseValue(int32 value) const;
929 float CalcValueMultiplier(Unit* caster, Spell* spell = nullptr) const;
930 float CalcDamageMultiplier(Unit* caster, Spell* spell = nullptr) const;
931
932 bool HasRadius() const;
933 float CalcRadius(Unit* caster = nullptr, Spell* = nullptr) const;
934
936 uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
937
940
941 [[nodiscard]] ImmunityInfo const* GetImmunityInfo() const;
942
943private:
944 struct StaticData
945 {
946 SpellEffectImplicitTargetTypes ImplicitTargetType; // defines what target can be added to effect target list if there's no valid target type provided for effect
947 SpellTargetObjectTypes UsedTargetObjectType; // defines valid target object type for spell effect
948 };
949
950 static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
951
952};
953
955{
956friend class SpellMgr;
957
958public:
959 uint32 Id;
960 SpellCategoryEntry const* CategoryEntry;
961 uint32 Dispel;
962 uint32 Mechanic;
963 uint32 Attributes;
964 uint32 AttributesEx;
965 uint32 AttributesEx2;
966 uint32 AttributesEx3;
967 uint32 AttributesEx4;
968 uint32 AttributesEx5;
969 uint32 AttributesEx6;
970 uint32 AttributesEx7;
971 uint32 AttributesCu;
972 uint32 Stances;
973 uint32 StancesNot;
975 uint32 TargetCreatureType;
976 uint32 RequiresSpellFocus;
977 uint32 FacingCasterFlags;
978 uint32 CasterAuraState;
979 uint32 TargetAuraState;
980 uint32 CasterAuraStateNot;
981 uint32 TargetAuraStateNot;
982 uint32 CasterAuraSpell;
983 uint32 TargetAuraSpell;
984 uint32 ExcludeCasterAuraSpell;
985 uint32 ExcludeTargetAuraSpell;
986 SpellCastTimesEntry const* CastTimeEntry;
987 uint32 RecoveryTime;
988 uint32 CategoryRecoveryTime;
989 uint32 StartRecoveryCategory;
990 uint32 StartRecoveryTime;
991 uint32 InterruptFlags;
992 uint32 AuraInterruptFlags;
993 uint32 ChannelInterruptFlags;
995 uint32 ProcChance;
996 uint32 ProcCharges;
997 uint32 MaxLevel;
998 uint32 BaseLevel;
999 uint32 SpellLevel;
1000 SpellDurationEntry const* DurationEntry;
1002 uint32 ManaCost;
1003 uint32 ManaCostPerlevel;
1004 uint32 ManaPerSecond;
1005 uint32 ManaPerSecondPerLevel;
1006 uint32 ManaCostPercentage;
1007 uint32 RuneCostID;
1008 SpellRangeEntry const* RangeEntry;
1009 float Speed;
1010 uint32 StackAmount;
1011 std::array<uint32, 2> Totem;
1012 std::array<int32, MAX_SPELL_REAGENTS> Reagent;
1013 std::array<uint32, MAX_SPELL_REAGENTS> ReagentCount;
1014 int32 EquippedItemClass;
1015 int32 EquippedItemSubClassMask;
1016 int32 EquippedItemInventoryTypeMask;
1017 std::array<uint32, 2> TotemCategory;
1018 std::array<uint32, 2> SpellVisual;
1019 uint32 SpellIconID;
1020 uint32 ActiveIconID;
1021 uint32 SpellPriority;
1022 std::array<char const*, 16> SpellName;
1023 std::array<char const*, 16> Rank;
1024 uint32 MaxTargetLevel;
1025 uint32 MaxAffectedTargets;
1026 uint32 SpellFamilyName;
1027 flag96 SpellFamilyFlags;
1028 uint32 DmgClass;
1029 uint32 PreventionType;
1030 int32 AreaGroupId;
1031 uint32 SchoolMask;
1032 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> Effects;
1033 uint32 ExplicitTargetMask;
1034 SpellChainNode const* ChainEntry;
1035
1036 // Mine
1037 AuraStateType _auraState;
1038 SpellSpecificType _spellSpecific;
1039 bool _isStackableWithRanks;
1040 bool _isSpellValid;
1041 bool _isCritCapable;
1042 bool _requireCooldownInfo;
1043 float JumpDistance;
1044
1045 SpellInfo(SpellEntry const* spellEntry);
1046 ~SpellInfo();
1047
1048 uint32 GetCategory() const;
1049 bool HasEffect(SpellEffects effect) const;
1050 bool HasEffectMechanic(Mechanics mechanic) const;
1051 bool HasAura(AuraType aura) const;
1052 bool HasAnyAura() const;
1053 bool HasAreaAuraEffect() const;
1054 bool HasOnlyDamageEffects() const;
1055
1056 inline bool HasAttribute(SpellAttr0 attribute) const { return (Attributes & attribute) != 0; }
1057 inline bool HasAttribute(SpellAttr1 attribute) const { return (AttributesEx & attribute) != 0; }
1058 inline bool HasAttribute(SpellAttr2 attribute) const { return (AttributesEx2 & attribute) != 0; }
1059 inline bool HasAttribute(SpellAttr3 attribute) const { return (AttributesEx3 & attribute) != 0; }
1060 inline bool HasAttribute(SpellAttr4 attribute) const { return (AttributesEx4 & attribute) != 0; }
1061 inline bool HasAttribute(SpellAttr5 attribute) const { return (AttributesEx5 & attribute) != 0; }
1062 inline bool HasAttribute(SpellAttr6 attribute) const { return (AttributesEx6 & attribute) != 0; }
1063 inline bool HasAttribute(SpellAttr7 attribute) const { return (AttributesEx7 & attribute) != 0; }
1064 inline bool HasAttribute(SpellCustomAttributes customAttribute) const { return (AttributesCu & customAttribute) != 0; }
1065
1066 bool IsExplicitDiscovery() const;
1067 bool IsLootCrafting() const;
1068 bool IsQuestTame() const;
1069 bool IsProfessionOrRiding() const;
1070 bool IsProfession() const;
1071 bool IsPrimaryProfession() const;
1072 bool IsPrimaryProfessionFirstRank() const;
1073 bool IsAbilityLearnedWithProfession() const;
1074 bool IsAbilityOfSkillType(uint32 skillType) const;
1075
1076 bool IsAffectingArea() const;
1077 bool IsTargetingArea() const;
1078 bool NeedsExplicitUnitTarget() const;
1079 bool NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell, uint8 effIndex = MAX_SPELL_EFFECTS) const;
1080 bool IsChannelCategorySpell() const;
1081 bool IsSelfCast() const;
1082
1083 bool IsPassive() const;
1084 bool IsAutocastable() const;
1085 bool ComputeIsCritCapable() const;
1086 bool IsCritCapable() const;
1087 bool RequireCooldownInfo() const;
1088 void SetCritCapable(bool val);
1089 bool ComputeIsStackableWithRanks() const;
1090 bool IsStackableWithRanks() const;
1091 void SetStackableWithRanks(bool val);
1092 bool IsSpellValid() const;
1093 void SetSpellValid(bool val);
1094 bool IsPassiveStackableWithRanks() const;
1095 bool IsMultiSlotAura() const;
1096 bool IsCooldownStartedOnEvent() const;
1097 bool IsDeathPersistent() const;
1098 bool IsRequiringDeadTarget() const;
1099 bool IsAllowingDeadTarget() const;
1100 bool CanBeUsedInCombat() const;
1101 bool IsPositive() const;
1102 bool IsPositiveEffect(uint8 effIndex) const;
1103 bool IsChanneled() const;
1104 [[nodiscard]] bool IsActionAllowedChannel() const;
1105 bool NeedsComboPoints() const;
1106 bool IsBreakingStealth() const;
1107 bool IsRangedWeaponSpell() const;
1108 bool IsAutoRepeatRangedSpell() const;
1109 bool HasInitialAggro() const;
1110
1111 [[nodiscard]] bool IsAffected(uint32 familyName, flag96 const& familyFlags) const;
1112
1113 bool IsAffectedBySpellMods() const;
1114 bool IsAffectedBySpellMod(SpellModifier const* mod) const;
1115
1116 bool CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const;
1117 bool CanDispelAura(SpellInfo const* auraSpellInfo) const;
1118
1119 void ApplyAllSpellImmunitiesTo(Unit* target, SpellEffectInfo const* effect, bool apply) const;
1120 bool CanSpellProvideImmunityAgainstAura(SpellInfo const* auraSpellInfo) const;
1121 bool CanSpellCastOverrideAuraEffect(AuraEffect const* aurEff) const;
1122
1123 bool IsSingleTarget() const;
1124 bool IsAuraExclusiveBySpecificWith(SpellInfo const* spellInfo) const;
1125 bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const* spellInfo) const;
1126
1127 SpellCastResult CheckShapeshift(uint32 form) const;
1128 SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player* player = nullptr, bool strict = true) const;
1129 SpellCastResult CheckTarget(Unit const* caster, WorldObject const* target, bool implicit = true) const;
1130 SpellCastResult CheckExplicitTarget(Unit const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const;
1131 bool CheckTargetCreatureType(Unit const* target) const;
1132
1133 bool IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const;
1134 bool ValidateAttribute6SpellDamageMods(Unit const* caster, const AuraEffect* auraEffect, bool isDot) const;
1135
1136 SpellSchoolMask GetSchoolMask() const;
1137 uint64 GetAllEffectsMechanicMask() const;
1138 uint64 GetEffectMechanicMask(uint8 effIndex) const;
1139 uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const;
1140 Mechanics GetEffectMechanic(uint8 effIndex) const;
1141 bool HasAnyEffectMechanic() const;
1142 [[nodiscard]] ImmunityInfo const* GetImmunityInfo(uint8 effIndex) const { return effIndex < MAX_SPELL_EFFECTS ? &_immunityInfo[effIndex] : nullptr; }
1143 uint32 GetDispelMask() const;
1144 static uint32 GetDispelMask(DispelType type);
1145 uint32 GetExplicitTargetMask() const;
1146
1147 AuraStateType GetAuraState() const;
1148 SpellSpecificType GetSpellSpecific() const;
1149
1150 float GetMinRange(bool positive = false) const;
1151 float GetMaxRange(bool positive = false, Unit* caster = nullptr, Spell* spell = nullptr) const;
1152
1153 int32 GetDuration() const;
1154 int32 GetMaxDuration() const;
1155
1156 uint32 GetMaxTicks() const;
1157
1158 uint32 CalcCastTime(Unit* caster = nullptr, Spell* spell = nullptr) const;
1159 uint32 GetRecoveryTime() const;
1160
1161 int32 CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
1162
1163 bool IsRanked() const;
1164 uint8 GetRank() const;
1165 SpellInfo const* GetFirstRankSpell() const;
1166 SpellInfo const* GetLastRankSpell() const;
1167 SpellInfo const* GetNextRankSpell() const;
1168 SpellInfo const* GetPrevRankSpell() const;
1169 SpellInfo const* GetAuraRankForLevel(uint8 level) const;
1170 bool IsRankOf(SpellInfo const* spellInfo) const;
1171 bool IsDifferentRankOf(SpellInfo const* spellInfo) const;
1172 bool IsHighRankOf(SpellInfo const* spellInfo) const;
1173
1174 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& GetEffects() const { return Effects; }
1175 SpellEffectInfo const& GetEffect(SpellEffIndex index) const { ASSERT(index < Effects.size()); return Effects[index]; }
1176
1177 // loading helpers
1178 void _InitializeExplicitTargetMask();
1179 bool _IsPositiveEffect(uint8 effIndex, bool deep) const;
1180 bool _IsPositiveSpell() const;
1181 static bool _IsPositiveTarget(uint32 targetA, uint32 targetB);
1182
1183 AuraStateType LoadAuraState() const;
1184 SpellSpecificType LoadSpellSpecific() const;
1185
1186 // unloading helpers
1187 void _UnloadImplicitTargetConditionLists();
1188
1189 // immunity helpers
1190 void _LoadImmunityInfo();
1191
1192 SpellDiminishInfo _diminishInfoNonTriggered;
1193 SpellDiminishInfo _diminishInfoTriggered;
1194
1195 ImmunityInfo _immunityInfo[MAX_SPELL_EFFECTS];
1196 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
1197 SpellEffectInfo& _GetEffect(SpellEffIndex index) { ASSERT(index < Effects.size()); return Effects[index]; }
1198};
1199
1200#endif // _SPELLINFO_H
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1637
#define AC_GAME_API
Definition Define.h:94
std::uint64_t uint64
Definition Define.h:106
#define ASSERT
Definition Errors.h:68
SpellEffIndex
Definition SharedDefines.h:30
DiminishingGroup
Definition SharedDefines.h:3492
@ DIMINISHING_NONE
Definition SharedDefines.h:3493
SpellAttr7
Definition SharedDefines.h:628
SpellEffects
Definition SharedDefines.h:766
SpellAttr5
Definition SharedDefines.h:554
Targets
Definition SharedDefines.h:1415
SpellAttr2
Definition SharedDefines.h:443
SpellAttr1
Definition SharedDefines.h:406
SpellAttr3
Definition SharedDefines.h:480
SpellAttr0
Definition SharedDefines.h:369
TotemCategory
Definition SharedDefines.h:3318
AuraStateType
Definition SharedDefines.h:1276
DiminishingReturnsType
Definition SharedDefines.h:3484
@ DRTYPE_NONE
Definition SharedDefines.h:3485
DispelType
Definition SharedDefines.h:1376
SpellCastResult
Definition SharedDefines.h:936
SpellAttr4
Definition SharedDefines.h:517
SpellAttr6
Definition SharedDefines.h:591
SpellSchoolMask
Definition SharedDefines.h:283
SpellEffectImplicitTargetTypes
Definition SpellInfo.h:142
@ EFFECT_IMPLICIT_TARGET_CASTER
Definition SpellInfo.h:145
@ EFFECT_IMPLICIT_TARGET_NONE
Definition SpellInfo.h:143
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:144
SpellTargetSelectionCategories
Definition SpellInfo.h:77
@ TARGET_SELECT_CATEGORY_CONE
Definition SpellInfo.h:82
@ TARGET_SELECT_CATEGORY_AREA
Definition SpellInfo.h:83
@ TARGET_SELECT_CATEGORY_DEFAULT
Definition SpellInfo.h:79
@ TARGET_SELECT_CATEGORY_NEARBY
Definition SpellInfo.h:81
@ TARGET_SELECT_CATEGORY_NYI
Definition SpellInfo.h:78
@ TARGET_SELECT_CATEGORY_TRAJ
Definition SpellInfo.h:84
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition SpellInfo.h:80
SpellTargetCheckTypes
Definition SpellInfo.h:114
@ TARGET_CHECK_CORPSE
Definition SpellInfo.h:123
@ TARGET_CHECK_PASSENGER
Definition SpellInfo.h:122
@ TARGET_CHECK_PARTY
Definition SpellInfo.h:119
@ TARGET_CHECK_ENEMY
Definition SpellInfo.h:117
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:115
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:116
@ TARGET_CHECK_RAID_CLASS
Definition SpellInfo.h:121
@ TARGET_CHECK_ALLY
Definition SpellInfo.h:118
@ TARGET_CHECK_RAID
Definition SpellInfo.h:120
@ TARGET_FLAG_TRADE_ITEM
Definition SpellInfo.h:59
@ TARGET_FLAG_STRING
Definition SpellInfo.h:60
@ TARGET_FLAG_NONE
Definition SpellInfo.h:46
@ TARGET_FLAG_UNIT_RAID
Definition SpellInfo.h:49
@ TARGET_FLAG_UNIT_ENEMY
Definition SpellInfo.h:54
@ TARGET_FLAG_GLYPH_SLOT
Definition SpellInfo.h:64
@ TARGET_FLAG_CORPSE_ALLY
Definition SpellInfo.h:62
@ TARGET_FLAG_UNIT_MINIPET
Definition SpellInfo.h:63
@ TARGET_FLAG_UNIT_PASSENGER
Definition SpellInfo.h:67
@ TARGET_FLAG_UNUSED20
Definition SpellInfo.h:66
@ TARGET_FLAG_UNIT_ALLY
Definition SpellInfo.h:55
@ TARGET_FLAG_ITEM_MASK
Definition SpellInfo.h:73
@ TARGET_FLAG_UNUSED_1
Definition SpellInfo.h:47
@ TARGET_FLAG_UNIT
Definition SpellInfo.h:48
@ TARGET_FLAG_DEST_TARGET
Definition SpellInfo.h:65
@ TARGET_FLAG_UNIT_DEAD
Definition SpellInfo.h:57
@ TARGET_FLAG_CORPSE_ENEMY
Definition SpellInfo.h:56
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition SpellInfo.h:71
@ TARGET_FLAG_UNIT_PARTY
Definition SpellInfo.h:50
SpellTargetDirectionTypes
Definition SpellInfo.h:127
@ TARGET_DIR_FRONT_RIGHT
Definition SpellInfo.h:133
@ TARGET_DIR_NONE
Definition SpellInfo.h:128
@ TARGET_DIR_BACK
Definition SpellInfo.h:130
@ TARGET_DIR_BACK_RIGHT
Definition SpellInfo.h:134
@ TARGET_DIR_RIGHT
Definition SpellInfo.h:131
@ TARGET_DIR_FRONT_LEFT
Definition SpellInfo.h:136
@ TARGET_DIR_FRONT
Definition SpellInfo.h:129
@ TARGET_DIR_LEFT
Definition SpellInfo.h:132
@ TARGET_DIR_ENTRY
Definition SpellInfo.h:138
@ TARGET_DIR_BACK_LEFT
Definition SpellInfo.h:135
@ TARGET_DIR_RANDOM
Definition SpellInfo.h:137
SpellCustomAttributes
Definition SpellInfo.h:176
@ SPELL_ATTR0_CU_IGNORE_ARMOR
Definition SpellInfo.h:192
@ SPELL_ATTR0_CU_POSITIVE_EFF2
Definition SpellInfo.h:204
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
Definition SpellInfo.h:193
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:195
@ SPELL_ATTR0_CU_ENCHANT_PROC
Definition SpellInfo.h:177
@ SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS
Definition SpellInfo.h:198
@ SPELL_ATTR0_CU_FORCE_SEND_CATEGORY_COOLDOWNS
Definition SpellInfo.h:205
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
Definition SpellInfo.h:185
@ SPELL_ATTR0_CU_POSITIVE
Definition SpellInfo.h:212
@ SPELL_ATTR0_CU_FORCE_AURA_SAVING
Definition SpellInfo.h:206
@ SPELL_ATTR0_CU_NO_PVP_FLAG
Definition SpellInfo.h:184
@ SPELL_ATTR0_CU_DONT_BREAK_STEALTH
Definition SpellInfo.h:183
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
Definition SpellInfo.h:194
@ SPELL_ATTR0_CU_CONE_BACK
Definition SpellInfo.h:178
@ SPELL_ATTR0_CU_SINGLE_AURA_STACK
Definition SpellInfo.h:199
@ SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED
Definition SpellInfo.h:201
@ SPELL_ATTR0_CU_NEGATIVE_EFF2
Definition SpellInfo.h:191
@ SPELL_ATTR0_CU_AURA_CC
Definition SpellInfo.h:182
@ SPELL_ATTR0_CU_NEGATIVE_EFF1
Definition SpellInfo.h:190
@ SPELL_ATTR0_CU_CHARGE
Definition SpellInfo.h:186
@ SPELL_ATTR0_CU_NEGATIVE
Definition SpellInfo.h:211
@ SPELL_ATTR0_CU_NEEDS_AMMO_DATA
Definition SpellInfo.h:196
@ SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY
Definition SpellInfo.h:209
@ SPELL_ATTR0_CU_POSITIVE_EFF0
Definition SpellInfo.h:202
@ SPELL_ATTR0_CU_NEGATIVE_EFF0
Definition SpellInfo.h:189
@ SPELL_ATTR0_CU_POSITIVE_EFF1
Definition SpellInfo.h:203
@ SPELL_ATTR0_CU_BINARY_SPELL
Definition SpellInfo.h:197
@ SPELL_ATTR0_CU_SHARE_DAMAGE
Definition SpellInfo.h:180
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
Definition SpellInfo.h:200
@ SPELL_ATTR0_CU_IGNORE_EVADE
Definition SpellInfo.h:188
@ SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA
Definition SpellInfo.h:207
@ SPELL_ATTR0_CU_ENCOUNTER_REWARD
Definition SpellInfo.h:208
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:187
@ SPELL_ATTR0_CU_CONE_LINE
Definition SpellInfo.h:179
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
Definition SpellInfo.h:181
SpellSpecificType
Definition SpellInfo.h:150
@ SPELL_SPECIFIC_FOOD
Definition SpellInfo.h:164
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition SpellInfo.h:159
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:151
@ SPELL_SPECIFIC_STING
Definition SpellInfo.h:154
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition SpellInfo.h:170
@ SPELL_SPECIFIC_ASPECT
Definition SpellInfo.h:156
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition SpellInfo.h:171
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition SpellInfo.h:160
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
Definition SpellInfo.h:163
@ SPELL_SPECIFIC_PRESENCE
Definition SpellInfo.h:167
@ SPELL_SPECIFIC_CURSE
Definition SpellInfo.h:155
@ SPELL_SPECIFIC_JUDGEMENT
Definition SpellInfo.h:162
@ SPELL_SPECIFIC_DRINK
Definition SpellInfo.h:165
@ SPELL_SPECIFIC_HAND
Definition SpellInfo.h:172
@ SPELL_SPECIFIC_AURA
Definition SpellInfo.h:153
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition SpellInfo.h:158
@ SPELL_SPECIFIC_SCROLL
Definition SpellInfo.h:169
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition SpellInfo.h:161
@ SPELL_SPECIFIC_TRACKER
Definition SpellInfo.h:157
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:152
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition SpellInfo.h:166
@ SPELL_SPECIFIC_CHARM
Definition SpellInfo.h:168
SpellTargetObjectTypes
Definition SpellInfo.h:98
@ TARGET_OBJECT_TYPE_UNIT
Definition SpellInfo.h:102
@ TARGET_OBJECT_TYPE_ITEM
Definition SpellInfo.h:106
@ TARGET_OBJECT_TYPE_CORPSE
Definition SpellInfo.h:107
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
Definition SpellInfo.h:103
@ TARGET_OBJECT_TYPE_NONE
Definition SpellInfo.h:99
@ TARGET_OBJECT_TYPE_DEST
Definition SpellInfo.h:101
@ TARGET_OBJECT_TYPE_GOBJ
Definition SpellInfo.h:104
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
Definition SpellInfo.h:110
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
Definition SpellInfo.h:109
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
Definition SpellInfo.h:105
@ TARGET_OBJECT_TYPE_SRC
Definition SpellInfo.h:100
SpellTargetReferenceTypes
Definition SpellInfo.h:88
@ TARGET_REFERENCE_TYPE_SRC
Definition SpellInfo.h:93
@ TARGET_REFERENCE_TYPE_TARGET
Definition SpellInfo.h:91
@ TARGET_REFERENCE_TYPE_LAST
Definition SpellInfo.h:92
@ TARGET_REFERENCE_TYPE_NONE
Definition SpellInfo.h:89
@ TARGET_REFERENCE_TYPE_CASTER
Definition SpellInfo.h:90
@ TARGET_REFERENCE_TYPE_DEST
Definition SpellInfo.h:94
ProcFlags
Definition SpellMgr.h:107
PowerType
Definition VehicleDefines.h:29
Definition SpellAuraEffects.h:39
Definition Item.h:220
Definition SpellInfo.h:270
float CalcDamageMultiplier(Unit *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:539
float CalcRadius(Unit *caster=nullptr, Spell *=nullptr) const
Definition SpellInfo.cpp:552
ImmunityInfo const * GetImmunityInfo() const
Definition SpellInfo.cpp:608
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:296
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:340
Definition SpellMgr.h:642
Definition Spell.h:298
Definition Totem.h:51
Definition Unit.h:664
Definition Object.h:475
Definition Util.h:442
Definition SpellInfo.h:226
Definition DBCStructure.h:1758
Definition DBCStructure.h:1766
Definition SpellMgr.h:544
Definition SpellInfo.h:218
Definition DBCStructure.h:1833
SpellTargetObjectTypes UsedTargetObjectType
Definition SpellInfo.h:332
SpellEffectImplicitTargetTypes ImplicitTargetType
Definition SpellInfo.h:331
Definition DBCStructure.h:1642
Definition Player.h:182
Definition DBCStructure.h:1785
Definition DBCStructure.h:1793
Definition System.cpp:63

Referenced by GetImplicitTargetType(), and GetUsedTargetObjectType().

◆ _spellInfo

SpellInfo const* SpellEffectInfo::_spellInfo
private

◆ Amplitude

uint32 SpellEffectInfo::Amplitude

◆ ApplyAuraName

◆ BasePoints

int32 SpellEffectInfo::BasePoints

◆ BonusMultiplier

float SpellEffectInfo::BonusMultiplier

◆ ChainTarget

uint32 SpellEffectInfo::ChainTarget

◆ DamageMultiplier

float SpellEffectInfo::DamageMultiplier

◆ DieSides

◆ Effect

◆ EffectIndex

◆ ImplicitTargetConditions

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

Referenced by SpellEffectInfo().

◆ ItemType

uint32 SpellEffectInfo::ItemType

◆ Mechanic

◆ MiscValue

◆ MiscValueB

int32 SpellEffectInfo::MiscValueB

◆ PointsPerComboPoint

float SpellEffectInfo::PointsPerComboPoint

◆ RadiusEntry

SpellRadiusEntry const* SpellEffectInfo::RadiusEntry

◆ RealPointsPerLevel

float SpellEffectInfo::RealPointsPerLevel

◆ SpellClassMask

flag96 SpellEffectInfo::SpellClassMask

◆ TargetA

◆ TargetB

◆ TriggerSpell

uint32 SpellEffectInfo::TriggerSpell

◆ ValueMultiplier

float SpellEffectInfo::ValueMultiplier

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