diff options
author | Naios <naios-dev@live.de> | 2016-04-02 22:37:51 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-11 20:07:24 +0200 |
commit | 59e3cf82acaea5a0e5023e087e0ca1e6a9d15d82 (patch) | |
tree | 804ef3d3dce046e645bf9163d944fbf9d0f61e9a /src/server/game/Maps/MapScripts.cpp | |
parent | 26dcde94b383f2e7f6af2dc1ad4ab2806ff7ceda (diff) |
Core/Game: Move scheduled map scripts counter methods into MapManager
* Since those have nothing to do with core scripts and are
not wished inside the ScriptMgr
Diffstat (limited to 'src/server/game/Maps/MapScripts.cpp')
-rw-r--r-- | src/server/game/Maps/MapScripts.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Maps/MapScripts.cpp b/src/server/game/Maps/MapScripts.cpp index 8caabbbe1ec..fd1f798d2d0 100644 --- a/src/server/game/Maps/MapScripts.cpp +++ b/src/server/game/Maps/MapScripts.cpp @@ -20,6 +20,7 @@ #include "GridNotifiers.h" #include "GossipDef.h" #include "Map.h" +#include "MapManager.h" #include "ObjectMgr.h" #include "Pet.h" #include "Item.h" @@ -57,7 +58,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O if (iter->first == 0) immedScript = true; - sScriptMgr->IncreaseScheduledScriptsCount(); + sMapMgr->IncreaseScheduledScriptsCount(); } ///- If one of the effects should be immediate, launch the script execution if (/*start &&*/ immedScript && !i_scriptLock) @@ -85,7 +86,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou sa.script = &script; m_scriptSchedule.insert(ScriptScheduleMap::value_type(time_t(sWorld->GetGameTime() + delay), sa)); - sScriptMgr->IncreaseScheduledScriptsCount(); + sMapMgr->IncreaseScheduledScriptsCount(); ///- If effects should be immediate, launch the script execution if (delay == 0 && !i_scriptLock) @@ -902,6 +903,6 @@ void Map::ScriptsProcess() m_scriptSchedule.erase(iter); iter = m_scriptSchedule.begin(); - sScriptMgr->DecreaseScheduledScriptCount(); + sMapMgr->DecreaseScheduledScriptCount(); } } |