From 0bb3a4c84d5e19fdae08da55378c4978d2930e95 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 11 Sep 2011 11:57:18 +0200 Subject: [PATCH] [11791] Implement spells 69048, 69051 and 69023 Signed-off-by: Schmoozerd --- src/game/Spell.cpp | 1 + src/game/SpellEffects.cpp | 20 ++++++++++++++++++++ src/game/SpellMgr.cpp | 5 +++++ src/game/UnitAuraProcHandler.cpp | 9 +++++++++ src/shared/revision_nr.h | 2 +- 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 8d5557cd3..71a98ebc3 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1574,6 +1574,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& case 59870: // Glare of the Tribunal (h) (Halls of Stone) case 64218: // Overcharge case 68950: // Fear + case 69048: // Mirrored Soul (FoS) unMaxTargets = 1; break; case 28542: // Life Drain diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 4efdf6d7c..dc2da07e7 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -7309,6 +7309,26 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) if (unitTarget) unitTarget->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(eff_idx), true); return; + case 69048: // Mirrored Soul + { + if (!unitTarget) + return; + + // This is extremely strange! + // The spell should send MSG_CHANNEL_START, SMSG_SPELL_START + // However it has cast time 2s, but should send SMSG_SPELL_GO instantly. + m_caster->CastSpell(unitTarget, 69051, true); + return; + } + case 69051: // Mirrored Soul + { + if (!unitTarget) + return; + + // Actually this spell should be sent with SMSG_SPELL_START + unitTarget->CastSpell(m_caster, 69023, true); + return; + } case 69377: // Fortitude { if (!unitTarget) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 1f8630d5e..a72d8c805 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1915,6 +1915,11 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons if (spellInfo_1->SpellIconID == 2606 && spellInfo_2->SpellIconID == 2606) return false; + // Mirrored Soul (FoS - Devourer) - and other Boss spells + if (spellInfo_1->SpellIconID == 3176 && spellInfo_2->SpellIconID == 3176) + return false; + + // Brood Affliction: Bronze if ((spellInfo_1->Id == 23170 && spellInfo_2->Id == 23171) || (spellInfo_2->Id == 23170 && spellInfo_1->Id == 23171)) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 00b729c4e..0080e5ada 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -2977,6 +2977,15 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d if (GetStat(STAT_AGILITY) > stat) { trigger_spell_id = 67772; } break; } + case 69023: // Mirrored Soul + { + int32 basepoints = (int32) (damage * 0.45f); + if (Unit* caster = triggeredByAura->GetCaster()) + // Actually this spell should be sent with SMSG_SPELL_START + CastCustomSpell(caster, 69034, &basepoints, NULL, NULL, true, NULL, triggeredByAura, GetObjectGuid()); + + return SPELL_AURA_PROC_OK; + } } break; case SPELLFAMILY_MAGE: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index df18858a7..983b1d631 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 "11790" + #define REVISION_NR "11791" #endif // __REVISION_NR_H__