Misc: Reorder more scripts in some script files and some cosmetic stuff

This commit is contained in:
joschiwald committed 2013-01-12 02:16:30 +01:00
1 parent ecbcca8794
commit 95f8068a6f
5 files changed
+949 -944

No files matched your search

+43 -33
View File
@@ -29,18 +29,19 @@
enum DruidSpells
{
DRUID_INCREASED_MOONFIRE_DURATION = 38414,
DRUID_NATURES_SPLENDOR = 57865,
DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
DRUID_LIFEBLOOM_ENERGIZE = 64372,
DRUID_SURVIVAL_INSTINCTS = 50322,
DRUID_SAVAGE_ROAR = 62071,
SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950,
SPELL_KING_OF_THE_JUNGLE = 48492,
SPELL_TIGER_S_FURY_ENERGIZE = 51178,
SPELL_ENRAGE_MOD_DAMAGE = 51185,
SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185,
SPELL_DRUID_INCREASED_MOONFIRE_DURATION = 38414,
SPELL_DRUID_KING_OF_THE_JUNGLE = 48492,
SPELL_DRUID_LIFEBLOOM_ENERGIZE = 64372,
SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
SPELL_DRUID_NATURES_SPLENDOR = 57865,
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
SPELL_DRUID_SAVAGE_ROAR = 62071,
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178,
SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950,
};
// -5229 - Enrage
class spell_dru_enrage : public SpellScriptLoader
{
public:
@@ -52,8 +53,8 @@ class spell_dru_enrage : public SpellScriptLoader
void OnHit()
{
if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_KING_OF_THE_JUNGLE, EFFECT_0))
GetHitUnit()->CastCustomSpell(SPELL_ENRAGE_MOD_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_DRUID_KING_OF_THE_JUNGLE, EFFECT_0))
GetHitUnit()->CastCustomSpell(SPELL_DRUID_ENRAGE_MOD_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
}
void Register()
@@ -68,7 +69,7 @@ class spell_dru_enrage : public SpellScriptLoader
}
};
// 54846 Glyph of Starfire
// 54846 - Glyph of Starfire
class spell_dru_glyph_of_starfire : public SpellScriptLoader
{
public:
@@ -78,9 +79,9 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
{
PrepareSpellScript(spell_dru_glyph_of_starfire_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/)
bool Validate(SpellInfo const* /*spellInfo*/)
{
if (!sSpellMgr->GetSpellInfo(DRUID_INCREASED_MOONFIRE_DURATION) || !sSpellMgr->GetSpellInfo(DRUID_NATURES_SPLENDOR))
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION) || !sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_SPLENDOR))
return false;
return true;
}
@@ -95,9 +96,9 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
uint32 countMin = aura->GetMaxDuration();
uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000;
if (caster->HasAura(DRUID_INCREASED_MOONFIRE_DURATION))
if (caster->HasAura(SPELL_DRUID_INCREASED_MOONFIRE_DURATION))
countMax += 3000;
if (caster->HasAura(DRUID_NATURES_SPLENDOR))
if (caster->HasAura(SPELL_DRUID_NATURES_SPLENDOR))
countMax += 3000;
if (countMin < countMax)
@@ -120,6 +121,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
}
};
// -5570 - Insect Swarm
class spell_dru_insect_swarm : public SpellScriptLoader
{
public:
@@ -148,6 +150,7 @@ class spell_dru_insect_swarm : public SpellScriptLoader
}
};
// -33763 - Lifebloom
class spell_dru_lifebloom : public SpellScriptLoader
{
public:
@@ -159,9 +162,9 @@ class spell_dru_lifebloom : public SpellScriptLoader
bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(DRUID_LIFEBLOOM_FINAL_HEAL))
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL))
return false;
if (!sSpellMgr->GetSpellInfo(DRUID_LIFEBLOOM_ENERGIZE))
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_ENERGIZE))
return false;
return true;
}
@@ -180,15 +183,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(), DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
// restore mana
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * stack / 2;
caster->CastCustomSpell(caster, DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
return;
}
GetTarget()->CastCustomSpell(GetTarget(), DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
}
void HandleDispel(DispelInfo* dispelInfo)
@@ -203,15 +206,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, DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
// restore mana
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * dispelInfo->GetRemovedCharges() / 2;
caster->CastCustomSpell(caster, DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, NULL, GetCasterGUID());
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, NULL, GetCasterGUID());
return;
}
target->CastCustomSpell(target, DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
}
}
}
@@ -273,6 +276,7 @@ class spell_dru_moonkin_form_passive : public SpellScriptLoader
}
};
// -16972 - Predatory Strikes
class spell_dru_predatory_strikes : public SpellScriptLoader
{
public:
@@ -388,6 +392,7 @@ class spell_dru_savage_defense : public SpellScriptLoader
}
};
// 52610 - Savage Roar
class spell_dru_savage_roar : public SpellScriptLoader
{
public:
@@ -418,7 +423,7 @@ class spell_dru_savage_roar : public SpellScriptLoader
bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(DRUID_SAVAGE_ROAR))
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SAVAGE_ROAR))
return false;
return true;
}
@@ -426,12 +431,12 @@ class spell_dru_savage_roar : public SpellScriptLoader
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
target->CastSpell(target, DRUID_SAVAGE_ROAR, true, NULL, aurEff, GetCasterGUID());
target->CastSpell(target, SPELL_DRUID_SAVAGE_ROAR, true, NULL, aurEff, GetCasterGUID());
}
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(DRUID_SAVAGE_ROAR);
GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_SAVAGE_ROAR);
}
void Register()
@@ -452,6 +457,7 @@ class spell_dru_savage_roar : public SpellScriptLoader
}
};
// -50294 - Starfall (AOE)
class spell_dru_starfall_aoe : public SpellScriptLoader
{
public:
@@ -478,6 +484,7 @@ class spell_dru_starfall_aoe : public SpellScriptLoader
}
};
// -50286 - Starfall (Dummy)
class spell_dru_starfall_dummy : public SpellScriptLoader
{
public:
@@ -523,6 +530,7 @@ class spell_dru_starfall_dummy : public SpellScriptLoader
}
};
// 61336 - Survival Instincts
class spell_dru_survival_instincts : public SpellScriptLoader
{
public:
@@ -553,7 +561,7 @@ class spell_dru_survival_instincts : public SpellScriptLoader
bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(DRUID_SURVIVAL_INSTINCTS))
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SURVIVAL_INSTINCTS))
return false;
return true;
}
@@ -562,12 +570,12 @@ class spell_dru_survival_instincts : public SpellScriptLoader
{
Unit* target = GetTarget();
int32 bp0 = target->CountPctFromMaxHealth(aurEff->GetAmount());
target->CastCustomSpell(target, DRUID_SURVIVAL_INSTINCTS, &bp0, NULL, NULL, true);
target->CastCustomSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, &bp0, NULL, NULL, true);
}
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(DRUID_SURVIVAL_INSTINCTS);
GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_SURVIVAL_INSTINCTS);
}
void Register()
@@ -622,6 +630,7 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
}
};
// -5217 - Tiger's Fury
class spell_dru_tiger_s_fury : public SpellScriptLoader
{
public:
@@ -633,8 +642,8 @@ class spell_dru_tiger_s_fury : public SpellScriptLoader
void OnHit()
{
if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_KING_OF_THE_JUNGLE, EFFECT_1))
GetHitUnit()->CastCustomSpell(SPELL_TIGER_S_FURY_ENERGIZE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_DRUID_KING_OF_THE_JUNGLE, EFFECT_1))
GetHitUnit()->CastCustomSpell(SPELL_DRUID_TIGER_S_FURY_ENERGIZE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
}
void Register()
@@ -649,6 +658,7 @@ class spell_dru_tiger_s_fury : public SpellScriptLoader
}
};
// 70691 - Item T10 Restoration 4P Bonus
class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader
{
public: