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:
@@ -1768,7 +1768,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder &e, Unit* unit, uint32 var0, ui
|
||||
}
|
||||
case SMART_EVENT_GOSSIP_SELECT:
|
||||
{
|
||||
sLog.outDebug("SmartScript: Gossip Select: action %u menu %u", var0, var1);
|
||||
sLog.outString("SmartScript: Gossip Select: menu %u action %u", var0, var1);//little help for scripters
|
||||
if (e.event.gossip.sender != var0 || e.event.gossip.action != var1)
|
||||
return;
|
||||
ProcessAction(e, unit, var0, var1);
|
||||
|
||||
@@ -146,7 +146,7 @@ enum SMART_EVENT
|
||||
SMART_EVENT_TIMED_EVENT_TRIGGERED = 59, //1 // id
|
||||
SMART_EVENT_UPDATE = 60, //1 // InitialMin, InitialMax, RepeatMin, RepeatMax
|
||||
SMART_EVENT_LINK = 61, //1 // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly
|
||||
SMART_EVENT_GOSSIP_SELECT = 62, //1 // actionID, menuID
|
||||
SMART_EVENT_GOSSIP_SELECT = 62, //1 // menuID, actionID
|
||||
SMART_EVENT_JUST_CREATED = 63, //1 // none
|
||||
SMART_EVENT_GOSSIP_HELLO = 64, //1 // none
|
||||
SMART_EVENT_FOLLOW_COPMLETE = 65, //1 // none
|
||||
|
||||
@@ -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