Core/SAI: Implemented new source type SMART_SCRIPT_TYPE_EVENT (3)
Port From (https://github.com/TrinityCore/TrinityCore/commit/d015711fbb7a8bf57f7bb64ba8113c942d5125de)
This commit is contained in:
@@ -425,7 +425,7 @@ namespace Game.Scripting
|
||||
|
||||
public virtual BattleField GetBattlefield(Map map) { return null; }
|
||||
}
|
||||
|
||||
|
||||
public class BattlegroundScript : ScriptObject
|
||||
{
|
||||
public BattlegroundScript(string name) : base(name)
|
||||
@@ -572,7 +572,7 @@ namespace Game.Scripting
|
||||
// Called when an achievement is completed.
|
||||
public virtual void OnCompleted(Player player, AchievementRecord achievement) { }
|
||||
}
|
||||
|
||||
|
||||
public class AchievementCriteriaScript : ScriptObject
|
||||
{
|
||||
public AchievementCriteriaScript(string name) : base(name)
|
||||
@@ -842,4 +842,17 @@ namespace Game.Scripting
|
||||
// Called when worldstate changes value, map is optional
|
||||
public virtual void OnValueChange(int worldStateId, int oldValue, int newValue, Map map) { }
|
||||
}
|
||||
|
||||
public class EventScript : ScriptObject
|
||||
{
|
||||
public EventScript(string name) : base(name)
|
||||
{
|
||||
Global.ScriptMgr.AddScript(this);
|
||||
}
|
||||
|
||||
public override bool IsDatabaseBound() { return true; }
|
||||
|
||||
// Called when a game event is triggered
|
||||
public virtual void OnTrigger(WorldObject obj, WorldObject invoker, uint eventId) { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user