Esempio n. 1
0
        /// <summary>Raised after a player warps to a new location.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        public static void OnWarped(object sender, WarpedEventArgs e)
        {
            try
            {
                if (Multiplayer.mode == Mode.Singleplayer)
                {
                    return;
                }

                Multiplayer.locationChange(e.OldLocation, e.NewLocation);
            }
            catch (Exception ex)
            {
                Log.error("Exception during location change: " + ex);
            }
        }
Esempio n. 2
0
        public static void onCurrentLocationChange(object sender, EventArgs args)
        {
            try
            {
                if (Multiplayer.mode == Mode.Singleplayer)
                {
                    return;
                }

                Multiplayer.locationChange((args as EventArgsCurrentLocationChanged).PriorLocation, (args as EventArgsCurrentLocationChanged).NewLocation);
            }
            catch (Exception e)
            {
                Log.error("Exception during location change: " + e);
            }
        }