*More fix about move flag.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-23 13:14:04 -06:00
parent e425ba5837
commit 34517a860f
24 changed files with 73 additions and 49 deletions

View File

@@ -729,6 +729,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)

View File

@@ -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);