diff --git a/src/game/Object/SpellMgr.cpp b/src/game/Object/SpellMgr.cpp index f407ff9f..c857275e 100644 --- a/src/game/Object/SpellMgr.cpp +++ b/src/game/Object/SpellMgr.cpp @@ -2003,6 +2003,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons // Allow stack passive and not passive spells if (spellInfo_1->HasAttribute(SPELL_ATTR_PASSIVE) != spellInfo_2->HasAttribute(SPELL_ATTR_PASSIVE)) { return false; } + + // Gnomish Death Ray + if (spellInfo_1->Id == 13278 || spellInfo_2->Id == 13278) + { return false; } // Specific spell family spells switch (spellInfo_1->SpellFamilyName) diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index f2aa52e3..b391a455 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -444,7 +444,9 @@ void Spell::FillTargetMap() { case TARGET_NONE: // Fill Target based on A only // Arcane Missiles have strange targeting for auras - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800)) + // Gnomish Death Ray triggered 13280 + if ((m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800)) || + (m_spellInfo->Id == 13280)) { if (m_caster->GetTypeId() == TYPEID_PLAYER) if (Unit* target = ObjectAccessor::Instance().GetUnit(*m_caster, ((Player*)m_caster)->GetSelectionGuid())) @@ -4273,6 +4275,10 @@ SpellCastResult Spell::CheckCast(bool strict) m_caster == target) { return SPELL_FAILED_BAD_TARGETS; } + // Gnomish Death Ray self cast forbidden + if (m_spellInfo->Id == 13278 && m_caster == target) + { return SPELL_FAILED_BAD_TARGETS; } + m_targets.setUnitTarget(target); } } diff --git a/src/game/WorldHandlers/SpellEffects.cpp b/src/game/WorldHandlers/SpellEffects.cpp index 68ecd3ad..4df441ac 100644 --- a/src/game/WorldHandlers/SpellEffects.cpp +++ b/src/game/WorldHandlers/SpellEffects.cpp @@ -554,6 +554,24 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) return; } + case 13278: // Gnomish Death Ray charging + { + if (unitTarget) + { m_caster->CastSpell(m_caster, 13493, true, NULL); } + + return; + } + case 13280: // Gnomish Death Ray ending charge + { + if (unitTarget) + { + uint32 roll = urand(0,7); + int32 dmg[8] = {900, 1200, 1500, 1800, 2100, 2400, 2700, 3000}; + + m_caster->CastCustomSpell(unitTarget, 13279, &dmg[roll], NULL, NULL, true); + } + return; + } case 13535: // Tame Beast { if (!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER)