diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 4 | ||||
| -rwxr-xr-x | src/server/game/Server/Protocol/Handlers/MiscHandler.cpp | 12 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 84520090466..9b034e522f1 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1760,7 +1760,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder &e, Unit* unit, uint32 var0, ui } case SMART_EVENT_GOSSIP_SELECT: { - if ((e.event.gossip.sender != var0 || e.event.gossip.action != var1)) + sLog.outDebug("SmartScript: Gossip Select: action %u menu %u", var0, var1); + if (e.event.gossip.sender != var0 || e.event.gossip.action != var1) return; ProcessAction(e, unit, var0, var1); break; @@ -1920,9 +1921,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn if (e.empty()) { if (obj) - sLog.outErrorDb("SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry()); + sLog.outDebug("SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry()); if (at) - sLog.outErrorDb("SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id); + sLog.outDebug("SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id); return; } for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index dc3a30013da..4df31186e77 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -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 // sender, action + SMART_EVENT_GOSSIP_SELECT = 62, //1 // actionID, menuID SMART_EVENT_JUST_CREATED = 63, //1 // none SMART_EVENT_GOSSIP_HELLO = 64, //1 // none SMART_EVENT_FOLLOW_COPMLETE = 65, //1 // none @@ -1149,7 +1149,7 @@ class SmartAIMgr else { if(entry > 0)//first search is for guid (negative), do not drop error if not found - sLog.outError("SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type)); + sLog.outDebug("SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type)); return temp; } } 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)); } } } |
