diff options
4 files changed, 69 insertions, 24 deletions
diff --git a/sql/updates/world/2013_07_26_06_world_spell_misc_434.sql b/sql/updates/world/2013_07_26_06_world_spell_misc_434.sql index 704e12d75d4..06e8895145f 100644 --- a/sql/updates/world/2013_07_26_06_world_spell_misc_434.sql +++ b/sql/updates/world/2013_07_26_06_world_spell_misc_434.sql @@ -9,7 +9,7 @@ INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES DELETE FROM `spell_ranks` WHERE `first_spell_id` IN (81016,81021); INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES --- Bär +-- Bear (81016, 81016, 1), (81016, 81017, 2), -- Cat diff --git a/sql/updates/world/2013_07_27_00_world_spell_misc_434.sql b/sql/updates/world/2013_07_27_00_world_spell_misc_434.sql new file mode 100644 index 00000000000..2cff156225c --- /dev/null +++ b/sql/updates/world/2013_07_27_00_world_spell_misc_434.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc_event` WHERE `entry`=-84583; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(-84583, 0, 4, 0x22200004, 0, 0, 0, 0, 0, 0, 0); + +DELETE FROM `spell_script_names` WHERE `spell_id`=-84583; +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(-84583,'spell_warr_lambs_to_the_slaughter'); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 3c492531348..5bbdd92c99f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1128,13 +1128,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const { uint32 spellId = 0; uint32 spellId2 = 0; - uint32 HotWSpellId = 0; switch (GetMiscValue()) { case FORM_CAT: spellId = 3025; - HotWSpellId = 24900; break; case FORM_TREE: spellId = 34123; @@ -1148,7 +1146,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const case FORM_BEAR: spellId = 1178; spellId2 = 21178; - HotWSpellId = 24899; break; case FORM_BATTLESTANCE: spellId = 21156; @@ -1185,7 +1182,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const case FORM_GHOSTWOLF: spellId = 67116; break; - case FORM_DIREBEAR: case FORM_GHOUL: case FORM_AMBIENT: case FORM_STEALTH: @@ -1258,32 +1254,32 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (plrTarget->HasSpell(17007)) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(24932); - if (spellInfo && spellInfo->Stances & (1<<(GetMiscValue()-1))) + if (spellInfo && spellInfo->Stances & (1 << (GetMiscValue() -1))) target->CastSpell(target, 24932, true, NULL, this); } // Heart of the Wild - if (HotWSpellId) + if (AuraEffect const* heartOfTheWild = target->GetAuraEffectOfRankedSpell(17003, EFFECT_0)) { - // Heart of the Wild - if (AuraEffect const* heartOfTheWild = target->GetAuraEffectOfRankedSpell(17003, EFFECT_0)) - { - int32 heartOfTheWildAmount = 0; - - switch (GetMiscValue()) - { - case FORM_CAT: - heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); - break; - case FORM_BEAR: - heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_2].CalcValue(); - break; - default: - break; - } + uint32 heartOfTheWildSpellId = 0; + int32 heartOfTheWildAmount = 0; - target->CastCustomSpell(target, HotWSpellId, &heartOfTheWildAmount, NULL, NULL, true, NULL, this); + switch (GetMiscValue()) + { + case FORM_CAT: + heartOfTheWildSpellId = 24900; + heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + break; + case FORM_BEAR: + heartOfTheWildSpellId = 24899; + heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_2].CalcValue(); + break; + default: + break; } + + if (heartOfTheWildSpellId) + target->CastCustomSpell(target, heartOfTheWildSpellId, &heartOfTheWildAmount, NULL, NULL, true, NULL, this); } switch (GetMiscValue()) @@ -1359,6 +1355,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const break; } } + Unit::AuraApplicationMap& tAuras = target->GetAppliedAuras(); for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();) { diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 5af45bfc32d..e4d8481eb4f 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -41,7 +41,9 @@ enum WarriorSpells SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_BUFF = 65156, SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT = 64976, SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976, + SPELL_WARRIOR_MORTAL_STRIKE = 12294, SPELL_WARRIOR_RALLYING_CRY = 97463, + SPELL_WARRIOR_REND = 94009, SPELL_WARRIOR_RETALIATION_DAMAGE = 22858, SPELL_WARRIOR_SECOUND_WIND_PROC_RANK_1 = 29834, SPELL_WARRIOR_SECOUND_WIND_PROC_RANK_2 = 29838, @@ -421,6 +423,44 @@ class spell_warr_intimidating_shout : public SpellScriptLoader } }; +// -84583 Lambs to the Slaughter +class spell_warr_lambs_to_the_slaughter : public SpellScriptLoader +{ + public: + spell_warr_lambs_to_the_slaughter() : SpellScriptLoader("spell_warr_lambs_to_the_slaughter") { } + + class spell_warr_lambs_to_the_slaughter_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warr_lambs_to_the_slaughter_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_MORTAL_STRIKE) || + !sSpellMgr->GetSpellInfo(SPELL_WARRIOR_REND)) + return false; + return true; + } + + void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id == SPELL_WARRIOR_MORTAL_STRIKE) + if (Aura* aur = eventInfo.GetProcTarget()->GetAura(SPELL_WARRIOR_REND, GetTarget()->GetGUID())) + aur->SetDuration(aur->GetSpellInfo()->GetMaxDuration(), true); + + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_warr_lambs_to_the_slaughter_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warr_lambs_to_the_slaughter_AuraScript(); + } +}; + /// Updated 4.3.4 // 12975 - Last Stand class spell_warr_last_stand : public SpellScriptLoader @@ -1026,6 +1066,7 @@ void AddSC_warrior_spell_scripts() new spell_warr_glyph_of_sunder_armor(); new spell_warr_improved_spell_reflection(); new spell_warr_intimidating_shout(); + new spell_warr_lambs_to_the_slaughter(); new spell_warr_last_stand(); new spell_warr_overpower(); new spell_warr_rallying_cry(); |