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:
@@ -843,4 +843,17 @@ namespace Game.Scripting
|
||||
// Called when a quest objective data change
|
||||
public virtual void OnQuestObjectiveChange(Player player, Quest quest, QuestObjective objective, int oldAmount, int newAmount) { }
|
||||
}
|
||||
|
||||
public class WorldStateScript : ScriptObject
|
||||
{
|
||||
public WorldStateScript(string name) : base(name)
|
||||
{
|
||||
Global.ScriptMgr.AddScript(this);
|
||||
}
|
||||
|
||||
public override bool IsDatabaseBound() { return true; }
|
||||
|
||||
// Called when worldstate changes value, map is optional
|
||||
public virtual void OnValueChange(int worldStateId, int oldValue, int newValue, Map map) { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user