internal void InvokePocketDimensionLeaveEvent(Player player, ref UnityEngine.Vector3 pos, ref PocketDimensionTeleport.PDTeleportType teleportType, out bool allow) { var ev = new PocketDimensionLeaveEventArgs { ExitPosition = pos, Player = player, TeleportType = teleportType }; PocketDimensionLeaveEvent?.Invoke(ev); pos = ev.ExitPosition; teleportType = ev.TeleportType; allow = ev.Allow; }
internal static void InvokePocketDimensionLeave(Player player, ref PocketDimensionTeleport.PDTeleportType type, out bool allow) { allow = true; if (PocketDimensionLeaveEvent == null) { return; } var ev = new PocketDimensionLeave { Allow = true, Player = player, TeleportType = type }; PocketDimensionLeaveEvent.Invoke(ev); allow = ev.Allow; type = ev.TeleportType; }