mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Misc: Fixed some more issues found by code analysis tools.
This commit is contained in:
@@ -2407,6 +2407,8 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
mapSave = sInstanceSaveMgr->AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
|
||||
}
|
||||
|
||||
ASSERT(mapSave);
|
||||
|
||||
// check for existing instance binds
|
||||
InstancePlayerBind* playerBind = player->GetBoundInstance(GetId(), Difficulty(GetSpawnMode()));
|
||||
if (playerBind && playerBind->perm)
|
||||
@@ -2441,10 +2443,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
if (groupBind->save != mapSave)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d but he is in group %d which is bound to instance %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty());
|
||||
if (mapSave)
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
|
||||
else
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "MapSave NULL");
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
|
||||
if (groupBind->save)
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount());
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user