*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
This commit is contained in:
QAston committed 2009-08-04 19:28:31 +02:00
1 parent 1d7375c545
commit d95e9c1027
7 files changed
+67 -12

No files matched your search

+20 -1
View File
@@ -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;
}