Core/SmartAI: fixed Gossip Select event

--HG--
branch : trunk
This commit is contained in:
Rat
2010-11-03 19:39:53 +01:00
parent c9cf2f059f
commit 2604250c3c
3 changed files with 11 additions and 12 deletions
@@ -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)
@@ -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;
}
}