diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-04-05 14:28:24 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2020-04-05 19:10:58 +0200 |
| commit | 3def52c1c459f566ab2b2d8cf017c70df4d7cf22 (patch) | |
| tree | c9e6287698915121e2fbe773e76ad8d9357d7f27 /src/server/game/Maps | |
| parent | 4f88be63e7551288f37e51928614cf14d99b444f (diff) | |
Core/Logs: Log full guid instead of just low guid, part 2
Diffstat (limited to 'src/server/game/Maps')
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Maps/MapScripts.cpp | 58 |
2 files changed, 35 insertions, 35 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index a494b3fb53d..710fe526874 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2833,8 +2833,8 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const Cell xy_cell(c->GetPositionX(), c->GetPositionY()); if (xy_cell != cur_cell) { - TC_LOG_DEBUG("maps", "Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u, %u]cell[%u, %u] instead of grid[%u, %u]cell[%u, %u]", - c->GetGUID().GetCounter(), + TC_LOG_DEBUG("maps", "Creature %s X: %f Y: %f (%s) is in grid[%u, %u]cell[%u, %u] instead of grid[%u, %u]cell[%u, %u]", + c->GetGUID().ToString().c_str(), c->GetPositionX(), c->GetPositionY(), (moved ? "final" : "original"), cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(), xy_cell.GridX(), xy_cell.GridY(), xy_cell.CellX(), xy_cell.CellY()); @@ -3612,8 +3612,8 @@ void Map::AddToActive(Creature* c) else { GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); - TC_LOG_ERROR("maps", "Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.", - c->GetGUID().GetCounter(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + TC_LOG_ERROR("maps", "Active creature%s added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } } @@ -3643,8 +3643,8 @@ void Map::RemoveFromActive(Creature* c) else { GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); - TC_LOG_ERROR("maps", "Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.", - c->GetGUID().GetCounter(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + TC_LOG_ERROR("maps", "Active creature %s removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } } diff --git a/src/server/game/Maps/MapScripts.cpp b/src/server/game/Maps/MapScripts.cpp index 613df3b3b01..7540b80b8a8 100644 --- a/src/server/game/Maps/MapScripts.cpp +++ b/src/server/game/Maps/MapScripts.cpp @@ -193,8 +193,8 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, ScriptInfo const* s if (!obj) TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else if (!obj->isType(TYPEMASK_UNIT)) - TC_LOG_ERROR("scripts", "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", - scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s %s object is not unit %s, skipping.", + scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetGUID().ToString().c_str()); else { unit = obj->ToUnit(); @@ -214,8 +214,8 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, ScriptInfo cons { player = obj->ToPlayer(); if (!player) - TC_LOG_ERROR("scripts", "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).", - scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s %s object is not a player %s.", + scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetGUID().ToString().c_str()); } return player; } @@ -229,8 +229,8 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, ScriptInfo { creature = obj->ToCreature(); if (!creature) - TC_LOG_ERROR("scripts", "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), - isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s %s object is not a creature %s.", scriptInfo->GetDebugInfo().c_str(), + isSource ? "source" : "target", obj->GetGUID().ToString().c_str()); } return creature; } @@ -245,8 +245,8 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, Scrip { pWorldObject = dynamic_cast<WorldObject*>(obj); if (!pWorldObject) - TC_LOG_ERROR("scripts", "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).", - scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s %s object is not a world object %s.", + scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetGUID().ToString().c_str()); } return pWorldObject; } @@ -269,22 +269,22 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, ScriptInfo c else if (!source) TC_LOG_ERROR("scripts", "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str()); else if (!source->isType(TYPEMASK_UNIT)) - TC_LOG_ERROR("scripts", "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), - source->GetTypeId(), source->GetEntry(), source->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s source object is not unit %s, skipping.", scriptInfo->GetDebugInfo().c_str(), + source->GetGUID().ToString().c_str()); else { WorldObject* wSource = dynamic_cast <WorldObject*> (source); if (!wSource) - TC_LOG_ERROR("scripts", "%s source object could not be cast to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", - scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s source object could not be cast to world object %s, skipping.", + scriptInfo->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str()); else { GameObject* pDoor = _FindGameObject(wSource, guid); if (!pDoor) TC_LOG_ERROR("scripts", "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) - TC_LOG_ERROR("scripts", "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", - scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s gameobject is not a door (GoType: %u, %s).", + scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetGUID().ToString().c_str()); else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY)) { pDoor->UseDoorOrButton(nTimeToToggle); @@ -489,9 +489,9 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object %s specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, - cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUID().GetCounter()); + cSource->GetValuesCount(), cSource->GetGUID().ToString().c_str()); else cSource->SetFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue); } @@ -503,9 +503,9 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object %s specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, - cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUID().GetCounter()); + cSource->GetValuesCount(), cSource->GetGUID().ToString().c_str()); else cSource->RemoveFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue); } @@ -546,8 +546,8 @@ void Map::ScriptsProcess() { if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER) { - TC_LOG_ERROR("scripts", "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s source is not unit, gameobject or player %s, skipping.", + step.script->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str()); break; } worldObject = dynamic_cast<WorldObject*>(source); @@ -559,17 +559,17 @@ void Map::ScriptsProcess() { if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER) { - TC_LOG_ERROR("scripts", "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s target is not unit, gameobject or player %s, skipping.", + step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str()); break; } worldObject = dynamic_cast<WorldObject*>(target); } else { - TC_LOG_ERROR("scripts", "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUID().GetCounter(), - target->GetTypeId(), target->GetEntry(), target->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s neither source nor target is player (source: %s; target: %s), skipping.", + step.script->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str(), + target->GetGUID().ToString().c_str()); break; } } @@ -675,8 +675,8 @@ void Map::ScriptsProcess() if (target->GetTypeId() != TYPEID_GAMEOBJECT) { - TC_LOG_ERROR("scripts", "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s target object is not gameobject %s, skipping.", + step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str()); break; } @@ -855,8 +855,8 @@ void Map::ScriptsProcess() if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (cSource->isDead()) - TC_LOG_ERROR("scripts", "%s creature is already dead (Entry: %u, GUID: %u)", - step.script->GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUID().GetCounter()); + TC_LOG_ERROR("scripts", "%s creature is already dead %s", + step.script->GetDebugInfo().c_str(), cSource->GetGUID().ToString().c_str()); else { cSource->setDeathState(JUST_DIED); |
