*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -684,7 +684,7 @@ void ScriptedAI::DoZoneInCombat(Unit* pUnit)
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
if (!i_pl->isAlive())
|
||||
if (i_pl->isAlive())
|
||||
{
|
||||
pUnit->SetInCombatWith(i_pl);
|
||||
i_pl->SetInCombatWith(pUnit);
|
||||
@@ -726,6 +726,12 @@ void ScriptedAI::DoModifyThreatPercent(Unit *pUnit, int32 pct)
|
||||
m_creature->getThreatManager().modifyThreatPercent(pUnit, pct);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportTo(float x, float y, float z, uint32 time)
|
||||
{
|
||||
m_creature->Relocate(x,y,z);
|
||||
m_creature->SendMonsterMove(x, y, z, time);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o)
|
||||
{
|
||||
if(!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
|
||||
|
||||
@@ -150,6 +150,8 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
float DoGetThreat(Unit *u);
|
||||
void DoModifyThreatPercent(Unit *pUnit, int32 pct);
|
||||
|
||||
void DoTeleportTo(float x, float y, float z, uint32 time = 0);
|
||||
|
||||
//Teleports a player without dropping threat (only teleports to same map)
|
||||
void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o);
|
||||
void DoTeleportAll(float x, float y, float z, float o);
|
||||
|
||||
Reference in New Issue
Block a user