Scripts: Replaced calls to ForcedDespawn with DespawnOrUnsummon (calls appropriate AI hooks in case of temporary summons) and made ForcedDespawn private
This commit is contained in:
@@ -135,7 +135,7 @@ CreatureBaseStats const* CreatureBaseStats::GetBaseStats(uint8 level, uint8 unit
|
||||
|
||||
bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
{
|
||||
m_owner.ForcedDespawn();
|
||||
m_owner.DespawnOrUnsummon(); // since we are here, we are not TempSummon as object type cannot change during runtime
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -635,7 +635,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
|
||||
void RemoveCorpse(bool setSpawnTime = true);
|
||||
|
||||
void ForcedDespawn(uint32 timeMSToDespawn = 0);
|
||||
void DespawnOrUnsummon(uint32 msTimeToDespawn = 0);
|
||||
|
||||
time_t const& GetRespawnTime() const { return m_respawnTime; }
|
||||
@@ -763,6 +762,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
bool IsInvisibleDueToDespawn() const;
|
||||
bool CanAlwaysSee(WorldObject const* obj) const;
|
||||
private:
|
||||
void ForcedDespawn(uint32 timeMSToDespawn = 0);
|
||||
|
||||
//WaypointMovementGenerator vars
|
||||
uint32 m_waypointID;
|
||||
uint32 m_path_id;
|
||||
|
||||
Reference in New Issue
Block a user