mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
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:
@@ -633,7 +633,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_LIST_RESPAWNS_ZONE, EnumUtils::ToTitle(type), zoneName, zoneId);
|
||||
|
||||
handler->PSendSysMessage(LANG_LIST_RESPAWNS_LISTHEADER);
|
||||
std::vector<RespawnInfo*> respawns;
|
||||
std::vector<RespawnInfo const*> respawns;
|
||||
map->GetRespawnInfo(respawns, SpawnObjectTypeMask(1 << type));
|
||||
for (RespawnInfo const* ri : respawns)
|
||||
{
|
||||
|
||||
@@ -1824,12 +1824,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