Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-23 23:25:44 +01:00
parent 95daf7998f
commit 928443d899
245 changed files with 5711 additions and 5714 deletions
+5 -5
View File
@@ -107,7 +107,7 @@ WayPoint* SmartAI::GetNextWayPoint()
mLastWP = (*itr).second;
if (mLastWP->id != mCurrentWPID)
{
sLog.outError("SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
sLog->outError("SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
}
return (*itr).second;
}
@@ -118,7 +118,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
{
if (me->isInCombat())// no wp movement in combat
{
sLog.outError("SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
sLog->outError("SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
return;
}
if (HasEscortState(SMART_ESCORT_ESCORTING))
@@ -163,7 +163,7 @@ void SmartAI::PausePath(uint32 delay, bool forced)
return;
if (HasEscortState(SMART_ESCORT_PAUSED))
{
sLog.outError("SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
sLog->outError("SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
return;
}
mForcedPaused = forced;
@@ -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("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("AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
+22 -22
View File
@@ -118,7 +118,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
}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);
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);
}
}
@@ -554,7 +554,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
InstanceScript* pInst = (InstanceScript*)obj->GetInstanceScript();
if (!pInst)
{
sLog.outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
return;
}
pInst->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data);
@@ -570,7 +570,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
InstanceScript* pInst = (InstanceScript*)obj->GetInstanceScript();
if (!pInst)
{
sLog.outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
return;
}
ObjectList* targets = GetTargets(e, unit);
@@ -948,7 +948,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
EquipmentInfo const *einfo = sObjectMgr->GetEquipmentInfo(e.action.equip.entry);
if (!einfo)
{
sLog.outErrorDb("SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry);
sLog->outErrorDb("SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry);
return;
}
npc->SetCurrentEquipmentId(e.action.equip.entry);
@@ -1064,7 +1064,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
if (e.GetTargetType() == SMART_TARGET_NONE)
{
sLog.outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
return;
}
ObjectList* targets = GetTargets(e, unit);
@@ -1157,7 +1157,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
uint32 id = temp[urand(0, count)];
if (e.GetTargetType() == SMART_TARGET_NONE)
{
sLog.outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
return;
}
ObjectList* targets = GetTargets(e, unit);
@@ -1183,7 +1183,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
uint32 id = urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2);
if (e.GetTargetType() == SMART_TARGET_NONE)
{
sLog.outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
return;
}
ObjectList* targets = GetTargets(e, unit);
@@ -1228,7 +1228,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
break;
}
default:
sLog.outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
break;
}
}
@@ -1239,7 +1239,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder e)
return;
if (mTemplate)
{
sLog.outErrorDb("SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
sLog->outErrorDb("SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
return;
}
mTemplate = (SMARTAI_TEMPLATE)e.action.installTtemplate.id;
@@ -1478,7 +1478,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder e, Unit* invoker)
{
if (!trigger && !GetBaseObject())
{
sLog.outErrorDb("SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry");
sLog->outErrorDb("SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry");
return NULL;
}
target = FindCreatureNear(trigger?trigger:GetBaseObject(), e.target.unitGUID.guid);
@@ -1500,7 +1500,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder e, Unit* invoker)
{
if (!trigger && !GetBaseObject())
{
sLog.outErrorDb("SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry");
sLog->outErrorDb("SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry");
return NULL;
}
target = FindGameObjectNear(trigger?trigger:GetBaseObject(), e.target.goGUID.guid);
@@ -1950,7 +1950,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder &e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_GOSSIP_SELECT:
{
sLog.outString("SmartScript: Gossip Select: menu %u action %u", var0, var1);//little help for scripters
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);
@@ -1964,7 +1964,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder &e, Unit* unit, uint32 var0, ui
break;
}
default:
sLog.outErrorDb("SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
sLog->outErrorDb("SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
break;
}
}
@@ -2118,9 +2118,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("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("SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
return;
}
for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
@@ -2144,9 +2144,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
mEvents.push_back((*i));//NOTE: 'world(0)' events still get processed in ANY instance mode
}
if (mEvents.empty() && obj)
sLog.outErrorDb("SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
sLog->outErrorDb("SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
if (mEvents.empty() && at)
sLog.outErrorDb("SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
sLog->outErrorDb("SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
}
void SmartScript::GetScript()
@@ -2182,26 +2182,26 @@ 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("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("SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
break;
default:
sLog.outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
sLog->outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
return;
}
} else if (at)
{
mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER;
trigger = at;
sLog.outDebug("SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
sLog->outDebug("SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
}
else
{
sLog.outError("SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
sLog->outError("SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
return;
}
@@ -111,7 +111,7 @@ class SmartScript
if (c && c->GetAIName() != "SmartAI") smart = false;
if (!me || me->GetAIName() != "SmartAI") smart = false;
if (!smart)
sLog.outErrorDb("SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c?c->GetEntry():(me?me->GetEntry():0));
sLog->outErrorDb("SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c?c->GetEntry():(me?me->GetEntry():0));
return smart;
}
bool IsSmartGO(GameObject* g = NULL)
@@ -120,7 +120,7 @@ class SmartScript
if (g && g->GetAIName() != "SmartGameObjectAI") smart = false;
if (!go || go->GetAIName() != "SmartGameObjectAI") smart = false;
if (!smart)
sLog.outErrorDb("SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g?g->GetEntry():(go?go->GetEntry():0));
sLog->outErrorDb("SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g?g->GetEntry():(go?go->GetEntry():0));
return smart;
}
ObjectList* GetTargetList(uint32 id)
@@ -42,8 +42,8 @@ void SmartWaypointMgr::LoadFromDB()
if (!result)
{
sLog.outString(">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
sLog.outString();
sLog->outString(">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
sLog->outString();
return;
}
@@ -73,7 +73,7 @@ void SmartWaypointMgr::LoadFromDB()
}
if (last_id != id)
{
sLog.outErrorDb("SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
sLog->outErrorDb("SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
}
last_id++;
(*path)[id] = wp;
@@ -88,8 +88,8 @@ void SmartWaypointMgr::LoadFromDB()
}
while (result->NextRow());
sLog.outString(">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
sLog.outString();
sLog->outString(">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
void SmartAIMgr::LoadSmartAIFromDB()
@@ -104,8 +104,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (!result)
{
sLog.outString(">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
sLog.outString();
sLog->outString(">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
sLog->outString();
return;
}
@@ -121,7 +121,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt32();
if (source_type >= SMART_SCRIPT_TYPE_MAX)
{
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
continue;
}
if (temp.entryOrGuid >= 0)
@@ -132,7 +132,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sCreatureStorage.LookupEntry<CreatureInfo>((uint32)temp.entryOrGuid))
{
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -141,7 +141,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sGOStorage.LookupEntry<GameObjectInfo>((uint32)temp.entryOrGuid))
{
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -150,7 +150,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sAreaTriggerStore.LookupEntry((uint32)temp.entryOrGuid))
{
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -158,14 +158,14 @@ void SmartAIMgr::LoadSmartAIFromDB()
case SMART_SCRIPT_TYPE_TIMED_ACTIONLIST:
break;//nothing to check, really
default:
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
continue;
}
}else
{
if (!sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid))))
{
sLog.outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
continue;
}
}
@@ -220,8 +220,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
}
while (result->NextRow());
sLog.outString(">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog.outString();
sLog->outString(">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
bool SmartAIMgr::IsTargetValid(SmartScriptHolder e)
@@ -235,7 +235,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder e)
{
if (e.target.unitDistance.creature && !sCreatureStorage.LookupEntry<CreatureInfo>(e.target.unitDistance.creature))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
return false;
}
break;
@@ -245,7 +245,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder e)
{
if (e.target.goDistance.entry && !sGOStorage.LookupEntry<GameObjectInfo>(e.target.goDistance.entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
return false;
}
break;
@@ -279,7 +279,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder e)
case SMART_TARGET_THREAT_LIST:
break;
default:
sLog.outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
return true;
@@ -289,23 +289,23 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.event.type >= SMART_EVENT_END)
{
sLog.outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
return false;
}
// in SMART_SCRIPT_TYPE_TIMED_ACTIONLIST all event types are overriden by core
if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && !(SmartAIEventMask[e.event.type][1] & SmartAITypeMask[e.GetScriptType()][1]))
{
sLog.outErrorDb("SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
return false;
}
if (e.action.type >= SMART_ACTION_END)
{
sLog.outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
return false;
}
if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL)
{
sLog.outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
return false;
}
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
@@ -339,12 +339,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
SpellEntry const* pSpell = sSpellStore.LookupEntry(e.event.spellHit.spell);
if (!pSpell)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
return false;
}
if (e.event.spellHit.school && (e.event.spellHit.school & pSpell->SchoolMask) != pSpell->SchoolMask)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
return false;
}
}
@@ -357,12 +357,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_EVENT_RESPAWN:
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
return false;
}
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
return false;
}
break;
@@ -420,7 +420,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.event.movementInform.type > NULL_MOTION_TYPE)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
return false;
}
break;
@@ -442,7 +442,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.link && e.link == e.event_id)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
return false;
}
break;
@@ -484,7 +484,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_EVENT_FOLLOW_COMPLETED:
break;
default:
sLog.outErrorDb("SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
}
@@ -494,7 +494,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_SET_FACTION:
if (e.action.faction.factionID && !sFactionStore.LookupEntry(e.action.faction.factionID))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
return false;
}
break;
@@ -504,7 +504,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.action.morphOrMount.creature > 0 && !sCreatureStorage.LookupEntry<CreatureInfo>(e.action.morphOrMount.creature))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
return false;
}
@@ -512,12 +512,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.action.morphOrMount.creature)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
else if (!sCreatureDisplayInfoStore.LookupEntry(e.action.morphOrMount.model))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
return false;
}
}
@@ -527,7 +527,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
if (!IsSoundValid(e, e.action.sound.sound)) return false;
if (e.action.sound.range > TEXT_RANGE_WORLD)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range);
return false;
}
break;
@@ -543,7 +543,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (!sTaxiPathStore.LookupEntry(e.action.taxi.id))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
return false;
}
break;
@@ -567,13 +567,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
return false;
}
}
else
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
return false;
}
break;
@@ -587,19 +587,19 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_SET_EVENT_PHASE:
if (e.action.setEventPhase.phase >= SMART_EVENT_PHASE_MAX)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
return false;
}
break;
case SMART_ACTION_INC_EVENT_PHASE:
if (!e.action.incEventPhase.inc && !e.action.incEventPhase.dec)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
else if (e.action.incEventPhase.inc > SMART_EVENT_PHASE_MAX || e.action.incEventPhase.dec > SMART_EVENT_PHASE_MAX)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
break;
@@ -619,7 +619,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
e.action.randomPhase.phase5 >= SMART_EVENT_PHASE_MAX ||
e.action.randomPhase.phase6 >= SMART_EVENT_PHASE_MAX)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
}
@@ -629,7 +629,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
if (e.action.randomPhaseRange.phaseMin >= SMART_EVENT_PHASE_MAX ||
e.action.randomPhaseRange.phaseMax >= SMART_EVENT_PHASE_MAX)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
if (!IsMinMaxValid(e, e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax)) return false;
@@ -639,7 +639,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
if (!IsCreatureValid(e, e.action.summonCreature.creature)) return false;
if (e.action.summonCreature.type > TEMPSUMMON_MANUAL_DESPAWN)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
return false;
}
break;
@@ -652,7 +652,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_SET_SHEATH:
if (e.action.setSheath.sheath && e.action.setSheath.sheath >= MAX_SHEATH_STATE)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
return false;
}
break;
@@ -660,7 +660,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (e.action.react.state > REACT_AGGRESSIVE)
{
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
return false;
}
break;
@@ -676,14 +676,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_TELEPORT:
if (!sMapStore.LookupEntry(e.action.teleport.mapID))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
return false;
}
break;
case SMART_ACTION_INSTALL_AI_TEMPLATE:
if (e.action.installTtemplate.id >= SMARTAI_TEMPLATE_END)
{
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
return false;
}
break;
@@ -694,13 +694,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
{
if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID))
{
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
return false;
}
if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest)) return false;
if (e.action.wpStart.reactState > REACT_AGGRESSIVE)
{
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
return false;
}
break;
@@ -768,7 +768,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_RANDOM_MOVE:
break;
default:
sLog.outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
return false;
}
@@ -786,7 +786,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder e, uint32 id)
CreatureData const* data = sObjectMgr->GetCreatureData(entry);
if (!data)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
else
@@ -796,7 +796,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder e, uint32 id)
error = true;
if (error)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
return false;
}
return true;
@@ -1181,7 +1181,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("SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
return temp;
}
}
@@ -1196,7 +1196,7 @@ class SmartAIMgr
{
if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
return false;
}
return true;
@@ -1205,7 +1205,7 @@ class SmartAIMgr
{
if (max < min)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
return false;
}
return true;
@@ -1214,7 +1214,7 @@ class SmartAIMgr
{
if (pct < -100 || pct > 100)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
return false;
}
return true;
@@ -1223,7 +1223,7 @@ class SmartAIMgr
{
if (!data)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
return true;
@@ -1232,7 +1232,7 @@ class SmartAIMgr
{
if (!sCreatureStorage.LookupEntry<CreatureInfo>(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1241,7 +1241,7 @@ class SmartAIMgr
{
if (!sObjectMgr->GetQuestTemplate(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1250,7 +1250,7 @@ class SmartAIMgr
{
if (!sGOStorage.LookupEntry<GameObjectInfo>(uint32(entry)))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1259,7 +1259,7 @@ class SmartAIMgr
{
if (!sSpellStore.LookupEntry(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1268,7 +1268,7 @@ class SmartAIMgr
{
if (!sItemStore.LookupEntry(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1288,7 +1288,7 @@ class SmartAIMgr
}
if (error)
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Condition, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Condition, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
return true;
@@ -1297,7 +1297,7 @@ class SmartAIMgr
{
if (!sEmotesTextStore.LookupEntry(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1306,7 +1306,7 @@ class SmartAIMgr
{
if (!sAreaTriggerStore.LookupEntry(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1315,7 +1315,7 @@ class SmartAIMgr
{
if (!sSoundEntriesStore.LookupEntry(entry))
{
sLog.outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;