diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-10-22 23:31:10 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-10-22 23:31:10 +0200 |
| commit | cffbcea8776dcf1fd175bd678c04e1ca3eb440c1 (patch) | |
| tree | d6da44a54ac3287a1fb716535eada3a56c651584 /src/server/game/Handlers | |
| parent | ac94efd5079a3a7e4d48e9f804f50acc0afa4f8f (diff) | |
Core/Entities: Sixth part of removing GetGUIDLow() uses
Diffstat (limited to 'src/server/game/Handlers')
| -rw-r--r-- | src/server/game/Handlers/MiscHandler.cpp | 52 | ||||
| -rw-r--r-- | src/server/game/Handlers/MovementHandler.cpp | 6 | ||||
| -rw-r--r-- | src/server/game/Handlers/NPCHandler.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Handlers/PetHandler.cpp | 16 | ||||
| -rw-r--r-- | src/server/game/Handlers/PetitionsHandler.cpp | 27 |
5 files changed, 54 insertions, 55 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index fcfb9e4f359..27342174a23 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -76,8 +76,8 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData) // release spirit after he's killed but before he is updated if (GetPlayer()->getDeathState() == JUST_DIED) { - TC_LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", - GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); + TC_LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player %s(%s) was killed and before he was updated", + GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str()); GetPlayer()->KillPlayer(); } @@ -854,23 +854,23 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) Player* player = GetPlayer(); if (player->IsInFlight()) { - TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", - player->GetName().c_str(), player->GetGUIDLow(), triggerId); + TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) in flight, ignore Area Trigger ID:%u", + player->GetName().c_str(), player->GetGUID().ToString().c_str(), triggerId); return; } AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(triggerId); if (!atEntry) { - TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", - player->GetName().c_str(), player->GetGUIDLow(), triggerId); + TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) send unknown (by DBC) Area Trigger ID:%u", + player->GetName().c_str(), player->GetGUID().ToString().c_str(), triggerId); return; } if (player->GetMapId() != atEntry->mapid) { - TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", - player->GetName().c_str(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId); + TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", + player->GetName().c_str(), player->GetGUID().ToString().c_str(), atEntry->mapid, player->GetMapId(), triggerId); return; } @@ -883,8 +883,8 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) float dist = player->GetDistance(atEntry->x, atEntry->y, atEntry->z); if (dist > atEntry->radius + delta) { - TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", - player->GetName().c_str(), player->GetGUIDLow(), atEntry->radius, dist, triggerId); + TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", + player->GetName().c_str(), player->GetGUID().ToString().c_str(), atEntry->radius, dist, triggerId); return; } } @@ -914,8 +914,8 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) (std::fabs(dy) > atEntry->box_y / 2 + delta) || (std::fabs(dz) > atEntry->box_z / 2 + delta)) { - TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", - player->GetName().c_str(), player->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotPlayerX, rotPlayerY, dz, triggerId); + TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", + player->GetName().c_str(), player->GetGUID().ToString().c_str(), atEntry->box_x / 2, atEntry->box_y / 2, atEntry->box_z / 2, rotPlayerX, rotPlayerY, dz, triggerId); return; } } @@ -1344,8 +1344,8 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData) if (GetPlayer()->IsInFlight()) { - TC_LOG_DEBUG("network", "Player '%s' (GUID: %u) in flight, ignore worldport command.", - GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); + TC_LOG_DEBUG("network", "Player '%s' (%s) in flight, ignore worldport command.", + GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str()); return; } @@ -1490,7 +1490,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData) if (apply) { - TC_LOG_DEBUG("network", "Added FarSight %s to player %u", _player->GetGuidValue(PLAYER_FARSIGHT).ToString().c_str(), _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "Added FarSight %s to %s", _player->GetGuidValue(PLAYER_FARSIGHT).ToString().c_str(), _player->GetGUID().ToString().c_str()); if (WorldObject* target = _player->GetViewpoint()) _player->SetSeer(target); else @@ -1498,7 +1498,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData) } else { - TC_LOG_DEBUG("network", "Player %u set vision to self", _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "%s set vision to self", _player->GetGUID().ToString().c_str()); _player->SetSeer(_player); } @@ -1567,7 +1567,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) if (mode >= MAX_DUNGEON_DIFFICULTY) { - TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); + TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: %s sent an invalid instance mode %d!", _player->GetGUID().ToString().c_str(), mode); return; } @@ -1578,8 +1578,8 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", - _player->GetName().c_str(), _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, %s) tried to reset the instance while player is inside!", + _player->GetName().c_str(), _player->GetGUID().ToString().c_str()); return; } @@ -1599,8 +1599,8 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) if (groupGuy->GetMap()->IsNonRaidDungeon()) { - TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", - _player->GetGUIDLow(), groupGuy->GetName().c_str(), groupGuy->GetGUIDLow()); + TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: %s tried to reset the instance while group member (Name: %s, %s) is inside!", + _player->GetGUID().ToString().c_str(), groupGuy->GetName().c_str(), groupGuy->GetGUID().ToString().c_str()); return; } } @@ -1626,7 +1626,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData) if (mode >= MAX_RAID_DIFFICULTY) { - TC_LOG_ERROR("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); + TC_LOG_ERROR("network", "WorldSession::HandleSetRaidDifficultyOpcode: %s sent an invalid instance mode %d!", _player->GetGUID().ToString().c_str(), mode); return; } @@ -1634,7 +1634,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: %s tried to reset the instance while inside!", _player->GetGUID().ToString().c_str()); return; } @@ -1657,7 +1657,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData) if (groupGuy->GetMap()->IsRaid()) { - TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: %s tried to reset the instance while inside!", _player->GetGUID().ToString().c_str()); return; } } @@ -1893,8 +1893,8 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket) if (!_player->HasPendingBind()) { - TC_LOG_INFO("network", "InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", - _player->GetName().c_str(), _player->GetGUIDLow()); + TC_LOG_INFO("network", "InstanceLockResponse: Player %s (%s) tried to bind himself/teleport to graveyard without a pending bind!", + _player->GetName().c_str(), _player->GetGUID().ToString().c_str()); return; } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index a74a1b1fa1e..3518bcd92f0 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -81,7 +81,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() // while the player is in transit, for example the map may get full if (!newMap || !newMap->CanEnter(GetPlayer())) { - TC_LOG_ERROR("network", "Map %d (%s) could not be created for player %d (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str()); + TC_LOG_ERROR("network", "Map %d (%s) could not be created for %s (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str()); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); return; } @@ -97,8 +97,8 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->SendInitialPacketsBeforeAddToMap(); if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer())) { - TC_LOG_ERROR("network", "WORLD: failed to teleport player %s (%d) to map %d (%s) because of unknown reason!", - GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown"); + TC_LOG_ERROR("network", "WORLD: failed to teleport player %s (%s) to map %d (%s) because of unknown reason!", + GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str(), loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown"); GetPlayer()->ResetMap(); GetPlayer()->SetMap(oldMap); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 6d2255dc814..78e1b9f4d71 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -519,7 +519,7 @@ void WorldSession::SendStablePet(ObjectGuid guid) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOTS_DETAIL); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(2, PET_SAVE_LAST_STABLE_SLOT); @@ -623,7 +623,7 @@ void WorldSession::HandleStablePet(WorldPacket& recvData) PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOTS); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(2, PET_SAVE_LAST_STABLE_SLOT); @@ -683,7 +683,7 @@ void WorldSession::HandleUnstablePet(WorldPacket& recvData) PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_ENTRY); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt32(1, petnumber); stmt->setUInt8(2, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(3, PET_SAVE_LAST_STABLE_SLOT); @@ -812,7 +812,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket& recvData) PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOT_BY_ID); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt32(1, petId); _stableSwapCallback.SetParam(petId); diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 4ad3d2fd3cc..e4aa2838730 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -44,8 +44,8 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData) if (!pet) { - TC_LOG_DEBUG("network", "Vanitypet (%s) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)", - guid.ToString().c_str(), GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), GetAccountId()); + TC_LOG_DEBUG("network", "Vanitypet (%s) does not exist - player '%s' (%s / account: %u) attempted to dismiss it (possibly lagged out)", + guid.ToString().c_str(), GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetAccountId()); return; } @@ -149,8 +149,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - TC_LOG_DEBUG("network", "WorldSession::HandlePetAction(petGuid: %s, tagGuid: %s, spellId: %u, flag: %u): object (GUID: %u Entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", - guid1.ToString().c_str(), guid2.ToString().c_str(), spellid, flag, pet->GetGUIDLow(), pet->GetEntry(), pet->GetTypeId()); + TC_LOG_DEBUG("network", "WorldSession::HandlePetAction(petGuid: %s, tagGuid: %s, spellId: %u, flag: %u): object (%s Entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", + guid1.ToString().c_str(), guid2.ToString().c_str(), spellid, flag, pet->GetGUID().ToString().c_str(), pet->GetEntry(), pet->GetTypeId()); return; } @@ -500,7 +500,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData) CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - TC_LOG_ERROR("network", "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + TC_LOG_ERROR("network", "WorldSession::HandlePetSetAction: object (%s) is considered pet-like but doesn't have a charminfo!", pet->GetGUID().ToString().c_str()); return; } @@ -664,7 +664,7 @@ void WorldSession::HandlePetRename(WorldPacket& recvData) trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_PET_DECLINEDNAME); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); for (uint8 i = 0; i < 5; i++) stmt->setString(i + 1, declinedname.name[i]); @@ -674,7 +674,7 @@ void WorldSession::HandlePetRename(WorldPacket& recvData) PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_PET_NAME); stmt->setString(0, name); - stmt->setUInt32(1, _player->GetGUIDLow()); + stmt->setUInt32(1, _player->GetGUID().GetCounter()); stmt->setUInt32(2, pet->GetCharmInfo()->GetPetNumber()); trans->Append(stmt); @@ -739,7 +739,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - TC_LOG_ERROR("network", "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + TC_LOG_ERROR("network", "WorldSession::HandlePetSpellAutocastOpcod: object (%s) is considered pet-like but doesn't have a charminfo!", pet->GetGUID().ToString().c_str()); return; } diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index bb39982db00..3fe90a28a87 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -201,7 +201,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) if (!charter) return; - charter->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1, charter->GetGUIDLow()); + charter->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1, charter->GetGUID().GetCounter()); // ITEM_FIELD_ENCHANTMENT_1_1 is guild/arenateam id // ITEM_FIELD_ENCHANTMENT_1_1+1 is current signatures count (showed on item) charter->SetState(ITEM_CHANGED, _player); @@ -211,7 +211,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) // we checked above, if this player is in an arenateam, so this must be // datacorruption PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_BY_OWNER); - stmt->setUInt32(0, _player->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt8(1, type); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -227,7 +227,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) } // delete petitions with the same guid as this one - ssInvalidPetitionGUIDs << '\'' << charter->GetGUIDLow() << '\''; + ssInvalidPetitionGUIDs << '\'' << charter->GetGUID().GetCounter() << '\''; TC_LOG_DEBUG("network", "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str()); CharacterDatabase.EscapeString(name); @@ -236,8 +236,8 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) trans->PAppend("DELETE FROM petition_sign WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str()); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PETITION); - stmt->setUInt32(0, _player->GetGUIDLow()); - stmt->setUInt32(1, charter->GetGUIDLow()); + stmt->setUInt32(0, _player->GetGUID().GetCounter()); + stmt->setUInt32(1, charter->GetGUID().GetCounter()); stmt->setString(2, name); stmt->setUInt8(3, uint8(type)); trans->Append(stmt); @@ -263,7 +263,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData) if (!result) { - TC_LOG_DEBUG("entities.player.items", "Petition %s is not found for player %u %s", petitionguid.ToString().c_str(), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str()); + TC_LOG_DEBUG("entities.player.items", "Petition %s is not found for %s %s", petitionguid.ToString().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str()); return; } Field* fields = result->Fetch(); @@ -471,7 +471,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData) if (!result) { - TC_LOG_ERROR("network", "Petition %s is not found for player %u %s", petitionGuid.ToString().c_str(), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str()); + TC_LOG_ERROR("network", "Petition %s is not found for %s %s", petitionGuid.ToString().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str()); return; } @@ -480,7 +480,6 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData) uint64 signs = fields[1].GetUInt64(); uint8 type = fields[2].GetUInt8(); - uint32 playerGuid = _player->GetGUIDLow(); if (ownerGuid == _player->GetGUID()) return; @@ -560,12 +559,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData) stmt->setUInt32(0, ownerGuid.GetCounter()); stmt->setUInt32(1, petitionGuid.GetCounter()); - stmt->setUInt32(2, playerGuid); + stmt->setUInt32(2, _player->GetGUID().GetCounter()); stmt->setUInt32(3, GetAccountId()); CharacterDatabase.Execute(stmt); - TC_LOG_DEBUG("network", "PETITION SIGN: %s by player: %s (GUID: %u Account: %u)", petitionGuid.ToString().c_str(), _player->GetName().c_str(), playerGuid, GetAccountId()); + TC_LOG_DEBUG("network", "PETITION SIGN: %s by player: %s (%s Account: %u)", petitionGuid.ToString().c_str(), _player->GetName().c_str(), _player->GetGUID().ToString().c_str(), GetAccountId()); WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4)); data << petitionGuid; @@ -591,7 +590,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData) ObjectGuid petitionguid; recvData >> petitionguid; // petition guid - TC_LOG_DEBUG("network", "Petition %s declined by %u", petitionguid.ToString().c_str(), _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "Petition %s declined by %s", petitionguid.ToString().c_str(), _player->GetGUID().ToString().c_str()); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_OWNER_BY_GUID); @@ -738,7 +737,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData) if (!item) return; - TC_LOG_DEBUG("network", "Petition %s turned in by %u", petitionGuid.ToString().c_str(), _player->GetGUIDLow()); + TC_LOG_DEBUG("network", "Petition %s turned in by %s", petitionGuid.ToString().c_str(), _player->GetGUID().ToString().c_str()); // Get petition data from db uint32 ownerguidlo; @@ -758,12 +757,12 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData) } else { - TC_LOG_ERROR("network", "Player %s (guid: %u) tried to turn in petition (%s) that is not present in the database", _player->GetName().c_str(), _player->GetGUIDLow(), petitionGuid.ToString().c_str()); + TC_LOG_ERROR("network", "Player %s (%s) tried to turn in petition (%s) that is not present in the database", _player->GetName().c_str(), _player->GetGUID().ToString().c_str(), petitionGuid.ToString().c_str()); return; } // Only the petition owner can turn in the petition - if (_player->GetGUIDLow() != ownerguidlo) + if (_player->GetGUID().GetCounter() != ownerguidlo) return; // Petition type (guild/arena) specific checks |
