AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_priest.cpp File Reference
#include "GridNotifiers.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
#include "SpellScript.h"
#include "TemporarySummon.h"

Go to the source code of this file.

Classes

class  spell_pri_shadowfiend_scaling
 
class  spell_pri_circle_of_healing
 
class  spell_pri_divine_aegis
 
class  spell_pri_divine_hymn
 
class  spell_pri_glyph_of_prayer_of_healing
 
class  spell_pri_guardian_spirit
 
class  spell_pri_hymn_of_hope
 
class  spell_pri_item_greater_heal_refund
 
class  spell_pri_lightwell
 
class  spell_pri_lightwell_renew
 
class  spell_pri_mana_burn
 
class  spell_pri_mana_leech
 
class  spell_pri_mind_sear
 
class  spell_pri_pain_and_suffering_proc
 
class  spell_pri_penance
 
class  spell_pri_power_word_shield_aura
 
class  spell_pri_power_word_shield
 
class  spell_pri_prayer_of_mending_heal
 
class  spell_pri_renew
 
class  spell_pri_shadow_word_death
 
class  spell_pri_vampiric_touch
 
class  spell_pri_mind_control
 

Enumerations

enum  PriestSpells {
  SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228 ,
  SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA = 58227 ,
  SPELL_PRIEST_SHADOWFIEND_DODGE = 8273 ,
  SPELL_PRIEST_LIGHTWELL_CHARGES = 59907 ,
  SPELL_PRIEST_DIVINE_AEGIS = 47753 ,
  SPELL_PRIEST_EMPOWERED_RENEW = 63544 ,
  SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING = 55675 ,
  SPELL_PRIEST_GLYPH_OF_LIGHTWELL = 55673 ,
  SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL = 56161 ,
  SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL = 48153 ,
  SPELL_PRIEST_ITEM_EFFICIENCY = 37595 ,
  SPELL_PRIEST_LIGHTWELL_CHARGES = 59907 ,
  SPELL_PRIEST_MANA_LEECH_PROC = 34650 ,
  SPELL_PRIEST_PENANCE_R1 = 47540 ,
  SPELL_PRIEST_PENANCE_R1_DAMAGE = 47758 ,
  SPELL_PRIEST_PENANCE_R1_HEAL = 47757 ,
  SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED = 33619 ,
  SPELL_PRIEST_REFLECTIVE_SHIELD_R1 = 33201 ,
  SPELL_PRIEST_SHADOW_WORD_DEATH = 32409 ,
  SPELL_PRIEST_T9_HEALING_2P = 67201 ,
  SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085 ,
  SPELL_GENERIC_ARENA_DAMPENING = 74410 ,
  SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411 ,
  SPELL_PRIEST_TWIN_DISCIPLINE_R1 = 47586 ,
  SPELL_PRIEST_SPIRITUAL_HEALING_R1 = 14898 ,
  SPELL_PRIEST_DIVINE_PROVIDENCE_R1 = 47562
}
 
enum  PriestSpellIcons {
  PRIEST_ICON_ID_BORROWED_TIME = 2899 ,
  PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021 ,
  PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874
}
 
enum  Mics {
  PRIEST_LIGHTWELL_NPC_1 = 31897 ,
  PRIEST_LIGHTWELL_NPC_2 = 31896 ,
  PRIEST_LIGHTWELL_NPC_3 = 31895 ,
  PRIEST_LIGHTWELL_NPC_4 = 31894 ,
  PRIEST_LIGHTWELL_NPC_5 = 31893 ,
  PRIEST_LIGHTWELL_NPC_6 = 31883
}
 

Functions

static int32 CalculateSpellAmount (Unit *caster, int32 amount, SpellInfo const *spellInfo, const AuraEffect *aurEff)
 
void AddSC_priest_spell_scripts ()
 

Enumeration Type Documentation

◆ Mics

enum Mics
Enumerator
PRIEST_LIGHTWELL_NPC_1 
PRIEST_LIGHTWELL_NPC_2 
PRIEST_LIGHTWELL_NPC_3 
PRIEST_LIGHTWELL_NPC_4 
PRIEST_LIGHTWELL_NPC_5 
PRIEST_LIGHTWELL_NPC_6 
67{
74};
@ PRIEST_LIGHTWELL_NPC_3
Definition: spell_priest.cpp:70
@ PRIEST_LIGHTWELL_NPC_2
Definition: spell_priest.cpp:69
@ PRIEST_LIGHTWELL_NPC_6
Definition: spell_priest.cpp:73
@ PRIEST_LIGHTWELL_NPC_4
Definition: spell_priest.cpp:71
@ PRIEST_LIGHTWELL_NPC_1
Definition: spell_priest.cpp:68
@ PRIEST_LIGHTWELL_NPC_5
Definition: spell_priest.cpp:72

◆ PriestSpellIcons

Enumerator
PRIEST_ICON_ID_BORROWED_TIME 
PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT 
PRIEST_ICON_ID_PAIN_AND_SUFFERING 
60{
64};
@ PRIEST_ICON_ID_BORROWED_TIME
Definition: spell_priest.cpp:61
@ PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT
Definition: spell_priest.cpp:62
@ PRIEST_ICON_ID_PAIN_AND_SUFFERING
Definition: spell_priest.cpp:63

◆ PriestSpells

Enumerator
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND 
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA 
SPELL_PRIEST_SHADOWFIEND_DODGE 
SPELL_PRIEST_LIGHTWELL_CHARGES 
SPELL_PRIEST_DIVINE_AEGIS 
SPELL_PRIEST_EMPOWERED_RENEW 
SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING 
SPELL_PRIEST_GLYPH_OF_LIGHTWELL 
SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL 
SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL 
SPELL_PRIEST_ITEM_EFFICIENCY 
SPELL_PRIEST_LIGHTWELL_CHARGES 
SPELL_PRIEST_MANA_LEECH_PROC 
SPELL_PRIEST_PENANCE_R1 
SPELL_PRIEST_PENANCE_R1_DAMAGE 
SPELL_PRIEST_PENANCE_R1_HEAL 
SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED 
SPELL_PRIEST_REFLECTIVE_SHIELD_R1 
SPELL_PRIEST_SHADOW_WORD_DEATH 
SPELL_PRIEST_T9_HEALING_2P 
SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL 
SPELL_GENERIC_ARENA_DAMPENING 
SPELL_GENERIC_BATTLEGROUND_DAMPENING 
SPELL_PRIEST_TWIN_DISCIPLINE_R1 
SPELL_PRIEST_SPIRITUAL_HEALING_R1 
SPELL_PRIEST_DIVINE_PROVIDENCE_R1 
33{
51
57};
@ SPELL_PRIEST_GLYPH_OF_LIGHTWELL
Definition: spell_priest.cpp:37
@ SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL
Definition: spell_priest.cpp:50
@ SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED
Definition: spell_priest.cpp:46
@ SPELL_PRIEST_REFLECTIVE_SHIELD_R1
Definition: spell_priest.cpp:47
@ SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL
Definition: spell_priest.cpp:39
@ SPELL_PRIEST_DIVINE_AEGIS
Definition: spell_priest.cpp:34
@ SPELL_PRIEST_MANA_LEECH_PROC
Definition: spell_priest.cpp:42
@ SPELL_PRIEST_TWIN_DISCIPLINE_R1
Definition: spell_priest.cpp:54
@ SPELL_GENERIC_ARENA_DAMPENING
Definition: spell_priest.cpp:52
@ SPELL_PRIEST_PENANCE_R1_DAMAGE
Definition: spell_priest.cpp:44
@ SPELL_PRIEST_PENANCE_R1
Definition: spell_priest.cpp:43
@ SPELL_PRIEST_LIGHTWELL_CHARGES
Definition: spell_priest.cpp:41
@ SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING
Definition: spell_priest.cpp:36
@ SPELL_PRIEST_ITEM_EFFICIENCY
Definition: spell_priest.cpp:40
@ SPELL_PRIEST_SHADOW_WORD_DEATH
Definition: spell_priest.cpp:48
@ SPELL_PRIEST_EMPOWERED_RENEW
Definition: spell_priest.cpp:35
@ SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL
Definition: spell_priest.cpp:38
@ SPELL_PRIEST_DIVINE_PROVIDENCE_R1
Definition: spell_priest.cpp:56
@ SPELL_PRIEST_T9_HEALING_2P
Definition: spell_priest.cpp:49
@ SPELL_PRIEST_SPIRITUAL_HEALING_R1
Definition: spell_priest.cpp:55
@ SPELL_GENERIC_BATTLEGROUND_DAMPENING
Definition: spell_priest.cpp:53
@ SPELL_PRIEST_PENANCE_R1_HEAL
Definition: spell_priest.cpp:45

Function Documentation

◆ AddSC_priest_spell_scripts()

void AddSC_priest_spell_scripts ( )
930{
952}
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition: ScriptMgr.h:2723
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:2721
Definition: spell_priest.cpp:77
Definition: spell_priest.cpp:154
Definition: spell_priest.cpp:183
Definition: spell_priest.cpp:220
Definition: spell_priest.cpp:244
Definition: spell_priest.cpp:275
Definition: spell_priest.cpp:319
Definition: spell_priest.cpp:344
Definition: spell_priest.cpp:376
Definition: spell_priest.cpp:418
Definition: spell_priest.cpp:456
Definition: spell_priest.cpp:473
Definition: spell_priest.cpp:511
Definition: spell_priest.cpp:527
Definition: spell_priest.cpp:549
Definition: spell_priest.cpp:661
Definition: spell_priest.cpp:700
Definition: spell_priest.cpp:730
Definition: spell_priest.cpp:779
Definition: spell_priest.cpp:816
Definition: spell_priest.cpp:838
Definition: spell_priest.cpp:894

References RegisterSpellAndAuraScriptPair, and RegisterSpellScript.

Referenced by AddSpellsScripts().

◆ CalculateSpellAmount()

static int32 CalculateSpellAmount ( Unit caster,
int32  amount,
SpellInfo const *  spellInfo,
const AuraEffect aurEff 
)
static
621{
622 // +80.68% from sp bonus
623 float bonus = 0.8068f;
624
625 // Borrowed Time
627 bonus += CalculatePct(1.0f, borrowedTime->GetAmount());
628
629 bonus *= caster->SpellBaseHealingBonusDone(spellInfo->GetSchoolMask());
630
631 // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
632 // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage
633 bonus = caster->ApplyEffectModifiers(spellInfo, aurEff->GetEffIndex(), bonus);
634 bonus *= caster->CalculateLevelPenalty(spellInfo);
635
636 amount += int32(bonus);
637
638 // Twin Disciplines
639 if (AuraEffect const* twinDisciplines = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_PRIEST, 0x400000, 0, 0, caster->GetGUID()))
640 AddPct(amount, twinDisciplines->GetAmount());
641
642 // Focused Power, xinef: apply positive modifier only
644 AddPct(amount, healModifier);
645
646 // Arena - Dampening
647 if (AuraEffect const* arenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
648 {
649 AddPct(amount, arenaDampening->GetAmount());
650 }
651 // Battleground - Dampening
652 else if (AuraEffect const* bgDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
653 {
654 AddPct(amount, bgDampening->GetAmount());
655 }
656
657 return amount;
658};
std::int32_t int32
Definition: Define.h:104
T AddPct(T &base, U pct)
Definition: Util.h:67
T CalculatePct(T base, U pct)
Definition: Util.h:61
@ SPELL_AURA_ADD_PCT_MODIFIER
Definition: SpellAuraDefines.h:171
@ SPELL_AURA_MOD_HEALING_DONE_PERCENT
Definition: SpellAuraDefines.h:199
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ SPELLFAMILY_PRIEST
Definition: SharedDefines.h:3506
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask)
Definition: Unit.cpp:12688
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition: Unit.cpp:5422
float ApplyEffectModifiers(SpellInfo const *spellProto, uint8 effect_index, float value) const
Definition: Unit.cpp:14799
int32 GetMaxPositiveAuraModifier(AuraType auratype)
Definition: Unit.cpp:5857
AuraEffect * GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
Definition: Unit.h:1988
float CalculateLevelPenalty(SpellInfo const *spellProto) const
Definition: Unit.cpp:3002
Definition: SpellAuraEffects.h:39
uint32 GetEffIndex() const
Definition: SpellAuraEffects.h:56

References AddPct(), Unit::ApplyEffectModifiers(), Unit::CalculateLevelPenalty(), CalculatePct(), EFFECT_0, EFFECT_1, Unit::GetAuraEffect(), Unit::GetDummyAuraEffect(), AuraEffect::GetEffIndex(), Object::GetGUID(), Unit::GetMaxPositiveAuraModifier(), SpellInfo::GetSchoolMask(), PRIEST_ICON_ID_BORROWED_TIME, SPELL_AURA_ADD_PCT_MODIFIER, SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELL_GENERIC_ARENA_DAMPENING, SPELL_GENERIC_BATTLEGROUND_DAMPENING, Unit::SpellBaseHealingBonusDone(), and SPELLFAMILY_PRIEST.

Referenced by spell_pri_power_word_shield_aura::CalculateAmount(), and spell_pri_power_word_shield::CheckCast().