diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-04-04 19:16:37 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2020-04-05 19:10:57 +0200 |
| commit | 468ecb7252ea4eabd37e11b9ddbbb96ffd26bd7e (patch) | |
| tree | 7dfeaaff13a8aeeca13b786f5ba1d1e761fdf996 /src/server/game/Entities/Creature | |
| parent | af1260c40e333e0d2d506128099f8263f5f2304f (diff) | |
Core/Logs: Log full guid instead of just low guid
Diffstat (limited to 'src/server/game/Entities/Creature')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 18 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/CreatureGroups.cpp | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index b709bf254d7..943e38cb875 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -276,7 +276,7 @@ void Creature::AddToWorld() if (m_spawnId) GetMap()->GetCreatureBySpawnIdStore().insert(std::make_pair(m_spawnId, this)); - TC_LOG_DEBUG("entities.unit", "Adding creature %u with entry %u and DBGUID %u to world in map %u", GetGUID().GetCounter(), GetEntry(), m_spawnId, GetMap()->GetId()); + TC_LOG_DEBUG("entities.unit", "Adding creature %s with DBGUID %u to world in map %u", GetGUID().ToString().c_str(), m_spawnId, GetMap()->GetId()); Unit::AddToWorld(); SearchFormation(); @@ -304,7 +304,7 @@ void Creature::RemoveFromWorld() if (m_spawnId) Trinity::Containers::MultimapErasePair(GetMap()->GetCreatureBySpawnIdStore(), m_spawnId, this); - TC_LOG_DEBUG("entities.unit", "Removing creature %u with entry %u and DBGUID %u to world in map %u", GetGUID().GetCounter(), GetEntry(), m_spawnId, GetMap()->GetId()); + TC_LOG_DEBUG("entities.unit", "Removing creature %s with DBGUID %u to world in map %u", GetGUID().ToString().c_str(), m_spawnId, GetMap()->GetId()); GetMap()->GetObjectsStore().Remove<Creature>(GetGUID()); } } @@ -662,17 +662,17 @@ void Creature::Update(uint32 diff) { case JUST_RESPAWNED: // Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting. - TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUID().GetCounter(), GetEntry()); + TC_LOG_ERROR("entities.unit", "Creature %s in wrong state: JUST_RESPAWNED (4)", GetGUID().ToString().c_str()); break; case JUST_DIED: // Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting. - TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) in wrong state: JUST_DIED (1)", GetGUID().GetCounter(), GetEntry()); + TC_LOG_ERROR("entities.unit", "Creature %s in wrong state: JUST_DIED (1)", GetGUID().ToString().c_str()); break; case DEAD: { if (!m_respawnCompatibilityMode) { - TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) in wrong state: DEAD (3)", GetGUID().GetCounter(), GetEntry()); + TC_LOG_ERROR("entities.unit", "Creature %s in wrong state: DEAD (3)", GetGUID().ToString().c_str()); break; } time_t now = GameTime::GetGameTime(); @@ -2237,7 +2237,7 @@ Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const { if (dist > MAX_VISIBILITY_DISTANCE) { - TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUID().GetCounter(), GetEntry()); + TC_LOG_ERROR("entities.unit", "Creature %s SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUID().ToString().c_str()); dist = ATTACK_DISTANCE; } @@ -2541,7 +2541,7 @@ bool Creature::LoadCreaturesAddon() SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(*itr); if (!AdditionalSpellInfo) { - TC_LOG_ERROR("sql.sql", "Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUID().GetCounter(), GetEntry(), *itr); + TC_LOG_ERROR("sql.sql", "Creature %s has wrong spell %u defined in `auras` field.", GetGUID().ToString().c_str(), *itr); continue; } @@ -2550,7 +2550,7 @@ bool Creature::LoadCreaturesAddon() continue; AddAura(*itr, this); - TC_LOG_DEBUG("entities.unit", "Spell: %u added to creature (GUID: %u Entry: %u)", *itr, GetGUID().GetCounter(), GetEntry()); + TC_LOG_DEBUG("entities.unit", "Spell: %u added to creature %s", *itr, GetGUID().ToString().c_str()); } } @@ -3221,7 +3221,7 @@ void Creature::SetTextRepeatId(uint8 textGroup, uint8 id) if (std::find(repeats.begin(), repeats.end(), id) == repeats.end()) repeats.push_back(id); else - TC_LOG_ERROR("sql.sql", "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), GetName().c_str(), GetGUID().GetCounter(), GetEntry(), uint32(id)); + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: TextGroup %u for Creature(%s) %s, id %u already added", uint32(textGroup), GetName().c_str(), GetGUID().ToString().c_str(), uint32(id)); } CreatureTextRepeatIds Creature::GetTextRepeatGroup(uint8 textGroup) diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index c9026f4eecb..fd7ae9eb9d7 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -50,7 +50,7 @@ void FormationMgr::AddCreatureToGroup(ObjectGuid::LowType leaderSpawnId, Creatur if (itr != map->CreatureGroupHolder.end()) { //Add member to an existing group - TC_LOG_DEBUG("entities.unit", "Group found: %u, inserting creature GUID: %u, Group InstanceID %u", leaderSpawnId, creature->GetGUID().GetCounter(), creature->GetInstanceId()); + TC_LOG_DEBUG("entities.unit", "Group found: %u, inserting creature %s, Group InstanceID %u", leaderSpawnId, creature->GetGUID().ToString().c_str(), creature->GetInstanceId()); // With dynamic spawn the creature may have just respawned // we need to find previous instance of creature and delete it from the formation, as it'll be invalidated @@ -199,12 +199,12 @@ CreatureGroup::~CreatureGroup() void CreatureGroup::AddMember(Creature* member) { - TC_LOG_DEBUG("entities.unit", "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUID().GetCounter()); + TC_LOG_DEBUG("entities.unit", "CreatureGroup::AddMember: Adding unit %s.", member->GetGUID().ToString().c_str()); //Check if it is a leader if (member->GetSpawnId() == _leaderSpawnId) { - TC_LOG_DEBUG("entities.unit", "Unit GUID: %u is formation leader. Adding group.", member->GetGUID().GetCounter()); + TC_LOG_DEBUG("entities.unit", "Unit %s is formation leader. Adding group.", member->GetGUID().ToString().c_str()); _leader = member; } @@ -269,7 +269,7 @@ void CreatureGroup::FormationReset(bool dismiss) pair.first->GetMotionMaster()->Initialize(); else pair.first->GetMotionMaster()->MoveIdle(); - TC_LOG_DEBUG("entities.unit", "CreatureGroup::FormationReset: Set %s movement for member GUID: %u", dismiss ? "default" : "idle", pair.first->GetGUID().GetCounter()); + TC_LOG_DEBUG("entities.unit", "CreatureGroup::FormationReset: Set %s movement for member %s", dismiss ? "default" : "idle", pair.first->GetGUID().ToString().c_str()); } } |
