AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_priest.cpp File Reference
#include "CreatureScript.h"
#include "GridNotifiers.h"
#include "Player.h"
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellScriptLoader.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
 
class  spell_pri_t4_4p_bonus
 
class  spell_pri_shadowfiend_death
 

Enumerations

enum  PriestSpells {
  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_PRIEST_T4_4P_FLEXIBILITY = 37565 ,
  SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228 ,
  SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA = 58227 ,
  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 
70{
77};
@ PRIEST_LIGHTWELL_NPC_3
Definition spell_priest.cpp:73
@ PRIEST_LIGHTWELL_NPC_2
Definition spell_priest.cpp:72
@ PRIEST_LIGHTWELL_NPC_6
Definition spell_priest.cpp:76
@ PRIEST_LIGHTWELL_NPC_4
Definition spell_priest.cpp:74
@ PRIEST_LIGHTWELL_NPC_1
Definition spell_priest.cpp:71
@ PRIEST_LIGHTWELL_NPC_5
Definition spell_priest.cpp:75

◆ PriestSpellIcons

Enumerator
PRIEST_ICON_ID_BORROWED_TIME 
PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT 
PRIEST_ICON_ID_PAIN_AND_SUFFERING 
63{
67};
@ PRIEST_ICON_ID_BORROWED_TIME
Definition spell_priest.cpp:64
@ PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT
Definition spell_priest.cpp:65
@ PRIEST_ICON_ID_PAIN_AND_SUFFERING
Definition spell_priest.cpp:66

◆ PriestSpells

Enumerator
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_PRIEST_T4_4P_FLEXIBILITY 
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND 
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA 
SPELL_GENERIC_ARENA_DAMPENING 
SPELL_GENERIC_BATTLEGROUND_DAMPENING 
SPELL_PRIEST_TWIN_DISCIPLINE_R1 
SPELL_PRIEST_SPIRITUAL_HEALING_R1 
SPELL_PRIEST_DIVINE_PROVIDENCE_R1 
33{
54
60};
@ 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_GLYPH_OF_SHADOWFIEND_MANA
Definition spell_priest.cpp:53
@ 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:57
@ SPELL_GENERIC_ARENA_DAMPENING
Definition spell_priest.cpp:55
@ 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_GLYPH_OF_SHADOWFIEND
Definition spell_priest.cpp:52
@ 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:59
@ SPELL_PRIEST_T4_4P_FLEXIBILITY
Definition spell_priest.cpp:51
@ SPELL_PRIEST_T9_HEALING_2P
Definition spell_priest.cpp:49
@ SPELL_PRIEST_SPIRITUAL_HEALING_R1
Definition spell_priest.cpp:58
@ SPELL_GENERIC_BATTLEGROUND_DAMPENING
Definition spell_priest.cpp:56
@ SPELL_PRIEST_PENANCE_R1_HEAL
Definition spell_priest.cpp:45

Function Documentation

◆ AddSC_priest_spell_scripts()

void AddSC_priest_spell_scripts ( )
987{
1011}
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition SpellScriptLoader.h:90
#define RegisterSpellScript(spell_script)
Definition SpellScriptLoader.h:88
Definition spell_priest.cpp:157
Definition spell_priest.cpp:186
Definition spell_priest.cpp:223
Definition spell_priest.cpp:247
Definition spell_priest.cpp:278
Definition spell_priest.cpp:322
Definition spell_priest.cpp:347
Definition spell_priest.cpp:421
Definition spell_priest.cpp:379
Definition spell_priest.cpp:459
Definition spell_priest.cpp:476
Definition spell_priest.cpp:897
Definition spell_priest.cpp:514
Definition spell_priest.cpp:530
Definition spell_priest.cpp:552
Definition spell_priest.cpp:664
Definition spell_priest.cpp:703
Definition spell_priest.cpp:733
Definition spell_priest.cpp:782
Definition spell_priest.cpp:819
Definition spell_priest.cpp:956
Definition spell_priest.cpp:80
Definition spell_priest.cpp:934
Definition spell_priest.cpp:841

References RegisterSpellAndAuraScriptPair, and RegisterSpellScript.

Referenced by AddSpellsScripts().

◆ CalculateSpellAmount()

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

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().