aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-10-17 15:04:51 -0500
committerSubv <s.v.h21@hotmail.com>2012-10-17 15:04:51 -0500
commit2356e936a4730dddc32c3893722cdf0c0aa2138a (patch)
tree0f68ed89b3b029c86409197b27790b3db964fe28
parent705873091b470a5d0cd361bd7f295ec724141df2 (diff)
Scripts/Spells: Updated some Shaman SpellScripts to 4.3.4
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp240
1 files changed, 46 insertions, 194 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 8b1fe6f38ba..d09289d59ab 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -29,8 +29,6 @@
enum ShamanSpells
{
- SHAMAN_SPELL_GLYPH_OF_MANA_TIDE = 55441,
- SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609,
SHAMAN_SPELL_FLAME_SHOCK = 8050,
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
SHAMAN_SPELL_SATED = 57724,
@@ -38,7 +36,7 @@ enum ShamanSpells
HUNTER_SPELL_INSANITY = 95809,
MAGE_SPELL_TEMPORAL_DISPLACEMENT = 80354,
- SHAMAN_SPELL_STORM_EARTH_AND_FIRE = 51483,
+ SHAMAN_SPELL_EARTH_GRASP = 51483,
EARTHBIND_TOTEM_SPELL_EARTHGRAB = 64695,
// For Earthen Power
@@ -49,7 +47,11 @@ enum ShamanSpells
ICON_ID_SHAMAN_LAVA_FLOW = 3087,
SHAMAN_LAVA_FLOWS_R1 = 51480,
- SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 64694,
+ SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 65264,
+ SHAMAN_SPELL_ANCESTRAL_AWAKENING_PROC = 52752,
+
+ ICON_ID_SOOTHING_RAIN = 2011,
+ SPELL_HEALING_STREAM_TOTEM_HEAL = 52042,
};
// 1535 Fire Nova
@@ -88,55 +90,38 @@ class spell_sha_fire_nova : public SpellScriptLoader
}
};
-// 39610 Mana Tide Totem
-class spell_sha_mana_tide_totem : public SpellScriptLoader
+// 16191 Mana Tide
+/// Updated 4.3.4
+class spell_sha_mana_tide : public SpellScriptLoader
{
public:
- spell_sha_mana_tide_totem() : SpellScriptLoader("spell_sha_mana_tide_totem") { }
+ spell_sha_mana_tide() : SpellScriptLoader("spell_sha_mana_tide") { }
- class spell_sha_mana_tide_totem_SpellScript : public SpellScript
+ class spell_sha_mana_tide_AuraScript : public AuraScript
{
- PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE) || !sSpellMgr->GetSpellInfo(SHAMAN_SPELL_MANA_TIDE_TOTEM))
- return false;
- return true;
- }
+ PrepareAuraScript(spell_sha_mana_tide_AuraScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
if (Unit* caster = GetCaster())
- if (Unit* unitTarget = GetHitUnit())
- {
- if (unitTarget->getPowerType() == POWER_MANA)
- {
- int32 effValue = GetEffectValue();
- // Glyph of Mana Tide
- if (Unit* owner = caster->GetOwner())
- if (AuraEffect* dummy = owner->GetAuraEffect(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE, 0))
- effValue += dummy->GetAmount();
- // Regenerate 6% of Total Mana Every 3 secs
- int32 effBasePoints0 = int32(CalculatePct(unitTarget->GetMaxPower(POWER_MANA), effValue));
- caster->CastCustomSpell(unitTarget, SHAMAN_SPELL_MANA_TIDE_TOTEM, &effBasePoints0, NULL, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID());
- }
- }
+ if (Unit* owner = caster->GetOwner())
+ amount = CalculatePct(owner->GetCreateStat(STAT_SPIRIT), aurEff->GetAmount());
}
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_sha_mana_tide_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_mana_tide_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_STAT);
}
};
- SpellScript* GetSpellScript() const
+ AuraScript* GetAuraScript() const
{
- return new spell_sha_mana_tide_totem_SpellScript();
+ return new spell_sha_mana_tide_AuraScript();
}
};
-// 6474 - Earthbind Totem - Fix Talent:Earthen Power
+// 6474 - Earthbind Totem - Fix Talent:Earthen Power, Earth's Grasp
+/// Updated 4.3.4
class spell_sha_earthbind_totem : public SpellScriptLoader
{
public:
@@ -170,8 +155,8 @@ class spell_sha_earthbind_totem : public SpellScriptLoader
Player* owner = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself();
if (!owner)
return;
- // Storm, Earth and Fire
- if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(SHAMAN_SPELL_STORM_EARTH_AND_FIRE, EFFECT_1))
+ // Earth's Grasp
+ if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(SHAMAN_SPELL_EARTH_GRASP, EFFECT_0))
{
if (roll_chance_i(aurEff->GetAmount()))
GetCaster()->CastSpell(GetCaster(), EARTHBIND_TOTEM_SPELL_EARTHGRAB, false);
@@ -234,6 +219,7 @@ class spell_sha_earthen_power : public SpellScriptLoader
}
};
+/// Updated 4.3.4
class spell_sha_bloodlust : public SpellScriptLoader
{
public:
@@ -278,6 +264,7 @@ class spell_sha_bloodlust : public SpellScriptLoader
}
};
+/// Updated 4.3.4
class spell_sha_heroism : public SpellScriptLoader
{
public:
@@ -322,11 +309,7 @@ class spell_sha_heroism : public SpellScriptLoader
}
};
-enum AncestralAwakeningProc
-{
- SPELL_ANCESTRAL_AWAKENING_PROC = 52752,
-};
-
+/// Updated 4.3.4
class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
{
public:
@@ -338,7 +321,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
bool Validate(SpellInfo const* /*SpellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_ANCESTRAL_AWAKENING_PROC))
+ if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_ANCESTRAL_AWAKENING_PROC))
return false;
return true;
}
@@ -347,7 +330,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
{
int32 damage = GetEffectValue();
if (GetCaster() && GetHitUnit())
- GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true);
+ GetCaster()->CastCustomSpell(GetHitUnit(), SHAMAN_SPELL_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true);
}
void Register()
@@ -362,53 +345,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
}
};
-enum CleansingTotemPulse
-{
- SPELL_CLEANSING_TOTEM_EFFECT = 52025,
-};
-
-class spell_sha_cleansing_totem_pulse : public SpellScriptLoader
-{
- public:
- spell_sha_cleansing_totem_pulse() : SpellScriptLoader("spell_sha_cleansing_totem_pulse") { }
-
- class spell_sha_cleansing_totem_pulse_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_sha_cleansing_totem_pulse_SpellScript);
-
- bool Validate(SpellInfo const* /*SpellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_CLEANSING_TOTEM_EFFECT))
- return false;
- return true;
- }
-
- void HandleDummy(SpellEffIndex /* effIndex */)
- {
- int32 bp = 1;
- if (GetCaster() && GetHitUnit() && GetOriginalCaster())
- GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_CLEANSING_TOTEM_EFFECT, NULL, &bp, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID());
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_sha_cleansing_totem_pulse_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_sha_cleansing_totem_pulse_SpellScript();
- }
-};
-
-enum HealingStreamTotem
-{
- SPELL_GLYPH_OF_HEALING_STREAM_TOTEM = 55456,
- ICON_ID_RESTORATIVE_TOTEMS = 338,
- SPELL_HEALING_STREAM_TOTEM_HEAL = 52042,
-};
-
+/// Updated 4.3.4
class spell_sha_healing_stream_totem : public SpellScriptLoader
{
public:
@@ -420,9 +357,7 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader
bool Validate(SpellInfo const* /*SpellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM) || !sSpellMgr->GetSpellInfo(SPELL_HEALING_STREAM_TOTEM_HEAL))
- return false;
- return true;
+ return sSpellMgr->GetSpellInfo(SPELL_HEALING_STREAM_TOTEM_HEAL);
}
void HandleDummy(SpellEffIndex /* effIndex */)
@@ -437,14 +372,10 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader
if (triggeringSpell)
damage = int32(owner->SpellHealingBonusDone(target, triggeringSpell, damage, HEAL));
- // Restorative Totems
- if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, ICON_ID_RESTORATIVE_TOTEMS, 1))
+ // Soothing Rains
+ if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, ICON_ID_SOOTHING_RAIN, EFFECT_0))
AddPct(damage, dummy->GetAmount());
- // Glyph of Healing Stream Totem
- if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM, EFFECT_0))
- AddPct(damage, aurEff->GetAmount());
-
damage = int32(target->SpellHealingBonusTaken(owner, triggeringSpell, damage, HEAL));
}
caster->CastCustomSpell(target, SPELL_HEALING_STREAM_TOTEM_HEAL, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
@@ -463,49 +394,7 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader
}
};
-enum ManaSpringTotem
-{
- SPELL_MANA_SPRING_TOTEM_ENERGIZE = 52032,
-};
-
-class spell_sha_mana_spring_totem : public SpellScriptLoader
-{
- public:
- spell_sha_mana_spring_totem() : SpellScriptLoader("spell_sha_mana_spring_totem") { }
-
- class spell_sha_mana_spring_totem_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_sha_mana_spring_totem_SpellScript);
-
- bool Validate(SpellInfo const* /*SpellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MANA_SPRING_TOTEM_ENERGIZE))
- return false;
- return true;
- }
-
- void HandleDummy(SpellEffIndex /* effIndex */)
- {
- int32 damage = GetEffectValue();
- if (Unit* target = GetHitUnit())
- if (Unit* caster = GetCaster())
- if (target->getPowerType() == POWER_MANA)
- caster->CastCustomSpell(target, SPELL_MANA_SPRING_TOTEM_ENERGIZE, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_sha_mana_spring_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
-
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_sha_mana_spring_totem_SpellScript();
- }
-};
-
+/// Updated 4.3.4
class spell_sha_lava_lash : public SpellScriptLoader
{
public:
@@ -550,6 +439,7 @@ class spell_sha_lava_lash : public SpellScriptLoader
};
// 1064 Chain Heal
+/// Updated 4.3.4
class spell_sha_chain_heal : public SpellScriptLoader
{
public:
@@ -563,6 +453,7 @@ class spell_sha_chain_heal : public SpellScriptLoader
{
firstHeal = true;
riptide = false;
+ amount = 0;
return true;
}
@@ -574,6 +465,7 @@ class spell_sha_chain_heal : public SpellScriptLoader
if (AuraEffect* aurEff = GetHitUnit()->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_SHAMAN, 0, 0, 0x10, GetCaster()->GetGUID()))
{
riptide = true;
+ amount = aurEff->GetSpellInfo()->Effects[EFFECT_2].CalcValue();
// Consume it
GetHitUnit()->RemoveAura(aurEff->GetBase());
}
@@ -581,7 +473,10 @@ class spell_sha_chain_heal : public SpellScriptLoader
}
// Riptide increases the Chain Heal effect by 25%
if (riptide)
- SetHitHeal(GetHitHeal() * 1.25f);
+ {
+ uint32 bonus = CalculatePct(GetHitHeal(), amount);
+ SetHitHeal(GetHitHeal() + bonus);
+ }
}
void Register()
@@ -591,6 +486,7 @@ class spell_sha_chain_heal : public SpellScriptLoader
bool firstHeal;
bool riptide;
+ uint32 amount;
};
SpellScript* GetSpellScript() const
@@ -599,6 +495,7 @@ class spell_sha_chain_heal : public SpellScriptLoader
}
};
+/// Updated 4.3.4
class spell_sha_flame_shock : public SpellScriptLoader
{
public:
@@ -620,15 +517,17 @@ class spell_sha_flame_shock : public SpellScriptLoader
void HandleDispel(DispelInfo* /*dispelInfo*/)
{
if (Unit* caster = GetCaster())
+ {
// Lava Flows
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, ICON_ID_SHAMAN_LAVA_FLOW, EFFECT_0))
{
if (sSpellMgr->GetFirstSpellInChain(SHAMAN_LAVA_FLOWS_R1) != sSpellMgr->GetFirstSpellInChain(aurEff->GetId()))
return;
- uint8 rank = sSpellMgr->GetSpellRank(aurEff->GetId());
- caster->CastSpell(caster, sSpellMgr->GetSpellWithRank(SHAMAN_LAVA_FLOWS_TRIGGERED_R1, rank), true);
+ uint32 basepoints = aurEff->GetAmount();
+ caster->CastCustomSpell(caster, SHAMAN_LAVA_FLOWS_TRIGGERED_R1, &basepoints, NULL, NULL, true);
}
+ }
}
void Register()
@@ -643,64 +542,17 @@ class spell_sha_flame_shock : public SpellScriptLoader
}
};
-class spell_sha_sentry_totem : public SpellScriptLoader
-{
- public:
- spell_sha_sentry_totem() : SpellScriptLoader("spell_sha_sentry_totem") { }
-
- class spell_sha_sentry_totem_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_sha_sentry_totem_AuraScript);
-
- bool Validate(SpellInfo const* /*spell*/)
- {
- if (!sSpellMgr->GetSpellInfo(SHAMAN_BIND_SIGHT))
- return false;
- return true;
- }
-
- void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- if (Unit* caster = GetCaster())
- if (Creature* totem = caster->GetMap()->GetCreature(caster->m_SummonSlot[4]))
- if (totem->isTotem())
- caster->CastSpell(totem, SHAMAN_BIND_SIGHT, true);
- }
-
- void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- if (Unit* caster = GetCaster())
- if (caster->GetTypeId() == TYPEID_PLAYER)
- caster->ToPlayer()->StopCastingBindSight();
- }
-
- void Register()
- {
- AfterEffectApply += AuraEffectApplyFn(spell_sha_sentry_totem_AuraScript::AfterApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- AfterEffectRemove += AuraEffectRemoveFn(spell_sha_sentry_totem_AuraScript::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- }
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_sha_sentry_totem_AuraScript();
- }
-};
-
void AddSC_shaman_spell_scripts()
{
new spell_sha_fire_nova();
- new spell_sha_mana_tide_totem();
+ new spell_sha_mana_tide();
new spell_sha_earthbind_totem();
new spell_sha_earthen_power();
new spell_sha_bloodlust();
new spell_sha_heroism();
new spell_sha_ancestral_awakening_proc();
- new spell_sha_cleansing_totem_pulse();
new spell_sha_healing_stream_totem();
- new spell_sha_mana_spring_totem();
new spell_sha_lava_lash();
new spell_sha_chain_heal();
new spell_sha_flame_shock();
- new spell_sha_sentry_totem();
}