diff options
| author | Rat <none@none> | 2010-11-03 19:39:53 +0100 |
|---|---|---|
| committer | Rat <none@none> | 2010-11-03 19:39:53 +0100 |
| commit | 2604250c3c4efd93e9977f2eb72d6398a7a7bcb2 (patch) | |
| tree | 1677822f5af9751f2d1bd7916aca6b3c4838617f /src/server/game/Server | |
| parent | c9cf2f059f8f33c3fcb58ad472871515e59df7c3 (diff) | |
Core/SmartAI: fixed Gossip Select event
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Server')
| -rwxr-xr-x | src/server/game/Server/Protocol/Handlers/MiscHandler.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 41cfdb2317f..09d3b60cc60 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -139,30 +139,28 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) { if (unit) { + unit->AI()->sGossipSelectCode(_player,gossipListId, menuId, code.c_str()); if (!sScriptMgr.OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str())) _player->OnGossipSelect(unit, gossipListId, menuId); - - unit->AI()->sGossipSelectCode(_player, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()); } else - { + { + go->AI()->GossipSelectCode(_player, gossipListId, menuId, code.c_str()); sScriptMgr.OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()); - go->AI()->GossipSelectCode(_player, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()); } } else { if (unit) { + unit->AI()->sGossipSelect(_player, gossipListId, menuId); if (!sScriptMgr.OnGossipSelect(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId))) _player->OnGossipSelect(unit, gossipListId, menuId); - - unit->AI()->sGossipSelect(_player, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)); } else { + go->AI()->GossipSelect(_player, gossipListId, menuId); sScriptMgr.OnGossipSelect(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)); - go->AI()->GossipSelect(_player, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)); } } } |
