Core/Pools: Fix pools with 1 member never spawning anything anymore
Port From (https://github.com/TrinityCore/TrinityCore/commit/9c3dc31a3764681ae641e24ab61cd5256cc3331e)
This commit is contained in:
@@ -2646,6 +2646,7 @@ namespace Game.Maps
|
||||
Global.PoolMgr.UpdatePool(poolId, next.type, next.spawnId);
|
||||
|
||||
// step 3: get rid of the actual entry
|
||||
RemoveRespawnTime(next.type, next.spawnId, null, true);
|
||||
GetRespawnMapForType(next.type).Remove(next.spawnId);
|
||||
}
|
||||
else if (CheckRespawn(next)) // see if we're allowed to respawn
|
||||
@@ -2657,12 +2658,14 @@ namespace Game.Maps
|
||||
DoRespawn(next.type, next.spawnId, next.gridId);
|
||||
|
||||
// step 3: get rid of the actual entry
|
||||
RemoveRespawnTime(next.type, next.spawnId, null, true);
|
||||
GetRespawnMapForType(next.type).Remove(next.spawnId);
|
||||
}
|
||||
else if (next.respawnTime == 0)
|
||||
{ // just remove this respawn entry without rescheduling
|
||||
_respawnTimes.Remove(next);
|
||||
GetRespawnMapForType(next.type).Remove(next.spawnId);
|
||||
RemoveRespawnTime(next.type, next.spawnId, null, true);
|
||||
}
|
||||
else
|
||||
{ // new respawn time, update heap position
|
||||
|
||||
Reference in New Issue
Block a user