fix(Core/QuestHandler): Question marks not being shown (#20099)
This commit is contained in:
@@ -38,14 +38,8 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
|
|||||||
recvData >> guid;
|
recvData >> guid;
|
||||||
uint32 questStatus = DIALOG_STATUS_NONE;
|
uint32 questStatus = DIALOG_STATUS_NONE;
|
||||||
|
|
||||||
GossipMenu& gossipMenu = _player->PlayerTalkClass->GetGossipMenu();
|
|
||||||
// Did we already get a gossip menu with that NPC? if so no need to status query
|
|
||||||
if (gossipMenu.GetSenderGUID() == guid)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object* questGiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
|
Object* questGiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
|
||||||
|
|
||||||
if (!questGiver)
|
if (!questGiver)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("network.opcode", "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver ({})", guid.ToString());
|
LOG_DEBUG("network.opcode", "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver ({})", guid.ToString());
|
||||||
@@ -55,21 +49,23 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
|
|||||||
switch (questGiver->GetTypeId())
|
switch (questGiver->GetTypeId())
|
||||||
{
|
{
|
||||||
case TYPEID_UNIT:
|
case TYPEID_UNIT:
|
||||||
{
|
{
|
||||||
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc {}", guid.ToString());
|
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc {}", guid.ToString());
|
||||||
if (!questGiver->ToCreature()->IsHostileTo(_player)) // do not show quest status to enemies
|
if (!questGiver->ToCreature()->IsHostileTo(_player)) // do not show quest status to enemies
|
||||||
questStatus = _player->GetQuestDialogStatus(questGiver);
|
questStatus = _player->GetQuestDialogStatus(questGiver);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TYPEID_GAMEOBJECT:
|
case TYPEID_GAMEOBJECT:
|
||||||
|
{
|
||||||
|
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject {}", guid.ToString());
|
||||||
|
if (sWorld->getBoolConfig(CONFIG_OBJECT_QUEST_MARKERS))
|
||||||
{
|
{
|
||||||
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject {}", guid.ToString());
|
questStatus = _player->GetQuestDialogStatus(questGiver);
|
||||||
if (sWorld->getBoolConfig(CONFIG_OBJECT_QUEST_MARKERS))
|
|
||||||
{
|
|
||||||
questStatus = _player->GetQuestDialogStatus(questGiver);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("network.opcode", "QuestGiver called for unexpected type {}", questGiver->GetTypeId());
|
LOG_ERROR("network.opcode", "QuestGiver called for unexpected type {}", questGiver->GetTypeId());
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user