[11471] Implement dummy effect 21147

Also simplify addThreatPercent but in same time avoid rounding in -100% case.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Xfurry 2011-05-11 23:04:29 +04:00 committed by VladimirMangos
parent 719e298795
commit 4bdf829064
3 changed files with 21 additions and 2 deletions

View file

@ -1030,6 +1030,21 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
return;
}
case 21147: // Arcane Vacuum
{
if (!unitTarget)
return;
// Spell used by Azuregos to teleport all the players to him
// This also resets the target threat
if (m_caster->getThreatManager().getThreat(unitTarget))
m_caster->getThreatManager().modifyThreatPercent(unitTarget, -100);
// cast summon player
m_caster->CastSpell(unitTarget, 21150, true);
return;
}
case 23019: // Crystal Prison Dummy DND
{
if (!unitTarget || !unitTarget->isAlive() || unitTarget->GetTypeId() != TYPEID_UNIT || ((Creature*)unitTarget)->IsPet())