Implement option to use delay in ForcedDespawn for creature, allow use delayed forced despawn also in EAI, by NoFantasy.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-01-16 19:51:59 +03:00
parent a29727e423
commit 720318e856
4 changed files with 37 additions and 5 deletions
+12 -1
View File
@@ -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