Core/Gossips: Fixed questgiver GOs that also have gossip menus, fixed gossip option selecting on GOs
Signed-off-by: Subv2112 <[email protected]>
This commit is contained in:
@@ -13997,6 +13997,10 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
|
|||||||
PrepareQuestMenu(source->GetGUID());
|
PrepareQuestMenu(source->GetGUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||||
|
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||||
|
PrepareQuestMenu(source->GetGUID());
|
||||||
|
|
||||||
for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
|
for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
|
||||||
{
|
{
|
||||||
bool canTalk = true;
|
bool canTalk = true;
|
||||||
@@ -14082,11 +14086,6 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
|
|||||||
|
|
||||||
switch (itr->second.OptionType)
|
switch (itr->second.OptionType)
|
||||||
{
|
{
|
||||||
case GOSSIP_OPTION_QUESTGIVER:
|
|
||||||
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
|
||||||
PrepareQuestMenu(source->GetGUID());
|
|
||||||
canTalk = false;
|
|
||||||
break;
|
|
||||||
case GOSSIP_OPTION_GOSSIP:
|
case GOSSIP_OPTION_GOSSIP:
|
||||||
if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER && go->GetGoType() != GAMEOBJECT_TYPE_GOOBER)
|
if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER && go->GetGoType() != GAMEOBJECT_TYPE_GOOBER)
|
||||||
canTalk = false;
|
canTalk = false;
|
||||||
|
|||||||
@@ -160,7 +160,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
go->AI()->GossipSelect(_player, menuId, gossipListId);
|
go->AI()->GossipSelect(_player, menuId, gossipListId);
|
||||||
sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
|
if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
|
||||||
|
_player->OnGossipSelect(go, gossipListId, menuId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user