Scripts/OnyxiasLair: Force Onyxia to enter evade mode if pulled out of her room
This commit is contained in:
1 parent
32f4f9718f
commit
b28849003c
1 file changed
+12
-1
@@ -316,9 +316,20 @@ public:
|
||||
MovePoint = iTemp;
|
||||
}
|
||||
|
||||
bool CheckInRoom() override
|
||||
{
|
||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 95.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
//Common to PHASE_START && PHASE_END
|
||||
|
||||
Reference in new issue
Block a user