aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-02-20 20:16:34 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2011-02-20 20:16:34 +0100
commite07e20ffcaf6911d4dd47e0895fbdc52c5a52f05 (patch)
treefcc0c8865a387c67b925df174e22f49820a985a0 /src/server/game/AI/SmartScripts
parent45db1591a4959ca9d58fc40ea2294936bcf4bd10 (diff)
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp14
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h2
3 files changed, 9 insertions, 11 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index dbd58b06a5f..422096b3798 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -845,7 +845,7 @@ void SmartGameObjectAI::Reset()
// Called when a player opens a gossip dialog with the gameobject.
bool SmartGameObjectAI::GossipHello(Player* player)
{
- sLog->outDebug("SmartGameObjectAI::GossipHello");
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartGameObjectAI::GossipHello");
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0 ,0 , false, NULL, go);
return false;
}
@@ -909,7 +909,7 @@ class SmartTrigger : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
- sLog->outDebug("AreaTrigger %u is using SmartTrigger script", trigger->id);
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index e8610ff94b5..f9371979a77 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -115,11 +115,9 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
SmartScriptHolder linked = FindLinkedEvent(e.link);
if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
- {
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
- }else{
+ else
sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
- }
}
switch (e.GetActionType())
@@ -2150,9 +2148,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
if (e.empty())
{
if (obj)
- sLog->outDebug("SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
if (at)
- sLog->outDebug("SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
return;
}
for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
@@ -2214,12 +2212,12 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
case TYPEID_UNIT:
mScriptType = SMART_SCRIPT_TYPE_CREATURE;
me = obj->ToCreature();
- sLog->outDebug("SmartScript::OnInitialize: source is Creature %u", me->GetEntry());
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is Creature %u", me->GetEntry());
break;
case TYPEID_GAMEOBJECT:
mScriptType = SMART_SCRIPT_TYPE_GAMEOBJECT;
go = obj->ToGameObject();
- sLog->outDebug("SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
break;
default:
sLog->outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
@@ -2229,7 +2227,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
{
mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER;
trigger = at;
- sLog->outDebug("SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
}
else
{
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 0dcb166070f..51f31e401ad 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1203,7 +1203,7 @@ class SmartAIMgr
else
{
if(entry > 0)//first search is for guid (negative), do not drop error if not found
- sLog->outDebug("SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
return temp;
}
}