Core/CreatureAI: Add virtual bool CanRespawn().

This method will be checked on Creature::Update with deathstate ¨DEAD¨, and allows inherited scripts to manipulate respawn behaviour based on scripted events.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-24 16:18:23 +01:00
parent fe1de5b1db
commit f690338de1
2 changed files with 11 additions and 3 deletions
+3
View File
@@ -88,6 +88,9 @@ class CreatureAI : public UnitAI
// Called if IsVisible(Unit *who) is true at each *who move, reaction at visibility zone enter
void MoveInLineOfSight_Safe(Unit *who);
// Called in Creature::Update when deathstate = DEAD. Inherited classes may maniuplate the ability to respawn based on scripted events.
virtual bool CanRespawn() { return true; }
// Called for reaction at stopping attack at no attackers or targets
virtual void EnterEvadeMode();