Scripts/Instances: Replace manual criteria timer starts in instances with new GameEvents api

Port From (https://github.com/TrinityCore/TrinityCore/commit/1c62b0b90f879e5df6c6785c12e9a5bddd65cb48)
This commit is contained in:
hondacrx
2022-05-31 19:57:24 -04:00
parent 4b0b5df152
commit 8bbd650d0b
2 changed files with 24 additions and 6 deletions
+8
View File
@@ -22,6 +22,14 @@ namespace Game.Maps
{
public class ZoneScript
{
public virtual void TriggerGameEvent(uint gameEventId, WorldObject source = null, WorldObject target = null)
{
if (source != null)
GameEvents.Trigger(gameEventId, source, target);
else
ProcessEvent(null, gameEventId, null);
}
public virtual uint GetCreatureEntry(ulong guidlow, CreatureData data) { return data.Id; }
public virtual uint GetGameObjectEntry(ulong spawnId, uint entry) { return entry; }