From aa87b7007c61d710814a89adef9bea94a1e7d6e3 Mon Sep 17 00:00:00 2001 From: m4cm4n Date: Sun, 18 Oct 2009 20:51:05 +0200 Subject: [PATCH] [8675] Implemented dummy effects for spells 49357, 52845. Signed-off-by: ApoC --- src/game/SpellEffects.cpp | 58 +++++++++++++++++++++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2033b9294..902153aa8 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1159,6 +1159,35 @@ void Spell::EffectDummy(uint32 i) m_caster->CastSpell(m_caster, 45088, true); return; } + case 49357: // Brewfest Mount Transformation + if (m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED)) + return; + + m_caster->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); + + // Ram for Alliance, Kodo for Horde + if (((Player *)m_caster)->GetTeam() == ALLIANCE) + { + if (m_caster->GetSpeedRate(MOVE_RUN) >= 2.0f) + // 100% Ram + m_caster->CastSpell(m_caster, 43900, true); + else + // 60% Ram + m_caster->CastSpell(m_caster, 43899, true); + } + else + { + if (((Player *)m_caster)->GetSpeedRate(MOVE_RUN) >= 2.0f) + // 100% Kodo + m_caster->CastSpell(m_caster, 49379, true); + else + // 60% Kodo + m_caster->CastSpell(m_caster, 49378, true); + } + return; case 50243: // Teach Language { if (m_caster->GetTypeId() != TYPEID_PLAYER) @@ -1225,6 +1254,35 @@ void Spell::EffectDummy(uint32 i) return; m_caster->CastCustomSpell(unitTarget, 52752, &damage, NULL, NULL, true); return; + case 52845: // Brewfest Mount Transformation (Faction Swap) + if (m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED)) + return; + + m_caster->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); + + // Ram for Horde, Kodo for Alliance + if (((Player *)m_caster)->GetTeam() == HORDE) + { + if (m_caster->GetSpeedRate(MOVE_RUN) >= 2.0f) + // 100% Ram + m_caster->CastSpell(m_caster, 43900, true); + else + // 60% Ram + m_caster->CastSpell(m_caster, 43899, true); + } + else + { + if (((Player *)m_caster)->GetSpeedRate(MOVE_RUN) >= 2.0f) + // 100% Kodo + m_caster->CastSpell(m_caster, 49379, true); + else + // 60% Kodo + m_caster->CastSpell(m_caster, 49378, true); + } + return; case 53341: // Rune of Cinderglacier case 53343: // Rune of Razorice { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ec3f02f4f..989bedd37 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8674" + #define REVISION_NR "8675" #endif // __REVISION_NR_H__