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

(cherry picked from commit 59e3cf82ac)
This commit is contained in:
Naios
2016-04-02 22:37:51 +02:00
parent 518692b4cb
commit 775e0764e8
8 changed files with 20 additions and 21 deletions

View File

@@ -1094,20 +1094,10 @@ class TC_GAME_API ScriptMgr
void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }
uint32 DecreaseScheduledScriptCount() { return --_scheduledScripts; }
uint32 DecreaseScheduledScriptCount(size_t count) { return _scheduledScripts -= count; }
bool IsScriptScheduled() const { return _scheduledScripts > 0; }
private:
uint32 _scriptCount;
//atomic op counter for active scripts amount
std::atomic<uint32> _scheduledScripts;
ScriptLoaderCallbackType _script_loader_callback;
};