*Fix a typo in Thaddius script that make he not berserk.
*Update Heigan script so that players outside the room will be teleported in when eruption happens. Thanks to cryingcloud. --HG-- branch : trunk
This commit is contained in:
@@ -644,6 +644,16 @@ void BossAI::_EnterCombat()
|
|||||||
instance->SetBossState(bossId, IN_PROGRESS);
|
instance->SetBossState(bossId, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BossAI::TeleportCheaters()
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
me->GetPosition(x, y, z);
|
||||||
|
std::list<HostilReference*> &m_threatlist = me->getThreatManager().getThreatList();
|
||||||
|
for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
|
||||||
|
if((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && !CheckBoundary((*itr)->getTarget()))
|
||||||
|
(*itr)->getTarget()->NearTeleportTo(x, y, z, 0);
|
||||||
|
}
|
||||||
|
|
||||||
bool BossAI::CheckBoundary(Unit *who)
|
bool BossAI::CheckBoundary(Unit *who)
|
||||||
{
|
{
|
||||||
if(!boundary || !who)
|
if(!boundary || !who)
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ struct TRINITY_DLL_DECL BossAI : public ScriptedAI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool CheckBoundary(Unit *who);
|
bool CheckBoundary(Unit *who);
|
||||||
|
void TeleportCheaters();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ struct TRINITY_DLL_DECL boss_heiganAI : public BossAI
|
|||||||
return;
|
return;
|
||||||
case EVENT_ERUPT:
|
case EVENT_ERUPT:
|
||||||
instance->SetData(DATA_HEIGAN_ERUPT, eruptSection);
|
instance->SetData(DATA_HEIGAN_ERUPT, eruptSection);
|
||||||
|
TeleportCheaters();
|
||||||
|
|
||||||
if(eruptSection == 0)
|
if(eruptSection == 0)
|
||||||
eruptDirection = true;
|
eruptDirection = true;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
|
|||||||
events.ScheduleEvent(EVENT_CHAIN, 10000+rand()%10000);
|
events.ScheduleEvent(EVENT_CHAIN, 10000+rand()%10000);
|
||||||
return;
|
return;
|
||||||
case EVENT_BERSERK:
|
case EVENT_BERSERK:
|
||||||
DoCast(me, EVENT_BERSERK);
|
DoCast(me, SPELL_BERSERK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user