Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/authserver/Server/AuthSocket.cpp src/server/game/Achievements/AchievementMgr.cpp src/server/game/Chat/Chat.h src/server/game/Chat/Commands/Level1.cpp src/server/game/Chat/Commands/Level2.cpp src/server/game/Chat/Commands/Level3.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/Updates/UpdateData.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/GuildMgr.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Handlers/PetHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/VehicleHandler.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/Spells/SpellMgr.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_debug.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/Kalimdor/azuremyst_isle.cpp src/server/shared/Logging/Log.cpp src/server/shared/Logging/Log.h src/server/worldserver/worldserver.conf.dist
This commit is contained in:
commit
d82266bc0e
684 files changed
+11732
-9491
No files matched your search
@@ -81,14 +81,14 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy)
|
||||
FILE* pf=fopen(tmp, "rb");
|
||||
|
||||
if (!pf)
|
||||
sLog->outError("Map file '%s': does not exist!", tmp);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map file '%s': does not exist!", tmp);
|
||||
else
|
||||
{
|
||||
map_fileheader header;
|
||||
if (fread(&header, sizeof(header), 1, pf) == 1)
|
||||
{
|
||||
if (header.mapMagic != MapMagic.asUInt || header.versionMagic != MapVersionMagic.asUInt)
|
||||
sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp);
|
||||
else
|
||||
ret = true;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy)
|
||||
if (!exists)
|
||||
{
|
||||
std::string name = vmgr->getDirFileName(mapid, gx, gy);
|
||||
sLog->outError("VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str());
|
||||
sLog->outError(LOG_FILTER_MAPS, "VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -124,13 +124,13 @@ void Map::LoadVMap(int gx, int gy)
|
||||
switch (vmapLoadResult)
|
||||
{
|
||||
case VMAP::VMAP_LOAD_RESULT_OK:
|
||||
sLog->outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
break;
|
||||
case VMAP::VMAP_LOAD_RESULT_ERROR:
|
||||
sLog->outDetail("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
break;
|
||||
case VMAP::VMAP_LOAD_RESULT_IGNORED:
|
||||
sLog->outStaticDebug("Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void Map::LoadMap(int gx, int gy, bool reload)
|
||||
//map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?)
|
||||
if (GridMaps[gx][gy])
|
||||
{
|
||||
sLog->outDetail("Unloading previously loaded map %u before reloading.", GetId());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "Unloading previously loaded map %u before reloading.", GetId());
|
||||
sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy);
|
||||
|
||||
delete (GridMaps[gx][gy]);
|
||||
@@ -169,12 +169,12 @@ void Map::LoadMap(int gx, int gy, bool reload)
|
||||
int len = sWorld->GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1;
|
||||
tmp = new char[len];
|
||||
snprintf(tmp, len, (char *)(sWorld->GetDataPath()+"maps/%03u%02u%02u.map").c_str(), GetId(), gx, gy);
|
||||
sLog->outDetail("Loading map %s", tmp);
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "Loading map %s", tmp);
|
||||
// loading data
|
||||
GridMaps[gx][gy] = new GridMap();
|
||||
if (!GridMaps[gx][gy]->loadData(tmp))
|
||||
{
|
||||
sLog->outError("Error loading map file: \n %s\n", tmp);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Error loading map file: \n %s\n", tmp);
|
||||
}
|
||||
delete [] tmp;
|
||||
|
||||
@@ -264,7 +264,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
|
||||
CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
|
||||
if (!p.IsCoordValid())
|
||||
{
|
||||
sLog->outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
|
||||
if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
|
||||
return;
|
||||
|
||||
sLog->outStaticDebug("Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
|
||||
NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY());
|
||||
ASSERT(ngrid != NULL);
|
||||
|
||||
@@ -346,7 +346,7 @@ void Map::EnsureGridLoadedForActiveObject(const Cell &cell, WorldObject* object)
|
||||
// refresh grid state & timer
|
||||
if (grid->GetGridState() != GRID_STATE_ACTIVE)
|
||||
{
|
||||
sLog->outStaticDebug("Active object "UI64FMTD" triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId());
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Active object "UI64FMTD" triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId());
|
||||
ResetGridExpiry(*grid, 0.1f);
|
||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||
}
|
||||
@@ -387,7 +387,7 @@ bool Map::AddPlayerToMap(Player* player)
|
||||
CellCoord cellCoord = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
|
||||
if (!cellCoord.IsCoordValid())
|
||||
{
|
||||
sLog->outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ bool Map::AddToMap(T *obj)
|
||||
ASSERT(cellCoord.IsCoordValid());
|
||||
if (!cellCoord.IsCoordValid())
|
||||
{
|
||||
sLog->outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
||||
return false; //Should delete object
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ bool Map::AddToMap(T *obj)
|
||||
else
|
||||
EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY()));
|
||||
AddToGrid(obj, cell);
|
||||
sLog->outStaticDebug("Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
|
||||
|
||||
//Must already be set before AddToMap. Usually during obj->Create.
|
||||
//obj->SetMap(this);
|
||||
@@ -715,7 +715,7 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float orie
|
||||
|
||||
if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell))
|
||||
{
|
||||
sLog->outStaticDebug("Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
|
||||
|
||||
player->RemoveFromGrid();
|
||||
|
||||
@@ -1002,7 +1002,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll)
|
||||
|
||||
GridMaps[gx][gy] = NULL;
|
||||
}
|
||||
sLog->outStaticDebug("Unloading grid[%u, %u] for map %u finished", x, y, GetId());
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Unloading grid[%u, %u] for map %u finished", x, y, GetId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ void Map::RemoveAllPlayers()
|
||||
if (!player->IsBeingTeleportedFar())
|
||||
{
|
||||
// this is happening for bg
|
||||
sLog->outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName(), GetId());
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName(), GetId());
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
|
||||
}
|
||||
}
|
||||
@@ -1089,28 +1089,28 @@ bool GridMap::loadData(char *filename)
|
||||
// loadup area data
|
||||
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
|
||||
{
|
||||
sLog->outError("Error loading map area data\n");
|
||||
sLog->outError(LOG_FILTER_MAPS, "Error loading map area data\n");
|
||||
fclose(in);
|
||||
return false;
|
||||
}
|
||||
// loadup height data
|
||||
if (header.heightMapOffset && !loadHeihgtData(in, header.heightMapOffset, header.heightMapSize))
|
||||
{
|
||||
sLog->outError("Error loading map height data\n");
|
||||
sLog->outError(LOG_FILTER_MAPS, "Error loading map height data\n");
|
||||
fclose(in);
|
||||
return false;
|
||||
}
|
||||
// loadup liquid data
|
||||
if (header.liquidMapOffset && !loadLiquidData(in, header.liquidMapOffset, header.liquidMapSize))
|
||||
{
|
||||
sLog->outError("Error loading map liquids data\n");
|
||||
sLog->outError(LOG_FILTER_MAPS, "Error loading map liquids data\n");
|
||||
fclose(in);
|
||||
return false;
|
||||
}
|
||||
fclose(in);
|
||||
return true;
|
||||
}
|
||||
sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
|
||||
fclose(in);
|
||||
return false;
|
||||
}
|
||||
@@ -1700,7 +1700,7 @@ bool Map::IsOutdoors(float x, float y, float z) const
|
||||
WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId);
|
||||
if (wmoEntry)
|
||||
{
|
||||
sLog->outStaticDebug("Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
|
||||
atEntry = GetAreaEntryByAreaID(wmoEntry->areaId);
|
||||
}
|
||||
return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry);
|
||||
@@ -1987,7 +1987,7 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpa
|
||||
|
||||
void Map::SendInitSelf(Player* player)
|
||||
{
|
||||
sLog->outDetail("Creating player data for himself %u", player->GetGUIDLow());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "Creating player data for himself %u", player->GetGUIDLow());
|
||||
|
||||
UpdateData data(player->GetMapId());
|
||||
|
||||
@@ -2071,7 +2071,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y)
|
||||
{
|
||||
if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
|
||||
{
|
||||
sLog->outError("map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
|
||||
sLog->outError(LOG_FILTER_MAPS, "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
|
||||
ASSERT(false);
|
||||
}
|
||||
i_grids[x][y] = grid;
|
||||
@@ -2144,7 +2144,7 @@ void Map::RemoveAllObjectsInRemoveList()
|
||||
{
|
||||
Corpse* corpse = ObjectAccessor::GetCorpse(*obj, obj->GetGUID());
|
||||
if (!corpse)
|
||||
sLog->outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
|
||||
sLog->outError(LOG_FILTER_MAPS, "Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
|
||||
else
|
||||
RemoveFromMap(corpse, true);
|
||||
break;
|
||||
@@ -2162,7 +2162,7 @@ void Map::RemoveAllObjectsInRemoveList()
|
||||
RemoveFromMap(obj->ToCreature(), true);
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
|
||||
sLog->outError(LOG_FILTER_MAPS, "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2239,7 +2239,7 @@ void Map::AddToActive(Creature* c)
|
||||
else
|
||||
{
|
||||
GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
|
||||
sLog->outError("Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
|
||||
sLog->outError(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
|
||||
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
|
||||
}
|
||||
}
|
||||
@@ -2260,7 +2260,7 @@ void Map::RemoveFromActive(Creature* c)
|
||||
else
|
||||
{
|
||||
GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
|
||||
sLog->outError("Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
|
||||
sLog->outError(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
|
||||
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
|
||||
}
|
||||
}
|
||||
@@ -2311,7 +2311,7 @@ bool InstanceMap::CanEnter(Player* player)
|
||||
{
|
||||
if (player->GetMapRef().getTarget() == this)
|
||||
{
|
||||
sLog->outError("InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode());
|
||||
sLog->outError(LOG_FILTER_MAPS, "InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode());
|
||||
ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
@@ -2324,7 +2324,7 @@ bool InstanceMap::CanEnter(Player* player)
|
||||
uint32 maxPlayers = GetMaxPlayers();
|
||||
if (GetPlayersCountExceptGMs() >= maxPlayers)
|
||||
{
|
||||
sLog->outDetail("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName());
|
||||
player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
|
||||
return false;
|
||||
}
|
||||
@@ -2394,7 +2394,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
|
||||
if (!mapSave)
|
||||
{
|
||||
sLog->outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
|
||||
mapSave = sInstanceSaveMgr->AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
|
||||
}
|
||||
|
||||
@@ -2405,7 +2405,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
// cannot enter other instances if bound permanently
|
||||
if (playerBind->save != mapSave)
|
||||
{
|
||||
sLog->outError("InstanceMap::Add: player %s(%d) is permanently bound to instance %d, %d, %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d, %d, %d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset());
|
||||
sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is permanently bound to instance %d, %d, %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d, %d, %d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2417,9 +2417,9 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
InstanceGroupBind* groupBind = group->GetBoundInstance(this);
|
||||
if (playerBind)
|
||||
{
|
||||
sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
|
||||
sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
|
||||
if (groupBind)
|
||||
sLog->outError("InstanceMap::Add: the group is bound to the instance %d, %d, %d, %d, %d, %d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset());
|
||||
sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: the group is bound to the instance %d, %d, %d, %d, %d, %d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset());
|
||||
//ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
@@ -2431,15 +2431,15 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
// cannot jump to a different instance without resetting it
|
||||
if (groupBind->save != mapSave)
|
||||
{
|
||||
sLog->outError("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(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty());
|
||||
sLog->outError(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(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty());
|
||||
if (mapSave)
|
||||
sLog->outError("MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
|
||||
sLog->outError(LOG_FILTER_MAPS, "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
|
||||
else
|
||||
sLog->outError("MapSave NULL");
|
||||
sLog->outError(LOG_FILTER_MAPS, "MapSave NULL");
|
||||
if (groupBind->save)
|
||||
sLog->outError("GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount());
|
||||
sLog->outError(LOG_FILTER_MAPS, "GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount());
|
||||
else
|
||||
sLog->outError("GroupBind save NULL");
|
||||
sLog->outError(LOG_FILTER_MAPS, "GroupBind save NULL");
|
||||
return false;
|
||||
}
|
||||
// if the group/leader is permanently bound to the instance
|
||||
@@ -2479,7 +2479,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
// first player enters (no players yet)
|
||||
SetResetSchedule(false);
|
||||
|
||||
sLog->outDetail("MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName());
|
||||
// initialize unload state
|
||||
m_unloadTimer = 0;
|
||||
m_resetAfterUnload = false;
|
||||
@@ -2505,7 +2505,7 @@ void InstanceMap::Update(const uint32 t_diff)
|
||||
|
||||
void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
|
||||
{
|
||||
sLog->outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
|
||||
//if last player set unload timer
|
||||
if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
|
||||
m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
|
||||
@@ -2600,7 +2600,7 @@ void InstanceMap::PermBindAllPlayers(Player* source)
|
||||
InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
|
||||
if (!save)
|
||||
{
|
||||
sLog->outError("Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId());
|
||||
sLog->outError(LOG_FILTER_MAPS, "Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2654,7 +2654,7 @@ void InstanceMap::SetResetSchedule(bool on)
|
||||
if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()))
|
||||
sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId()));
|
||||
else
|
||||
sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)",
|
||||
sLog->outError(LOG_FILTER_MAPS, "InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)",
|
||||
on ? "on" : "off", GetId(), GetMapName(), GetInstanceId(), Difficulty(GetSpawnMode()));
|
||||
}
|
||||
}
|
||||
@@ -2716,7 +2716,7 @@ bool BattlegroundMap::CanEnter(Player* player)
|
||||
{
|
||||
if (player->GetMapRef().getTarget() == this)
|
||||
{
|
||||
sLog->outError("BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow());
|
||||
sLog->outError(LOG_FILTER_MAPS, "BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow());
|
||||
ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
@@ -2744,7 +2744,7 @@ bool BattlegroundMap::AddPlayerToMap(Player* player)
|
||||
|
||||
void BattlegroundMap::RemovePlayerFromMap(Player* player, bool remove)
|
||||
{
|
||||
sLog->outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
|
||||
sLog->outInfo(LOG_FILTER_MAPS, "MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
|
||||
Map::RemovePlayerFromMap(player, remove);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user