Exemplo n.º 1
0
        /// <summary>
        /// Leaving the specified player and forAnotherRegion.
        /// </summary>
        /// <param name='player'>
        /// Player.
        /// </param>
        /// <param name='forAnotherRegion'>
        /// If going into another region dont tell the player, leaving
        /// </param>
        internal virtual void Leaving(Client player, WorldRegion nextRegion)
        {
            if (Type == SpawnRegion.Type)
            {
                SpawnRegion.Leaving(player);
            }

            if (Type == SpawnTimeRegion.Type)
            {
                SpawnTimeRegion.Leaving(player);
                return;
            }

            Log.WriteRegion(player, this, false);
            if (nextRegion == null || nextRegion.SubRegions != null && nextRegion.SubRegions.Contains(this))
            {
                player.TellAbove(Chat.Gray, "Leaving " + Name);
            }

            if (player.Settings.Cloaked != null)
            {
                return;
            }
            if (ReportVisits == false)
            {
                return;
            }

            TellResidentsSystem(player, Chat.Gray, player.Name + " left " + Name + " " + FromDirection(player.Session.Position));
        }
Exemplo n.º 2
0
        static internal void Leaving(Client player)
        {
            //Resume outside weather
            player.SendToClient(World.Main.Weather);

            player.TellAbove(Chat.Aqua, "Chat range: " + Parser.DistanceMax + " blocks");
        }
Exemplo n.º 3
0
        public static bool Trigger(Client player, WorldRegion r)
        {
#if DEBUG
            player.TellAbove("DEBUG: ", "You triggered the ban");
#else
            player.BanByServer(DateTime.Now.AddMinutes(30), r.Name);
#endif
            return(true);
        }
Exemplo n.º 4
0
        public static bool Trigger(Client player, WorldRegion r)
        {
#if DEBUG
            player.TellAbove("DEBUG: ", "You triggered the ban");
#else
            player.BanByServer(DateTime.Now.AddMinutes(30), r.Name);
#endif
            return true;
        }
Exemplo n.º 5
0
        internal virtual void Entering(Client player)
        {
            if (Type == SpawnRegion.Type)
            {
                SpawnRegion.Entering(player);
            }

            if (Type == SpawnTimeRegion.Type)
            {
                SpawnTimeRegion.Entering(player);
                return;
            }

            Log.WriteRegion(player, this, true);

            Regions.WarpPortalVisuals.EnterRegion(player, this);

            //Region message
            if (Message != null)
            {
                player.TellAbove(Chat.DarkAqua + "[region] ", Message);
            }
            else
            {
                player.TellAbove(Chat.DarkAqua, "Entering " + Name);
            }

            if (player.Settings.Cloaked != null)
            {
                return;
            }

            if (ReportVisits == false)
            {
                return;
            }

            string message = player.Name + " entered " + ColorName + " " + FromDirection(player.Session.Position);

#if DEBUG
            player.TellSystem("DEBUG " + Chat.Blue, message);
#endif
            TellResidentsSystem(player, Chat.Blue, message);
        }
Exemplo n.º 6
0
        static bool DiggProtect(Client player, PlayerDigging pd)
        {
            if (pd.Status == PlayerDigging.StatusEnum.FinishedDigging)
            {
                BlockChange bc = new BlockChange(pd.Position.Offset(pd.Face), BlockID.Fire);
                player.SendToClient(bc);

                player.TellAbove(Chat.Purple, "You are still in spawn");
                return(true);
            }

            return(false);
        }
Exemplo n.º 7
0
        static internal void Leaving(Client player)
        {
            //Resume outside weather
            player.SendToClient(World.Main.Weather);
			
            player.TellAbove(Chat.Aqua, "Chat range: " + Parser.DistanceMax + " blocks");
        }
Exemplo n.º 8
0
        static bool DiggProtect(Client player, PlayerDigging pd)
        {
            if (pd.Status == PlayerDigging.StatusEnum.FinishedDigging)
            {
                BlockChange bc = new BlockChange(pd.Position.Offset(pd.Face), BlockID.Fire);
                player.SendToClient(bc);
				
                player.TellAbove(Chat.Purple, "You are still in spawn");
                return true;
            }
			
            return false;
        }