Core/World: implement database support for default map and realm wide world states
Port From (https://github.com/TrinityCore/TrinityCore/commit/737d94d7efe0b6c308ac1bf3692b6aa2e43f5adb)
This commit is contained in:
@@ -1198,6 +1198,14 @@ namespace Game.Scripting
|
||||
RunScript<QuestScript>(script => script.OnQuestObjectiveChange(player, quest, objective, oldAmount, newAmount), quest.ScriptId);
|
||||
}
|
||||
|
||||
// WorldState
|
||||
public void OnWorldStateValueChange(WorldStateTemplate worldStateTemplate, int oldValue, int newValue, Map map)
|
||||
{
|
||||
Cypher.Assert(worldStateTemplate != null);
|
||||
|
||||
RunScript<WorldStateScript>(script => script.OnValueChange(worldStateTemplate.Id, oldValue, newValue, map), worldStateTemplate.ScriptId);
|
||||
}
|
||||
|
||||
public void ForEach<T>(Action<T> a) where T : ScriptObject
|
||||
{
|
||||
var reg = GetScriptRegistry<T>();
|
||||
|
||||
Reference in New Issue
Block a user