Fix Gnomish Death Ray.
- The Gnomish Death Ray now properly charges and deals damage. - TODO: more research on dmg/crit/dr
This commit is contained in:
parent
0fd23fb680
commit
c7f8748e69
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user