Exemple #1
0
        private void guild(GameClient client, GameDoor targetDoor, string[] args)
        {
            string guildName = string.Empty;

            if (args.Length > 2)
            {
                guildName = string.Join(" ", args, 2, args.Length - 2);
            }

            if (guildName != string.Empty)
            {
                targetDoor.GuildName = CheckGuildName(guildName, client);
                targetDoor.SaveIntoDatabase();
                client.Out.SendMessage("You changed the door guild to " + targetDoor.GuildName, eChatType.CT_System,
                                       eChatLoc.CL_SystemWindow);
            }
            else
            {
                if (targetDoor.GuildName != string.Empty)
                {
                    targetDoor.GuildName = string.Empty;
                    targetDoor.SaveIntoDatabase();
                    client.Out.SendMessage("Door guild removed", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else
                {
                    DisplaySyntax(client, args[1]);
                }
            }
        }
Exemple #2
0
 private void heal(GameClient client, GameDoor targetDoor)
 {
     targetDoor.Health = targetDoor.MaxHealth;
     targetDoor.SaveIntoDatabase();
     client.Out.SendMessage("You change the door health to " + targetDoor.Health, eChatType.CT_System,
                            eChatLoc.CL_SystemWindow);
 }
Exemple #3
0
        private void realm(GameClient client, GameDoor targetDoor, string[] args)
        {
            byte realm;

            try
            {
                realm            = Convert.ToByte(args[2]);
                targetDoor.Realm = (eRealm)realm;
                targetDoor.SaveIntoDatabase();
                client.Out.SendMessage("You changed the door realm to " + targetDoor.Realm, eChatType.CT_System,
                                       eChatLoc.CL_SystemWindow);
            }
            catch (Exception)
            {
                DisplaySyntax(client, args[1]);
            }
        }
Exemple #4
0
        private void level(GameClient client, GameDoor targetDoor, string[] args)
        {
            byte level;

            try
            {
                level             = Convert.ToByte(args[2]);
                targetDoor.Level  = level;
                targetDoor.Health = targetDoor.MaxHealth;
                targetDoor.SaveIntoDatabase();
                client.Out.SendMessage("You changed the door level to " + targetDoor.Level, eChatType.CT_System,
                                       eChatLoc.CL_SystemWindow);
            }
            catch (Exception)
            {
                DisplaySyntax(client, args[1]);
            }
        }
Exemple #5
0
        private void name(GameClient client, GameDoor targetDoor, string[] args)
        {
            string doorName = string.Empty;

            if (args.Length > 2)
            {
                doorName = string.Join(" ", args, 2, args.Length - 2);
            }

            if (doorName != string.Empty)
            {
                targetDoor.Name = CheckName(doorName, client);
                targetDoor.SaveIntoDatabase();
                client.Out.SendMessage("You changed the door name to " + targetDoor.Name, eChatType.CT_System,
                                       eChatLoc.CL_SystemWindow);
            }
            else
            {
                DisplaySyntax(client, args[1]);
            }
        }
Exemple #6
0
        private void sound(GameClient client, GameDoor targetDoor, string[] args)
        {
            uint doorSound = 0;

            try
            {
                if (args.Length > 2)
                {
                    doorSound       = Convert.ToUInt16(args[2]);
                    targetDoor.Flag = doorSound;
                    targetDoor.SaveIntoDatabase();
                    client.Out.SendMessage("You set the door sound to " + doorSound, eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else
                {
                    DisplaySyntax(client, args[1]);
                }
            }
            catch
            {
                DisplaySyntax(client, args[1]);
            }
        }
Exemple #7
0
		private void unlocked(GameClient client, GameDoor targetDoor)
		{
			targetDoor.Locked = 0;
			targetDoor.SaveIntoDatabase();
			client.Out.SendMessage("Door " + targetDoor.Name + " is unlocked", eChatType.CT_System, eChatLoc.CL_SystemWindow);
		}
Exemple #8
0
		private void heal(GameClient client, GameDoor targetDoor)
		{
			targetDoor.Health = targetDoor.MaxHealth;
			targetDoor.SaveIntoDatabase();
			client.Out.SendMessage("You change the door health to " + targetDoor.Health, eChatType.CT_System,
			                       eChatLoc.CL_SystemWindow);
		}
Exemple #9
0
		private void realm(GameClient client, GameDoor targetDoor, string[] args)
		{
			byte realm;

			try
			{
				realm = Convert.ToByte(args[2]);
				targetDoor.Realm = (eRealm) realm;
				targetDoor.SaveIntoDatabase();
				client.Out.SendMessage("You changed the door realm to " + targetDoor.Realm, eChatType.CT_System,
				                       eChatLoc.CL_SystemWindow);
			}
			catch (Exception)
			{
				DisplaySyntax(client, args[1]);
			}
		}
Exemple #10
0
		private void level(GameClient client, GameDoor targetDoor, string[] args)
		{
			byte level;

			try
			{
				level = Convert.ToByte(args[2]);
				targetDoor.Level = level;
				targetDoor.Health = targetDoor.MaxHealth;
				targetDoor.SaveIntoDatabase();
				client.Out.SendMessage("You changed the door level to " + targetDoor.Level, eChatType.CT_System,
				                       eChatLoc.CL_SystemWindow);
			}
			catch (Exception)
			{
				DisplaySyntax(client, args[1]);
			}
		}
Exemple #11
0
		private void guild(GameClient client, GameDoor targetDoor, string[] args)
		{
			string guildName = "";

			if (args.Length > 2)
				guildName = String.Join(" ", args, 2, args.Length - 2);

			if (guildName != "")
			{
				targetDoor.GuildName = CheckGuildName(guildName, client);
				targetDoor.SaveIntoDatabase();
				client.Out.SendMessage("You changed the door guild to " + targetDoor.GuildName, eChatType.CT_System,
				                       eChatLoc.CL_SystemWindow);
			}
			else
			{
				if (targetDoor.GuildName != "")
				{
					targetDoor.GuildName = "";
					targetDoor.SaveIntoDatabase();
					client.Out.SendMessage("Door guild removed", eChatType.CT_System, eChatLoc.CL_SystemWindow);
				}
				else
					DisplaySyntax(client, args[1]);
			}
		}
Exemple #12
0
		private void sound(GameClient client, GameDoor targetDoor, string[] args)
		{
			uint doorSound = 0;

			try
			{
				if (args.Length > 2)
				{
					doorSound = Convert.ToUInt16(args[2]);
					targetDoor.Flag = doorSound;
					targetDoor.SaveIntoDatabase();
					client.Out.SendMessage("You set the door sound to " + doorSound, eChatType.CT_System, eChatLoc.CL_SystemWindow);
				}
				else
				{
					DisplaySyntax(client, args[1]);
				}
			}
			catch
			{
				DisplaySyntax(client, args[1]);
			}
		}
Exemple #13
0
		private void name(GameClient client, GameDoor targetDoor, string[] args)
		{
			string doorName = "";

			if (args.Length > 2)
				doorName = String.Join(" ", args, 2, args.Length - 2);

			if (doorName != "")
			{
				targetDoor.Name = CheckName(doorName, client);
				targetDoor.SaveIntoDatabase();
				client.Out.SendMessage("You changed the door name to " + targetDoor.Name, eChatType.CT_System,
				                       eChatLoc.CL_SystemWindow);
			}
			else
			{
				DisplaySyntax(client, args[1]);
			}
		}
Exemple #14
0
 private void unlocked(GameClient client, GameDoor targetDoor)
 {
     targetDoor.Locked = 0;
     targetDoor.SaveIntoDatabase();
     client.Out.SendMessage("Door " + targetDoor.Name + " is unlocked", eChatType.CT_System, eChatLoc.CL_SystemWindow);
 }