mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
fix(Core/Gossips): Properly send packet with questgiver query handler. (#12290)
Fixes #12215
This commit is contained in:
@@ -29,6 +29,7 @@ GossipMenu::GossipMenu()
|
||||
{
|
||||
_menuId = 0;
|
||||
_locale = DEFAULT_LOCALE;
|
||||
_senderGUID.Clear();
|
||||
}
|
||||
|
||||
GossipMenu::~GossipMenu()
|
||||
@@ -188,8 +189,10 @@ void PlayerMenu::ClearMenus()
|
||||
_questMenu.ClearMenu();
|
||||
}
|
||||
|
||||
void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID) const
|
||||
void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID)
|
||||
{
|
||||
_gossipMenu.SetSenderGUID(objectGUID);
|
||||
|
||||
WorldPacket data(SMSG_GOSSIP_MESSAGE, 24 + _gossipMenu.GetMenuItemCount() * 100 + _questMenu.GetMenuItemCount() * 75); // guess size
|
||||
data << objectGUID;
|
||||
data << uint32(_gossipMenu.GetMenuId()); // new 2.4.0
|
||||
@@ -234,8 +237,10 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID) const
|
||||
_session->SendPacket(&data);
|
||||
}
|
||||
|
||||
void PlayerMenu::SendCloseGossip() const
|
||||
void PlayerMenu::SendCloseGossip()
|
||||
{
|
||||
_gossipMenu.SetSenderGUID(ObjectGuid::Empty);
|
||||
|
||||
WorldPacket data(SMSG_GOSSIP_COMPLETE, 0);
|
||||
_session->SendPacket(&data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user