mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 11:34:07 -04:00
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user