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,12 +21,13 @@
|
||||
* Scriptnames of files in this file should be prefixed with "spell_dru_".
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Containers.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "Containers.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum DruidSpells
|
||||
{
|
||||
@@ -60,7 +61,7 @@ enum DruidSpells
|
||||
SPELL_DRUID_NATURES_GRACE_TRIGGER = 16886,
|
||||
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
|
||||
SPELL_DRUID_SAVAGE_ROAR = 62071,
|
||||
SPELL_DRUID_STAMPEDE_BAER_RANK_1 = 81016,
|
||||
SPELL_DRUID_STAMPEDE_BEAR_RANK_1 = 81016,
|
||||
SPELL_DRUID_STAMPEDE_CAT_RANK_1 = 81021,
|
||||
SPELL_DRUID_STAMPEDE_CAT_STATE = 109881,
|
||||
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178
|
||||
@@ -108,10 +109,7 @@ class spell_dru_eclipse : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE_TRIGGER))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_NATURES_GRACE, SPELL_DRUID_NATURES_GRACE_TRIGGER });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
@@ -263,12 +261,13 @@ class spell_dru_enrage : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_KING_OF_THE_JUNGLE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGE_MOD_DAMAGE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGED_DEFENSE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_DRUID_KING_OF_THE_JUNGLE,
|
||||
SPELL_DRUID_ENRAGE_MOD_DAMAGE,
|
||||
SPELL_DRUID_ENRAGED_DEFENSE,
|
||||
SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS
|
||||
});
|
||||
}
|
||||
|
||||
void RecalculateBaseArmor()
|
||||
@@ -332,9 +331,7 @@ class spell_dru_glyph_of_innervate : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_INNERVATE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_GLYPH_OF_INNERVATE });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -346,7 +343,7 @@ class spell_dru_glyph_of_innervate : public SpellScriptLoader
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_GLYPH_OF_INNERVATE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_GLYPH_OF_INNERVATE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -374,9 +371,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_INCREASED_MOONFIRE_DURATION });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
@@ -424,15 +419,13 @@ class spell_dru_glyph_of_starfire_proc : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_STARFIRE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_GLYPH_OF_STARFIRE });
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -554,11 +547,7 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_ENERGIZE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, SPELL_DRUID_LIFEBLOOM_ENERGIZE });
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
@@ -575,15 +564,15 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, stack);
|
||||
healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, stack);
|
||||
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
|
||||
// restore mana
|
||||
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * stack / 2;
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* dispelInfo)
|
||||
@@ -598,15 +587,15 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
{
|
||||
healAmount = caster->SpellHealingBonusDone(target, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
|
||||
healAmount = target->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
|
||||
// restore mana
|
||||
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * dispelInfo->GetRemovedCharges() / 2;
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -636,16 +625,14 @@ class spell_dru_living_seed : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_PROC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIVING_SEED_PROC });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 amount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_PROC, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_PROC, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -672,15 +659,13 @@ class spell_dru_living_seed_proc : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIVING_SEED_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -853,15 +838,13 @@ class spell_dru_savage_roar : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SAVAGE_ROAR))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_SAVAGE_ROAR });
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, SPELL_DRUID_SAVAGE_ROAR, true, NULL, aurEff, GetCasterGUID());
|
||||
target->CastSpell(target, SPELL_DRUID_SAVAGE_ROAR, true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -945,13 +928,14 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_BAER_RANK_1) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_CAT_RANK_1) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_CAT_STATE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_FERAL_CHARGE_CAT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_FERAL_CHARGE_BEAR))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_DRUID_STAMPEDE_BEAR_RANK_1,
|
||||
SPELL_DRUID_STAMPEDE_CAT_RANK_1,
|
||||
SPELL_DRUID_STAMPEDE_CAT_STATE,
|
||||
SPELL_DRUID_FERAL_CHARGE_CAT,
|
||||
SPELL_DRUID_FERAL_CHARGE_BEAR
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffectCatProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -960,8 +944,8 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
if (GetTarget()->GetShapeshiftForm() != FORM_CAT || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_CAT)
|
||||
return;
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_STAMPEDE_CAT_STATE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, nullptr, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_STAMPEDE_CAT_STATE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void HandleEffectBearProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -970,7 +954,7 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
if (GetTarget()->GetShapeshiftForm() != FORM_BEAR || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_BEAR)
|
||||
return;
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BAER_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BEAR_RANK_1, GetSpellInfo()->GetRank()), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1017,16 +1001,14 @@ class spell_dru_survival_instincts : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SURVIVAL_INSTINCTS))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_SURVIVAL_INSTINCTS });
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
int32 bp0 = target->CountPctFromMaxHealth(aurEff->GetAmount());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, &bp0, NULL, NULL, true);
|
||||
target->CastCustomSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, &bp0, nullptr, nullptr, true);
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
Reference in new issue
Block a user