Scripts/Icecrown Citadel: Fixed Ice Tomb targeting tanks in phase 3 in Sindragosa encounter

Closes #8778
This commit is contained in:
Shauren
2013-08-19 22:15:39 +02:00
parent e0f010b310
commit 44485a74ad

View File

@@ -196,6 +196,22 @@ class FrostBombExplosion : public BasicEvent
uint64 _sindragosaGUID;
};
class FrostBeaconSelector
{
public:
FrostBeaconSelector(Unit* source) : _source(source) { }
bool operator()(Unit* target) const
{
return target->GetTypeId() == TYPEID_PLAYER &&
target != _source->GetVictim() &&
!target->HasAura(SPELL_ICE_TOMB_UNTARGETABLE);
}
private:
Unit* _source;
};
class boss_sindragosa : public CreatureScript
{
public:
@@ -466,7 +482,7 @@ class boss_sindragosa : public CreatureScript
me->GetMotionMaster()->MovePoint(POINT_AIR_PHASE_FAR, SindragosaAirPosFar);
break;
case EVENT_ICE_TOMB:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_ICE_TOMB_UNTARGETABLE))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, FrostBeaconSelector(me)))
{
Talk(EMOTE_WARN_FROZEN_ORB, target->GetGUID());
DoCast(target, SPELL_ICE_TOMB_DUMMY, true);