mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
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
This commit is contained in:
@@ -241,7 +241,7 @@ struct TSpellSummary
|
||||
} *SpellSummary;
|
||||
|
||||
ScriptMgr::ScriptMgr()
|
||||
: _scriptCount(0), _scheduledScripts(0), _script_loader_callback(nullptr)
|
||||
: _scriptCount(0), _script_loader_callback(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1102,19 +1102,9 @@ 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;
|
||||
|
||||
std::string _currentContext;
|
||||
|
||||
Reference in New Issue
Block a user