Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -21,11 +21,12 @@
|
||||
* Scriptnames of files in this file should be prefixed with "spell_pri_".
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum PriestSpells
|
||||
{
|
||||
@@ -123,10 +124,7 @@ class spell_pri_body_and_soul : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_CURE_DISEASE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_PRIEST_BODY_AND_SOUL_DISPEL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_CURE_DISEASE, SPELL_PRIEST_BODY_AND_SOUL_DISPEL });
|
||||
}
|
||||
|
||||
void HandleEffectSpeedProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -136,7 +134,7 @@ class spell_pri_body_and_soul : public SpellScriptLoader
|
||||
if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[0] & 0x1 || eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[2] & 0x80000))
|
||||
return;
|
||||
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_BODY_AND_SOUL_SPEED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_BODY_AND_SOUL_SPEED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void HandleEffectDispelProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -147,7 +145,7 @@ class spell_pri_body_and_soul : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (roll_chance_i(aurEff->GetAmount()))
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_BODY_AND_SOUL_DISPEL, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_BODY_AND_SOUL_DISPEL, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -175,9 +173,7 @@ class spell_pri_circle_of_healing : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING });
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
@@ -217,13 +213,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_ABSOLUTION))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_DISPEL_MAGIC_HEAL))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_DISPEL_MAGIC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ABSOLUTION, SPELL_PRIEST_GLYPH_OF_DISPEL_MAGIC_HEAL, SPELL_PRIEST_GLYPH_OF_DISPEL_MAGIC });
|
||||
}
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
@@ -276,9 +266,7 @@ class spell_pri_divine_aegis : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_DIVINE_AEGIS))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_DIVINE_AEGIS });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -298,7 +286,7 @@ class spell_pri_divine_aegis : public SpellScriptLoader
|
||||
|
||||
absorb = std::min(absorb, eventInfo.GetProcTarget()->getLevel() * 125);
|
||||
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -361,9 +349,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -372,7 +358,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
|
||||
|
||||
SpellInfo const* triggeredSpellInfo = sSpellMgr->AssertSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
|
||||
int32 heal = int32(CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()) / triggeredSpellInfo->GetMaxTicks());
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -434,15 +420,13 @@ class spell_pri_item_greater_heal_refund : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_ITEM_EFFICIENCY))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ITEM_EFFICIENCY });
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -478,9 +462,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
@@ -504,7 +486,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
int32 healAmount = int32(target->CountPctFromMaxHealth(healPct));
|
||||
// remove the aura now, we don't want 40% healing bonus
|
||||
Remove(AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
target->CastCustomSpell(target, SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL, &healAmount, NULL, NULL, true);
|
||||
target->CastCustomSpell(target, SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL, &healAmount, nullptr, nullptr, true);
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
}
|
||||
|
||||
@@ -569,9 +551,7 @@ class spell_pri_leap_of_faith_effect_trigger : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_LEAP_OF_FAITH_EFFECT))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_LEAP_OF_FAITH_EFFECT });
|
||||
}
|
||||
|
||||
void HandleEffectDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -581,7 +561,7 @@ class spell_pri_leap_of_faith_effect_trigger : public SpellScriptLoader
|
||||
SpellCastTargets targets;
|
||||
targets.SetDst(destPos);
|
||||
targets.SetUnitTarget(GetCaster());
|
||||
GetHitUnit()->CastSpell(targets, sSpellMgr->GetSpellInfo(GetEffectValue()), NULL);
|
||||
GetHitUnit()->CastSpell(targets, sSpellMgr->GetSpellInfo(GetEffectValue()), nullptr);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -638,18 +618,9 @@ class spell_pri_mana_leech : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_mana_leech_AuraScript);
|
||||
|
||||
public:
|
||||
spell_pri_mana_leech_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_MANA_LEECH_PROC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_MANA_LEECH_PROC });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
@@ -661,7 +632,7 @@ class spell_pri_mana_leech : public SpellScriptLoader
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_PRIEST_MANA_LEECH_PROC, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_PRIEST_MANA_LEECH_PROC, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -670,8 +641,7 @@ class spell_pri_mana_leech : public SpellScriptLoader
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_mana_leech_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
Unit* _procTarget = nullptr;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
@@ -868,11 +838,11 @@ class spell_pri_power_word_shield : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_R1))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED,
|
||||
SPELL_PRIEST_REFLECTIVE_SHIELD_R1
|
||||
});
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
|
||||
@@ -917,7 +887,7 @@ class spell_pri_power_word_shield : public SpellScriptLoader
|
||||
if (AuraEffect const* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||
{
|
||||
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, nullptr, nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -981,9 +951,7 @@ class spell_pri_renew : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_DIVINE_TOUCH))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_DIVINE_TOUCH });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
@@ -1001,7 +969,7 @@ class spell_pri_renew : public SpellScriptLoader
|
||||
uint32 heal = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), aurEff->GetAmount(), DOT);
|
||||
heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT);
|
||||
int32 basepoints0 = CalculatePct(int32(heal) * aurEff->GetTotalTicks(), empoweredRenewAurEff->GetAmount());
|
||||
caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_DIVINE_TOUCH, &basepoints0, NULL, NULL, true, NULL, aurEff);
|
||||
caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_DIVINE_TOUCH, &basepoints0, nullptr, nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1063,10 +1031,11 @@ class spell_pri_shadowform : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH,
|
||||
SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1105,9 +1074,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -1122,7 +1089,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
|
||||
int32 self = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
|
||||
int32 team = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount() / 2));
|
||||
|
||||
GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL, &team, &self, NULL, true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell((Unit*)nullptr, SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL, &team, &self, nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1177,10 +1144,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_GEN_REPLENISHMENT))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL, SPELL_GEN_REPLENISHMENT });
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* /*dispelInfo*/)
|
||||
@@ -1191,7 +1155,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
{
|
||||
int32 damage = aurEff->GetAmount() * 8;
|
||||
// backfire damage
|
||||
caster->CastCustomSpell(target, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL, &damage, NULL, NULL, true, NULL, aurEff);
|
||||
caster->CastCustomSpell(target, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL, &damage, nullptr, nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1202,7 +1166,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
eventInfo.GetProcTarget()->CastSpell((Unit*)NULL, SPELL_GEN_REPLENISHMENT, true, NULL, aurEff);
|
||||
eventInfo.GetProcTarget()->CastSpell((Unit*)nullptr, SPELL_GEN_REPLENISHMENT, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1243,7 +1207,7 @@ class spell_pri_echo_of_light : public SpellScriptLoader
|
||||
uint32 healAmount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());
|
||||
uint8 tickNumber = sSpellMgr->GetSpellInfo(SPELL_PRIEST_ECHO_OF_LIGHT)->GetMaxTicks();
|
||||
if (healAmount && tickNumber)
|
||||
caster->CastCustomSpell(SPELL_PRIEST_ECHO_OF_LIGHT, SPELLVALUE_BASE_POINT0, healAmount / tickNumber, target, true, NULL, aurEff);
|
||||
caster->CastCustomSpell(SPELL_PRIEST_ECHO_OF_LIGHT, SPELLVALUE_BASE_POINT0, healAmount / tickNumber, target, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user