mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
[11927] Fix typo, also use shiny wrapper for ObjectGuid.GetString. Thanks to tyrnon for pointing
This commit is contained in:
parent
e9140ec82b
commit
443050ffa1
5 changed files with 16 additions and 16 deletions
|
|
@ -44,7 +44,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
|
|||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY - for %s to %s", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY - for %s to %s", _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
|
||||
switch(questgiver->GetTypeId())
|
||||
{
|
||||
|
|
@ -85,12 +85,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
|||
ObjectGuid guid;
|
||||
recv_data >> guid;
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_HELLO - for %s to %s", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_HELLO - for %s to %s", _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
|
||||
Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||
if (!pCreature)
|
||||
{
|
||||
DEBUG_LOG ("WORLD: HandleQuestgiverHelloOpcode - for %s to %s not found or you can't interact with him.", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG ("WORLD: HandleQuestgiverHelloOpcode - for %s to %s not found or you can't interact with him.", _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
|
|||
if (!CanInteractWithQuestGiver(guid, "CMSG_QUESTGIVER_ACCEPT_QUEST"))
|
||||
return;
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST - for %s to %s, quest = %u, unk1 = %u", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str(), quest, unk1 );
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST - for %s to %s, quest = %u, unk1 = %u", _player->GetGuidStr().c_str(), guid.GetString().c_str(), quest, unk1 );
|
||||
|
||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_PLAYER_OR_ITEM);
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
|
|||
uint8 unk1;
|
||||
recv_data >> guid >> quest >> unk1;
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST - for %s to %s, quest = %u, unk1 = %u", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str(), quest, unk1);
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST - for %s to %s, quest = %u, unk1 = %u", _player->GetGuidStr().c_str(), guid.GetString().c_str(), quest, unk1);
|
||||
|
||||
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_OR_ITEM);
|
||||
|
|
@ -238,14 +238,14 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
|||
|
||||
if(reward >= QUEST_REWARD_CHOICES_COUNT)
|
||||
{
|
||||
sLog.outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD - %s tried to get invalid reward (%u) (probably packet hacking)", _player->GetObjectGuid().GetString().c_str(), _player->GetGUIDLow(), reward);
|
||||
sLog.outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD - %s tried to get invalid reward (%u) (probably packet hacking)", _player->GetGuidStr().c_str(), _player->GetGUIDLow(), reward);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CanInteractWithQuestGiver(guid, "CMSG_QUESTGIVER_CHOOSE_REWARD"))
|
||||
return;
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD - for %s to %s, quest = %u, reward = %u", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str(), quest, reward);
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD - for %s to %s, quest = %u, reward = %u", _player->GetGuidStr().c_str(), guid.GetString().c_str(), quest, reward);
|
||||
|
||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
||||
if(!pObject)
|
||||
|
|
@ -279,7 +279,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode( WorldPacket & recv_data
|
|||
if (!CanInteractWithQuestGiver(guid, "CMSG_QUESTGIVER_REQUEST_REWARD"))
|
||||
return;
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD - for %s to %s, quest = %u", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str(), quest);
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD - for %s to %s, quest = %u", _player->GetGuidStr().c_str(), guid.GetString().c_str(), quest);
|
||||
|
||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
||||
if (!pObject||!pObject->HasInvolvedQuest(quest))
|
||||
|
|
@ -389,7 +389,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
|
|||
return;
|
||||
|
||||
// All ok, continue
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST - for %s to %s, quest = %u", _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str(), quest);
|
||||
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST - for %s to %s, quest = %u", _player->GetGuidStr().c_str(), guid.GetString().c_str(), quest);
|
||||
|
||||
if (Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||
{
|
||||
|
|
@ -651,7 +651,7 @@ bool WorldSession::CanInteractWithQuestGiver(ObjectGuid& guid, char const* descr
|
|||
Creature* pCreature = _player->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (!pCreature)
|
||||
{
|
||||
DEBUG_LOG("WORLD: %s - %s cannot interact with %s.", descr, _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG("WORLD: %s - %s cannot interact with %s.", descr, _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -660,13 +660,13 @@ bool WorldSession::CanInteractWithQuestGiver(ObjectGuid& guid, char const* descr
|
|||
GameObject* pGo = _player->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_QUESTGIVER);
|
||||
if (!pGo)
|
||||
{
|
||||
DEBUG_LOG("WORLD: %s - %s cannot interact with %s.", descr, _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG("WORLD: %s - %s cannot interact with %s.", descr, _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!_player->isAlive())
|
||||
{
|
||||
DEBUG_LOG("WORLD: $s - %s is dead, requested guid was %s", descr, _player->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
|
||||
DEBUG_LOG("WORLD: %s - %s is dead, requested guid was %s", descr, _player->GetGuidStr().c_str(), guid.GetString().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue