AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellMgr.h File Reference
#include "Common.h"
#include "Log.h"
#include "SharedDefines.h"
#include "Unit.h"

Go to the source code of this file.

Classes

struct  SpellProcEventEntry
 
struct  SpellProcEntry
 
struct  SpellEnchantProcEntry
 
struct  SpellBonusEntry
 
struct  SpellStackInfo
 
struct  SpellThreatEntry
 
struct  SpellTargetPosition
 
class  PetAura
 
struct  SpellArea
 
struct  SpellChainNode
 
struct  SpellLearnSkillNode
 
struct  PetDefaultSpellsEntry
 
struct  SpellCooldownOverride
 
class  SpellMgr
 

Macros

#define SPELL_RELIC_COOLDOWN   1
 
#define SPELL_LINKED_MAX_SPELLS   200000
 
#define MELEE_BASED_TRIGGER_MASK
 
#define AURA_SPELL_PROC_EX_MASK
 
#define sSpellMgr   SpellMgr::instance()
 

Typedefs

typedef std::unordered_map< uint32, SpellProcEventEntrySpellProcEventMap
 
typedef std::unordered_map< uint32, SpellProcEntrySpellProcMap
 
typedef std::unordered_map< uint32, SpellEnchantProcEntrySpellEnchantProcEventMap
 
typedef std::unordered_map< uint32, SpellBonusEntrySpellBonusMap
 
typedef std::map< uint32, SpellStackInfoSpellGroupMap
 
typedef std::map< uint32, SpellGroupStackFlagsSpellGroupStackMap
 
typedef std::unordered_map< uint32, SpellThreatEntrySpellThreatMap
 
typedef std::map< uint32, float > SpellMixologyMap
 
typedef std::map< std::pair< uint32, SpellEffIndex >, SpellTargetPositionSpellTargetPositionMap
 
typedef std::map< uint32, PetAuraSpellPetAuraMap
 
typedef std::multimap< uint32, SpellAreaSpellAreaMap
 
typedef std::multimap< uint32, SpellArea const * > SpellAreaForQuestMap
 
typedef std::multimap< uint32, SpellArea const * > SpellAreaForAuraMap
 
typedef std::multimap< uint32, SpellArea const * > SpellAreaForAreaMap
 
typedef std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
 
typedef std::pair< SpellAreaForQuestMap::const_iterator, SpellAreaForQuestMap::const_iterator > SpellAreaForQuestMapBounds
 
typedef std::pair< SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator > SpellAreaForAuraMapBounds
 
typedef std::pair< SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator > SpellAreaForAreaMapBounds
 
typedef std::unordered_map< uint32, SpellChainNodeSpellChainMap
 
typedef std::multimap< uint32, uint32SpellRequiredMap
 
typedef std::pair< SpellRequiredMap::const_iterator, SpellRequiredMap::const_iterator > SpellRequiredMapBounds
 
typedef std::multimap< uint32, uint32SpellsRequiringSpellMap
 
typedef std::pair< SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator > SpellsRequiringSpellMapBounds
 
typedef std::unordered_map< uint32, SpellLearnSkillNodeSpellLearnSkillMap
 
typedef std::multimap< uint32, SkillLineAbilityEntry const * > SkillLineAbilityMap
 
typedef std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
 
typedef std::multimap< uint32, uint32PetLevelupSpellSet
 
typedef std::map< uint32, PetLevelupSpellSetPetLevelupSpellMap
 
typedef std::map< uint32, uint32SpellDifficultySearcherMap
 
typedef std::map< int32, PetDefaultSpellsEntryPetDefaultSpellsMap
 
typedef std::vector< uint32SpellCustomAttribute
 
typedef std::vector< bool > EnchantCustomAttribute
 
typedef std::vector< SpellInfo * > SpellInfoMap
 
typedef std::map< int32, std::vector< int32 > > SpellLinkedMap
 
typedef std::map< uint32, SpellCooldownOverrideSpellCooldownOverrideMap
 
typedef std::set< uint32TalentAdditionalSet
 

Enumerations

enum  SpellCategories {
  SPELLCATEGORY_HEALTH_MANA_POTIONS = 4 ,
  SPELLCATEGORY_DEVOUR_MAGIC = 12 ,
  SPELLCATEGORY_JUDGEMENT = 1210 ,
  SPELLCATEGORY_FOOD = 11 ,
  SPELLCATEGORY_DRINK = 59
}
 
enum  SpellFamilyFlag {
  SPELLFAMILYFLAG_ROGUE_VANISH = 0x00000800 ,
  SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT = 0x00000860 ,
  SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP = 0x00000240 ,
  SPELLFAMILYFLAG_ROGUE_KICK = 0x00000010 ,
  SPELLFAMILYFLAG1_ROGUE_DISMANTLE = 0x00100000 ,
  SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY = 0x40000000 ,
  SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY = 0x00000800 ,
  SPELLFAMILYFLAG_WARRIOR_CHARGE = 0x00000001 ,
  SPELLFAMILYFLAG_WARRIOR_SLAM = 0x00200000 ,
  SPELLFAMILYFLAG_WARRIOR_EXECUTE = 0x20000000 ,
  SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW = 0x04000000 ,
  SPELLFAMILYFLAG_WARLOCK_LIFETAP = 0x00040000 ,
  SPELLFAMILYFLAG2_DRUID_STARFALL = 0x00000100 ,
  SPELLFAMILYFLAG1_PALADIN_DIVINESTORM = 0x00020000 ,
  SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK = 0x80000000 ,
  SPELLFAMILYFLAG_SHAMAN_HEALING_STREAM = 0x00002000 ,
  SPELLFAMILYFLAG_SHAMAN_MANA_SPRING = 0x00004000 ,
  SPELLFAMILYFLAG2_SHAMAN_LAVA_LASH = 0x00000004 ,
  SPELLFAMILYFLAG_SHAMAN_FIRE_NOVA = 0x28000000 ,
  SPELLFAMILYFLAG_DK_DEATH_STRIKE = 0x00000010 ,
  SPELLFAMILYFLAG_DK_DEATH_COIL = 0x00002000 ,
  SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS = 0x04000000
}
 
enum  SpellLinkedType {
  SPELL_LINK_CAST = 0 ,
  SPELL_LINK_HIT = 1 * 200000 ,
  SPELL_LINK_AURA = 2 * 200000 ,
  SPELL_LINK_REMOVE = 0
}
 
enum  ProcFlags {
  PROC_FLAG_NONE = 0x00000000 ,
  PROC_FLAG_KILLED = 0x00000001 ,
  PROC_FLAG_KILL = 0x00000002 ,
  PROC_FLAG_DONE_MELEE_AUTO_ATTACK = 0x00000004 ,
  PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK = 0x00000008 ,
  PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS = 0x00000010 ,
  PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS = 0x00000020 ,
  PROC_FLAG_DONE_RANGED_AUTO_ATTACK = 0x00000040 ,
  PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK = 0x00000080 ,
  PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS = 0x00000100 ,
  PROC_FLAG_TAKEN_SPELL_RANGED_DMG_CLASS = 0x00000200 ,
  PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS = 0x00000400 ,
  PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_POS = 0x00000800 ,
  PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG = 0x00001000 ,
  PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG = 0x00002000 ,
  PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS = 0x00004000 ,
  PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS = 0x00008000 ,
  PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG = 0x00010000 ,
  PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG = 0x00020000 ,
  PROC_FLAG_DONE_PERIODIC = 0x00040000 ,
  PROC_FLAG_TAKEN_PERIODIC = 0x00080000 ,
  PROC_FLAG_TAKEN_DAMAGE = 0x00100000 ,
  PROC_FLAG_DONE_TRAP_ACTIVATION = 0x00200000 ,
  PROC_FLAG_DONE_MAINHAND_ATTACK = 0x00400000 ,
  PROC_FLAG_DONE_OFFHAND_ATTACK = 0x00800000 ,
  PROC_FLAG_DEATH = 0x01000000 ,
  AUTO_ATTACK_PROC_FLAG_MASK ,
  MELEE_PROC_FLAG_MASK ,
  RANGED_PROC_FLAG_MASK ,
  SPELL_PROC_FLAG_MASK ,
  SPELL_CAST_PROC_FLAG_MASK = SPELL_PROC_FLAG_MASK | PROC_FLAG_DONE_TRAP_ACTIVATION | RANGED_PROC_FLAG_MASK ,
  PERIODIC_PROC_FLAG_MASK = PROC_FLAG_DONE_PERIODIC | PROC_FLAG_TAKEN_PERIODIC ,
  DONE_HIT_PROC_FLAG_MASK ,
  TAKEN_HIT_PROC_FLAG_MASK ,
  REQ_SPELL_PHASE_PROC_FLAG_MASK = SPELL_PROC_FLAG_MASK & DONE_HIT_PROC_FLAG_MASK
}
 
enum  ProcFlagsExLegacy {
  PROC_EX_NONE = 0x0000000 ,
  PROC_EX_NORMAL_HIT = 0x0000001 ,
  PROC_EX_CRITICAL_HIT = 0x0000002 ,
  PROC_EX_MISS = 0x0000004 ,
  PROC_EX_RESIST = 0x0000008 ,
  PROC_EX_DODGE = 0x0000010 ,
  PROC_EX_PARRY = 0x0000020 ,
  PROC_EX_BLOCK = 0x0000040 ,
  PROC_EX_EVADE = 0x0000080 ,
  PROC_EX_IMMUNE = 0x0000100 ,
  PROC_EX_DEFLECT = 0x0000200 ,
  PROC_EX_ABSORB = 0x0000400 ,
  PROC_EX_REFLECT = 0x0000800 ,
  PROC_EX_INTERRUPT = 0x0001000 ,
  PROC_EX_FULL_BLOCK = 0x0002000 ,
  PROC_EX_RESERVED2 = 0x0004000 ,
  PROC_EX_NOT_ACTIVE_SPELL = 0x0008000 ,
  PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000 ,
  PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 ,
  PROC_EX_ONLY_ACTIVE_SPELL = 0x0040000 ,
  PROC_EX_NO_OVERHEAL = 0x0080000 ,
  PROC_EX_NO_AURA_REFRESH = 0x0100000 ,
  PROC_EX_ONLY_FIRST_TICK = 0x0200000 ,
  PROC_EX_INTERNAL_CANT_PROC = 0x0800000 ,
  PROC_EX_INTERNAL_DOT = 0x1000000 ,
  PROC_EX_INTERNAL_HOT = 0x2000000 ,
  PROC_EX_INTERNAL_TRIGGERED = 0x4000000 ,
  PROC_EX_INTERNAL_REQ_FAMILY = 0x8000000
}
 
enum  ProcFlagsSpellType {
  PROC_SPELL_TYPE_NONE = 0x0000000 ,
  PROC_SPELL_TYPE_DAMAGE = 0x0000001 ,
  PROC_SPELL_TYPE_HEAL = 0x0000002 ,
  PROC_SPELL_TYPE_NO_DMG_HEAL = 0x0000004 ,
  PROC_SPELL_TYPE_MASK_ALL = PROC_SPELL_TYPE_DAMAGE | PROC_SPELL_TYPE_HEAL | PROC_SPELL_TYPE_NO_DMG_HEAL
}
 
enum  ProcFlagsSpellPhase {
  PROC_SPELL_PHASE_NONE = 0x0000000 ,
  PROC_SPELL_PHASE_CAST = 0x0000001 ,
  PROC_SPELL_PHASE_HIT = 0x0000002 ,
  PROC_SPELL_PHASE_FINISH = 0x0000004 ,
  PROC_SPELL_PHASE_MASK_ALL = PROC_SPELL_PHASE_CAST | PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH
}
 
enum  ProcFlagsHit {
  PROC_HIT_NONE = 0x0000000 ,
  PROC_HIT_NORMAL = 0x0000001 ,
  PROC_HIT_CRITICAL = 0x0000002 ,
  PROC_HIT_MISS = 0x0000004 ,
  PROC_HIT_FULL_RESIST = 0x0000008 ,
  PROC_HIT_DODGE = 0x0000010 ,
  PROC_HIT_PARRY = 0x0000020 ,
  PROC_HIT_BLOCK = 0x0000040 ,
  PROC_HIT_EVADE = 0x0000080 ,
  PROC_HIT_IMMUNE = 0x0000100 ,
  PROC_HIT_DEFLECT = 0x0000200 ,
  PROC_HIT_ABSORB = 0x0000400 ,
  PROC_HIT_REFLECT = 0x0000800 ,
  PROC_HIT_INTERRUPT = 0x0001000 ,
  PROC_HIT_FULL_BLOCK = 0x0002000 ,
  PROC_HIT_MASK_ALL = 0x0002FFF
}
 
enum  ProcAttributes { PROC_ATTR_REQ_EXP_OR_HONOR = 0x0000010 }
 
enum  EnchantProcAttributes {
  ENCHANT_PROC_ATTR_EXCLUSIVE = 0x1 ,
  ENCHANT_PROC_ATTR_WHITE_HIT = 0x2
}
 
enum  SpellGroupSpecialFlags {
  SPELL_GROUP_SPECIAL_FLAG_NONE = 0x000 ,
  SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE = 0x001 ,
  SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN = 0x002 ,
  SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE = 0x004 ,
  SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH = 0x008 ,
  SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX = 0x00F ,
  SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST = 0x010 ,
  SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK = 0x020 ,
  SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK = 0x040 ,
  SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 = 0x100 ,
  SPELL_GROUP_SPECIAL_FLAG_PRIORITY2 = 0x200 ,
  SPELL_GROUP_SPECIAL_FLAG_PRIORITY3 = 0x400 ,
  SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 = 0x800 ,
  SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK = 0x1000 ,
  SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL = 0x2000 ,
  SPELL_GROUP_SPECIAL_FLAG_MAX = 0x4000 ,
  SPELL_GROUP_SPECIAL_FLAG_FLASK = SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE | SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN
}
 
enum  SpellGroupStackFlags {
  SPELL_GROUP_STACK_FLAG_NONE = 0x00 ,
  SPELL_GROUP_STACK_FLAG_EXCLUSIVE = 0x01 ,
  SPELL_GROUP_STACK_FLAG_NOT_SAME_CASTER = 0x02 ,
  SPELL_GROUP_STACK_FLAG_FLAGGED = 0x04 ,
  SPELL_GROUP_STACK_FLAG_NEVER_STACK = 0x08 ,
  SPELL_GROUP_STACK_FLAG_EFFECT_EXCLUSIVE = 0x10 ,
  SPELL_GROUP_STACK_FLAG_MAX = 0x20 ,
  SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST = 0x100 ,
  SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST = 0x200
}
 
enum  SpellGroupIDs { SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS = 1 }
 
enum  EffectRadiusIndex {
  EFFECT_RADIUS_2_YARDS = 7 ,
  EFFECT_RADIUS_5_YARDS = 8 ,
  EFFECT_RADIUS_20_YARDS = 9 ,
  EFFECT_RADIUS_30_YARDS = 10 ,
  EFFECT_RADIUS_45_YARDS = 11 ,
  EFFECT_RADIUS_100_YARDS = 12 ,
  EFFECT_RADIUS_10_YARDS = 13 ,
  EFFECT_RADIUS_8_YARDS = 14 ,
  EFFECT_RADIUS_3_YARDS = 15 ,
  EFFECT_RADIUS_1_YARD = 16 ,
  EFFECT_RADIUS_13_YARDS = 17 ,
  EFFECT_RADIUS_15_YARDS = 18 ,
  EFFECT_RADIUS_18_YARDS = 19 ,
  EFFECT_RADIUS_25_YARDS = 20 ,
  EFFECT_RADIUS_35_YARDS = 21 ,
  EFFECT_RADIUS_200_YARDS = 22 ,
  EFFECT_RADIUS_40_YARDS = 23 ,
  EFFECT_RADIUS_65_YARDS = 24 ,
  EFFECT_RADIUS_70_YARDS = 25 ,
  EFFECT_RADIUS_4_YARDS = 26 ,
  EFFECT_RADIUS_50_YARDS = 27 ,
  EFFECT_RADIUS_50000_YARDS = 28 ,
  EFFECT_RADIUS_6_YARDS = 29 ,
  EFFECT_RADIUS_500_YARDS = 30 ,
  EFFECT_RADIUS_80_YARDS = 31 ,
  EFFECT_RADIUS_12_YARDS = 32 ,
  EFFECT_RADIUS_99_YARDS = 33 ,
  EFFECT_RADIUS_55_YARDS = 35 ,
  EFFECT_RADIUS_0_YARDS = 36 ,
  EFFECT_RADIUS_7_YARDS = 37 ,
  EFFECT_RADIUS_21_YARDS = 38 ,
  EFFECT_RADIUS_34_YARDS = 39 ,
  EFFECT_RADIUS_9_YARDS = 40 ,
  EFFECT_RADIUS_150_YARDS = 41 ,
  EFFECT_RADIUS_11_YARDS = 42 ,
  EFFECT_RADIUS_16_YARDS = 43 ,
  EFFECT_RADIUS_0_5_YARDS = 44 ,
  EFFECT_RADIUS_10_YARDS_2 = 45 ,
  EFFECT_RADIUS_5_YARDS_2 = 46 ,
  EFFECT_RADIUS_15_YARDS_2 = 47 ,
  EFFECT_RADIUS_60_YARDS = 48 ,
  EFFECT_RADIUS_90_YARDS = 49 ,
  EFFECT_RADIUS_15_YARDS_3 = 50 ,
  EFFECT_RADIUS_60_YARDS_2 = 51 ,
  EFFECT_RADIUS_5_YARDS_3 = 52 ,
  EFFECT_RADIUS_60_YARDS_3 = 53 ,
  EFFECT_RADIUS_50000_YARDS_2 = 54 ,
  EFFECT_RADIUS_130_YARDS = 55 ,
  EFFECT_RADIUS_38_YARDS = 56 ,
  EFFECT_RADIUS_45_YARDS_2 = 57 ,
  EFFECT_RADIUS_32_YARDS = 59 ,
  EFFECT_RADIUS_44_YARDS = 60 ,
  EFFECT_RADIUS_14_YARDS = 61 ,
  EFFECT_RADIUS_47_YARDS = 62 ,
  EFFECT_RADIUS_23_YARDS = 63 ,
  EFFECT_RADIUS_3_5_YARDS = 64 ,
  EFFECT_RADIUS_80_YARDS_2 = 65
}
 
enum  ICCBuff {
  ICC_AREA = 4812 ,
  ICC_RACEMASK_HORDE = 690 ,
  ICC_RACEMASK_ALLIANCE = 1101
}
 

Functions

bool IsPrimaryProfessionSkill (uint32 skill)
 
bool IsProfessionSkill (uint32 skill)
 
bool IsProfessionOrRidingSkill (uint32 skill)
 
bool IsPartOfSkillLine (uint32 skillId, uint32 spellId)
 
DiminishingGroup GetDiminishingReturnsGroupForSpell (SpellInfo const *spellproto, bool triggered)
 
DiminishingReturnsType GetDiminishingReturnsGroupType (DiminishingGroup group)
 
DiminishingLevels GetDiminishingReturnsMaxLevel (DiminishingGroup group)
 
int32 GetDiminishingReturnsLimitDuration (DiminishingGroup group, SpellInfo const *spellproto)
 
bool IsDiminishingReturnsGroupDurationLimited (DiminishingGroup group)
 

Macro Definition Documentation

◆ AURA_SPELL_PROC_EX_MASK

#define AURA_SPELL_PROC_EX_MASK
Value:
@ PROC_EX_DODGE
Definition: SpellMgr.h:198
@ PROC_EX_DEFLECT
Definition: SpellMgr.h:203
@ PROC_EX_BLOCK
Definition: SpellMgr.h:200
@ PROC_EX_CRITICAL_HIT
Definition: SpellMgr.h:195
@ PROC_EX_NORMAL_HIT
Definition: SpellMgr.h:194
@ PROC_EX_IMMUNE
Definition: SpellMgr.h:202
@ PROC_EX_MISS
Definition: SpellMgr.h:196
@ PROC_EX_RESIST
Definition: SpellMgr.h:197
@ PROC_EX_REFLECT
Definition: SpellMgr.h:205
@ PROC_EX_ABSORB
Definition: SpellMgr.h:204
@ PROC_EX_INTERRUPT
Definition: SpellMgr.h:206
@ PROC_EX_PARRY
Definition: SpellMgr.h:199
@ PROC_EX_EVADE
Definition: SpellMgr.h:201

◆ MELEE_BASED_TRIGGER_MASK

#define MELEE_BASED_TRIGGER_MASK
Value:
@ PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS
Definition: SpellMgr.h:119
@ PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK
Definition: SpellMgr.h:117
@ PROC_FLAG_DONE_MELEE_AUTO_ATTACK
Definition: SpellMgr.h:110
@ PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS
Definition: SpellMgr.h:113
@ PROC_FLAG_TAKEN_SPELL_RANGED_DMG_CLASS
Definition: SpellMgr.h:120
@ PROC_FLAG_DONE_RANGED_AUTO_ATTACK
Definition: SpellMgr.h:116
@ PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK
Definition: SpellMgr.h:111
@ PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS
Definition: SpellMgr.h:114

◆ SPELL_LINKED_MAX_SPELLS

#define SPELL_LINKED_MAX_SPELLS   200000

◆ SPELL_RELIC_COOLDOWN

#define SPELL_RELIC_COOLDOWN   1

◆ sSpellMgr

#define sSpellMgr   SpellMgr::instance()

Typedef Documentation

◆ EnchantCustomAttribute

typedef std::vector<bool> EnchantCustomAttribute

◆ PetDefaultSpellsMap

◆ PetLevelupSpellMap

◆ PetLevelupSpellSet

typedef std::multimap<uint32, uint32> PetLevelupSpellSet

◆ SkillLineAbilityMap

typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap

◆ SkillLineAbilityMapBounds

typedef std::pair<SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds

◆ SpellAreaForAreaMap

typedef std::multimap<uint32, SpellArea const*> SpellAreaForAreaMap

◆ SpellAreaForAreaMapBounds

typedef std::pair<SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator> SpellAreaForAreaMapBounds

◆ SpellAreaForAuraMap

typedef std::multimap<uint32, SpellArea const*> SpellAreaForAuraMap

◆ SpellAreaForAuraMapBounds

typedef std::pair<SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator> SpellAreaForAuraMapBounds

◆ SpellAreaForQuestMap

typedef std::multimap<uint32, SpellArea const*> SpellAreaForQuestMap

◆ SpellAreaForQuestMapBounds

typedef std::pair<SpellAreaForQuestMap::const_iterator, SpellAreaForQuestMap::const_iterator> SpellAreaForQuestMapBounds

◆ SpellAreaMap

typedef std::multimap<uint32, SpellArea> SpellAreaMap

◆ SpellAreaMapBounds

typedef std::pair<SpellAreaMap::const_iterator, SpellAreaMap::const_iterator> SpellAreaMapBounds

◆ SpellBonusMap

typedef std::unordered_map<uint32, SpellBonusEntry> SpellBonusMap

◆ SpellChainMap

typedef std::unordered_map<uint32, SpellChainNode> SpellChainMap

◆ SpellCooldownOverrideMap

◆ SpellCustomAttribute

typedef std::vector<uint32> SpellCustomAttribute

◆ SpellDifficultySearcherMap

◆ SpellEnchantProcEventMap

◆ SpellGroupMap

typedef std::map<uint32, SpellStackInfo> SpellGroupMap

◆ SpellGroupStackMap

◆ SpellInfoMap

typedef std::vector<SpellInfo*> SpellInfoMap

◆ SpellLearnSkillMap

typedef std::unordered_map<uint32, SpellLearnSkillNode> SpellLearnSkillMap

◆ SpellLinkedMap

typedef std::map<int32, std::vector<int32> > SpellLinkedMap

◆ SpellMixologyMap

typedef std::map<uint32, float> SpellMixologyMap

◆ SpellPetAuraMap

typedef std::map<uint32, PetAura> SpellPetAuraMap

◆ SpellProcEventMap

typedef std::unordered_map<uint32, SpellProcEventEntry> SpellProcEventMap

◆ SpellProcMap

typedef std::unordered_map<uint32, SpellProcEntry> SpellProcMap

◆ SpellRequiredMap

typedef std::multimap<uint32, uint32> SpellRequiredMap

◆ SpellRequiredMapBounds

typedef std::pair<SpellRequiredMap::const_iterator, SpellRequiredMap::const_iterator> SpellRequiredMapBounds

◆ SpellsRequiringSpellMap

typedef std::multimap<uint32, uint32> SpellsRequiringSpellMap

◆ SpellsRequiringSpellMapBounds

typedef std::pair<SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator> SpellsRequiringSpellMapBounds

◆ SpellTargetPositionMap

◆ SpellThreatMap

typedef std::unordered_map<uint32, SpellThreatEntry> SpellThreatMap

◆ TalentAdditionalSet

typedef std::set<uint32> TalentAdditionalSet

Enumeration Type Documentation

◆ EffectRadiusIndex

Enumerator
EFFECT_RADIUS_2_YARDS 
EFFECT_RADIUS_5_YARDS 
EFFECT_RADIUS_20_YARDS 
EFFECT_RADIUS_30_YARDS 
EFFECT_RADIUS_45_YARDS 
EFFECT_RADIUS_100_YARDS 
EFFECT_RADIUS_10_YARDS 
EFFECT_RADIUS_8_YARDS 
EFFECT_RADIUS_3_YARDS 
EFFECT_RADIUS_1_YARD 
EFFECT_RADIUS_13_YARDS 
EFFECT_RADIUS_15_YARDS 
EFFECT_RADIUS_18_YARDS 
EFFECT_RADIUS_25_YARDS 
EFFECT_RADIUS_35_YARDS 
EFFECT_RADIUS_200_YARDS 
EFFECT_RADIUS_40_YARDS 
EFFECT_RADIUS_65_YARDS 
EFFECT_RADIUS_70_YARDS 
EFFECT_RADIUS_4_YARDS 
EFFECT_RADIUS_50_YARDS 
EFFECT_RADIUS_50000_YARDS 
EFFECT_RADIUS_6_YARDS 
EFFECT_RADIUS_500_YARDS 
EFFECT_RADIUS_80_YARDS 
EFFECT_RADIUS_12_YARDS 
EFFECT_RADIUS_99_YARDS 
EFFECT_RADIUS_55_YARDS 
EFFECT_RADIUS_0_YARDS 
EFFECT_RADIUS_7_YARDS 
EFFECT_RADIUS_21_YARDS 
EFFECT_RADIUS_34_YARDS 
EFFECT_RADIUS_9_YARDS 
EFFECT_RADIUS_150_YARDS 
EFFECT_RADIUS_11_YARDS 
EFFECT_RADIUS_16_YARDS 
EFFECT_RADIUS_0_5_YARDS 
EFFECT_RADIUS_10_YARDS_2 
EFFECT_RADIUS_5_YARDS_2 
EFFECT_RADIUS_15_YARDS_2 
EFFECT_RADIUS_60_YARDS 
EFFECT_RADIUS_90_YARDS 
EFFECT_RADIUS_15_YARDS_3 
EFFECT_RADIUS_60_YARDS_2 
EFFECT_RADIUS_5_YARDS_3 
EFFECT_RADIUS_60_YARDS_3 
EFFECT_RADIUS_50000_YARDS_2 
EFFECT_RADIUS_130_YARDS 
EFFECT_RADIUS_38_YARDS 
EFFECT_RADIUS_45_YARDS_2 
EFFECT_RADIUS_32_YARDS 
EFFECT_RADIUS_44_YARDS 
EFFECT_RADIUS_14_YARDS 
EFFECT_RADIUS_47_YARDS 
EFFECT_RADIUS_23_YARDS 
EFFECT_RADIUS_3_5_YARDS 
EFFECT_RADIUS_80_YARDS_2 
408{
445 EFFECT_RADIUS_0_5_YARDS = 44, // 0.5 yards
464 EFFECT_RADIUS_3_5_YARDS = 64, // 3.5 yards
466};
@ EFFECT_RADIUS_14_YARDS
Definition: SpellMgr.h:461
@ EFFECT_RADIUS_500_YARDS
Definition: SpellMgr.h:432
@ EFFECT_RADIUS_13_YARDS
Definition: SpellMgr.h:419
@ EFFECT_RADIUS_7_YARDS
Definition: SpellMgr.h:438
@ EFFECT_RADIUS_100_YARDS
Definition: SpellMgr.h:414
@ EFFECT_RADIUS_45_YARDS_2
Definition: SpellMgr.h:458
@ EFFECT_RADIUS_80_YARDS
Definition: SpellMgr.h:433
@ EFFECT_RADIUS_20_YARDS
Definition: SpellMgr.h:411
@ EFFECT_RADIUS_60_YARDS_2
Definition: SpellMgr.h:452
@ EFFECT_RADIUS_8_YARDS
Definition: SpellMgr.h:416
@ EFFECT_RADIUS_34_YARDS
Definition: SpellMgr.h:440
@ EFFECT_RADIUS_45_YARDS
Definition: SpellMgr.h:413
@ EFFECT_RADIUS_2_YARDS
Definition: SpellMgr.h:409
@ EFFECT_RADIUS_50000_YARDS_2
Definition: SpellMgr.h:455
@ EFFECT_RADIUS_44_YARDS
Definition: SpellMgr.h:460
@ EFFECT_RADIUS_5_YARDS_3
Definition: SpellMgr.h:453
@ EFFECT_RADIUS_15_YARDS
Definition: SpellMgr.h:420
@ EFFECT_RADIUS_23_YARDS
Definition: SpellMgr.h:463
@ EFFECT_RADIUS_55_YARDS
Definition: SpellMgr.h:436
@ EFFECT_RADIUS_65_YARDS
Definition: SpellMgr.h:426
@ EFFECT_RADIUS_32_YARDS
Definition: SpellMgr.h:459
@ EFFECT_RADIUS_30_YARDS
Definition: SpellMgr.h:412
@ EFFECT_RADIUS_1_YARD
Definition: SpellMgr.h:418
@ EFFECT_RADIUS_9_YARDS
Definition: SpellMgr.h:441
@ EFFECT_RADIUS_16_YARDS
Definition: SpellMgr.h:444
@ EFFECT_RADIUS_60_YARDS
Definition: SpellMgr.h:449
@ EFFECT_RADIUS_90_YARDS
Definition: SpellMgr.h:450
@ EFFECT_RADIUS_130_YARDS
Definition: SpellMgr.h:456
@ EFFECT_RADIUS_4_YARDS
Definition: SpellMgr.h:428
@ EFFECT_RADIUS_25_YARDS
Definition: SpellMgr.h:422
@ EFFECT_RADIUS_10_YARDS_2
Definition: SpellMgr.h:446
@ EFFECT_RADIUS_15_YARDS_2
Definition: SpellMgr.h:448
@ EFFECT_RADIUS_5_YARDS
Definition: SpellMgr.h:410
@ EFFECT_RADIUS_40_YARDS
Definition: SpellMgr.h:425
@ EFFECT_RADIUS_70_YARDS
Definition: SpellMgr.h:427
@ EFFECT_RADIUS_5_YARDS_2
Definition: SpellMgr.h:447
@ EFFECT_RADIUS_3_YARDS
Definition: SpellMgr.h:417
@ EFFECT_RADIUS_38_YARDS
Definition: SpellMgr.h:457
@ EFFECT_RADIUS_21_YARDS
Definition: SpellMgr.h:439
@ EFFECT_RADIUS_50_YARDS
Definition: SpellMgr.h:429
@ EFFECT_RADIUS_50000_YARDS
Definition: SpellMgr.h:430
@ EFFECT_RADIUS_60_YARDS_3
Definition: SpellMgr.h:454
@ EFFECT_RADIUS_18_YARDS
Definition: SpellMgr.h:421
@ EFFECT_RADIUS_200_YARDS
Definition: SpellMgr.h:424
@ EFFECT_RADIUS_12_YARDS
Definition: SpellMgr.h:434
@ EFFECT_RADIUS_10_YARDS
Definition: SpellMgr.h:415
@ EFFECT_RADIUS_0_YARDS
Definition: SpellMgr.h:437
@ EFFECT_RADIUS_3_5_YARDS
Definition: SpellMgr.h:464
@ EFFECT_RADIUS_150_YARDS
Definition: SpellMgr.h:442
@ EFFECT_RADIUS_80_YARDS_2
Definition: SpellMgr.h:465
@ EFFECT_RADIUS_35_YARDS
Definition: SpellMgr.h:423
@ EFFECT_RADIUS_47_YARDS
Definition: SpellMgr.h:462
@ EFFECT_RADIUS_6_YARDS
Definition: SpellMgr.h:431
@ EFFECT_RADIUS_11_YARDS
Definition: SpellMgr.h:443
@ EFFECT_RADIUS_15_YARDS_3
Definition: SpellMgr.h:451
@ EFFECT_RADIUS_0_5_YARDS
Definition: SpellMgr.h:445
@ EFFECT_RADIUS_99_YARDS
Definition: SpellMgr.h:435

◆ EnchantProcAttributes

Enumerator
ENCHANT_PROC_ATTR_EXCLUSIVE 
ENCHANT_PROC_ATTR_WHITE_HIT 
308{
309 ENCHANT_PROC_ATTR_EXCLUSIVE = 0x1, // Only one instance of that effect can be active
310 ENCHANT_PROC_ATTR_WHITE_HIT = 0x2 // Enchant shall only proc off white hits (not abilities)
311};
@ ENCHANT_PROC_ATTR_WHITE_HIT
Definition: SpellMgr.h:310
@ ENCHANT_PROC_ATTR_EXCLUSIVE
Definition: SpellMgr.h:309

◆ ICCBuff

enum ICCBuff
Enumerator
ICC_AREA 
ICC_RACEMASK_HORDE 
ICC_RACEMASK_ALLIANCE 
520{
521 ICC_AREA = 4812,
522 ICC_RACEMASK_HORDE = 690,
524};
@ ICC_RACEMASK_HORDE
Definition: SpellMgr.h:522
@ ICC_AREA
Definition: SpellMgr.h:521
@ ICC_RACEMASK_ALLIANCE
Definition: SpellMgr.h:523

◆ ProcAttributes

Enumerator
PROC_ATTR_REQ_EXP_OR_HONOR 
270{
271 PROC_ATTR_REQ_EXP_OR_HONOR = 0x0000010,
272};
@ PROC_ATTR_REQ_EXP_OR_HONOR
Definition: SpellMgr.h:271

◆ ProcFlags

enum ProcFlags
Enumerator
PROC_FLAG_NONE 
PROC_FLAG_KILLED 
PROC_FLAG_KILL 
PROC_FLAG_DONE_MELEE_AUTO_ATTACK 
PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK 
PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS 
PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS 
PROC_FLAG_DONE_RANGED_AUTO_ATTACK 
PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK 
PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS 
PROC_FLAG_TAKEN_SPELL_RANGED_DMG_CLASS 
PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS 
PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_POS 
PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG 
PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG 
PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS 
PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS 
PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG 
PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG 
PROC_FLAG_DONE_PERIODIC 
PROC_FLAG_TAKEN_PERIODIC 
PROC_FLAG_TAKEN_DAMAGE 
PROC_FLAG_DONE_TRAP_ACTIVATION 
PROC_FLAG_DONE_MAINHAND_ATTACK 
PROC_FLAG_DONE_OFFHAND_ATTACK 
PROC_FLAG_DEATH 
AUTO_ATTACK_PROC_FLAG_MASK 
MELEE_PROC_FLAG_MASK 
RANGED_PROC_FLAG_MASK 
SPELL_PROC_FLAG_MASK 
SPELL_CAST_PROC_FLAG_MASK 
PERIODIC_PROC_FLAG_MASK 
DONE_HIT_PROC_FLAG_MASK 
TAKEN_HIT_PROC_FLAG_MASK 
REQ_SPELL_PHASE_PROC_FLAG_MASK 
104{
105 PROC_FLAG_NONE = 0x00000000,
106
107 PROC_FLAG_KILLED = 0x00000001, // 00 Killed by agressor - not sure about this flag
108 PROC_FLAG_KILL = 0x00000002, // 01 Kill target (in most cases need XP/Honor reward)
109
110 PROC_FLAG_DONE_MELEE_AUTO_ATTACK = 0x00000004, // 02 Done melee auto attack
111 PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK = 0x00000008, // 03 Taken melee auto attack
112
113 PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS = 0x00000010, // 04 Done attack by Spell that has dmg class melee
114 PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS = 0x00000020, // 05 Taken attack by Spell that has dmg class melee
115
116 PROC_FLAG_DONE_RANGED_AUTO_ATTACK = 0x00000040, // 06 Done ranged auto attack
117 PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK = 0x00000080, // 07 Taken ranged auto attack
118
119 PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS = 0x00000100, // 08 Done attack by Spell that has dmg class ranged
120 PROC_FLAG_TAKEN_SPELL_RANGED_DMG_CLASS = 0x00000200, // 09 Taken attack by Spell that has dmg class ranged
121
122 PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS = 0x00000400, // 10 Done positive spell that has dmg class none
123 PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_POS = 0x00000800, // 11 Taken positive spell that has dmg class none
124
125 PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG = 0x00001000, // 12 Done negative spell that has dmg class none
126 PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG = 0x00002000, // 13 Taken negative spell that has dmg class none
127
128 PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS = 0x00004000, // 14 Done positive spell that has dmg class magic
129 PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS = 0x00008000, // 15 Taken positive spell that has dmg class magic
130
131 PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG = 0x00010000, // 16 Done negative spell that has dmg class magic
132 PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG = 0x00020000, // 17 Taken negative spell that has dmg class magic
133
134 PROC_FLAG_DONE_PERIODIC = 0x00040000, // 18 Successful do periodic (damage / healing)
135 PROC_FLAG_TAKEN_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage / healing)
136
137 PROC_FLAG_TAKEN_DAMAGE = 0x00100000, // 20 Taken any damage
138 PROC_FLAG_DONE_TRAP_ACTIVATION = 0x00200000, // 21 On trap activation (possibly needs name change to ON_GAMEOBJECT_CAST or USE)
139
140 PROC_FLAG_DONE_MAINHAND_ATTACK = 0x00400000, // 22 Done main-hand melee attacks (spell and autoattack)
141 PROC_FLAG_DONE_OFFHAND_ATTACK = 0x00800000, // 23 Done off-hand melee attacks (spell and autoattack)
142
143 PROC_FLAG_DEATH = 0x01000000, // 24 Died in any way
144
145 // flag masks
148
152
155
162
164
166
172
178
180};
@ MELEE_PROC_FLAG_MASK
Definition: SpellMgr.h:149
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS
Definition: SpellMgr.h:128
@ AUTO_ATTACK_PROC_FLAG_MASK
Definition: SpellMgr.h:146
@ PROC_FLAG_DONE_PERIODIC
Definition: SpellMgr.h:134
@ TAKEN_HIT_PROC_FLAG_MASK
Definition: SpellMgr.h:173
@ SPELL_CAST_PROC_FLAG_MASK
Definition: SpellMgr.h:163
@ PERIODIC_PROC_FLAG_MASK
Definition: SpellMgr.h:165
@ PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS
Definition: SpellMgr.h:122
@ PROC_FLAG_KILLED
Definition: SpellMgr.h:107
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG
Definition: SpellMgr.h:132
@ PROC_FLAG_DEATH
Definition: SpellMgr.h:143
@ PROC_FLAG_TAKEN_PERIODIC
Definition: SpellMgr.h:135
@ REQ_SPELL_PHASE_PROC_FLAG_MASK
Definition: SpellMgr.h:179
@ PROC_FLAG_KILL
Definition: SpellMgr.h:108
@ PROC_FLAG_DONE_MAINHAND_ATTACK
Definition: SpellMgr.h:140
@ PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG
Definition: SpellMgr.h:126
@ PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG
Definition: SpellMgr.h:125
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS
Definition: SpellMgr.h:129
@ PROC_FLAG_TAKEN_DAMAGE
Definition: SpellMgr.h:137
@ RANGED_PROC_FLAG_MASK
Definition: SpellMgr.h:153
@ PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_POS
Definition: SpellMgr.h:123
@ SPELL_PROC_FLAG_MASK
Definition: SpellMgr.h:156
@ DONE_HIT_PROC_FLAG_MASK
Definition: SpellMgr.h:167
@ PROC_FLAG_DONE_TRAP_ACTIVATION
Definition: SpellMgr.h:138
@ PROC_FLAG_DONE_OFFHAND_ATTACK
Definition: SpellMgr.h:141
@ PROC_FLAG_NONE
Definition: SpellMgr.h:105
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG
Definition: SpellMgr.h:131

◆ ProcFlagsExLegacy

Enumerator
PROC_EX_NONE 
PROC_EX_NORMAL_HIT 
PROC_EX_CRITICAL_HIT 
PROC_EX_MISS 
PROC_EX_RESIST 
PROC_EX_DODGE 
PROC_EX_PARRY 
PROC_EX_BLOCK 
PROC_EX_EVADE 
PROC_EX_IMMUNE 
PROC_EX_DEFLECT 
PROC_EX_ABSORB 
PROC_EX_REFLECT 
PROC_EX_INTERRUPT 
PROC_EX_FULL_BLOCK 
PROC_EX_RESERVED2 
PROC_EX_NOT_ACTIVE_SPELL 
PROC_EX_EX_TRIGGER_ALWAYS 
PROC_EX_EX_ONE_TIME_TRIGGER 
PROC_EX_ONLY_ACTIVE_SPELL 
PROC_EX_NO_OVERHEAL 
PROC_EX_NO_AURA_REFRESH 
PROC_EX_ONLY_FIRST_TICK 
PROC_EX_INTERNAL_CANT_PROC 
PROC_EX_INTERNAL_DOT 
PROC_EX_INTERNAL_HOT 
PROC_EX_INTERNAL_TRIGGERED 
PROC_EX_INTERNAL_REQ_FAMILY 
192{
193 PROC_EX_NONE = 0x0000000, // If none can tigger on Hit/Crit only (passive spells MUST defined by SpellFamily flag)
194 PROC_EX_NORMAL_HIT = 0x0000001, // If set only from normal hit (only damage spells)
195 PROC_EX_CRITICAL_HIT = 0x0000002,
196 PROC_EX_MISS = 0x0000004,
197 PROC_EX_RESIST = 0x0000008,
198 PROC_EX_DODGE = 0x0000010,
199 PROC_EX_PARRY = 0x0000020,
200 PROC_EX_BLOCK = 0x0000040,
201 PROC_EX_EVADE = 0x0000080,
202 PROC_EX_IMMUNE = 0x0000100,
203 PROC_EX_DEFLECT = 0x0000200,
204 PROC_EX_ABSORB = 0x0000400,
205 PROC_EX_REFLECT = 0x0000800,
206 PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
207 PROC_EX_FULL_BLOCK = 0x0002000, // block all attack damage
208 PROC_EX_RESERVED2 = 0x0004000,
209 PROC_EX_NOT_ACTIVE_SPELL = 0x0008000, // Spell mustn't do damage/heal to proc
210 PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always no matter of hit result
211 PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000, // If set trigger always but only one time (not implemented yet)
212 PROC_EX_ONLY_ACTIVE_SPELL = 0x0040000, // Spell has to do damage/heal to proc
213 PROC_EX_NO_OVERHEAL = 0x0080000, // Proc if heal did some work
214 PROC_EX_NO_AURA_REFRESH = 0x0100000, // Proc if aura was not refreshed
215 PROC_EX_ONLY_FIRST_TICK = 0x0200000, // Proc only on first tick (in case of periodic spells)
216
217 // Flags for internal use - do not use these in db!
218 PROC_EX_INTERNAL_CANT_PROC = 0x0800000,
219 PROC_EX_INTERNAL_DOT = 0x1000000,
220 PROC_EX_INTERNAL_HOT = 0x2000000,
221 PROC_EX_INTERNAL_TRIGGERED = 0x4000000,
223};
@ PROC_EX_NONE
Definition: SpellMgr.h:193
@ PROC_EX_NO_OVERHEAL
Definition: SpellMgr.h:213
@ PROC_EX_NO_AURA_REFRESH
Definition: SpellMgr.h:214
@ PROC_EX_INTERNAL_CANT_PROC
Definition: SpellMgr.h:218
@ PROC_EX_RESERVED2
Definition: SpellMgr.h:208
@ PROC_EX_INTERNAL_DOT
Definition: SpellMgr.h:219
@ PROC_EX_INTERNAL_HOT
Definition: SpellMgr.h:220
@ PROC_EX_ONLY_ACTIVE_SPELL
Definition: SpellMgr.h:212
@ PROC_EX_FULL_BLOCK
Definition: SpellMgr.h:207
@ PROC_EX_EX_ONE_TIME_TRIGGER
Definition: SpellMgr.h:211
@ PROC_EX_ONLY_FIRST_TICK
Definition: SpellMgr.h:215
@ PROC_EX_INTERNAL_TRIGGERED
Definition: SpellMgr.h:221
@ PROC_EX_EX_TRIGGER_ALWAYS
Definition: SpellMgr.h:210
@ PROC_EX_NOT_ACTIVE_SPELL
Definition: SpellMgr.h:209
@ PROC_EX_INTERNAL_REQ_FAMILY
Definition: SpellMgr.h:222

◆ ProcFlagsHit

Enumerator
PROC_HIT_NONE 
PROC_HIT_NORMAL 
PROC_HIT_CRITICAL 
PROC_HIT_MISS 
PROC_HIT_FULL_RESIST 
PROC_HIT_DODGE 
PROC_HIT_PARRY 
PROC_HIT_BLOCK 
PROC_HIT_EVADE 
PROC_HIT_IMMUNE 
PROC_HIT_DEFLECT 
PROC_HIT_ABSORB 
PROC_HIT_REFLECT 
PROC_HIT_INTERRUPT 
PROC_HIT_FULL_BLOCK 
PROC_HIT_MASK_ALL 
250{
251 PROC_HIT_NONE = 0x0000000, // no value - PROC_HIT_NORMAL | PROC_HIT_CRITICAL for TAKEN proc type, PROC_HIT_NORMAL | PROC_HIT_CRITICAL | PROC_HIT_ABSORB for DONE
252 PROC_HIT_NORMAL = 0x0000001, // non-critical hits
253 PROC_HIT_CRITICAL = 0x0000002,
254 PROC_HIT_MISS = 0x0000004,
255 PROC_HIT_FULL_RESIST = 0x0000008,
256 PROC_HIT_DODGE = 0x0000010,
257 PROC_HIT_PARRY = 0x0000020,
258 PROC_HIT_BLOCK = 0x0000040, // partial or full block
259 PROC_HIT_EVADE = 0x0000080,
260 PROC_HIT_IMMUNE = 0x0000100,
261 PROC_HIT_DEFLECT = 0x0000200,
262 PROC_HIT_ABSORB = 0x0000400, // partial or full absorb
263 PROC_HIT_REFLECT = 0x0000800,
264 PROC_HIT_INTERRUPT = 0x0001000, // (not used atm)
265 PROC_HIT_FULL_BLOCK = 0x0002000,
266 PROC_HIT_MASK_ALL = 0x0002FFF,
267};
@ PROC_HIT_BLOCK
Definition: SpellMgr.h:258
@ PROC_HIT_FULL_RESIST
Definition: SpellMgr.h:255
@ PROC_HIT_FULL_BLOCK
Definition: SpellMgr.h:265
@ PROC_HIT_MISS
Definition: SpellMgr.h:254
@ PROC_HIT_INTERRUPT
Definition: SpellMgr.h:264
@ PROC_HIT_NONE
Definition: SpellMgr.h:251
@ PROC_HIT_DEFLECT
Definition: SpellMgr.h:261
@ PROC_HIT_EVADE
Definition: SpellMgr.h:259
@ PROC_HIT_DODGE
Definition: SpellMgr.h:256
@ PROC_HIT_IMMUNE
Definition: SpellMgr.h:260
@ PROC_HIT_ABSORB
Definition: SpellMgr.h:262
@ PROC_HIT_PARRY
Definition: SpellMgr.h:257
@ PROC_HIT_MASK_ALL
Definition: SpellMgr.h:266
@ PROC_HIT_CRITICAL
Definition: SpellMgr.h:253
@ PROC_HIT_NORMAL
Definition: SpellMgr.h:252
@ PROC_HIT_REFLECT
Definition: SpellMgr.h:263

◆ ProcFlagsSpellPhase

Enumerator
PROC_SPELL_PHASE_NONE 
PROC_SPELL_PHASE_CAST 
PROC_SPELL_PHASE_HIT 
PROC_SPELL_PHASE_FINISH 
PROC_SPELL_PHASE_MASK_ALL 
241{
242 PROC_SPELL_PHASE_NONE = 0x0000000,
243 PROC_SPELL_PHASE_CAST = 0x0000001,
244 PROC_SPELL_PHASE_HIT = 0x0000002,
245 PROC_SPELL_PHASE_FINISH = 0x0000004,
247};
@ PROC_SPELL_PHASE_FINISH
Definition: SpellMgr.h:245
@ PROC_SPELL_PHASE_NONE
Definition: SpellMgr.h:242
@ PROC_SPELL_PHASE_CAST
Definition: SpellMgr.h:243
@ PROC_SPELL_PHASE_HIT
Definition: SpellMgr.h:244
@ PROC_SPELL_PHASE_MASK_ALL
Definition: SpellMgr.h:246

◆ ProcFlagsSpellType

Enumerator
PROC_SPELL_TYPE_NONE 
PROC_SPELL_TYPE_DAMAGE 
PROC_SPELL_TYPE_HEAL 
PROC_SPELL_TYPE_NO_DMG_HEAL 
PROC_SPELL_TYPE_MASK_ALL 
232{
233 PROC_SPELL_TYPE_NONE = 0x0000000,
234 PROC_SPELL_TYPE_DAMAGE = 0x0000001, // damage type of spell
235 PROC_SPELL_TYPE_HEAL = 0x0000002, // heal type of spell
236 PROC_SPELL_TYPE_NO_DMG_HEAL = 0x0000004, // other spells
238};
@ PROC_SPELL_TYPE_NONE
Definition: SpellMgr.h:233
@ PROC_SPELL_TYPE_HEAL
Definition: SpellMgr.h:235
@ PROC_SPELL_TYPE_MASK_ALL
Definition: SpellMgr.h:237
@ PROC_SPELL_TYPE_DAMAGE
Definition: SpellMgr.h:234
@ PROC_SPELL_TYPE_NO_DMG_HEAL
Definition: SpellMgr.h:236

◆ SpellCategories

Enumerator
SPELLCATEGORY_HEALTH_MANA_POTIONS 
SPELLCATEGORY_DEVOUR_MAGIC 
SPELLCATEGORY_JUDGEMENT 
SPELLCATEGORY_FOOD 
SPELLCATEGORY_DRINK 
38{
41 SPELLCATEGORY_JUDGEMENT = 1210, // Judgement (seal trigger)
44};
@ SPELLCATEGORY_DRINK
Definition: SpellMgr.h:43
@ SPELLCATEGORY_DEVOUR_MAGIC
Definition: SpellMgr.h:40
@ SPELLCATEGORY_HEALTH_MANA_POTIONS
Definition: SpellMgr.h:39
@ SPELLCATEGORY_FOOD
Definition: SpellMgr.h:42
@ SPELLCATEGORY_JUDGEMENT
Definition: SpellMgr.h:41

◆ SpellFamilyFlag

Enumerator
SPELLFAMILYFLAG_ROGUE_VANISH 
SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT 
SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP 
SPELLFAMILYFLAG_ROGUE_KICK 
SPELLFAMILYFLAG1_ROGUE_DISMANTLE 
SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY 
SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY 
SPELLFAMILYFLAG_WARRIOR_CHARGE 
SPELLFAMILYFLAG_WARRIOR_SLAM 
SPELLFAMILYFLAG_WARRIOR_EXECUTE 
SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW 
SPELLFAMILYFLAG_WARLOCK_LIFETAP 
SPELLFAMILYFLAG2_DRUID_STARFALL 
SPELLFAMILYFLAG1_PALADIN_DIVINESTORM 
SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK 
SPELLFAMILYFLAG_SHAMAN_HEALING_STREAM 
SPELLFAMILYFLAG_SHAMAN_MANA_SPRING 
SPELLFAMILYFLAG2_SHAMAN_LAVA_LASH 
SPELLFAMILYFLAG_SHAMAN_FIRE_NOVA 
SPELLFAMILYFLAG_DK_DEATH_STRIKE 
SPELLFAMILYFLAG_DK_DEATH_COIL 
SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS 
Todo:
: Figure out a more accurate name for the following familyflag(s)
48{
49 // SPELLFAMILYFLAG = SpellFamilyFlags[0]
50 // SPELLFAMILYFLAG1 = SpellFamilyFlags[1]
51 // SPELLFAMILYFLAG2 = SpellFamilyFlags[2]
52
53 // Rogue
55 SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT = 0x00000860, // Vanish, Evasion, Sprint
56 SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP = 0x00000240, // Cold Blood, Shadowstep
57 SPELLFAMILYFLAG_ROGUE_KICK = 0x00000010, // Kick
58 SPELLFAMILYFLAG1_ROGUE_DISMANTLE = 0x00100000, // Dismantle
59 SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY = 0x40000000, // Blade Flurry
60 SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY = 0x00000800, // Blade Flurry
61
62 // Warrior
67
68 // Warlock
70
71 // Druid
73
74 // Paladin
76
77 // Shaman
83
84 // Deathknight
87
89 SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS = 0x04000000, // Seems to be linked to most totems and some totem effects
90};
@ SPELLFAMILYFLAG_SHAMAN_MANA_SPRING
Definition: SpellMgr.h:80
@ SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT
Definition: SpellMgr.h:55
@ SPELLFAMILYFLAG_WARLOCK_LIFETAP
Definition: SpellMgr.h:69
@ SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW
Definition: SpellMgr.h:66
@ SPELLFAMILYFLAG_ROGUE_KICK
Definition: SpellMgr.h:57
@ SPELLFAMILYFLAG1_ROGUE_DISMANTLE
Definition: SpellMgr.h:58
@ SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP
Definition: SpellMgr.h:56
@ SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY
Definition: SpellMgr.h:59
@ SPELLFAMILYFLAG_WARRIOR_EXECUTE
Definition: SpellMgr.h:65
@ SPELLFAMILYFLAG2_SHAMAN_LAVA_LASH
Definition: SpellMgr.h:81
@ SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS
Definition: SpellMgr.h:89
@ SPELLFAMILYFLAG_DK_DEATH_COIL
Definition: SpellMgr.h:86
@ SPELLFAMILYFLAG_ROGUE_VANISH
Definition: SpellMgr.h:54
@ SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK
Definition: SpellMgr.h:78
@ SPELLFAMILYFLAG_WARRIOR_SLAM
Definition: SpellMgr.h:64
@ SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY
Definition: SpellMgr.h:60
@ SPELLFAMILYFLAG2_DRUID_STARFALL
Definition: SpellMgr.h:72
@ SPELLFAMILYFLAG1_PALADIN_DIVINESTORM
Definition: SpellMgr.h:75
@ SPELLFAMILYFLAG_WARRIOR_CHARGE
Definition: SpellMgr.h:63
@ SPELLFAMILYFLAG_DK_DEATH_STRIKE
Definition: SpellMgr.h:85
@ SPELLFAMILYFLAG_SHAMAN_HEALING_STREAM
Definition: SpellMgr.h:79
@ SPELLFAMILYFLAG_SHAMAN_FIRE_NOVA
Definition: SpellMgr.h:82

◆ SpellGroupIDs

Enumerator
SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS 
371{
373};
@ SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS
Definition: SpellMgr.h:372

◆ SpellGroupSpecialFlags

Enumerator
SPELL_GROUP_SPECIAL_FLAG_NONE 
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE 
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN 
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE 
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH 
SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX 
SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST 
SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK 
SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK 
SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 
SPELL_GROUP_SPECIAL_FLAG_PRIORITY2 
SPELL_GROUP_SPECIAL_FLAG_PRIORITY3 
SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 
SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK 
SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL 
SPELL_GROUP_SPECIAL_FLAG_MAX 
SPELL_GROUP_SPECIAL_FLAG_FLASK 
334{
341 SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST = 0x010, // xinef: specially helpful flag if some spells have different auras, but only one should be present
351
353};
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY1
Definition: SpellMgr.h:344
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY3
Definition: SpellMgr.h:346
@ SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK
Definition: SpellMgr.h:342
@ SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST
Definition: SpellMgr.h:341
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY2
Definition: SpellMgr.h:345
@ SPELL_GROUP_SPECIAL_FLAG_MAX
Definition: SpellMgr.h:350
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH
Definition: SpellMgr.h:339
@ SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK
Definition: SpellMgr.h:348
@ SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX
Definition: SpellMgr.h:340
@ SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK
Definition: SpellMgr.h:343
@ SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL
Definition: SpellMgr.h:349
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY4
Definition: SpellMgr.h:347
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE
Definition: SpellMgr.h:336
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN
Definition: SpellMgr.h:337
@ SPELL_GROUP_SPECIAL_FLAG_FLASK
Definition: SpellMgr.h:352
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE
Definition: SpellMgr.h:338
@ SPELL_GROUP_SPECIAL_FLAG_NONE
Definition: SpellMgr.h:335

◆ SpellGroupStackFlags

Enumerator
SPELL_GROUP_STACK_FLAG_NONE 
SPELL_GROUP_STACK_FLAG_EXCLUSIVE 
SPELL_GROUP_STACK_FLAG_NOT_SAME_CASTER 
SPELL_GROUP_STACK_FLAG_FLAGGED 
SPELL_GROUP_STACK_FLAG_NEVER_STACK 
SPELL_GROUP_STACK_FLAG_EFFECT_EXCLUSIVE 
SPELL_GROUP_STACK_FLAG_MAX 
SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST 
SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST 
356{
360 SPELL_GROUP_STACK_FLAG_FLAGGED = 0x04, // xinef: just a marker
364
365 // Internal use
368};
@ SPELL_GROUP_STACK_FLAG_FLAGGED
Definition: SpellMgr.h:360
@ SPELL_GROUP_STACK_FLAG_EXCLUSIVE
Definition: SpellMgr.h:358
@ SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST
Definition: SpellMgr.h:367
@ SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST
Definition: SpellMgr.h:366
@ SPELL_GROUP_STACK_FLAG_MAX
Definition: SpellMgr.h:363
@ SPELL_GROUP_STACK_FLAG_NOT_SAME_CASTER
Definition: SpellMgr.h:359
@ SPELL_GROUP_STACK_FLAG_NONE
Definition: SpellMgr.h:357
@ SPELL_GROUP_STACK_FLAG_NEVER_STACK
Definition: SpellMgr.h:361
@ SPELL_GROUP_STACK_FLAG_EFFECT_EXCLUSIVE
Definition: SpellMgr.h:362

◆ SpellLinkedType

Enumerator
SPELL_LINK_CAST 
SPELL_LINK_HIT 
SPELL_LINK_AURA 
SPELL_LINK_REMOVE 
95{
96 SPELL_LINK_CAST = 0, // +: cast; -: remove
97 SPELL_LINK_HIT = 1 * 200000,
98 SPELL_LINK_AURA = 2 * 200000, // +: aura; -: immune
100};
@ SPELL_LINK_HIT
Definition: SpellMgr.h:97
@ SPELL_LINK_CAST
Definition: SpellMgr.h:96
@ SPELL_LINK_AURA
Definition: SpellMgr.h:98
@ SPELL_LINK_REMOVE
Definition: SpellMgr.h:99

Function Documentation

◆ GetDiminishingReturnsGroupForSpell()

DiminishingGroup GetDiminishingReturnsGroupForSpell ( SpellInfo const *  spellproto,
bool  triggered 
)
59{
60 if (spellproto->IsPositive())
61 return DIMINISHING_NONE;
62
63 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
64 {
65 if (spellproto->Effects[i].ApplyAuraName == SPELL_AURA_MOD_TAUNT)
66 return DIMINISHING_TAUNT;
67 }
68
69 // Explicit Diminishing Groups
70 switch (spellproto->SpellFamilyName)
71 {
73 {
74 // Pet charge effects (Infernal Awakening, Demon Charge)
75 if (spellproto->SpellVisual[0] == 2816 && spellproto->SpellIconID == 15)
77 // Gnaw
78 else if (spellproto->Id == 47481)
80 // Screams of the Past
81 else if (spellproto->Id == 7074)
82 return DIMINISHING_NONE;
83 break;
84 }
85 // Event spells
87 return DIMINISHING_NONE;
89 {
90 // Frostbite
91 if (spellproto->Id == 12494)
92 return DIMINISHING_ROOT;
93 // Shattered Barrier
94 else if (spellproto->Id == 55080)
95 return DIMINISHING_ROOT;
96 // Deep Freeze
97 else if (spellproto->SpellIconID == 2939 && spellproto->SpellVisual[0] == 9963)
99 // Frost Nova / Freeze (Water Elemental)
100 else if (spellproto->SpellIconID == 193)
102 // Dragon's Breath
103 else if (spellproto->SpellFamilyFlags[0] & 0x800000)
105 break;
106 }
108 {
109 // Hamstring - limit duration to 10s in PvP
110 if (spellproto->SpellFamilyFlags[0] & 0x2)
112 // Improved Hamstring
113 else if (spellproto->Id == 23694)
114 return DIMINISHING_ROOT;
115 // Charge Stun (own diminishing)
116 else if (spellproto->SpellFamilyFlags[0] & 0x01000000)
117 return DIMINISHING_CHARGE;
118 break;
119 }
121 {
122 // Curses/etc
123 if ((spellproto->SpellFamilyFlags[0] & 0x80000000) || (spellproto->SpellFamilyFlags[1] & 0x200))
125 // Seduction
126 else if (spellproto->SpellFamilyFlags[1] & 0x10000000)
127 return DIMINISHING_FEAR;
128 break;
129 }
131 {
132 // Pounce
133 if (spellproto->SpellFamilyFlags[0] & 0x20000)
135 // Cyclone
136 else if (spellproto->SpellFamilyFlags[1] & 0x20)
137 return DIMINISHING_CYCLONE;
138 // Entangling Roots
139 // Nature's Grasp
140 else if (spellproto->SpellFamilyFlags[0] & 0x00000200)
142 // Faerie Fire
143 else if (spellproto->SpellFamilyFlags[0] & 0x400)
145 // Feral Charge Root Effect
146 else if (spellproto->Id == 45334)
147 return DIMINISHING_NONE;
148 break;
149 }
151 {
152 // Gouge
153 if (spellproto->SpellFamilyFlags[0] & 0x8)
155 // Blind
156 else if (spellproto->SpellFamilyFlags[0] & 0x1000000)
157 return DIMINISHING_FEAR;
158 // Cheap Shot
159 else if (spellproto->SpellFamilyFlags[0] & 0x400)
161 // Crippling poison - Limit to 10 seconds in PvP (No SpellFamilyFlags)
162 else if (spellproto->SpellIconID == 163)
164 break;
165 }
167 {
168 // Hunter's Mark
169 if ((spellproto->SpellFamilyFlags[0] & 0x400) && spellproto->SpellIconID == 538)
171 // Scatter Shot (own diminishing)
172 else if ((spellproto->SpellFamilyFlags[0] & 0x40000) && spellproto->SpellIconID == 132)
174 // Entrapment (own diminishing)
175 else if (spellproto->SpellVisual[0] == 7484 && spellproto->SpellIconID == 20)
177 // Wyvern Sting mechanic is MECHANIC_SLEEP but the diminishing is DIMINISHING_DISORIENT
178 else if ((spellproto->SpellFamilyFlags[1] & 0x1000) && spellproto->SpellIconID == 1721)
180 // Freezing Arrow
181 else if (spellproto->SpellFamilyFlags[0] & 0x8)
183 break;
184 }
186 {
187 // Judgement of Justice - limit duration to 10s in PvP
188 if (spellproto->SpellFamilyFlags[0] & 0x100000)
190 // Turn Evil
191 else if ((spellproto->SpellFamilyFlags[1] & 0x804000) && spellproto->SpellIconID == 309)
192 return DIMINISHING_FEAR;
193 break;
194 }
196 {
197 // Storm, Earth and Fire - Earthgrab
198 if (spellproto->SpellFamilyFlags[2] & 0x4000)
199 return DIMINISHING_NONE;
200 break;
201 }
203 {
204 // Hungering Cold (no flags)
205 if (spellproto->SpellIconID == 2797)
207 // Mark of Blood
208 else if ((spellproto->SpellFamilyFlags[0] & 0x10000000) && spellproto->SpellIconID == 2285)
210 break;
211 }
212 default:
213 break;
214 }
215
216 // Lastly - Set diminishing depending on mechanic
217 uint32 mechanic = spellproto->GetAllEffectsMechanicMask();
218 if (mechanic & (1 << MECHANIC_CHARM))
220 if (mechanic & (1 << MECHANIC_SILENCE))
221 return DIMINISHING_SILENCE;
222 if (mechanic & (1 << MECHANIC_SLEEP))
223 return DIMINISHING_SLEEP;
224 if (mechanic & ((1 << MECHANIC_SAPPED) | (1 << MECHANIC_POLYMORPH) | (1 << MECHANIC_SHACKLE)))
226 // Mechanic Knockout, except Blast Wave
227 if (mechanic & (1 << MECHANIC_KNOCKOUT) && spellproto->SpellIconID != 292)
229 if (mechanic & (1 << MECHANIC_DISARM))
230 return DIMINISHING_DISARM;
231 if (mechanic & (1 << MECHANIC_FEAR))
232 return DIMINISHING_FEAR;
233 if (mechanic & (1 << MECHANIC_STUN))
235 if (mechanic & (1 << MECHANIC_BANISH))
236 return DIMINISHING_BANISH;
237 if (mechanic & (1 << MECHANIC_ROOT))
239 if (mechanic & (1 << MECHANIC_HORROR))
240 return DIMINISHING_HORROR;
241
242 return DIMINISHING_NONE;
243}
std::uint8_t uint8
Definition: Define.h:109
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_AURA_MOD_TAUNT
Definition: SpellAuraDefines.h:74
@ DIMINISHING_MIND_CONTROL
Definition: SharedDefines.h:3270
@ DIMINISHING_HORROR
Definition: SharedDefines.h:3269
@ DIMINISHING_DRAGONS_BREATH
Definition: SharedDefines.h:3278
@ DIMINISHING_CONTROLLED_STUN
Definition: SharedDefines.h:3262
@ DIMINISHING_CYCLONE
Definition: SharedDefines.h:3264
@ DIMINISHING_BANISH
Definition: SharedDefines.h:3259
@ DIMINISHING_CONTROLLED_ROOT
Definition: SharedDefines.h:3263
@ DIMINISHING_NONE
Definition: SharedDefines.h:3258
@ DIMINISHING_SLEEP
Definition: SharedDefines.h:3275
@ DIMINISHING_STUN
Definition: SharedDefines.h:3272
@ DIMINISHING_DISARM
Definition: SharedDefines.h:3265
@ DIMINISHING_ENTRAPMENT
Definition: SharedDefines.h:3267
@ DIMINISHING_FEAR
Definition: SharedDefines.h:3268
@ DIMINISHING_SCATTER_SHOT
Definition: SharedDefines.h:3273
@ DIMINISHING_LIMITONLY
Definition: SharedDefines.h:3277
@ DIMINISHING_OPENING_STUN
Definition: SharedDefines.h:3261
@ DIMINISHING_DISORIENT
Definition: SharedDefines.h:3266
@ DIMINISHING_ROOT
Definition: SharedDefines.h:3271
@ DIMINISHING_TAUNT
Definition: SharedDefines.h:3276
@ DIMINISHING_CHARGE
Definition: SharedDefines.h:3260
@ DIMINISHING_SILENCE
Definition: SharedDefines.h:3274
@ MECHANIC_DISARM
Definition: SharedDefines.h:1328
@ MECHANIC_FEAR
Definition: SharedDefines.h:1330
@ MECHANIC_KNOCKOUT
Definition: SharedDefines.h:1339
@ MECHANIC_CHARM
Definition: SharedDefines.h:1326
@ MECHANIC_STUN
Definition: SharedDefines.h:1337
@ MECHANIC_ROOT
Definition: SharedDefines.h:1332
@ MECHANIC_SLEEP
Definition: SharedDefines.h:1335
@ MECHANIC_POLYMORPH
Definition: SharedDefines.h:1342
@ MECHANIC_BANISH
Definition: SharedDefines.h:1343
@ MECHANIC_SILENCE
Definition: SharedDefines.h:1334
@ MECHANIC_SHACKLE
Definition: SharedDefines.h:1345
@ MECHANIC_SAPPED
Definition: SharedDefines.h:1355
@ MECHANIC_HORROR
Definition: SharedDefines.h:1349
@ SPELLFAMILY_WARLOCK
Definition: SharedDefines.h:3533
@ SPELLFAMILY_MAGE
Definition: SharedDefines.h:3531
@ SPELLFAMILY_GENERIC
Definition: SharedDefines.h:3528
@ SPELLFAMILY_WARRIOR
Definition: SharedDefines.h:3532
@ SPELLFAMILY_PALADIN
Definition: SharedDefines.h:3538
@ SPELLFAMILY_HUNTER
Definition: SharedDefines.h:3537
@ SPELLFAMILY_ROGUE
Definition: SharedDefines.h:3536
@ SPELLFAMILY_SHAMAN
Definition: SharedDefines.h:3539
@ SPELLFAMILY_DRUID
Definition: SharedDefines.h:3535
@ SPELLFAMILY_DEATHKNIGHT
Definition: SharedDefines.h:3543
@ SPELLFAMILY_UNK1
Definition: SharedDefines.h:3529
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:1636

References DIMINISHING_BANISH, DIMINISHING_CHARGE, DIMINISHING_CONTROLLED_ROOT, DIMINISHING_CONTROLLED_STUN, DIMINISHING_CYCLONE, DIMINISHING_DISARM, DIMINISHING_DISORIENT, DIMINISHING_DRAGONS_BREATH, DIMINISHING_ENTRAPMENT, DIMINISHING_FEAR, DIMINISHING_HORROR, DIMINISHING_LIMITONLY, DIMINISHING_MIND_CONTROL, DIMINISHING_NONE, DIMINISHING_OPENING_STUN, DIMINISHING_ROOT, DIMINISHING_SCATTER_SHOT, DIMINISHING_SILENCE, DIMINISHING_SLEEP, DIMINISHING_STUN, DIMINISHING_TAUNT, SpellInfo::Effects, SpellInfo::GetAllEffectsMechanicMask(), SpellInfo::Id, SpellInfo::IsPositive(), MAX_SPELL_EFFECTS, MECHANIC_BANISH, MECHANIC_CHARM, MECHANIC_DISARM, MECHANIC_FEAR, MECHANIC_HORROR, MECHANIC_KNOCKOUT, MECHANIC_POLYMORPH, MECHANIC_ROOT, MECHANIC_SAPPED, MECHANIC_SHACKLE, MECHANIC_SILENCE, MECHANIC_SLEEP, MECHANIC_STUN, SPELL_AURA_MOD_TAUNT, SPELLFAMILY_DEATHKNIGHT, SPELLFAMILY_DRUID, SPELLFAMILY_GENERIC, SPELLFAMILY_HUNTER, SPELLFAMILY_MAGE, SPELLFAMILY_PALADIN, SPELLFAMILY_ROGUE, SPELLFAMILY_SHAMAN, SPELLFAMILY_UNK1, SPELLFAMILY_WARLOCK, SPELLFAMILY_WARRIOR, SpellInfo::SpellFamilyFlags, SpellInfo::SpellFamilyName, SpellInfo::SpellIconID, and SpellInfo::SpellVisual.

Referenced by Spell::DoSpellHitOnUnit().

◆ GetDiminishingReturnsGroupType()

DiminishingReturnsType GetDiminishingReturnsGroupType ( DiminishingGroup  group)
246{
247 switch (group)
248 {
251 case DIMINISHING_STUN:
255 return DRTYPE_ALL;
257 case DIMINISHING_NONE:
258 return DRTYPE_NONE;
259 default:
260 return DRTYPE_PLAYER;
261 }
262}
@ DRTYPE_NONE
Definition: SharedDefines.h:3250
@ DRTYPE_PLAYER
Definition: SharedDefines.h:3251
@ DRTYPE_ALL
Definition: SharedDefines.h:3252

References DIMINISHING_CHARGE, DIMINISHING_CONTROLLED_STUN, DIMINISHING_CYCLONE, DIMINISHING_LIMITONLY, DIMINISHING_NONE, DIMINISHING_OPENING_STUN, DIMINISHING_STUN, DIMINISHING_TAUNT, DRTYPE_ALL, DRTYPE_NONE, and DRTYPE_PLAYER.

Referenced by Unit::ApplyDiminishingToDuration(), and Spell::DoSpellHitOnUnit().

◆ GetDiminishingReturnsLimitDuration()

int32 GetDiminishingReturnsLimitDuration ( DiminishingGroup  group,
SpellInfo const *  spellproto 
)
276{
278 return 0;
279
280 // Explicit diminishing duration
281 switch (spellproto->SpellFamilyName)
282 {
284 {
285 // Faerie Fire - limit to 40 seconds in PvP (3.1)
286 if (spellproto->SpellFamilyFlags[0] & 0x400)
287 return 40 * IN_MILLISECONDS;
288 break;
289 }
291 {
292 // Wyvern Sting
293 if (spellproto->SpellFamilyFlags[1] & 0x1000)
294 return 6 * IN_MILLISECONDS;
295 // Hunter's Mark
296 if (spellproto->SpellFamilyFlags[0] & 0x400)
297 return 120 * IN_MILLISECONDS;
298 break;
299 }
301 {
302 // Repentance - limit to 6 seconds in PvP
303 if (spellproto->SpellFamilyFlags[0] & 0x4)
304 return 6 * IN_MILLISECONDS;
305 break;
306 }
308 {
309 // Banish - limit to 6 seconds in PvP
310 if (spellproto->SpellFamilyFlags[1] & 0x8000000)
311 return 6 * IN_MILLISECONDS;
312 // Curse of Tongues - limit to 12 seconds in PvP
313 else if (spellproto->SpellFamilyFlags[2] & 0x800)
314 return 12 * IN_MILLISECONDS;
315 // Curse of Elements - limit to 120 seconds in PvP
316 else if (spellproto->SpellFamilyFlags[1] & 0x200)
317 return 120 * IN_MILLISECONDS;
318 // Curse of Exhaustion
319 else if (spellproto->SpellFamilyFlags[0] & 0x400000)
320 return 12 * IN_MILLISECONDS;
321 break;
322 }
323 default:
324 break;
325 }
326
327 return 10 * IN_MILLISECONDS;
328}
constexpr auto IN_MILLISECONDS
Definition: Common.h:53
bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
Definition: SpellMgr.cpp:330

References IN_MILLISECONDS, IsDiminishingReturnsGroupDurationLimited(), SPELLFAMILY_DRUID, SPELLFAMILY_HUNTER, SPELLFAMILY_PALADIN, SPELLFAMILY_WARLOCK, SpellInfo::SpellFamilyFlags, and SpellInfo::SpellFamilyName.

Referenced by Spell::DoSpellHitOnUnit().

◆ GetDiminishingReturnsMaxLevel()

DiminishingLevels GetDiminishingReturnsMaxLevel ( DiminishingGroup  group)
265{
266 switch (group)
267 {
270 default:
272 }
273}
@ DIMINISHING_LEVEL_IMMUNE
Definition: Unit.h:266
@ DIMINISHING_LEVEL_TAUNT_IMMUNE
Definition: Unit.h:268

References DIMINISHING_LEVEL_IMMUNE, DIMINISHING_LEVEL_TAUNT_IMMUNE, and DIMINISHING_TAUNT.

Referenced by Unit::IncrDiminishing().

◆ IsDiminishingReturnsGroupDurationLimited()

◆ IsPartOfSkillLine()

bool IsPartOfSkillLine ( uint32  skillId,
uint32  spellId 
)
49{
50 SkillLineAbilityMapBounds skillBounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
51 for (SkillLineAbilityMap::const_iterator itr = skillBounds.first; itr != skillBounds.second; ++itr)
52 if (itr->second->SkillLine == skillId)
53 return true;
54
55 return false;
56}
#define sSpellMgr
Definition: SpellMgr.h:825
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
Definition: SpellMgr.h:584

References sSpellMgr.

Referenced by SpellMgr::LoadSpellInfoCustomAttributes().

◆ IsPrimaryProfessionSkill()

bool IsPrimaryProfessionSkill ( uint32  skill)
37{
38 SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
39 if (!pSkill)
40 return false;
41
43 return false;
44
45 return true;
46}
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
@ SKILL_CATEGORY_PROFESSION
Definition: SharedDefines.h:3078
Definition: DBCStructure.h:1582
int32 categoryId
Definition: DBCStructure.h:1584

References SkillLineEntry::categoryId, SKILL_CATEGORY_PROFESSION, and sSkillLineStore.

Referenced by WorldSession::HandleUnlearnSkillOpcode(), SpellInfo::IsPrimaryProfession(), and IsProfessionSkill().

◆ IsProfessionOrRidingSkill()

bool IsProfessionOrRidingSkill ( uint32  skill)
inline
624{
625 return IsProfessionSkill(skill) || skill == SKILL_RIDING;
626}
bool IsProfessionSkill(uint32 skill)
Definition: SpellMgr.h:618
@ SKILL_RIDING
Definition: SharedDefines.h:2991

References IsProfessionSkill(), and SKILL_RIDING.

Referenced by SpellInfo::IsProfessionOrRiding(), Player::LearnDefaultSkill(), and Player::UpdateSkillsToMaxSkillsForLevel().

◆ IsProfessionSkill()

bool IsProfessionSkill ( uint32  skill)
inline
619{
620 return IsPrimaryProfessionSkill(skill) || skill == SKILL_FISHING || skill == SKILL_COOKING || skill == SKILL_FIRST_AID;
621}
bool IsPrimaryProfessionSkill(uint32 skill)
Definition: SpellMgr.cpp:36
@ SKILL_COOKING
Definition: SharedDefines.h:2918
@ SKILL_FISHING
Definition: SharedDefines.h:2957
@ SKILL_FIRST_AID
Definition: SharedDefines.h:2892

References IsPrimaryProfessionSkill(), SKILL_COOKING, SKILL_FIRST_AID, and SKILL_FISHING.

Referenced by SpellInfo::IsProfession(), and IsProfessionOrRidingSkill().