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 (WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
 
int32 CalcBaseValue (int32 value) const
 
float CalcValueMultiplier (WorldObject *caster, Spell *spell=nullptr) const
 
float CalcDamageMultiplier (WorldObject *caster, Spell *spell=nullptr) const
 
bool HasRadius () const
 
float CalcRadius (WorldObject *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
526{
527 if (DieSides == 0)
528 return value;
529 else
530 return value - 1;
531}

References DieSides.

◆ CalcDamageMultiplier()

float SpellEffectInfo::CalcDamageMultiplier ( WorldObject *  caster,
Spell *  spell = nullptr 
) const
542{
543 float multiplier = DamageMultiplier;
544 if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
545 modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell);
546 return multiplier;
547}
@ SPELLMOD_DAMAGE_MULTIPLIER
Definition SpellDefines.h:104
Definition Player.h:1086
virtual Player * GetSpellModOwner() const
Definition Object.cpp:3351

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

◆ CalcRadius()

float SpellEffectInfo::CalcRadius ( WorldObject *  caster = nullptr,
Spell *  spell = nullptr 
) const
555{
556 if (!HasRadius())
557 return 0.0f;
558
559 float radius = RadiusEntry->RadiusMin;
560 if (caster)
561 {
562 if (Unit* unitCaster = caster->ToUnit())
563 radius += RadiusEntry->RadiusPerLevel * unitCaster->GetLevel();
564
565 radius = std::min(radius, RadiusEntry->RadiusMax);
566 if (Player* modOwner = caster->GetSpellModOwner())
567 modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
568 }
569
570 return radius;
571}
@ SPELLMOD_RADIUS
Definition SpellDefines.h:90
Unit * ToUnit()
Definition Object.h:216
bool HasRadius() const
Definition SpellInfo.cpp:549
uint32 Id
Definition SpellInfo.h:344
Definition Unit.h:665
float RadiusPerLevel
Definition DBCStructure.h:1824
float RadiusMax
Definition DBCStructure.h:1825
float RadiusMin
Definition DBCStructure.h:1823

References _spellInfo, WorldObject::GetSpellModOwner(), HasRadius(), SpellInfo::Id, RadiusEntry, SpellRadiusEntry::RadiusMax, SpellRadiusEntry::RadiusMin, SpellRadiusEntry::RadiusPerLevel, SPELLMOD_RADIUS, and Object::ToUnit().

◆ CalcValue()

int32 SpellEffectInfo::CalcValue ( WorldObject 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 Unit const* casterUnit = caster ? caster->ToUnit() : nullptr;
416
417 // base amount modification based on spell lvl vs caster lvl
418 // xinef: added basePointsPerLevel check
419 if (casterUnit && basePointsPerLevel != 0.0f)
420 {
421 int32 level = int32(casterUnit->GetLevel());
422 if (level > int32(_spellInfo->MaxLevel) && _spellInfo->MaxLevel > 0)
423 level = int32(_spellInfo->MaxLevel);
424 else if (level < int32(_spellInfo->BaseLevel))
425 level = int32(_spellInfo->BaseLevel);
426
427 // xinef: if base level is greater than spell level, reduce by base level (eg. pilgrims foods)
428 level -= int32(std::max(_spellInfo->BaseLevel, _spellInfo->SpellLevel));
429 basePoints += int32(level * basePointsPerLevel);
430 }
431
432 // roll in a range <1;EffectDieSides> as of patch 3.3.3
433 switch (randomPoints)
434 {
435 case 0:
436 break;
437 case 1:
438 basePoints += 1;
439 break; // range 1..1
440 default:
441 // range can have positive (1..rand) and negative (rand..1) values, so order its for irand
442 int32 randvalue = (randomPoints >= 1)
443 ? irand(1, randomPoints)
444 : irand(randomPoints, 1);
445
446 basePoints += randvalue;
447 break;
448 }
449
450 float value = float(basePoints);
451
452 // random damage
453 if (casterUnit)
454 {
455 // bonus amount from combo points
456 if (uint8 comboPoints = casterUnit->GetComboPoints())
457 {
458 value += PointsPerComboPoint * comboPoints;
459 }
460
461 value = casterUnit->ApplyEffectModifiers(_spellInfo, EffectIndex, value);
462
463 // amount multiplication based on caster's level
464 if (!casterUnit->IsControlledByPlayer() &&
465 _spellInfo->SpellLevel && _spellInfo->SpellLevel != casterUnit->GetLevel() &&
467 {
468 bool canEffectScale = false;
469 switch (Effect)
470 {
483 canEffectScale = true;
484 break;
485 default:
486 break;
487 }
488
489 switch (ApplyAuraName)
490 {
492 case SPELL_AURA_DUMMY:
500 canEffectScale = true;
501 break;
502 default:
503 break;
504 }
505
507 canEffectScale = false;
508
509 if (canEffectScale)
510 {
511 CreatureTemplate const* cInfo = casterUnit->ToCreature()->GetCreatureTemplate();
512
513 CreatureBaseStats const* pCBS = sObjectMgr->GetCreatureBaseStats(casterUnit->GetLevel(), casterUnit->getClass());
514 float CBSPowerCreature = pCBS->BaseDamage[cInfo->expansion];
515 CreatureBaseStats const* spellCBS = sObjectMgr->GetCreatureBaseStats(_spellInfo->SpellLevel, casterUnit->getClass());
516 float CBSPowerSpell = spellCBS->BaseDamage[cInfo->expansion];
517 value *= CBSPowerCreature / CBSPowerSpell;
518 }
519 }
520 }
521
522 return int32(value);
523}
std::int32_t int32
Definition Define.h:103
std::uint8_t uint8
Definition Define.h:109
#define sObjectMgr
Definition ObjectMgr.h:1731
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:847
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:207
Creature * ToCreature()
Definition Object.h:212
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
uint8 getClass() const
Definition Unit.h:844
float ApplyEffectModifiers(SpellInfo const *spellProto, uint8 effect_index, float value) const
Definition Unit.cpp:11327
uint8 GetComboPoints(Unit const *who=nullptr) const
Definition Unit.h:1020
bool IsControlledByPlayer() const
Definition Unit.h:1312
uint8 GetLevel() const
Definition Unit.h:1109
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, Object::ToCreature(), and Object::ToUnit().

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(), spell_sorlofs_booty_cannon_primer::Validate(), and spell_gen_whisper_to_controller::Validate().

◆ CalcValueMultiplier()

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

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

◆ GetImmunityInfo()

ImmunityInfo const * SpellEffectInfo::GetImmunityInfo ( ) const
613{
614 if (!_spellInfo)
615 return nullptr;
616
618}
ImmunityInfo const * GetImmunityInfo(uint8 effIndex) const
Definition SpellInfo.h:528

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

◆ GetImplicitTargetType()

SpellEffectImplicitTargetTypes SpellEffectInfo::GetImplicitTargetType ( ) const
603{
604 return _data[Effect].ImplicitTargetType;
605}
static std::array< StaticData, TOTAL_SPELL_EFFECTS > _data
Definition SpellInfo.h:620

References _data, and Effect.

◆ GetMissingTargetMask()

uint32 SpellEffectInfo::GetMissingTargetMask ( bool  srcSet = false,
bool  destSet = false,
uint32  mask = 0 
) const
579{
580 uint32 effImplicitTargetMask = GetTargetFlagMask(GetUsedTargetObjectType());
582
583 // remove all flags covered by effect target mask
584 if (providedTargetMask & TARGET_FLAG_UNIT_MASK)
585 effImplicitTargetMask &= ~(TARGET_FLAG_UNIT_MASK);
586 if (providedTargetMask & TARGET_FLAG_CORPSE_MASK)
587 effImplicitTargetMask &= ~(TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK);
588 if (providedTargetMask & TARGET_FLAG_GAMEOBJECT_ITEM)
590 if (providedTargetMask & TARGET_FLAG_GAMEOBJECT)
591 effImplicitTargetMask &= ~(TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM);
592 if (providedTargetMask & TARGET_FLAG_ITEM)
593 effImplicitTargetMask &= ~(TARGET_FLAG_ITEM | TARGET_FLAG_GAMEOBJECT_ITEM);
594 if (dstSet || providedTargetMask & TARGET_FLAG_DEST_LOCATION)
595 effImplicitTargetMask &= ~(TARGET_FLAG_DEST_LOCATION);
596 if (srcSet || providedTargetMask & TARGET_FLAG_SOURCE_LOCATION)
597 effImplicitTargetMask &= ~(TARGET_FLAG_SOURCE_LOCATION);
598
599 return effImplicitTargetMask;
600}
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:607
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
608{
609 return _data[Effect].UsedTargetObjectType;
610}

References _data, and Effect.

Referenced by GetMissingTargetMask().

◆ HasRadius()

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

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
664{
665 TARGET_FLAG_NONE = 0x00000000,
666 TARGET_FLAG_UNUSED_1 = 0x00000001, // not used
667 TARGET_FLAG_UNIT = 0x00000002, // pguid
668 TARGET_FLAG_UNIT_RAID = 0x00000004, // not sent, used to validate target (if raid member)
669 TARGET_FLAG_UNIT_PARTY = 0x00000008, // not sent, used to validate target (if party member)
670 TARGET_FLAG_ITEM = 0x00000010, // pguid
671 TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // pguid, 3 float
672 TARGET_FLAG_DEST_LOCATION = 0x00000040, // pguid, 3 float
673 TARGET_FLAG_UNIT_ENEMY = 0x00000080, // not sent, used to validate target (if enemy)
674 TARGET_FLAG_UNIT_ALLY = 0x00000100, // not sent, used to validate target (if ally)
675 TARGET_FLAG_CORPSE_ENEMY = 0x00000200, // pguid
676 TARGET_FLAG_UNIT_DEAD = 0x00000400, // not sent, used to validate target (if dead creature)
677 TARGET_FLAG_GAMEOBJECT = 0x00000800, // pguid, used with TARGET_GAMEOBJECT_TARGET
678 TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid
679 TARGET_FLAG_STRING = 0x00002000, // string
680 TARGET_FLAG_GAMEOBJECT_ITEM = 0x00004000, // not sent, used with TARGET_GAMEOBJECT_ITEM_TARGET
681 TARGET_FLAG_CORPSE_ALLY = 0x00008000, // pguid
682 TARGET_FLAG_UNIT_MINIPET = 0x00010000, // pguid, used to validate target (if non combat pet)
683 TARGET_FLAG_GLYPH_SLOT = 0x00020000, // used in glyph spells
684 TARGET_FLAG_DEST_TARGET = 0x00040000, // sometimes appears with DEST_TARGET spells (may appear or not for a given spell)
685 TARGET_FLAG_UNUSED20 = 0x00080000, // uint32 counter, loop { vec3 - screen position (?), guid }, not used so far
686 TARGET_FLAG_UNIT_PASSENGER = 0x00100000, // guessed, used to validate target (if vehicle passenger)
687
693};
694
696{
704};
705
707{
714};
715
717{
727 // only for effect target type
730};
731
733{
743};
744
746{
758};
759
761{
765};
766
767// Spell clasification
769{
792};
793
795{
796 SPELL_ATTR0_CU_ENCHANT_PROC = 0x00000001,
797 SPELL_ATTR0_CU_CONE_BACK = 0x00000002,
798 SPELL_ATTR0_CU_CONE_LINE = 0x00000004,
799 SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
801 SPELL_ATTR0_CU_AURA_CC = 0x00000020,
803 SPELL_ATTR0_CU_NO_PVP_FLAG = 0x00000080,
804 SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
805 SPELL_ATTR0_CU_CHARGE = 0x00000200,
806 SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,
807 SPELL_ATTR0_CU_IGNORE_EVADE = 0x00000800,
808 SPELL_ATTR0_CU_NEGATIVE_EFF0 = 0x00001000,
809 SPELL_ATTR0_CU_NEGATIVE_EFF1 = 0x00002000,
810 SPELL_ATTR0_CU_NEGATIVE_EFF2 = 0x00004000,
811 SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
816 SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
821 SPELL_ATTR0_CU_POSITIVE_EFF0 = 0x02000000,
822 SPELL_ATTR0_CU_POSITIVE_EFF1 = 0x04000000,
823 SPELL_ATTR0_CU_POSITIVE_EFF2 = 0x08000000,
829
832};
833
835
837{
838 DiminishingGroup DiminishGroup = DIMINISHING_NONE;
839 DiminishingReturnsType DiminishReturnType = DRTYPE_NONE;
840 int32 DiminishMaxLevel = 3; // DIMINISHING_LEVEL_IMMUNE
841 int32 DiminishDurationLimit = 0;
842};
843
845{
846 uint32 SchoolImmuneMask = 0;
847 uint32 ApplyHarmfulAuraImmuneMask = 0;
848 uint64 MechanicImmuneMask = 0;
849 uint32 DispelImmuneMask = 0;
850 uint32 DamageSchoolMask = 0;
851
852 boost::container::flat_set<AuraType> AuraTypeImmune;
853 boost::container::flat_set<SpellEffects> SpellEffectImmune;
854};
855
857{
858private:
859 Targets _target;
860public:
861 SpellImplicitTargetInfo() : _target(Targets(0)) {}
863
864 bool IsArea() const;
865 SpellTargetSelectionCategories GetSelectionCategory() const;
866 SpellTargetReferenceTypes GetReferenceType() const;
867 SpellTargetObjectTypes GetObjectType() const;
868 SpellTargetCheckTypes GetCheckType() const;
869 SpellTargetDirectionTypes GetDirectionType() const;
870 float CalcDirectionAngle() const;
871
872 Targets GetTarget() const;
873 uint32 GetExplicitTargetMask(bool& srcSet, bool& dstSet) const;
874
875private:
876 struct StaticData
877 {
878 SpellTargetObjectTypes ObjectType; // type of object returned by target type
879 SpellTargetReferenceTypes ReferenceType; // defines which object is used as a reference when selecting target
880 SpellTargetSelectionCategories SelectionCategory;
881 SpellTargetCheckTypes SelectionCheckType; // defines selection criteria
882 SpellTargetDirectionTypes DirectionType; // direction for cone and dest targets
883 };
884
885 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
886};
887
888class SpellEffectInfo
889{
890 SpellInfo const* _spellInfo;
891public:
897 float RealPointsPerLevel;
900 float ValueMultiplier;
901 float DamageMultiplier;
902 float BonusMultiplier;
913 std::list<Condition*>* ImplicitTargetConditions;
914
919 SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
920
921 bool IsEffect() const;
922 bool IsEffect(SpellEffects effectName) const;
923 bool IsAura() const;
924 bool IsAura(AuraType aura) const;
925 bool IsTargetingArea() const;
926 bool IsAreaAuraEffect() const;
927 bool IsFarUnitTargetEffect() const;
928 bool IsFarDestTargetEffect() const;
929 bool IsUnitOwnedAuraEffect() const;
930
931 int32 CalcValue(WorldObject const* caster = nullptr, int32 const* basePoints = nullptr, Unit const* target = nullptr) const;
932 int32 CalcBaseValue(int32 value) const;
933 float CalcValueMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
934 float CalcDamageMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
935
936 bool HasRadius() const;
937 float CalcRadius(WorldObject* caster = nullptr, Spell* = nullptr) const;
938
940 uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
941
944
945 [[nodiscard]] ImmunityInfo const* GetImmunityInfo() const;
946
947private:
948 struct StaticData
949 {
950 SpellEffectImplicitTargetTypes ImplicitTargetType; // defines what target can be added to effect target list if there's no valid target type provided for effect
951 SpellTargetObjectTypes UsedTargetObjectType; // defines valid target object type for spell effect
952 };
953
954 static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
955
956};
957
959{
960friend class SpellMgr;
961
962public:
963 uint32 Id;
964 SpellCategoryEntry const* CategoryEntry;
965 uint32 Dispel;
966 uint32 Mechanic;
967 uint32 Attributes;
968 uint32 AttributesEx;
969 uint32 AttributesEx2;
970 uint32 AttributesEx3;
971 uint32 AttributesEx4;
972 uint32 AttributesEx5;
973 uint32 AttributesEx6;
974 uint32 AttributesEx7;
975 uint32 AttributesCu;
976 uint32 Stances;
977 uint32 StancesNot;
979 uint32 TargetCreatureType;
980 uint32 RequiresSpellFocus;
981 uint32 FacingCasterFlags;
982 uint32 CasterAuraState;
983 uint32 TargetAuraState;
984 uint32 CasterAuraStateNot;
985 uint32 TargetAuraStateNot;
986 uint32 CasterAuraSpell;
987 uint32 TargetAuraSpell;
988 uint32 ExcludeCasterAuraSpell;
989 uint32 ExcludeTargetAuraSpell;
990 SpellCastTimesEntry const* CastTimeEntry;
991 uint32 RecoveryTime;
992 uint32 CategoryRecoveryTime;
993 uint32 StartRecoveryCategory;
994 uint32 StartRecoveryTime;
995 uint32 InterruptFlags;
996 uint32 AuraInterruptFlags;
997 uint32 ChannelInterruptFlags;
999 uint32 ProcChance;
1000 uint32 ProcCharges;
1001 uint32 MaxLevel;
1002 uint32 BaseLevel;
1003 uint32 SpellLevel;
1004 SpellDurationEntry const* DurationEntry;
1006 uint32 ManaCost;
1007 uint32 ManaCostPerlevel;
1008 uint32 ManaPerSecond;
1009 uint32 ManaPerSecondPerLevel;
1010 uint32 ManaCostPercentage;
1011 uint32 RuneCostID;
1012 SpellRangeEntry const* RangeEntry;
1013 float Speed;
1014 uint32 StackAmount;
1015 std::array<uint32, 2> Totem;
1016 std::array<int32, MAX_SPELL_REAGENTS> Reagent;
1017 std::array<uint32, MAX_SPELL_REAGENTS> ReagentCount;
1018 int32 EquippedItemClass;
1019 int32 EquippedItemSubClassMask;
1020 int32 EquippedItemInventoryTypeMask;
1021 std::array<uint32, 2> TotemCategory;
1022 std::array<uint32, 2> SpellVisual;
1023 uint32 SpellIconID;
1024 uint32 ActiveIconID;
1025 uint32 SpellPriority;
1026 std::array<char const*, 16> SpellName;
1027 std::array<char const*, 16> Rank;
1028 uint32 MaxTargetLevel;
1029 uint32 MaxAffectedTargets;
1030 uint32 SpellFamilyName;
1031 flag96 SpellFamilyFlags;
1032 uint32 DmgClass;
1033 uint32 PreventionType;
1034 int32 AreaGroupId;
1035 uint32 SchoolMask;
1036 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> Effects;
1037 uint32 ExplicitTargetMask;
1038 SpellChainNode const* ChainEntry;
1039
1040 // Mine
1041 AuraStateType _auraState;
1042 SpellSpecificType _spellSpecific;
1043 bool _isStackableWithRanks;
1044 bool _isSpellValid;
1045 bool _isCritCapable;
1046 bool _requireCooldownInfo;
1047 float JumpDistance;
1048
1049 SpellInfo(SpellEntry const* spellEntry);
1050 ~SpellInfo();
1051
1052 uint32 GetCategory() const;
1053 bool HasEffect(SpellEffects effect) const;
1054 bool HasEffectMechanic(Mechanics mechanic) const;
1055 bool HasAura(AuraType aura) const;
1056 bool HasAnyAura() const;
1057 bool HasAreaAuraEffect() const;
1058 bool HasOnlyDamageEffects() const;
1059
1060 inline bool HasAttribute(SpellAttr0 attribute) const { return (Attributes & attribute) != 0; }
1061 inline bool HasAttribute(SpellAttr1 attribute) const { return (AttributesEx & attribute) != 0; }
1062 inline bool HasAttribute(SpellAttr2 attribute) const { return (AttributesEx2 & attribute) != 0; }
1063 inline bool HasAttribute(SpellAttr3 attribute) const { return (AttributesEx3 & attribute) != 0; }
1064 inline bool HasAttribute(SpellAttr4 attribute) const { return (AttributesEx4 & attribute) != 0; }
1065 inline bool HasAttribute(SpellAttr5 attribute) const { return (AttributesEx5 & attribute) != 0; }
1066 inline bool HasAttribute(SpellAttr6 attribute) const { return (AttributesEx6 & attribute) != 0; }
1067 inline bool HasAttribute(SpellAttr7 attribute) const { return (AttributesEx7 & attribute) != 0; }
1068 inline bool HasAttribute(SpellCustomAttributes customAttribute) const { return (AttributesCu & customAttribute) != 0; }
1069
1070 bool IsExplicitDiscovery() const;
1071 bool IsLootCrafting() const;
1072 bool IsQuestTame() const;
1073 bool IsProfessionOrRiding() const;
1074 bool IsProfession() const;
1075 bool IsPrimaryProfession() const;
1076 bool IsPrimaryProfessionFirstRank() const;
1077 bool IsAbilityLearnedWithProfession() const;
1078 bool IsAbilityOfSkillType(uint32 skillType) const;
1079
1080 bool IsAffectingArea() const;
1081 bool CanBeRedirectedBySpellMagnet() const;
1082 bool IsTargetingArea() const;
1083 bool NeedsExplicitUnitTarget() const;
1084 bool NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell, uint8 effIndex = MAX_SPELL_EFFECTS) const;
1085 bool IsChannelCategorySpell() const;
1086 bool IsSelfCast() const;
1087
1088 bool IsPassive() const;
1089 bool IsAutocastable() const;
1090 bool ComputeIsCritCapable() const;
1091 bool IsCritCapable() const;
1092 bool RequireCooldownInfo() const;
1093 void SetCritCapable(bool val);
1094 bool ComputeIsStackableWithRanks() const;
1095 bool IsStackableWithRanks() const;
1096 void SetStackableWithRanks(bool val);
1097 bool IsSpellValid() const;
1098 void SetSpellValid(bool val);
1099 bool IsPassiveStackableWithRanks() const;
1100 bool IsMultiSlotAura() const;
1101 bool IsCooldownStartedOnEvent() const;
1102 bool IsDeathPersistent() const;
1103 bool IsRequiringDeadTarget() const;
1104 bool IsAllowingDeadTarget() const;
1105 bool CanBeUsedInCombat() const;
1106 bool IsPositive() const;
1107 bool IsPositiveEffect(uint8 effIndex) const;
1108 bool IsChanneled() const;
1109 [[nodiscard]] bool IsActionAllowedChannel() const;
1110 bool NeedsComboPoints() const;
1111 bool IsBreakingStealth() const;
1112 bool IsRangedWeaponSpell() const;
1113 bool IsAutoRepeatRangedSpell() const;
1114 bool HasInitialAggro() const;
1115
1116 [[nodiscard]] bool IsAffected(uint32 familyName, flag96 const& familyFlags) const;
1117
1118 bool IsAffectedBySpellMods() const;
1119 bool IsAffectedBySpellMod(SpellModifier const* mod) const;
1120
1121 bool CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const;
1122 bool CanDispelAura(SpellInfo const* auraSpellInfo) const;
1123
1124 void ApplyAllSpellImmunitiesTo(Unit* target, SpellEffectInfo const* effect, bool apply) const;
1125 bool CanSpellProvideImmunityAgainstAura(SpellInfo const* auraSpellInfo) const;
1126 bool CanSpellCastOverrideAuraEffect(AuraEffect const* aurEff) const;
1127
1128 bool IsSingleTarget() const;
1129 bool IsAuraExclusiveBySpecificWith(SpellInfo const* spellInfo) const;
1130 bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const* spellInfo) const;
1131
1132 SpellCastResult CheckShapeshift(uint32 form) const;
1133 SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player* player = nullptr, bool strict = true) const;
1134 SpellCastResult CheckTarget(WorldObject const* caster, WorldObject const* target, bool implicit = true) const;
1135 SpellCastResult CheckExplicitTarget(WorldObject const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const;
1136 bool CheckTargetCreatureType(Unit const* target) const;
1137
1138 bool IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const;
1139 bool ValidateAttribute6SpellDamageMods(Unit const* caster, AuraEffect const* auraEffect, bool isDot) const;
1140
1141 SpellSchoolMask GetSchoolMask() const;
1142 uint64 GetAllEffectsMechanicMask() const;
1143 uint64 GetEffectMechanicMask(uint8 effIndex) const;
1144 uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const;
1145 Mechanics GetEffectMechanic(uint8 effIndex) const;
1146 bool HasAnyEffectMechanic() const;
1147 [[nodiscard]] ImmunityInfo const* GetImmunityInfo(uint8 effIndex) const { return effIndex < MAX_SPELL_EFFECTS ? &_immunityInfo[effIndex] : nullptr; }
1148 uint32 GetDispelMask() const;
1149 static uint32 GetDispelMask(DispelType type);
1150 uint32 GetExplicitTargetMask() const;
1151
1152 AuraStateType GetAuraState() const;
1153 SpellSpecificType GetSpellSpecific() const;
1154
1155 float GetMinRange(bool positive = false) const;
1156 float GetMaxRange(bool positive = false, WorldObject* caster = nullptr, Spell* spell = nullptr) const;
1157
1158 int32 GetDuration() const;
1159 int32 GetMaxDuration() const;
1160
1161 uint32 GetMaxTicks() const;
1162
1163 uint32 CalcCastTime(WorldObject* caster = nullptr, Spell* spell = nullptr) const;
1164 uint32 GetRecoveryTime() const;
1165
1166 int32 CalcPowerCost(WorldObject const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
1167
1168 bool IsRanked() const;
1169 uint8 GetRank() const;
1170 SpellInfo const* GetFirstRankSpell() const;
1171 SpellInfo const* GetLastRankSpell() const;
1172 SpellInfo const* GetNextRankSpell() const;
1173 SpellInfo const* GetPrevRankSpell() const;
1174 SpellInfo const* GetAuraRankForLevel(uint8 level) const;
1175 bool IsRankOf(SpellInfo const* spellInfo) const;
1176 bool IsDifferentRankOf(SpellInfo const* spellInfo) const;
1177 bool IsHighRankOf(SpellInfo const* spellInfo) const;
1178
1179 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& GetEffects() const { return Effects; }
1180 SpellEffectInfo const& GetEffect(SpellEffIndex index) const { ASSERT(index < Effects.size()); return Effects[index]; }
1181
1182 // loading helpers
1183 void _InitializeExplicitTargetMask();
1184 bool _IsPositiveEffect(uint8 effIndex, bool deep) const;
1185 bool _IsPositiveSpell() const;
1186 static bool _IsPositiveTarget(uint32 targetA, uint32 targetB);
1187
1188 AuraStateType LoadAuraState() const;
1189 SpellSpecificType LoadSpellSpecific() const;
1190
1191 // unloading helpers
1192 void _UnloadImplicitTargetConditionLists();
1193
1194 // immunity helpers
1195 void _LoadImmunityInfo();
1196
1197 SpellDiminishInfo _diminishInfoNonTriggered;
1198 SpellDiminishInfo _diminishInfoTriggered;
1199
1200 ImmunityInfo _immunityInfo[MAX_SPELL_EFFECTS];
1201 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
1202 SpellEffectInfo& _GetEffect(SpellEffIndex index) { ASSERT(index < Effects.size()); return Effects[index]; }
1203};
1204
1205#endif // _SPELLINFO_H
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1673
#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:3490
@ DIMINISHING_NONE
Definition SharedDefines.h:3491
SpellAttr7
Definition SharedDefines.h:628
SpellEffects
Definition SharedDefines.h:766
SpellAttr5
Definition SharedDefines.h:554
Targets
Definition SharedDefines.h:1413
SpellAttr2
Definition SharedDefines.h:443
SpellAttr1
Definition SharedDefines.h:406
SpellAttr3
Definition SharedDefines.h:480
SpellAttr0
Definition SharedDefines.h:369
TotemCategory
Definition SharedDefines.h:3316
AuraStateType
Definition SharedDefines.h:1276
DiminishingReturnsType
Definition SharedDefines.h:3482
@ DRTYPE_NONE
Definition SharedDefines.h:3483
DispelType
Definition SharedDefines.h:1374
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
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
Definition SpellInfo.cpp:409
float CalcDamageMultiplier(WorldObject *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:541
float CalcRadius(WorldObject *caster=nullptr, Spell *=nullptr) const
Definition SpellInfo.cpp:554
float CalcValueMultiplier(WorldObject *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:533
ImmunityInfo const * GetImmunityInfo() const
Definition SpellInfo.cpp:612
uint32 GetMissingTargetMask(bool srcSet=false, bool destSet=false, uint32 mask=0) const
Definition SpellInfo.cpp:578
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:602
SpellEffectInfo()
Definition SpellInfo.h:296
uint32 GetProvidedTargetMask() const
Definition SpellInfo.cpp:573
int32 CalcBaseValue(int32 value) const
Definition SpellInfo.cpp:525
Definition SpellInfo.h:340
Definition SpellMgr.h:649
Definition Spell.h:298
Definition Totem.h:51
Definition Object.h:482
Definition Util.h:442
Definition SpellInfo.h:226
Definition DBCStructure.h:1794
Definition DBCStructure.h:1802
Definition SpellMgr.h:551
Definition SpellInfo.h:218
Definition DBCStructure.h:1869
SpellTargetObjectTypes UsedTargetObjectType
Definition SpellInfo.h:332
SpellEffectImplicitTargetTypes ImplicitTargetType
Definition SpellInfo.h:331
Definition DBCStructure.h:1678
Definition Player.h:182
Definition DBCStructure.h:1821
Definition DBCStructure.h:1829
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: