Skip to content

Commit 528a9a6

Browse files
committed
Merge pull request #4742 from Subv/gossips
Gossips
2 parents d007780 + d02c781 commit 528a9a6

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/server/game/Entities/Player/Player.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13997,6 +13997,10 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
1399713997
PrepareQuestMenu(source->GetGUID());
1399813998
}
1399913999

14000+
if (source->GetTypeId() == TYPEID_GAMEOBJECT)
14001+
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
14002+
PrepareQuestMenu(source->GetGUID());
14003+
1400014004
for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
1400114005
{
1400214006
bool canTalk = true;
@@ -14082,11 +14086,6 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
1408214086

1408314087
switch (itr->second.OptionType)
1408414088
{
14085-
case GOSSIP_OPTION_QUESTGIVER:
14086-
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
14087-
PrepareQuestMenu(source->GetGUID());
14088-
canTalk = false;
14089-
break;
1409014089
case GOSSIP_OPTION_GOSSIP:
1409114090
if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER && go->GetGoType() != GAMEOBJECT_TYPE_GOOBER)
1409214091
canTalk = false;

src/server/game/Server/Protocol/Handlers/MiscHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
160160
else
161161
{
162162
go->AI()->GossipSelect(_player, menuId, gossipListId);
163-
sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
163+
if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
164+
_player->OnGossipSelect(go, gossipListId, menuId);
164165
}
165166
}
166167
}

src/server/scripts/Commands/cs_account.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ class account_commandscript : public CommandScript
510510

511511
stmt->setUInt32(0, targetAccountId);
512512
stmt->setUInt8(1, uint8(gm));
513-
stmt->setUInt32(2, gmRealmID);
513+
stmt->setInt32(2, gmRealmID);
514514

515515
LoginDatabase.Execute(stmt);
516516
}

0 commit comments

Comments
 (0)