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:
+12
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user