Core/SmartAI: swap menuid/actionid params in GOSSIP_SELECT event
- use proper sql ORDER to order script lines --HG-- branch : trunk
This commit is contained in:
@@ -139,13 +139,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (unit)
|
||||
{
|
||||
unit->AI()->sGossipSelectCode(_player,gossipListId, menuId, code.c_str());
|
||||
unit->AI()->sGossipSelectCode(_player, menuId, gossipListId, code.c_str());
|
||||
if (!sScriptMgr.OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()))
|
||||
_player->OnGossipSelect(unit, gossipListId, menuId);
|
||||
}
|
||||
else
|
||||
{
|
||||
go->AI()->GossipSelectCode(_player, gossipListId, menuId, code.c_str());
|
||||
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
|
||||
sScriptMgr.OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str());
|
||||
}
|
||||
}
|
||||
@@ -153,13 +153,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (unit)
|
||||
{
|
||||
unit->AI()->sGossipSelect(_player, gossipListId, menuId);
|
||||
unit->AI()->sGossipSelect(_player, menuId, gossipListId);
|
||||
if (!sScriptMgr.OnGossipSelect(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)))
|
||||
_player->OnGossipSelect(unit, gossipListId, menuId);
|
||||
}
|
||||
else
|
||||
{
|
||||
go->AI()->GossipSelect(_player, gossipListId, menuId);
|
||||
go->AI()->GossipSelect(_player, menuId, gossipListId);
|
||||
sScriptMgr.OnGossipSelect(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user