*Add script function DoGetThreat and DoModifyThreatPercent and check if !pUnit to prevent crash.

*Note: it is always possible that getVictim() becomes NULL during updateAI!

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-09 12:06:08 -06:00
parent 0f0f38c6d7
commit 9b8c50bb3b
27 changed files with 73 additions and 58 deletions
@@ -144,6 +144,9 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
//Drops all threat to 0%. Does not remove players from the threat list
void DoResetThreat();
float DoGetThreat(Unit *u);
void DoModifyThreatPercent(Unit *pUnit, int32 pct);
//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);