diff options
author | n0n4m3 <none@none> | 2010-01-16 19:51:59 +0300 |
---|---|---|
committer | n0n4m3 <none@none> | 2010-01-16 19:51:59 +0300 |
commit | 720318e85601321d633103ab61b6efdadbdf5965 (patch) | |
tree | 5b5bf43aa6356a01fde66835dc38e3fae56dd288 /src/game/Creature.h | |
parent | a29727e4238d0a02dab80fb7489af59848c21a03 (diff) |
Implement option to use delay in ForcedDespawn for creature, allow use delayed forced despawn also in EAI, by NoFantasy.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Creature.h')
-rw-r--r-- | src/game/Creature.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h index cd9f30f703a..efc09deb49f 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -589,7 +589,7 @@ class TRINITY_DLL_SPEC Creature : public Unit, public GridObject<Creature> void RemoveCorpse(); bool isDeadByDefault() const { return m_isDeadByDefault; }; - void ForcedDespawn(); + void ForcedDespawn(uint32 timeMSToDespawn = 0); time_t const& GetRespawnTime() const { return m_respawnTime; } time_t GetRespawnTimeEx() const; @@ -710,6 +710,7 @@ class TRINITY_DLL_SPEC Creature : public Unit, public GridObject<Creature> CreatureData const* m_creatureData; uint16 m_LootMode; // bitmask, default DEFAULT_LOOT_MODE, determines what loot will be lootable + private: //WaypointMovementGenerator vars uint32 m_waypointID; @@ -734,4 +735,14 @@ class AssistDelayEvent : public BasicEvent Unit& m_owner; }; +class ForcedDespawnDelayEvent : public BasicEvent +{ + public: + ForcedDespawnDelayEvent(Creature& owner) : BasicEvent(), m_owner(owner) { } + bool Execute(uint64 e_time, uint32 p_time); + + private: + Creature& m_owner; +}; + #endif |