diff options
author | QAston <none@none> | 2009-08-04 19:28:31 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-04 19:28:31 +0200 |
commit | d95e9c1027380f93b045e2fdea400256a0214860 (patch) | |
tree | 022925343ff003663ff2e93185ce877e9dca007e /src/game/SpellEffects.cpp | |
parent | 1d7375c545e881a12d12f633e0387695b327c432 (diff) |
*Fix Gargoyle feeding behaviour - original patch by thenecromancer.
*Add SPELL_TARGET_TYPE_CONTROLLED for spell_script_target table for fast search of units(grid search skipped) and to prevent applying effects to not owned summons
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 3f95efcdeed..b3ee8baa7e8 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1936,11 +1936,30 @@ void Spell::EffectDummy(uint32 i) bp = damage; } m_caster->CastCustomSpell(unitTarget,m_spellInfo->CalculateSimpleValue(1),&bp,NULL,NULL,true); - // Suicide + // Corpse Explosion (Suicide) unitTarget->CastCustomSpell(unitTarget,43999,&bp,NULL,NULL,true); // Set corpse look unitTarget->SetDisplayId(25537+urand(0,3)); } + // Runic Power Feed ( keeping Gargoyle alive ) + else if (m_spellInfo->Id == 50524) + { + // No power, dismiss Gargoyle + if (m_caster->GetPower(POWER_RUNIC_POWER)<30) + m_caster->CastSpell((Unit*)NULL,50515,true); + else + m_caster->ModifyPower(POWER_RUNIC_POWER,-30); + + return; + } + // Dismiss Gargoyle + else if (m_spellInfo->Id == 50515) + { + // FIXME: gargoyle should fly away + unitTarget->setDeathState(JUST_DIED); + m_caster->RemoveAurasDueToSpell(50514); + return; + } break; } |