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:
1 parent
ee3956b44c
commit
f7a79750c9
4 files changed
+16
-14
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user