aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_06_24_00_world_spell_script_names_434.sql3
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp43
2 files changed, 46 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_24_00_world_spell_script_names_434.sql b/sql/updates/world/2013_06_24_00_world_spell_script_names_434.sql
new file mode 100644
index 00000000000..4e671d426c6
--- /dev/null
+++ b/sql/updates/world/2013_06_24_00_world_spell_script_names_434.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=97462;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(97462, 'spell_warr_rallying_cry'); \ No newline at end of file
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 9e2cb8aad71..a5316766239 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -41,6 +41,7 @@ enum WarriorSpells
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_BUFF = 65156,
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT = 64976,
SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976,
+ SPELL_WARRIOR_RALLYING_CRY = 97463,
SPELL_WARRIOR_SLAM = 50782,
SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK = 26654,
SPELL_WARRIOR_TAUNT = 355,
@@ -435,6 +436,47 @@ class spell_warr_overpower : public SpellScriptLoader
}
};
+// 97462 - Rallying Cry
+class spell_warr_rallying_cry : public SpellScriptLoader
+{
+ public:
+ spell_warr_rallying_cry() : SpellScriptLoader("spell_warr_rallying_cry") { }
+
+ class spell_warr_rallying_cry_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_rallying_cry_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_RALLYING_CRY))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ int32 basePoints0 = int32(GetHitUnit()->CountPctFromMaxHealth(GetEffectValue()));
+
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_WARRIOR_RALLYING_CRY, &basePoints0, NULL, NULL, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_rallying_cry_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_rallying_cry_SpellScript();
+ }
+};
+
// -772 - Rend
class spell_warr_rend : public SpellScriptLoader
{
@@ -736,6 +778,7 @@ void AddSC_warrior_spell_scripts()
new spell_warr_intimidating_shout();
new spell_warr_last_stand();
new spell_warr_overpower();
+ new spell_warr_rallying_cry();
new spell_warr_rend();
new spell_warr_shattering_throw();
new spell_warr_slam();