From ce7b98c45e915020e33e2ef67d3dd70020ccc7d5 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Wed, 1 Dec 2010 09:54:34 +0300 Subject: [PATCH] [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. --- src/game/AuctionHouseHandler.cpp | 18 +++++----- src/game/GameObject.cpp | 2 +- src/game/GridNotifiers.cpp | 2 +- src/game/GroupHandler.cpp | 6 ++-- src/game/Item.cpp | 8 ++--- src/game/Map.cpp | 8 ++--- src/game/MiscHandler.cpp | 4 +-- src/game/MotionMaster.cpp | 44 +++++++++++------------ src/game/MovementHandler.cpp | 6 ++-- src/game/Object.h | 1 + src/game/PetHandler.cpp | 12 +++---- src/game/PetitionsHandler.cpp | 2 +- src/game/Player.cpp | 8 ++--- src/game/Spell.cpp | 2 +- src/game/SpellAuras.cpp | 12 +++---- src/game/SpellHandler.cpp | 2 +- src/game/TradeHandler.cpp | 16 ++++----- src/game/Transports.cpp | 2 +- src/game/Unit.cpp | 24 ++++++------- src/game/debugcmds.cpp | 62 ++++++++++++++++---------------- src/shared/revision_nr.h | 2 +- 21 files changed, 122 insertions(+), 121 deletions(-) diff --git a/src/game/AuctionHouseHandler.cpp b/src/game/AuctionHouseHandler.cpp index 4f03e913f..2817a9ded 100644 --- a/src/game/AuctionHouseHandler.cpp +++ b/src/game/AuctionHouseHandler.cpp @@ -193,17 +193,17 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data ) DEBUG_LOG("WORLD: HandleAuctionSellItem"); ObjectGuid auctioneerGuid; - uint64 item; + ObjectGuid itemGuid; uint32 etime, bid, buyout; recv_data >> auctioneerGuid; recv_data.read_skip(); // const 1? - recv_data >> item; + recv_data >> itemGuid; recv_data.read_skip(); // stack size recv_data >> bid; recv_data >> buyout; recv_data >> etime; - if (!item || !bid || !etime) + if (itemGuid.IsEmpty() || !bid || !etime) return; // check for cheaters Player *pl = GetPlayer(); @@ -233,11 +233,11 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data ) if(GetPlayer()->hasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); - Item *it = pl->GetItemByGuid( item ); + Item *it = pl->GetItemByGuid(itemGuid); // do not allow to sell already auctioned items - if(sAuctionMgr.GetAItem(GUID_LOPART(item))) + if (sAuctionMgr.GetAItem(itemGuid.GetCounter())) { - sLog.outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item)); + sLog.outError("AuctionError, %s is sending %s, but item is already in another auction", pl->GetGuidStr().c_str(), itemGuid.GetString().c_str()); SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR); return; } @@ -280,7 +280,7 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data ) AuctionEntry *AH = new AuctionEntry; AH->Id = sObjectMgr.GenerateAuctionID(); - AH->item_guidlow = GUID_LOPART(item); + AH->item_guidlow = itemGuid.GetCounter(); AH->item_template = it->GetEntry(); AH->owner = pl->GetGUIDLow(); AH->startbid = bid; @@ -291,8 +291,8 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data ) AH->deposit = deposit; AH->auctionHouseEntry = auctionHouseEntry; - DETAIL_LOG("selling item %u to auctioneer %s with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", - GUID_LOPART(item), auctioneerGuid.GetString().c_str(), bid, buyout, auction_time, AH->GetHouseId()); + DETAIL_LOG("selling %s to auctioneer %s with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", + itemGuid.GetString().c_str(), auctioneerGuid.GetString().c_str(), bid, buyout, auction_time, AH->GetHouseId()); auctionHouse->AddAuction(AH); sAuctionMgr.AddAItem(it); diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index a1c836baf..440295a44 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -85,7 +85,7 @@ void GameObject::RemoveFromWorld() else { sLog.outError("Delete %s with SpellId %u LinkedGO %u that lost references to owner %s GO list. Crash possible later.", - GetObjectGuid().GetString().c_str(), m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), owner_guid.GetString().c_str()); + GetGuidStr().c_str(), m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), owner_guid.GetString().c_str()); } } diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp index ba2eb06db..b4c3c6937 100644 --- a/src/game/GridNotifiers.cpp +++ b/src/game/GridNotifiers.cpp @@ -64,7 +64,7 @@ VisibleNotifier::Notify() player.m_clientGUIDs.erase(*itr); DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is out of range (no in active cells set) now for %s", - itr->GetString().c_str(), player.GetObjectGuid().GetString().c_str()); + itr->GetString().c_str(), player.GetGuidStr().c_str()); } if (i_data.HasData()) diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index d340b1a2a..61f91f1f5 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -175,7 +175,7 @@ void WorldSession::HandleGroupAcceptOpcode( WorldPacket & recv_data ) if (group->GetLeaderGuid() == GetPlayer()->GetObjectGuid()) { sLog.outError("HandleGroupAcceptOpcode: %s tried to accept an invite to his own group", - GetPlayer()->GetObjectGuid().GetString().c_str()); + GetPlayer()->GetGuidStr().c_str()); return; } @@ -240,7 +240,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data) // can't uninvite yourself if (guid == GetPlayer()->GetObjectGuid()) { - sLog.outError("WorldSession::HandleGroupUninviteGuidOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("WorldSession::HandleGroupUninviteGuidOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetGuidStr().c_str()); return; } @@ -282,7 +282,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data) // can't uninvite yourself if (GetPlayer()->GetName() == membername) { - sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetGuidStr().c_str()); return; } diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 154935439..aad12e7ec 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -726,7 +726,7 @@ void Item::AddToUpdateQueueOf(Player *player) if (!player) { sLog.outError("Item::AddToUpdateQueueOf - %s current owner (%s) not in world!", - GetObjectGuid().GetString().c_str(), GetOwnerGuid().GetString().c_str()); + GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str()); return; } } @@ -734,7 +734,7 @@ void Item::AddToUpdateQueueOf(Player *player) if (player->GetObjectGuid() != GetOwnerGuid()) { sLog.outError("Item::AddToUpdateQueueOf - %s current owner (%s) and inventory owner (%s) don't match!", - GetObjectGuid().GetString().c_str(), GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str()); + GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); return; } @@ -756,7 +756,7 @@ void Item::RemoveFromUpdateQueueOf(Player *player) if (!player) { sLog.outError("Item::RemoveFromUpdateQueueOf - %s current owner (%s) not in world!", - GetObjectGuid().GetString().c_str(), GetOwnerGuid().GetString().c_str()); + GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str()); return; } } @@ -764,7 +764,7 @@ void Item::RemoveFromUpdateQueueOf(Player *player) if (player->GetObjectGuid() != GetOwnerGuid()) { sLog.outError("Item::RemoveFromUpdateQueueOf - %s current owner (%s) and inventory owner (%s) don't match!", - GetObjectGuid().GetString().c_str(), GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str()); + GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); return; } diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 1c3a9682f..a5e640d7f 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1340,7 +1340,7 @@ bool InstanceMap::Add(Player *player) if (playerBind) { sLog.outError("InstanceMap::Add: %s is being put in instance %d,%d,%d,%d,%d,%d but he is in group (Id: %d) and is bound to instance %d,%d,%d,%d,%d,%d!", - player->GetObjectGuid().GetString().c_str(), GetInstanceSave()->GetMapId(), GetInstanceSave()->GetInstanceId(), + player->GetGuidStr().c_str(), GetInstanceSave()->GetMapId(), GetInstanceSave()->GetInstanceId(), GetInstanceSave()->GetDifficulty(), GetInstanceSave()->GetPlayerCount(), GetInstanceSave()->GetGroupCount(), GetInstanceSave()->CanReset(), pGroup->GetId(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), @@ -1365,7 +1365,7 @@ bool InstanceMap::Add(Player *player) if (groupBind->save != GetInstanceSave()) { sLog.outError("InstanceMap::Add: %s is being put in instance %d,%d,%d but he is in group (Id: %d) which is bound to instance %d,%d,%d!", - player->GetObjectGuid().GetString().c_str(), GetInstanceSave()->GetMapId(), + player->GetGuidStr().c_str(), GetInstanceSave()->GetMapId(), GetInstanceSave()->GetInstanceId(), GetInstanceSave()->GetDifficulty(), pGroup->GetId(), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty()); @@ -1911,7 +1911,7 @@ void Map::ScriptsProcess() case CHAT_TYPE_WHISPER: if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) { - sLog.outError("SCRIPT_COMMAND_TALK (script id %u) attempt to whisper (%u) to %s, skipping.", step.script->id, step.script->talk.chatType, unitTarget ? unitTarget->GetObjectGuid().GetString().c_str() : ""); + sLog.outError("SCRIPT_COMMAND_TALK (script id %u) attempt to whisper (%u) to %s, skipping.", step.script->id, step.script->talk.chatType, unitTarget ? unitTarget->GetGuidStr().c_str() : ""); break; } pSource->MonsterWhisper(textId, unitTarget); @@ -1919,7 +1919,7 @@ void Map::ScriptsProcess() case CHAT_TYPE_BOSS_WHISPER: if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) { - sLog.outError("SCRIPT_COMMAND_TALK (script id %u) attempt to whisper (%u) to %s, skipping.", step.script->id, step.script->talk.chatType, unitTarget ? unitTarget->GetObjectGuid().GetString().c_str() : ""); + sLog.outError("SCRIPT_COMMAND_TALK (script id %u) attempt to whisper (%u) to %s, skipping.", step.script->id, step.script->talk.chatType, unitTarget ? unitTarget->GetGuidStr().c_str() : ""); break; } pSource->MonsterWhisper(textId, unitTarget, true); diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index d7796a0c8..e7e0f9707 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1298,11 +1298,11 @@ void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data ) switch(op) { case 0: - DEBUG_LOG("Removed FarSight from %s", _player->GetObjectGuid().GetString().c_str()); + DEBUG_LOG("Removed FarSight from %s", _player->GetGuidStr().c_str()); _player->GetCamera().ResetView(false); break; case 1: - DEBUG_LOG("Added FarSight %s to %s", _player->GetFarSightGuid().GetString().c_str(), _player->GetObjectGuid().GetString().c_str()); + DEBUG_LOG("Added FarSight %s to %s", _player->GetFarSightGuid().GetString().c_str(), _player->GetGuidStr().c_str()); _player->GetCamera().SetView(obj, false); break; } diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index b77585992..16106d287 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -216,11 +216,11 @@ void MotionMaster::MoveRandom() { if (m_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outError("%s attempt to move random.", m_owner->GetObjectGuid().GetString().c_str()); + sLog.outError("%s attempt to move random.", m_owner->GetGuidStr().c_str()); } else { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move random.", m_owner->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move random.", m_owner->GetGuidStr().c_str()); Mutate(new RandomMovementGenerator(*m_owner)); } } @@ -234,28 +234,28 @@ void MotionMaster::MoveTargetedHome() if (m_owner->GetTypeId() == TYPEID_UNIT && ((Creature*)m_owner)->GetCharmerOrOwnerGuid().IsEmpty()) { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted home", m_owner->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted home", m_owner->GetGuidStr().c_str()); Mutate(new HomeMovementGenerator()); } else if (m_owner->GetTypeId() == TYPEID_UNIT && !((Creature*)m_owner)->GetCharmerOrOwnerGuid().IsEmpty()) { if (Unit *target = ((Creature*)m_owner)->GetCharmerOrOwner()) { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", m_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", m_owner->GetGuidStr().c_str(), target->GetGuidStr().c_str()); Mutate(new FollowMovementGenerator(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE)); } else { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s attempt but fail to follow owner", m_owner->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s attempt but fail to follow owner", m_owner->GetGuidStr().c_str()); } } else - sLog.outError("%s attempt targeted home", m_owner->GetObjectGuid().GetString().c_str()); + sLog.outError("%s attempt targeted home", m_owner->GetGuidStr().c_str()); } void MotionMaster::MoveConfused() { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move confused", m_owner->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move confused", m_owner->GetGuidStr().c_str()); if (m_owner->GetTypeId() == TYPEID_PLAYER) Mutate(new ConfusedMovementGenerator()); @@ -269,7 +269,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) if (!target) return; - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s chase to %s", m_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s chase to %s", m_owner->GetGuidStr().c_str(), target->GetGuidStr().c_str()); if (m_owner->GetTypeId() == TYPEID_PLAYER) Mutate(new ChaseMovementGenerator(*target,dist,angle)); @@ -288,7 +288,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle) if (!target) return; - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", m_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", m_owner->GetGuidStr().c_str(), target->GetGuidStr().c_str()); if (m_owner->GetTypeId() == TYPEID_PLAYER) Mutate(new FollowMovementGenerator(*target,dist,angle)); @@ -298,7 +298,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle) void MotionMaster::MovePoint(uint32 id, float x, float y, float z) { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted point (Id: %u X: %f Y: %f Z: %f)", m_owner->GetObjectGuid().GetString().c_str(), id, x, y, z ); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted point (Id: %u X: %f Y: %f Z: %f)", m_owner->GetGuidStr().c_str(), id, x, y, z ); if (m_owner->GetTypeId() == TYPEID_PLAYER) Mutate(new PointMovementGenerator(id,x,y,z)); @@ -310,12 +310,12 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z) { if (m_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outError("%s attempt to seek assistance", m_owner->GetObjectGuid().GetString().c_str()); + sLog.outError("%s attempt to seek assistance", m_owner->GetGuidStr().c_str()); } else { DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s seek assistance (X: %f Y: %f Z: %f)", - m_owner->GetObjectGuid().GetString().c_str(), x, y, z ); + m_owner->GetGuidStr().c_str(), x, y, z ); Mutate(new AssistanceMovementGenerator(x,y,z)); } } @@ -324,12 +324,12 @@ void MotionMaster::MoveSeekAssistanceDistract(uint32 time) { if (m_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outError("%s attempt to call distract after assistance", m_owner->GetObjectGuid().GetString().c_str()); + sLog.outError("%s attempt to call distract after assistance", m_owner->GetGuidStr().c_str()); } else { DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s is distracted after assistance call (Time: %u)", - m_owner->GetObjectGuid().GetString().c_str(), time ); + m_owner->GetGuidStr().c_str(), time ); Mutate(new AssistanceDistractMovementGenerator(time)); } } @@ -339,7 +339,7 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time) if (!enemy) return; - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s flee from %s", m_owner->GetObjectGuid().GetString().c_str(), enemy->GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s flee from %s", m_owner->GetGuidStr().c_str(), enemy->GetGuidStr().c_str()); if (m_owner->GetTypeId() == TYPEID_PLAYER) Mutate(new FleeingMovementGenerator(enemy->GetGUID())); @@ -358,18 +358,18 @@ void MotionMaster::MoveWaypoint() { if (GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { - sLog.outError("Creature %s (Entry %u) attempt to MoveWaypoint() but creature is already using waypoint", m_owner->GetObjectGuid().GetString().c_str(), m_owner->GetEntry()); + sLog.outError("Creature %s (Entry %u) attempt to MoveWaypoint() but creature is already using waypoint", m_owner->GetGuidStr().c_str(), m_owner->GetEntry()); return; } Creature* creature = (Creature*)m_owner; - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature %s (Entry %u) start MoveWaypoint()", m_owner->GetObjectGuid().GetString().c_str(), m_owner->GetEntry()); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature %s (Entry %u) start MoveWaypoint()", m_owner->GetGuidStr().c_str(), m_owner->GetEntry()); Mutate(new WaypointMovementGenerator(*creature)); } else { - sLog.outError("Non-creature %s attempt to MoveWaypoint()", m_owner->GetObjectGuid().GetString().c_str()); + sLog.outError("Non-creature %s attempt to MoveWaypoint()", m_owner->GetGuidStr().c_str()); } } @@ -379,26 +379,26 @@ void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode) { if (path < sTaxiPathNodesByPath.size()) { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s taxi to (Path %u node %u)", m_owner->GetObjectGuid().GetString().c_str(), path, pathnode); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s taxi to (Path %u node %u)", m_owner->GetGuidStr().c_str(), path, pathnode); FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path],pathnode); Mutate(mgen); } else { sLog.outError("%s attempt taxi to (nonexistent Path %u node %u)", - m_owner->GetObjectGuid().GetString().c_str(), path, pathnode); + m_owner->GetGuidStr().c_str(), path, pathnode); } } else { sLog.outError("%s attempt taxi to (Path %u node %u)", - m_owner->GetObjectGuid().GetString().c_str(), path, pathnode); + m_owner->GetGuidStr().c_str(), path, pathnode); } } void MotionMaster::MoveDistract(uint32 timer) { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s distracted (timer: %u)", m_owner->GetObjectGuid().GetString().c_str(), timer); + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s distracted (timer: %u)", m_owner->GetGuidStr().c_str(), timer); DistractMovementGenerator* mgen = new DistractMovementGenerator(timer); Mutate(mgen); } diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index b4f632ab2..abc5674da 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -346,7 +346,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if(_player->GetMover()->GetObjectGuid() != guid) { sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s", - _player->GetMover()->GetObjectGuid().GetString().c_str(), guid.GetString().c_str()); + _player->GetMover()->GetGuidStr().c_str(), guid.GetString().c_str()); return; } } @@ -365,8 +365,8 @@ void WorldSession::HandleMoveNotActiveMoverOpcode(WorldPacket &recv_data) if(_player->GetMover()->GetObjectGuid() == old_mover_guid) { sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is %s and should be %s instead of %s", - _player->GetMover()->GetObjectGuid().GetString().c_str(), - _player->GetObjectGuid().GetString().c_str(), + _player->GetMover()->GetGuidStr().c_str(), + _player->GetGuidStr().c_str(), old_mover_guid.GetString().c_str()); recv_data.rpos(recv_data.wpos()); // prevent warnings spam return; diff --git a/src/game/Object.h b/src/game/Object.h index 84df5f47e..81f56bcd4 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -113,6 +113,7 @@ class MANGOS_DLL_SPEC Object const uint64& GetGUID() const { return GetUInt64Value(OBJECT_FIELD_GUID); } uint32 GetGUIDLow() const { return GUID_LOPART(GetUInt64Value(OBJECT_FIELD_GUID)); } PackedGuid const& GetPackGUID() const { return m_PackGUID; } + std::string GetGuidStr() const { return GetObjectGuid().GetString(); } uint32 GetEntry() const { return GetUInt32Value(OBJECT_FIELD_ENTRY); } void SetEntry(uint32 entry) { SetUInt32Value(OBJECT_FIELD_ENTRY, entry); } diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index f1ce925f4..f09d3ba24 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -53,7 +53,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) if (GetPlayer()->GetObjectGuid() != pet->GetCharmerOrOwnerGuid()) { - sLog.outError("HandlePetAction: %s isn't controlled by %s.", petGuid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetAction: %s isn't controlled by %s.", petGuid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } @@ -288,7 +288,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket& recv_data) if (GetPlayer()->GetObjectGuid() != pet->GetCharmerOrOwnerGuid()) { - sLog.outError("HandlePetStopAttack: %s isn't charm/pet of %s.", petGuid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetStopAttack: %s isn't charm/pet of %s.", petGuid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } @@ -571,7 +571,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket) if (!pet || guid != pet->GetObjectGuid()) { - sLog.outError("HandlePetUnlearnOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetUnlearnOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } @@ -581,7 +581,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket) CharmInfo *charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog.outError("WorldSession::HandlePetUnlearnOpcode: %s is considered pet-like but doesn't have a charminfo!", pet->GetObjectGuid().GetString().c_str()); + sLog.outError("WorldSession::HandlePetUnlearnOpcode: %s is considered pet-like but doesn't have a charminfo!", pet->GetGuidStr().c_str()); return; } pet->resetTalents(); @@ -599,7 +599,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket ) Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid); if (!pet || (guid != _player->GetPetGuid() && guid != _player->GetCharmGuid())) { - sLog.outError("HandlePetSpellAutocastOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetSpellAutocastOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } @@ -640,7 +640,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket ) if (!pet || (guid != _player->GetPetGuid() && guid != _player->GetCharmGuid())) { - sLog.outError("HandlePetCastSpellOpcode: %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetCastSpellOpcode: %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } diff --git a/src/game/PetitionsHandler.cpp b/src/game/PetitionsHandler.cpp index 85b9806da..7205612ea 100644 --- a/src/game/PetitionsHandler.cpp +++ b/src/game/PetitionsHandler.cpp @@ -582,7 +582,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data) ObjectGuid petitionGuid; recv_data >> petitionGuid; // petition guid - DEBUG_LOG("Petition %s declined by %s", petitionGuid.GetString().c_str(), _player->GetObjectGuid().GetString().c_str()); + DEBUG_LOG("Petition %s declined by %s", petitionGuid.GetString().c_str(), _player->GetGuidStr().c_str()); uint32 petitionLowGuid = petitionGuid.GetCounter(); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 444cf998c..ff91c7e39 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16420,7 +16420,7 @@ void Player::_LoadSpells(QueryResult *result) if(GetTalentSpellPos(spell_id)) { sLog.outError("Player::_LoadSpells: %s has talent spell %u in character_spell, removing it.", - GetObjectGuid().GetString().c_str(), spell_id); + GetGuidStr().c_str(), spell_id); CharacterDatabase.PExecute("DELETE FROM character_spell WHERE spell = '%u'", spell_id); continue; } @@ -16580,7 +16580,7 @@ void Player::_LoadBoundInstances(QueryResult *result) if(!perm && group) { sLog.outError("_LoadBoundInstances: %s is in group (Id: %d) but has a non-permanent character bind to map %d,%d,%d", - GetObjectGuid().GetString().c_str(), group->GetId(), mapId, instanceId, difficulty); + GetGuidStr().c_str(), group->GetId(), mapId, instanceId, difficulty); CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%u' AND instance = '%u'", GetGUIDLow(), instanceId); continue; @@ -19507,7 +19507,7 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, T* target, UpdateD target->BuildOutOfRangeUpdateBlock(&data); m_clientGUIDs.erase(t_guid); - DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is out of range for %s. Distance = %f", t_guid.GetString().c_str(), GetObjectGuid().GetString().c_str(), GetDistance(target)); + DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is out of range for %s. Distance = %f", t_guid.GetString().c_str(), GetGuidStr().c_str(), GetDistance(target)); } } else @@ -19518,7 +19518,7 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, T* target, UpdateD target->BuildCreateUpdateBlockForPlayer(&data, this); UpdateVisibilityOf_helper(m_clientGUIDs,target); - DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is visible now for %s. Distance = %f", target->GetObjectGuid().GetString().c_str(), GetObjectGuid().GetString().c_str(), GetDistance(target)); + DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is visible now for %s. Distance = %f", target->GetGuidStr().c_str(), GetGuidStr().c_str(), GetDistance(target)); } } } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 12a5f8c57..cd41e9172 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3919,7 +3919,7 @@ void Spell::TakeCastItem() { // This code is to avoid a crash // I'm not sure, if this is really an error, but I guess every item needs a prototype - sLog.outError("Cast item (%s) has no item prototype", m_CastItem->GetObjectGuid().GetString().c_str()); + sLog.outError("Cast item (%s) has no item prototype", m_CastItem->GetGuidStr().c_str()); return; } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 1e9b87cf1..a57b0bc8a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6558,7 +6558,7 @@ void Aura::PeriodicTick() target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED)); DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId(),absorb); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(),absorb); pCaster->DealDamageMods(target, pdamage, &absorb); @@ -6650,7 +6650,7 @@ void Aura::PeriodicTick() target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !(spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED)); DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId(),absorb); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId(),absorb); pCaster->DealDamageMods(target, pdamage, &absorb); @@ -6740,7 +6740,7 @@ void Aura::PeriodicTick() pdamage -= absorbHeal; DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s heal of %s for %u health (absorbed %u) inflicted by %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, absorbHeal, GetId()); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, absorbHeal, GetId()); int32 gain = target->ModifyHealth(pdamage); SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - uint32(gain)), absorbHeal, 0, 0.0f, isCrit); @@ -6835,7 +6835,7 @@ void Aura::PeriodicTick() } DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId()); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId()); int32 drain_amount = target->GetPower(power) > pdamage ? pdamage : target->GetPower(power); @@ -6881,7 +6881,7 @@ void Aura::PeriodicTick() uint32 pdamage = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0; DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s for %u dmg inflicted by %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId()); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId()); if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS) break; @@ -6912,7 +6912,7 @@ void Aura::PeriodicTick() uint32 pdamage = uint32(target->GetMaxPower(POWER_MANA) * amount / 100); DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s for %u mana inflicted by %u", - GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId()); + GetCasterGuid().GetString().c_str(), target->GetGuidStr().c_str(), pdamage, GetId()); if(target->GetMaxPower(POWER_MANA) == 0) break; diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index cb168b1ee..1fea2a61a 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -511,7 +511,7 @@ void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket) if (guid != GetPlayer()->GetPetGuid() && guid != GetPlayer()->GetCharmGuid()) { - sLog.outError("HandlePetCancelAura. %s isn't pet of %s", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str()); + sLog.outError("HandlePetCancelAura. %s isn't pet of %s", guid.GetString().c_str(), GetPlayer()->GetGuidStr().c_str()); return; } diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index a9c50a50e..8d1096b1f 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -149,7 +149,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (myItems[i]) { // logging - DEBUG_LOG("partner storing: %s", myItems[i]->GetObjectGuid().GetString().c_str()); + DEBUG_LOG("partner storing: %s", myItems[i]->GetGuidStr().c_str()); if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE)) { sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)", @@ -165,7 +165,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (hisItems[i]) { // logging - DEBUG_LOG("player storing: %s", hisItems[i]->GetObjectGuid().GetString().c_str()); + DEBUG_LOG("player storing: %s", hisItems[i]->GetGuidStr().c_str()); if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE)) { sLog.outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)", @@ -185,21 +185,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (myItems[i]) { if (!traderCanTrade) - sLog.outError("trader can't store item: %s", myItems[i]->GetObjectGuid().GetString().c_str()); + sLog.outError("trader can't store item: %s", myItems[i]->GetGuidStr().c_str()); if (_player->CanStoreItem( NULL_BAG, NULL_SLOT, playerDst, myItems[i], false ) == EQUIP_ERR_OK) _player->MoveItemToInventory(playerDst, myItems[i], true, true); else - sLog.outError("player can't take item back: %s", myItems[i]->GetObjectGuid().GetString().c_str()); + sLog.outError("player can't take item back: %s", myItems[i]->GetGuidStr().c_str()); } // return the already removed items to the original owner if (hisItems[i]) { if (!playerCanTrade) - sLog.outError("player can't store item: %s", hisItems[i]->GetObjectGuid().GetString().c_str()); + sLog.outError("player can't store item: %s", hisItems[i]->GetGuidStr().c_str()); if (trader->CanStoreItem( NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false ) == EQUIP_ERR_OK) trader->MoveItemToInventory(traderDst, hisItems[i], true, true); else - sLog.outError("trader can't take item back: %s", hisItems[i]->GetObjectGuid().GetString().c_str()); + sLog.outError("trader can't take item back: %s", hisItems[i]->GetGuidStr().c_str()); } } } @@ -216,7 +216,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m { if (Item* item = myTrade->GetItem(TradeSlots(i))) { - DEBUG_LOG("player trade %s bag: %u slot: %u", item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot()); + DEBUG_LOG("player trade %s bag: %u slot: %u", item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot()); //Can return NULL myItems[i] = item; myItems[i]->SetInTrade(); @@ -224,7 +224,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m if (Item* item = hisTrade->GetItem(TradeSlots(i))) { - DEBUG_LOG("partner trade %s bag: %u slot: %u", item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot()); + DEBUG_LOG("partner trade %s bag: %u slot: %u", item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot()); hisItems[i] = item; hisItems[i]->SetInTrade(); } diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index 213d416ca..1f924660c 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -576,7 +576,7 @@ void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure { if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID) { - DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Taxi %s event %u of node %u of %s (%s) path", departure ? "departure" : "arrival", eventid, node.first, GetName(), GetObjectGuid().GetString().c_str()); + DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Taxi %s event %u of node %u of %s \"%s\") path", departure ? "departure" : "arrival", eventid, node.first, GetGuidStr().c_str(), GetName()); if (!Script->ProcessEventId(eventid, this, this, departure)) GetMap()->ScriptsStart(sEventScripts, eventid, this, this); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 74a19508f..9f49be516 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1109,9 +1109,9 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str()); + sLog.outError("CastSpell: unknown spell id %i by caster: %s", spellId, GetGuidStr().c_str()); return; } @@ -1123,9 +1123,9 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str()); + sLog.outError("CastSpell: unknown spell by caster: %s", GetGuidStr().c_str()); return; } @@ -1155,9 +1155,9 @@ void Unit::CastCustomSpell(Unit* Victim,uint32 spellId, int32 const* bp0, int32 if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str()); + sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s", spellId, GetGuidStr().c_str()); return; } @@ -1169,9 +1169,9 @@ void Unit::CastCustomSpell(Unit* Victim, SpellEntry const *spellInfo, int32 cons if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastCustomSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastCustomSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastCustomSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str()); + sLog.outError("CastCustomSpell: unknown spell by caster: %s", GetGuidStr().c_str()); return; } @@ -1211,9 +1211,9 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str()); + sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s", spellId, GetGuidStr().c_str()); return; } @@ -1226,9 +1226,9 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const *spellInfo, boo if(!spellInfo) { if (triggeredByAura) - sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); + sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s triggered by aura %u (eff %u)", GetGuidStr().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex()); else - sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s", GetObjectGuid().GetString().c_str()); + sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s", GetGuidStr().c_str()); return; } diff --git a/src/game/debugcmds.cpp b/src/game/debugcmds.cpp index a0f938e7d..e98f6e06f 100644 --- a/src/game/debugcmds.cpp +++ b/src/game/debugcmds.cpp @@ -332,7 +332,7 @@ bool ChatHandler::HandleDebugGetLootRecipientCommand(char* /*args*/) SendSysMessage("loot recipient: no loot recipient"); else if(Player* recipient = target->GetLootRecipient()) PSendSysMessage("loot recipient: %s with raw data %s from group %u", - recipient->GetObjectGuid().GetString().c_str(), + recipient->GetGuidStr().c_str(), target->GetLootRecipientGuid().GetString().c_str(), target->GetLootGroupRecipientId()); else @@ -403,7 +403,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) { if (item->GetState() == state) PSendSysMessage("%s bag: 255 slot: %u owner: %s", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), item->GetOwnerGuid().GetString().c_str()); + item->GetGuidStr().c_str(), item->GetSlot(), item->GetOwnerGuid().GetString().c_str()); } else { @@ -413,7 +413,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) Item* item2 = bag->GetItemByPos(j); if (item2 && item2->GetState() == state) PSendSysMessage("%s bag: %u slot: %u owner: %s", - item2->GetObjectGuid().GetString().c_str(), item2->GetBagSlot(), item2->GetSlot(), + item2->GetGuidStr().c_str(), item2->GetBagSlot(), item2->GetSlot(), item2->GetOwnerGuid().GetString().c_str()); } } @@ -441,7 +441,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) } PSendSysMessage("%s bag: %u slot: %u - state: %s", - item->GetObjectGuid().GetString().c_str(), bag_slot, item->GetSlot(), st.c_str()); + item->GetGuidStr().c_str(), bag_slot, item->GetSlot(), st.c_str()); } if (updateQueue.empty()) PSendSysMessage("updatequeue empty"); @@ -462,23 +462,23 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (item->GetSlot() != i) { PSendSysMessage("%s at slot %u has an incorrect slot value: %d", - item->GetObjectGuid().GetString().c_str(), i, item->GetSlot()); + item->GetGuidStr().c_str(), i, item->GetSlot()); error = true; continue; } if (item->GetOwnerGuid() != player->GetObjectGuid()) { PSendSysMessage("%s at slot %u owner (%s) and inventory owner (%s) don't match!", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), - item->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str()); + item->GetGuidStr().c_str(), item->GetSlot(), + item->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); error = true; continue; } if (Bag *container = item->GetContainer()) { PSendSysMessage("%s at slot %u has a container %s from slot %u but shouldnt!", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), - container->GetObjectGuid().GetString().c_str(), container->GetSlot()); + item->GetGuidStr().c_str(), item->GetSlot(), + container->GetGuidStr().c_str(), container->GetSlot()); error = true; continue; } @@ -488,29 +488,29 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (qp > updateQueue.size()) { PSendSysMessage("%s at slot %u has a queuepos (%d) larger than the update queue size! ", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp); + item->GetGuidStr().c_str(), item->GetSlot(), qp); error = true; continue; } if (updateQueue[qp] == NULL) { PSendSysMessage("%s at slot %u has a queuepos (%d) that points to NULL in the queue!", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp); + item->GetGuidStr().c_str(), item->GetSlot(), qp); error = true; continue; } if (updateQueue[qp] != item) { PSendSysMessage("%s at slot %u has a queuepos (%d) that points to %s in the queue (bag %u, slot %u)", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp, - updateQueue[qp]->GetObjectGuid().GetString().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot()); + item->GetGuidStr().c_str(), item->GetSlot(), qp, + updateQueue[qp]->GetGuidStr().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot()); error = true; continue; } } else if (item->GetState() != ITEM_UNCHANGED) { PSendSysMessage("%s at slot %u is not in queue but should be (state: %d)!", - item->GetObjectGuid().GetString().c_str(), item->GetSlot(), item->GetState()); + item->GetGuidStr().c_str(), item->GetSlot(), item->GetState()); error = true; continue; } @@ -525,15 +525,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (item2->GetSlot() != j) { PSendSysMessage("%s in bag %u at slot %u has an incorrect slot value: %u", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), j, item2->GetSlot()); + item2->GetGuidStr().c_str(), bag->GetSlot(), j, item2->GetSlot()); error = true; continue; } if (item2->GetOwnerGuid() != player->GetGUID()) { PSendSysMessage("%s in bag %u at slot %u owner (%s) and inventory owner (%s) don't match!", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), - item2->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str()); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), + item2->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); error = true; continue; } @@ -541,15 +541,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (!container) { PSendSysMessage("%s in bag %u at slot %u has no container!", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot()); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot()); error = true; continue; } if (container != bag) { PSendSysMessage("%s in bag %u at slot %u has a different container %s from slot %u!", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), - container->GetObjectGuid().GetString().c_str(), container->GetSlot()); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), + container->GetGuidStr().c_str(), container->GetSlot()); error = true; continue; } @@ -559,29 +559,29 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (qp > updateQueue.size()) { PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) larger than the update queue size! ", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp); error = true; continue; } if (updateQueue[qp] == NULL) { PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) that points to NULL in the queue!", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp); error = true; continue; } if (updateQueue[qp] != item2) { PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) that points to %s in the queue (bag %u slot %u)", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp, - updateQueue[qp]->GetObjectGuid().GetString().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot()); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp, + updateQueue[qp]->GetGuidStr().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot()); error = true; continue; } } else if (item2->GetState() != ITEM_UNCHANGED) { PSendSysMessage("%s in bag %u at slot %u is not in queue but should be (state: %d)!", - item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), item2->GetState()); + item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), item2->GetState()); error = true; continue; } } @@ -596,15 +596,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (item->GetOwnerGuid() != player->GetObjectGuid()) { PSendSysMessage("queue(" SIZEFMTD "): %s has the owner (%s) and inventory owner (%s) don't match!", - i, item->GetObjectGuid().GetString().c_str(), - item->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str()); + i, item->GetGuidStr().c_str(), + item->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); error = true; continue; } if (item->GetQueuePos() != i) { PSendSysMessage("queue(" SIZEFMTD "): %s has queuepos doesn't match it's position in the queue!", - i, item->GetObjectGuid().GetString().c_str()); + i, item->GetGuidStr().c_str()); error = true; continue; } @@ -614,15 +614,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args) if (test == NULL) { PSendSysMessage("queue(" SIZEFMTD "): %s has incorrect (bag %u slot %u) values, the player doesn't have an item at that position!", - i, item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot()); + i, item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot()); error = true; continue; } if (test != item) { PSendSysMessage("queue(" SIZEFMTD "): %s has incorrect (bag %u slot %u) values, the %s is there instead!", - i, item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot(), - test->GetObjectGuid().GetString().c_str()); + i, item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot(), + test->GetGuidStr().c_str()); error = true; continue; } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e96627d88..9271cbc80 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10798" + #define REVISION_NR "10799" #endif // __REVISION_NR_H__