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
 

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_PRIEST_T4_4P_FLEXIBILITY = 37565 ,
  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 
68{
75};
@ PRIEST_LIGHTWELL_NPC_3
Definition: spell_priest.cpp:71
@ PRIEST_LIGHTWELL_NPC_2
Definition: spell_priest.cpp:70
@ PRIEST_LIGHTWELL_NPC_6
Definition: spell_priest.cpp:74
@ PRIEST_LIGHTWELL_NPC_4
Definition: spell_priest.cpp:72
@ PRIEST_LIGHTWELL_NPC_1
Definition: spell_priest.cpp:69
@ PRIEST_LIGHTWELL_NPC_5
Definition: spell_priest.cpp:73

◆ PriestSpellIcons

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

◆ 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_PRIEST_T4_4P_FLEXIBILITY 
SPELL_GENERIC_ARENA_DAMPENING 
SPELL_GENERIC_BATTLEGROUND_DAMPENING 
SPELL_PRIEST_TWIN_DISCIPLINE_R1 
SPELL_PRIEST_SPIRITUAL_HEALING_R1 
SPELL_PRIEST_DIVINE_PROVIDENCE_R1 
33{
52
58};
@ 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:55
@ SPELL_GENERIC_ARENA_DAMPENING
Definition: spell_priest.cpp:53
@ 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:57
@ 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:56
@ SPELL_GENERIC_BATTLEGROUND_DAMPENING
Definition: spell_priest.cpp:54
@ SPELL_PRIEST_PENANCE_R1_HEAL
Definition: spell_priest.cpp:45

Function Documentation

◆ AddSC_priest_spell_scripts()

void AddSC_priest_spell_scripts ( )
953{
976}
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition: SpellScriptLoader.h:90
#define RegisterSpellScript(spell_script)
Definition: SpellScriptLoader.h:88
Definition: spell_priest.cpp:78
Definition: spell_priest.cpp:155
Definition: spell_priest.cpp:184
Definition: spell_priest.cpp:221
Definition: spell_priest.cpp:245
Definition: spell_priest.cpp:276
Definition: spell_priest.cpp:320
Definition: spell_priest.cpp:345
Definition: spell_priest.cpp:377
Definition: spell_priest.cpp:419
Definition: spell_priest.cpp:457
Definition: spell_priest.cpp:474
Definition: spell_priest.cpp:512
Definition: spell_priest.cpp:528
Definition: spell_priest.cpp:550
Definition: spell_priest.cpp:662
Definition: spell_priest.cpp:701
Definition: spell_priest.cpp:731
Definition: spell_priest.cpp:780
Definition: spell_priest.cpp:817
Definition: spell_priest.cpp:839
Definition: spell_priest.cpp:895
Definition: spell_priest.cpp:932

References RegisterSpellAndAuraScriptPair, and RegisterSpellScript.

Referenced by AddSpellsScripts().

◆ CalculateSpellAmount()

static int32 CalculateSpellAmount ( Unit caster,
int32  amount,
SpellInfo const *  spellInfo,
const AuraEffect aurEff 
)
static
622{
623 // +80.68% from sp bonus
624 float bonus = 0.8068f;
625
626 // Borrowed Time
628 bonus += CalculatePct(1.0f, borrowedTime->GetAmount());
629
630 bonus *= caster->SpellBaseHealingBonusDone(spellInfo->GetSchoolMask());
631
632 // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
633 // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage
634 bonus = caster->ApplyEffectModifiers(spellInfo, aurEff->GetEffIndex(), bonus);
635 bonus *= caster->CalculateLevelPenalty(spellInfo);
636
637 amount += int32(bonus);
638
639 // Twin Disciplines
640 if (AuraEffect const* twinDisciplines = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_PRIEST, 0x400000, 0, 0, caster->GetGUID()))
641 AddPct(amount, twinDisciplines->GetAmount());
642
643 // Focused Power, xinef: apply positive modifier only
645 AddPct(amount, healModifier);
646
647 // Arena - Dampening
648 if (AuraEffect const* arenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
649 {
650 AddPct(amount, arenaDampening->GetAmount());
651 }
652 // Battleground - Dampening
653 else if (AuraEffect const* bgDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
654 {
655 AddPct(amount, bgDampening->GetAmount());
656 }
657
658 return amount;
659};
T AddPct(T &base, U pct)
Definition: Util.h:67
T CalculatePct(T base, U pct)
Definition: Util.h:61
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
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask)
Definition: Unit.cpp:12702
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition: Unit.cpp:5494
float ApplyEffectModifiers(SpellInfo const *spellProto, uint8 effect_index, float value) const
Definition: Unit.cpp:14829
int32 GetMaxPositiveAuraModifier(AuraType auratype)
Definition: Unit.cpp:5935
AuraEffect * GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
Definition: Unit.h:1358
float CalculateLevelPenalty(SpellInfo const *spellProto) const
Definition: Unit.cpp:3040
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().