diff options
author | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
---|---|---|
committer | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
commit | 928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch) | |
tree | b30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/Scripting/MapScripts.cpp | |
parent | 95daf7998fc3b772fdcd70087c12db80bd5a031a (diff) |
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Scripting/MapScripts.cpp')
-rwxr-xr-x | src/server/game/Scripting/MapScripts.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 758275eeddc..ee191b3e534 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -53,11 +53,11 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O sa.ownerGUID = ownerGUID; sa.script = &iter->second; - m_scriptSchedule.insert(std::pair<time_t, ScriptAction>(time_t(sWorld.GetGameTime() + iter->first), sa)); + m_scriptSchedule.insert(std::pair<time_t, ScriptAction>(time_t(sWorld->GetGameTime() + iter->first), sa)); if (iter->first == 0) immedScript = true; - sWorld.IncreaseScheduledScriptsCount(); + sWorld->IncreaseScheduledScriptsCount(); } ///- If one of the effects should be immediate, launch the script execution if (/*start &&*/ immedScript && !i_scriptLock) @@ -83,9 +83,9 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou sa.ownerGUID = ownerGUID; sa.script = &script; - m_scriptSchedule.insert(std::pair<time_t, ScriptAction>(time_t(sWorld.GetGameTime() + delay), sa)); + m_scriptSchedule.insert(std::pair<time_t, ScriptAction>(time_t(sWorld->GetGameTime() + delay), sa)); - sWorld.IncreaseScheduledScriptsCount(); + sWorld->IncreaseScheduledScriptsCount(); ///- If effects should be immediate, launch the script execution if (delay == 0 && !i_scriptLock) @@ -101,7 +101,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe { Player *pPlayer = NULL; if (!source && !target) - sLog.outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else { // Check target first, then source. @@ -111,7 +111,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe pPlayer = source->ToPlayer(); if (!pPlayer) - sLog.outError("%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); @@ -123,7 +123,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t { Creature *pCreature = NULL; if (!source && !target) - sLog.outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else { if (bReverse) @@ -144,7 +144,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t } if (!pCreature) - sLog.outError("%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); @@ -156,15 +156,15 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s { Unit* pUnit = NULL; if (!obj) - sLog.outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else if (!obj->isType(TYPEMASK_UNIT)) - sLog.outError("%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); else { pUnit = dynamic_cast<Unit*>(obj); if (!pUnit) - sLog.outError("%s %s object could not be casted to unit.", + sLog->outError("%s %s object could not be casted to unit.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); } return pUnit; @@ -174,12 +174,12 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf { Player* pPlayer = NULL; if (!obj) - sLog.outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { pPlayer = obj->ToPlayer(); if (!pPlayer) - sLog.outError("%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).", + sLog->outError("%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return pPlayer; @@ -189,12 +189,12 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip { Creature* pCreature = NULL; if (!obj) - sLog.outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { pCreature = obj->ToCreature(); if (!pCreature) - sLog.outError("%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), + sLog->outError("%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return pCreature; @@ -204,13 +204,13 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const { WorldObject* pWorldObject = NULL; if (!obj) - sLog.outError("%s %s object is NULL.", + sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { pWorldObject = dynamic_cast<WorldObject*>(obj); if (!pWorldObject) - sLog.outError("%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).", + sLog->outError("%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return pWorldObject; @@ -226,29 +226,29 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script case SCRIPT_COMMAND_OPEN_DOOR: bOpen = true; break; case SCRIPT_COMMAND_CLOSE_DOOR: break; default: - sLog.outError("%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError("%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str()); return; } if (!guid) - sLog.outError("%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError("%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str()); else if (!source) - sLog.outError("%s source object is NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError("%s source object is NULL.", scriptInfo->GetDebugInfo().c_str()); else if (!source->isType(TYPEMASK_UNIT)) - sLog.outError("%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), + sLog->outError("%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { WorldObject* wSource = dynamic_cast <WorldObject*> (source); if (!wSource) - sLog.outError("%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { GameObject *pDoor = _FindGameObject(wSource, guid); if (!pDoor) - sLog.outError("%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); + sLog->outError("%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) - sLog.outError("%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", + sLog->outError("%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUIDLow()); else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY)) { @@ -291,7 +291,7 @@ void Map::ScriptsProcess() ///- Process overdue queued scripts std::multimap<time_t, ScriptAction>::iterator iter = m_scriptSchedule.begin(); // ok as multimap is a *sorted* associative container - while (!m_scriptSchedule.empty() && (iter->first <= sWorld.GetGameTime())) + while (!m_scriptSchedule.empty() && (iter->first <= sWorld->GetGameTime())) { ScriptAction const& step = iter->second; @@ -335,7 +335,7 @@ void Map::ScriptsProcess() } break; default: - sLog.outError("*_script source with unsupported high guid value %u",GUID_HIPART(step.sourceGUID)); + sLog->outError("*_script source with unsupported high guid value %u",GUID_HIPART(step.sourceGUID)); break; } } @@ -367,7 +367,7 @@ void Map::ScriptsProcess() target = HashMapHolder<Corpse>::Find(step.targetGUID); break; default: - sLog.outError("*_script source with unsupported high guid value %u",GUID_HIPART(step.targetGUID)); + sLog->outError("*_script source with unsupported high guid value %u",GUID_HIPART(step.targetGUID)); break; } } @@ -381,7 +381,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_TALK: if (step.script->Talk.ChatType > CHAT_TYPE_WHISPER && step.script->Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER) { - sLog.outError("%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType); + sLog->outError("%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType); break; } if (step.script->Talk.Flags & SF_TALK_USE_PLAYER) @@ -408,7 +408,7 @@ void Map::ScriptsProcess() case CHAT_MSG_RAID_BOSS_WHISPER: if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) { - sLog.outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); break; } pSource->Whisper(text, LANG_UNIVERSAL, targetGUID); @@ -441,7 +441,7 @@ void Map::ScriptsProcess() case CHAT_TYPE_WHISPER: if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) { - sLog.outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); break; } cSource->Whisper(step.script->Talk.TextID, targetGUID); @@ -449,7 +449,7 @@ void Map::ScriptsProcess() case CHAT_MSG_RAID_BOSS_WHISPER: //42 if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) { - sLog.outError("%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); break; } cSource->MonsterWhisper(step.script->Talk.TextID, targetGUID, true); @@ -478,7 +478,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount()) - sLog.outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FieldSet.FieldID, cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow()); else @@ -501,7 +501,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - sLog.outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else @@ -515,7 +515,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - sLog.outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else @@ -542,12 +542,12 @@ void Map::ScriptsProcess() { if (!source) { - sLog.outError("%s source object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s source object is NULL.", step.script->GetDebugInfo().c_str()); break; } if (!target) { - sLog.outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); break; } @@ -558,7 +558,7 @@ void Map::ScriptsProcess() { if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER) { - sLog.outError("%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); break; } @@ -571,7 +571,7 @@ void Map::ScriptsProcess() { if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER) { - sLog.outError("%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); break; } @@ -579,7 +579,7 @@ void Map::ScriptsProcess() } else { - sLog.outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); @@ -611,7 +611,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT: if (!step.script->RespawnGameobject.GOGuid) { - sLog.outError("%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str()); break; } @@ -621,7 +621,7 @@ void Map::ScriptsProcess() GameObject *pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); if (!pGO) { - sLog.outError("%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); + sLog->outError("%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); break; } @@ -630,7 +630,7 @@ void Map::ScriptsProcess() pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP) { - sLog.outError("%s can not be used with gameobject of type %u (guid: %u).", + sLog->outError("%s can not be used with gameobject of type %u (guid: %u).", step.script->GetDebugInfo().c_str(), uint32(pGO->GetGoType()), step.script->RespawnGameobject.GOGuid); break; } @@ -653,7 +653,7 @@ void Map::ScriptsProcess() if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script)) { if (!step.script->TempSummonCreature.CreatureEntry) - sLog.outError("%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str()); else { float x = step.script->TempSummonCreature.PosX; @@ -662,7 +662,7 @@ void Map::ScriptsProcess() float o = step.script->TempSummonCreature.Orientation; if (!pSummoner->SummonCreature(step.script->TempSummonCreature.CreatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->TempSummonCreature.DespawnDelay)) - sLog.outError("%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry); + sLog->outError("%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry); } } break; @@ -680,13 +680,13 @@ void Map::ScriptsProcess() // Target must be GameObject. if (!target) { - sLog.outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); break; } if (target->GetTypeId() != TYPEID_GAMEOBJECT) { - sLog.outError("%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError("%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); break; } @@ -710,7 +710,7 @@ void Map::ScriptsProcess() // TODO: Allow gameobjects to be targets and casters if (!source && !target) { - sLog.outError("%s source and target objects are NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s source and target objects are NULL.", step.script->GetDebugInfo().c_str()); break; } @@ -743,13 +743,13 @@ void Map::ScriptsProcess() if (!uSource || !uSource->isType(TYPEMASK_UNIT)) { - sLog.outError("%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); + sLog->outError("%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); break; } if (!uTarget || !uTarget->isType(TYPEMASK_UNIT)) { - sLog.outError("%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); + sLog->outError("%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); break; } @@ -809,7 +809,7 @@ void Map::ScriptsProcess() if (Unit* pSource = _GetScriptUnit(source, true, step.script)) { if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID)) - sLog.outError("%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID); + sLog->outError("%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID); else pSource->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable); } @@ -819,12 +819,12 @@ void Map::ScriptsProcess() { if (!step.script->CallScript.CreatureEntry) { - sLog.outError("%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str()); break; } if (!step.script->CallScript.ScriptID) { - sLog.outError("%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError("%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str()); break; } @@ -851,7 +851,7 @@ void Map::ScriptsProcess() if (!cTarget) { - sLog.outError("%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry); + sLog->outError("%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry); break; } @@ -860,7 +860,7 @@ void Map::ScriptsProcess() //if no scriptmap present... if (!datamap) { - sLog.outError("%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType); + sLog->outError("%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType); break; } @@ -874,7 +874,7 @@ void Map::ScriptsProcess() if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (cSource->isDead()) - sLog.outError("%s creature is already dead (Entry: %u, GUID: %u)", + sLog->outError("%s creature is already dead (Entry: %u, GUID: %u)", step.script->GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUIDLow()); else { @@ -930,12 +930,12 @@ void Map::ScriptsProcess() break; default: - sLog.outError("Unknown script command %s.", step.script->GetDebugInfo().c_str()); + sLog->outError("Unknown script command %s.", step.script->GetDebugInfo().c_str()); break; } m_scriptSchedule.erase(iter); - sWorld.DecreaseScheduledScriptCount(); + sWorld->DecreaseScheduledScriptCount(); iter = m_scriptSchedule.begin(); } |