Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these.

This commit is contained in:
Treeston authored and Ovahlord committed 2021-01-03 09:44:08 +01:00
1 parent ee3956b44c
commit f7a79750c9
4 files changed
+16 -14

No files matched your search

+2 -2
View File
@@ -1915,12 +1915,12 @@ public:
Cell::VisitGridObjects(player, worker, player->GetGridActivationRange());
// Now handle any that had despawned, but had respawn time logged.
std::vector<RespawnInfo*> data;
std::vector<RespawnInfo const*> data;
player->GetMap()->GetRespawnInfo(data, SPAWN_TYPEMASK_ALL);
if (!data.empty())
{
uint32 const gridId = Trinity::ComputeGridCoord(player->GetPositionX(), player->GetPositionY()).GetId();
for (RespawnInfo* info : data)
for (RespawnInfo const* info : data)
if (info->gridId == gridId)
player->GetMap()->Respawn(info->type, info->spawnId);
}