mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Gossip: Send correct response depending on how the interaction was started (#31046)
This commit is contained in:
@@ -14031,16 +14031,17 @@ void Player::SendPreparedGossip(WorldObject* source)
|
||||
if (!source)
|
||||
return;
|
||||
|
||||
// If there is only one quest available (and no gossip options), send quest info
|
||||
if (source->GetTypeId() == TYPEID_UNIT || source->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
{
|
||||
if (PlayerTalkClass->GetGossipMenu().Empty() && !PlayerTalkClass->GetQuestMenu().Empty())
|
||||
if (PlayerTalkClass->GetGossipMenu().Empty() && PlayerTalkClass->GetQuestMenu().GetMenuItemCount() == 1)
|
||||
{
|
||||
SendPreparedQuest(source);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// in case non empty gossip menu (that not included quests list size) show it
|
||||
// In case non empty gossip menu or quest menu count > 1, show it
|
||||
// (quest entries from quest menu will be included in list)
|
||||
|
||||
uint32 textId = GetGossipTextId(source);
|
||||
|
||||
@@ -80,8 +80,8 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPackets::Quest::QuestGiverHe
|
||||
if (creature->AI()->OnGossipHello(_player))
|
||||
return;
|
||||
|
||||
_player->PrepareGossipMenu(creature, _player->GetGossipMenuForSource(creature), true);
|
||||
_player->SendPreparedGossip(creature);
|
||||
_player->PrepareQuestMenu(creature->GetGUID());
|
||||
_player->SendPreparedQuest(creature);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPackets::Quest::QuestGiverAcceptQuest& packet)
|
||||
|
||||
Reference in New Issue
Block a user