示例#1
0
		public void method_1(DatabaseClient class6_0)
		{
			Logging.Write("Loading Pre-set Help Messages..");
			this.UserMessagePresets.Clear();
			this.RoomMessagePresets.Clear();
			DataTable dataTable = class6_0.ReadDataTable("SELECT type,message FROM moderation_presets WHERE enabled = '1'");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					string item = (string)dataRow["message"];
					string text = dataRow["type"].ToString().ToLower();
					if (text != null)
					{
						if (!(text == "message"))
						{
							if (text == "roommessage")
							{
								this.RoomMessagePresets.Add(item);
							}
						}
						else
						{
							this.UserMessagePresets.Add(item);
						}
					}
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
 public static void InitWords(DatabaseClient dbClient)
 {
     ChatCommandHandler.list_0.Clear();
     ChatCommandHandler.list_1.Clear();
     ChatCommandHandler.list_2.Clear();
     ChatCommandHandler.list_3.Clear();
     DataTable dataTable = dbClient.ReadDataTable("SELECT * FROM wordfilter ORDER BY word ASC;");
     if (dataTable != null)
     {
         foreach (DataRow dataRow in dataTable.Rows)
         {
             ChatCommandHandler.list_0.Add(dataRow["word"].ToString());
             ChatCommandHandler.list_1.Add(dataRow["replacement"].ToString());
             ChatCommandHandler.list_2.Add(Essential.StringToInt(dataRow["strict"].ToString()));
         }
     }
     DataTable dataTable2 = dbClient.ReadDataTable("SELECT * FROM linkfilter;");
     if (dataTable2 != null)
     {
         foreach (DataRow dataRow in dataTable2.Rows)
         {
             ChatCommandHandler.list_3.Add(dataRow["externalsite"].ToString());
         }
     }
 }
示例#3
0
		public void method_3(DatabaseClient class6_0)
		{
			Logging.Write("Loading Help Topics..");
			this.dictionary_1.Clear();
			DataTable dataTable = class6_0.ReadDataTable("SELECT Id, title, body, subject, known_issue FROM help_topics");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					HelpTopic @class = new HelpTopic((uint)dataRow["Id"], (string)dataRow["title"], (string)dataRow["body"], (uint)dataRow["subject"]);
					this.dictionary_1.Add((uint)dataRow["Id"], @class);
					int num = int.Parse(dataRow["known_issue"].ToString());
					if (num == 1)
					{
						this.list_1.Add(@class);
					}
					else
					{
						if (num == 2)
						{
							this.list_0.Add(@class);
						}
					}
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
 public SurpriseBoxManager(DatabaseClient dbClient)
 {
         foreach(DataRow itm in dbClient.ReadDataTable("SELECT * FROM surpriseboxes").Rows)
         {
             surpriseboxes.Add(new SurpriseBox(Convert.ToUInt32((int)itm["itemid"]), (int)itm["probability"], (string)itm["image"],(string)itm["name"]));
         }
     surpriseboxes = surpriseboxes.OrderByDescending(s => s.Probability).ToList();
 }
示例#5
0
		public void Initialize(DatabaseClient class6_0)
		{
            Logging.Write("Loading Bot data..");
			this.list_0 = new List<RoomBot>();
			DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM bots;");
			DataTable dataTable2 = class6_0.ReadDataTable("SELECT Id, bot_id, keywords, response_text, mode, serve_id FROM bots_responses;");
			DataTable dataTable3 = class6_0.ReadDataTable("SELECT text, shout, bot_id FROM bots_speech;");
			List<BotResponse> list = new List<BotResponse>();
			List<RandomSpeech> list2 = new List<RandomSpeech>();
			foreach (DataRow dataRow in dataTable2.Rows)
			{
				list.Add(new BotResponse((uint)dataRow["Id"], (uint)dataRow["bot_id"], (string)dataRow["keywords"], (string)dataRow["response_text"], dataRow["mode"].ToString(), (int)dataRow["serve_id"]));
			}
			foreach (DataRow dataRow in dataTable3.Rows)
			{
				list2.Add(new RandomSpeech((string)dataRow["text"], Essential.StringToBoolean(dataRow["shout"].ToString()), (uint)dataRow["bot_id"]));
			}
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					string text = (string)dataRow["ai_type"];
					string text2 = text;
					if (text2 == null)
					{
						goto IL_201;
					}
					AIType enum2_;
					if (!(text2 == "generic"))
					{
						if (!(text2 == "guide"))
						{
							if (!(text2 == "pet"))
							{
								goto IL_201;
							}
                            enum2_ = AIType.Pet;
						}
						else
						{
                            enum2_ = AIType.Guide;
						}
					}
					else
					{
                        enum2_ = AIType.Generic;
					}
					IL_204:
					this.list_0.Add(new RoomBot((uint)dataRow["Id"], (uint)dataRow["room_id"], enum2_, (string)dataRow["walk_mode"], (string)dataRow["name"], (string)dataRow["motto"], (string)dataRow["look"], (int)dataRow["x"], (int)dataRow["y"], (int)dataRow["z"], (int)dataRow["rotation"], (int)dataRow["min_x"], (int)dataRow["min_y"], (int)dataRow["max_x"], (int)dataRow["max_y"], ref list2, ref list, (int)dataRow["effect"]));
					continue;
					IL_201:
                    enum2_ = AIType.Generic;
					goto IL_204;
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
示例#6
0
		public static void Initialize(DatabaseClient class6_0)
		{
            Logging.Write("Loading groups...");
			Groups.ClearGroups();
			DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM groups;");
			foreach (DataRow dataRow in dataTable.Rows)
			{
				Groups.GroupsManager.Add((int)dataRow["Id"], new GroupsManager((int)dataRow["Id"], dataRow, class6_0));
			}
			Logging.WriteLine("completed!", ConsoleColor.Green);
		}
 public static void Initialize(DatabaseClient class6_0)
 {
     Logging.Write("Loading Chat Filter..");
     ChatCommandHandler.list_0 = new List<string>();
     ChatCommandHandler.list_1 = new List<string>();
     ChatCommandHandler.list_2 = new List<int>();
     ChatCommandHandler.list_3 = new List<string>();
     ChatCommandHandler.config = Essential.GetGame().GetRoleManager().config;
     ChatCommandHandler.InitWords(class6_0);
     Logging.WriteLine("completed!", ConsoleColor.Green);
 }
示例#8
0
 public GuideManager(DatabaseClient dbClient)
 {
     this.Guides = new List<uint>();
     this.GuidesOnDuty = new Dictionary<uint, Guide>();
     this.Tickets = new List<GuideTicket>();
     DataTable dt = dbClient.ReadDataTable("SELECT * FROM users WHERE is_guide='1'");
     foreach(DataRow dr in dt.Rows)
     {
         this.Guides.Add((uint)dr["id"]);
     }
     errorMessage = new ServerMessage(2553);
     errorMessage.AppendInt32(0);
     detachedMessage = new ServerMessage(1719);
 }
示例#9
0
		public GroupsManager(int int_2, DataRow Row, DatabaseClient class6_0)
		{
			this.Id = int_2;
            this.Name = (string)Row["name"];
            this.Description = (string)Row["desc"];
            this.OwnerId = (int)Row["OwnerId"];
			this.Badge = (string)Row["badge"];
            this.RoomId = (uint)Row["roomid"];
			this.Locked = (string)Row["locked"];
            this.GuildBaseColor = (int)Row["GuildBaseColor"];
            this.GuildBase = (int)Row["GuildBase"];
            foreach (string str in Row["GuildStates"].ToString().Split(new char[] { ';' }))
            {
                try
                {
                    if (!String.IsNullOrEmpty(str))
                    {
                        GuildStates.Add(int.Parse(str));
                    }
                }
                catch
                {
                    Console.WriteLine("Failed to add guild states for guild ID: " + int_2);
                }
            }
			this.Members = new List<int>();
            this.canMove = Essential.StringToBoolean((string)Row["members_canmove"]);
            this.OnlyAdminsCanMove = this.canMove ? 0 : 1;
            try
            {
                this.Created = Essential.TimestampToDate(int.Parse(((string)Row["created"]).Split('.')[0])).ToShortDateString();
            }catch{this.Created = Essential.TimestampToDate(Essential.GetUnixTimestamp()).ToShortDateString();}
                DataTable dataTable = class6_0.ReadDataTable("SELECT userid,hasRights FROM group_memberships WHERE groupid = " + int_2 + ";");
			foreach (DataRow dataRow in dataTable.Rows)
			{
                this.JoinGroup((int)dataRow["userid"]);
                if (Essential.StringToBoolean(dataRow["hasRights"].ToString()))
                    this.UserWithRanks.Add((int)dataRow["userid"]);
			}
            if (!this.UserWithRanks.Contains(this.OwnerId))
                this.UserWithRanks.Add(this.OwnerId);
            this.ColorOne = (string)Row["color_one"];
            this.ColorTwo = (string)Row["color_two"];
            DataTable dt = class6_0.ReadDataTable("SELECT userid FROM group_requests WHERE groupid=" + this.Id);
            foreach (DataRow dRow in dt.Rows)
            {
                if (!this.Petitions.Contains((int)dRow["userid"]))
                    this.Petitions.Add((int)dRow["userid"]);
            }
		}
示例#10
0
		public void method_0(DatabaseClient class6_0)
		{
			Logging.Write("Loading Help Categories..");
			this.dictionary_0.Clear();
			DataTable dataTable = class6_0.ReadDataTable("SELECT Id, caption FROM help_subjects");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					this.dictionary_0.Add((uint)dataRow["Id"], new HelpCategory((uint)dataRow["Id"], (string)dataRow["caption"]));
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
示例#11
0
        public static void Init(DatabaseClient dbClient)
        {

            DataTable Table = dbClient.ReadDataTable("SELECT * FROM pets_breeds");

            Races = new List<PetRace>();
            foreach (DataRow Race in Table.Rows)
            {
                PetRace R = new PetRace();
                R.RaceId = (int)Race["breed_id"];
                R.Color1 = (int)Race["color1"];
                R.Color2 = (int)Race["color2"];
                R.Has1Color = ((string)Race["color1_enabled"] == "1");
                R.Has2Color = ((string)Race["color2_enabled"] == "1");
                Races.Add(R);
            }
        }
示例#12
0
		public void method_2(DatabaseClient class6_0)
		{
			Logging.Write("Loading Current Help Tickets..");
			DataTable dataTable = class6_0.ReadDataTable("SELECT Id,score,type,status,sender_id,reported_id,moderator_id,message,room_id,room_name,timestamp FROM moderation_tickets WHERE status = 'open' OR status = 'picked'");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					SupportTicket @class = new SupportTicket((uint)dataRow["Id"], (int)dataRow["score"], (int)dataRow["type"], (uint)dataRow["sender_id"], (uint)dataRow["reported_id"], (string)dataRow["message"], (uint)dataRow["room_id"], (string)dataRow["room_name"], (double)dataRow["timestamp"], (uint)dataRow["moderator_id"]);
					if (dataRow["status"].ToString().ToLower() == "picked")
					{
						@class.method_0((uint)dataRow["moderator_id"], false);
					}
					this.Tickets.Add(@class);
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
示例#13
0
        public void LoadPowerupPackages(DatabaseClient dbClient)
        {
            try
            {
                DataTable Table = dbClient.ReadDataTable("SELECT * FROM basejump_powerup_packages");

                PowerupPackages = new Dictionary<int, PowerupPackage>();

                foreach (DataRow Powerup in Table.Rows)
                {
                    PowerupPackages.Add(int.Parse(Powerup["id"].ToString()), new PowerupPackage(int.Parse(Powerup["id"].ToString()), Powerup["package_name"].ToString(), Powerup["powerup_type"].ToString(), int.Parse(Powerup["cost_credits"].ToString()), int.Parse(Powerup["amount"].ToString())));
                }
            }
            catch (Exception e)
            {
                Logging.LogException("GamesManager error in LoadPowerupPackages. Data for developer: " + e.Data);
                Logging.WriteLine("Error in GamesManager", ConsoleColor.Red);
            }
        }
示例#14
0
        public void LoadGameLocales(DatabaseClient dbClient)
        {
            try
            {
                DataTable Table = dbClient.ReadDataTable("SELECT * FROM basejump_locales");

                GameLocales = new List<GameLocale>();

                foreach (DataRow Locale in Table.Rows)
                {
                    GameLocales.Add(new GameLocale(Locale["lang_id"].ToString(), Locale["lkey"].ToString(), Locale["lvalue"].ToString()));
                }
            }
            catch(Exception e)
            {
                Logging.LogException("GamesManager error in LoadGameLocales. Data for developer: " + e.Data);
              Logging.WriteLine("Error in GamesManager", ConsoleColor.Red);

            }
        }
示例#15
0
 internal List<SnowItems> GetSnowItems(int Level, DatabaseClient dbClient)
 {
     List<SnowItems> list = new List<SnowItems>();
     DataTable table = dbClient.ReadDataTable("SELECT * FROM storm_items WHERE Snow_Level = '" + Level + "'");
     foreach (DataRow row in table.Rows)
     {
         SnowItems item = new SnowItems
         {
             Id = (int)row["Id"],
             ItemId = (int)row["ItemId"],
             Name = (string)row["Name"],
             X = (int)row["X"],
             Y = (int)row["Y"],
             Rot = (int)row["Rot"],
             SpriteId = (int)row["SpriteId"],
             Extradata = (string)row["Extradata"],
             Level = (int)row["Snow_Level"]
         };
         list.Add(item);
     }
     return list;
 }
示例#16
0
		public static void UpdateGroup(DatabaseClient class6_0, int int_0)
		{
			GroupsManager @class = Groups.GetGroupById(int_0);
			if (@class != null)
			{
				DataRow Row = class6_0.ReadDataRow("SELECT * FROM groups WHERE Id = " + int_0 + " LIMIT 1");
				@class.Name = (string)Row["name"];
                @class.Badge = (string)Row["badge"];
                @class.RoomId = (uint)Row["roomid"];
				@class.Description = (string)Row["desc"];
                @class.Locked = (string)Row["locked"];
                @class.ColorOne = (string)Row["color_one"];
                @class.ColorTwo = (string)Row["color_two"];
                @class.Created = Essential.TimestampToDate(double.Parse((string)Row["created"])).ToShortDateString();
				@class.Members.Clear();
				DataTable dataTable = class6_0.ReadDataTable("SELECT userid FROM group_memberships WHERE groupid = " + int_0 + ";");
				foreach (DataRow dataRow2 in dataTable.Rows)
				{

                    @class.JoinGroup((int)dataRow2["userid"]);
				}
			}
		}
		public static void Load(DatabaseClient class6_0)
		{
            Logging.Write("Loading Achievements..");
			AchievementManager.dictionary_0.Clear();
			DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM achievements");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
                    AchievementManager.dictionary_0.Add((uint)dataRow["Id"], new Achievement((uint)dataRow["Id"], (string)dataRow["type"], (int)dataRow["levels"], (string)dataRow["badge"], (int)dataRow["pixels_base"], (double)dataRow["pixels_multiplier"], Essential.StringToBoolean(dataRow["dynamic_badgelevel"].ToString()), (int)dataRow["score_base"], (int)dataRow["pixels_base"]));
				}
				AchievementManager.dictionary_1.Clear();
				dataTable = class6_0.ReadDataTable("SELECT * FROM badges");
				if (dataTable != null)
				{
					foreach (DataRow dataRow in dataTable.Rows)
					{
						AchievementManager.dictionary_1.Add((string)dataRow["badge"], (uint)dataRow["Id"]);
					}
					Logging.WriteLine("completed!", ConsoleColor.Green);
				}
			}
		}
		public void Initialise(DatabaseClient dbClient)
		{
            Logging.Write("Loading bans..");

			this.Bans.Clear();
			
            DataTable dataTable = dbClient.ReadDataTable("SELECT bantype,value,reason,expire FROM bans WHERE expire > '" + Essential.GetUnixTimestamp() + "'");
			
            if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					ModerationBanType Type = ModerationBanType.IP;
					if ((string)dataRow["bantype"] == "user")
					{
						Type = ModerationBanType.USERNAME;
					}

					this.Bans.Add(new ModerationBan(Type, (string)dataRow["value"], (string)dataRow["reason"], (double)dataRow["expire"]));
				}

				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
示例#19
0
		public void Initialize(DatabaseClient class6_0)
		{
            if (!isLoading)
            {
                isLoading = true;
                Logging.Write("Loading Catalogue..");
                this.dictionary_0 = new Dictionary<int, CatalogPage>();


                this.list_0 = new List<EcotronReward>();
                DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM catalog_pages WHERE order_num >= '0' ORDER BY order_num ASC");
                DataTable dataTable2 = class6_0.ReadDataTable("SELECT * FROM ecotron_rewards ORDER BY item_id");
                DataTable dataTable4 = class6_0.ReadDataTable("SELECT * FROM catalog_pages WHERE order_num = '-1' ORDER BY caption ASC");
                try
                {
                    this.uint_0 = (uint)class6_0.ReadDataRow("SELECT ID FROM items ORDER BY ID DESC LIMIT 1")[0];
                }
                catch
                {
                    this.uint_0 = 0u;
                }
                this.uint_0 += 1u;
                this.spbmanager = new SurpriseBoxManager(class6_0);
                Hashtable hashtable = new Hashtable();
                DataTable dataTable3 = class6_0.ReadDataTable("SELECT * FROM catalog_items");
                if (dataTable3 != null)
                {
                    foreach (DataRow dataRow in dataTable3.Rows)
                    {
                        try
                        {
                            if (!(dataRow["item_ids"].ToString() == "") && (int)dataRow["amount"] > 0)
                            {
                                string BadgeID = dataRow["BadgeID"].ToString();
                                if (string.IsNullOrEmpty(BadgeID) || string.IsNullOrWhiteSpace(BadgeID)) BadgeID = string.Empty;
                                hashtable.Add((uint)dataRow["Id"], new CatalogItem((uint)dataRow["Id"], (string)dataRow["catalog_name"], (string)dataRow["item_ids"], (int)dataRow["cost_credits"], (int)dataRow["cost_pixels"], (int)dataRow["cost_snow"], (int)dataRow["amount"], (int)dataRow["page_id"], Essential.StringToInt(dataRow["vip"].ToString()), (uint)dataRow["achievement"], (int)dataRow["song_id"], BadgeID, (int)dataRow["limited_sold"], (int)dataRow["limited_count"], int.Parse(dataRow["have_offer"].ToString()) == 1, (int)dataRow["poster_id"], (string)dataRow["extradata"]));
                            }
                        }
                        catch
                        {
                            Console.WriteLine("Error loading Item #" + dataRow["Id"].ToString());
                        }
                    }
                }
                if (dataTable != null)
                {
                    foreach (DataRow dataRow in dataTable.Rows)
                    {
                        bool bool_ = false;
                        bool bool_2 = false;
                        if (dataRow["visible"].ToString() == "1")
                        {
                            bool_ = true;
                        }
                        if (dataRow["enabled"].ToString() == "1")
                        {
                            bool_2 = true;
                        }
                        this.dictionary_0.Add((int)dataRow["Id"], new CatalogPage((int)dataRow["Id"], (string)dataRow["link_name"], (int)dataRow["parent_id"], (string)dataRow["caption"], bool_, bool_2, (uint)dataRow["min_rank"], Essential.StringToBoolean(dataRow["club_only"].ToString()), (int)dataRow["icon_color"], (int)dataRow["icon_image"], (string)dataRow["page_layout"], (string)dataRow["page_headline"], (string)dataRow["page_teaser"], (string)dataRow["page_special"], (string)dataRow["page_text1"], (string)dataRow["page_text2"], (string)dataRow["page_text_details"], (string)dataRow["page_text_teaser"], (string)dataRow["page_link_description"], (string)dataRow["page_link_pagename"], ref hashtable));
                    }
                }
                if (dataTable4 != null)
                {
                    foreach (DataRow dataRow in dataTable4.Rows)
                    {
                        bool bool_ = false;
                        bool bool_2 = false;
                        if (dataRow["visible"].ToString() == "1")
                        {
                            bool_ = true;
                        }
                        if (dataRow["enabled"].ToString() == "1")
                        {
                            bool_2 = true;
                        }
                        this.dictionary_0.Add((int)dataRow["Id"], new CatalogPage((int)dataRow["Id"], (string)dataRow["link_name"], (int)dataRow["parent_id"], (string)dataRow["caption"], bool_, bool_2, (uint)dataRow["min_rank"], Essential.StringToBoolean(dataRow["club_only"].ToString()), (int)dataRow["icon_color"], (int)dataRow["icon_image"], (string)dataRow["page_layout"], (string)dataRow["page_headline"], (string)dataRow["page_teaser"], (string)dataRow["page_special"], (string)dataRow["page_text1"], (string)dataRow["page_text2"], (string)dataRow["page_text_details"], (string)dataRow["page_text_teaser"], (string)dataRow["page_link_description"], (string)dataRow["page_link_pagename"], ref hashtable));
                    }
                }
                if (dataTable2 != null)
                {
                    foreach (DataRow dataRow in dataTable2.Rows)
                    {
                        this.list_0.Add(new EcotronReward((uint)dataRow["Id"], (uint)dataRow["display_id"], (uint)dataRow["item_id"], (uint)dataRow["reward_level"]));
                    }
                }
                this.groupsDataMessage = GetGuildPage();
                Logging.WriteLine("completed!", ConsoleColor.Green);
                isLoading = false;
            }
		}
示例#20
0
        public void LoadBillboards(DatabaseClient dbClient)
        {
            Logging.Write("Loading Public Rooms Ads..");

            this.Billboards.Clear();
            DataTable mainokset = dbClient.ReadDataTable("SELECT * FROM publicroom_ads");
            if (mainokset != null)
            {
                foreach (DataRow mainostieto in mainokset.Rows)
                {
                    this.Billboards.Add(int.Parse(mainostieto["id"].ToString()), new Billboard(uint.Parse(mainostieto["room_id"].ToString()), mainostieto["image"].ToString(), mainostieto["url"].ToString()));
                }
                Logging.WriteLine("completed!", ConsoleColor.Green);
            }

        }
示例#21
0
		public void method_8(DatabaseClient class6_0)
		{
			Logging.Write("Loading Room Models..");
			this.Models.Clear();
			DataTable dataTable = class6_0.ReadDataTable("SELECT Id,door_x,door_y,door_z,door_dir,heightmap,public_items,club_only FROM room_models");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					string text = (string)dataRow["Id"];
					this.Models.Add(text, new RoomModel(text, (int)dataRow["door_x"], (int)dataRow["door_y"], (double)dataRow["door_z"], (int)dataRow["door_dir"], (string)dataRow["heightmap"], (string)dataRow["public_items"], Essential.StringToBoolean(dataRow["club_only"].ToString())));
				}
				Logging.WriteLine("completed!", ConsoleColor.Green);
			}
		}
示例#22
0
        internal void method_65(DatabaseClient class6_0)
        {
            try
            {
                Dictionary<uint, bool> dictionary = new Dictionary<uint, bool>();
                StringBuilder stringBuilder = new StringBuilder();
                if (this.list_14.Count > 0)
                {
                    foreach (RoomItem @class in this.list_14)
                    {

                        try
                        {
                            if (!dictionary.ContainsKey(@class.uint_0))
                            {

                                class6_0.AddParamWithValue(@class.uint_0 + "Extra1", @class.string_2);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra2", @class.string_3);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra3", @class.string_4);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra4", @class.string_5);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra5", @class.string_6);
                                stringBuilder.Append(string.Concat(new object[]
										{
											"DELETE FROM wired_items WHERE item_id = '",
											@class.uint_0,
											"' LIMIT 1; INSERT INTO wired_items (item_id,extra1,extra2,extra3,extra4,extra5) VALUES ('",
											@class.uint_0,
											"',@",
											@class.uint_0,
											"Extra1,@",
											@class.uint_0,
											"Extra2,@",
											@class.uint_0,
											"Extra3,@",
											@class.uint_0,
											"Extra4,@",
											@class.uint_0,
											"Extra5); "
										}));
                            }
                            dictionary.Add(@class.uint_0, true);

                        }
                        catch
                        {
                        }
                    }

                }
                if (this.list_15.Count > 0)
                {
                    foreach (RoomItem @class in this.list_15)
                    {

                        try
                        {
                            if (!dictionary.ContainsKey(@class.uint_0))
                            {

                                class6_0.AddParamWithValue(@class.uint_0 + "Extra1", @class.string_2);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra2", @class.string_3);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra3", @class.string_4);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra4", @class.string_5);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra5", @class.string_6);
                                stringBuilder.Append(string.Concat(new object[]
										{
											"DELETE FROM wired_items WHERE item_id = '",
											@class.uint_0,
											"' LIMIT 1; INSERT INTO wired_items (item_id,extra1,extra2,extra3,extra4,extra5) VALUES ('",
											@class.uint_0,
											"',@",
											@class.uint_0,
											"Extra1,@",
											@class.uint_0,
											"Extra2,@",
											@class.uint_0,
											"Extra3,@",
											@class.uint_0,
											"Extra4,@",
											@class.uint_0,
											"Extra5); "
										}));
                            }
                            dictionary.Add(@class.uint_0, true);

                        }
                        catch
                        {
                        }

                    }
                }
                if (this.list_16.Count > 0)
                {
                    foreach (RoomItem @class in this.list_16)
                    {

                        try
                        {
                            if (!dictionary.ContainsKey(@class.uint_0))
                            {

                                class6_0.AddParamWithValue(@class.uint_0 + "Extra1", @class.string_2);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra2", @class.string_3);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra3", @class.string_4);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra4", @class.string_5);
                                class6_0.AddParamWithValue(@class.uint_0 + "Extra5", @class.string_6);
                                stringBuilder.Append(string.Concat(new object[]
										{
											"DELETE FROM wired_items WHERE item_id = '",
											@class.uint_0,
											"' LIMIT 1; INSERT INTO wired_items (item_id,extra1,extra2,extra3,extra4,extra5) VALUES ('",
											@class.uint_0,
											"',@",
											@class.uint_0,
											"Extra1,@",
											@class.uint_0,
											"Extra2,@",
											@class.uint_0,
											"Extra3,@",
											@class.uint_0,
											"Extra4,@",
											@class.uint_0,
											"Extra5); "
										}));
                            }
                            dictionary.Add(@class.uint_0, true);
                        }

                        catch
                        {
                        }
                    }

                }
                dictionary.Clear();
                if (this.hashtable_3.Count > 0 || this.hashtable_1.Count > 0 || this.hashtable_2.Count > 0 || this.Boolean_4)
                {
                    foreach (RoomItem @class in this.hashtable_1.Values)
                    {
                        stringBuilder.Append(string.Concat(new object[]
						{
							"UPDATE items SET room_id = 0 WHERE Id = '",
							@class.uint_0,
							"' AND room_id = '",
							this.Id,
							"' LIMIT 1; "
						}));
                    }
                    this.hashtable_1.Clear();
                    IEnumerator enumerator2;
                    if (this.hashtable_3.Count > 0)
                    {
                        enumerator2 = this.hashtable_3.Values.GetEnumerator();
                        try
                        {
                            while (enumerator2.MoveNext())
                            {
                                RoomItem @class = (RoomItem)enumerator2.Current;
                                stringBuilder.Append("UPDATE items SET room_id = 0 WHERE Id = '" + @class.uint_0 + "' LIMIT 1; ");
                            }
                        }
                        finally
                        {
                            IDisposable disposable = enumerator2 as IDisposable;
                            if (disposable != null)
                            {
                                disposable.Dispose();
                            }
                        }
                        int num = 0;
                        int num2 = 0;
                        enumerator2 = this.hashtable_3.Values.GetEnumerator();
                        try
                        {
                            while (enumerator2.MoveNext())
                            {
                                RoomItem @class = (RoomItem)enumerator2.Current;
                                if (@class.Boolean_2)
                                {
                                    num2++;
                                }
                                else
                                {
                                    num++;
                                }
                            }
                        }
                        finally
                        {
                            IDisposable disposable = enumerator2 as IDisposable;
                            if (disposable != null)
                            {
                                disposable.Dispose();
                            }
                        }
                        if (num2 > 0)
                        {
                            enumerator2 = this.hashtable_3.Values.GetEnumerator();
                            try
                            {
                                while (enumerator2.MoveNext())
                                {
                                    RoomItem @class = (RoomItem)enumerator2.Current;
                                    if (@class.Boolean_2)
                                    {
                                        stringBuilder.Append(string.Concat(new object[]
										{
											"UPDATE items SET room_id = '",
											this.Id,
											"', base_item = '",
											@class.uint_2,
											", x = '",
											@class.GetX,
											"', y = '",
											@class.Int32_1,
											"', z = '",
											@class.Double_0.ToString().Replace(",", "."),
											"', rot = '",
											@class.int_3,
											"', wall_pos = '' WHERE Id = '",
											@class.uint_0,
											"' LIMIT 1; "
										}));

                                        if (!string.IsNullOrEmpty(@class.ExtraData))
                                        {
                                            class6_0.AddParamWithValue("extra_data" + @class.uint_0, @class.ExtraData);
                                            stringBuilder.Append(string.Concat(new object[]
                                            {
                                                "DELETE FROM items_extra_data WHERE item_id = '" + @class.uint_0 + "'; ",
                                                "INSERT INTO items_extra_data (item_id,extra_data) VALUES ('" + @class.uint_0 + "' , @extra_data" + @class.uint_0 + "); ",
                                            }));
                                        }
                                        else
                                        {
                                            stringBuilder.Append(string.Concat(new object[]
                                            {
                                                "DELETE FROM items_extra_data WHERE item_id = '" + @class.uint_0 + "'; "
                                            }));
                                        }
                                    }
                                }
                            }
                            finally
                            {
                                IDisposable disposable = enumerator2 as IDisposable;
                                if (disposable != null)
                                {
                                    disposable.Dispose();
                                }
                            }
                        }
                        if (num > 0)
                        {
                            enumerator2 = this.hashtable_3.Values.GetEnumerator();
                            try
                            {
                                while (enumerator2.MoveNext())
                                {
                                    RoomItem @class = (RoomItem)enumerator2.Current;
                                    if (@class.Boolean_1)
                                    {
                                        class6_0.AddParamWithValue("pos" + @class.uint_0, @class.string_7);
                                        stringBuilder.Append(string.Concat(new object[]
										{
											"UPDATE items SET room_id = '",
											this.Id,
											"', base_item = '",
											@class.uint_2,
											", x = '0', y = '0', z = '0', rot = '0', wall_pos = @pos",
											@class.uint_0,
											" WHERE Id = '",
											@class.uint_0,
											"' LIMIT 1; "
										}));

                                        if (!string.IsNullOrEmpty(@class.ExtraData))
                                        {
                                            class6_0.AddParamWithValue("extra_data" + @class.uint_0, @class.ExtraData);
                                            stringBuilder.Append(string.Concat(new object[]
                                            {
                                                "DELETE FROM items_extra_data WHERE item_id = '" + @class.uint_0 + "'; ",
                                                "INSERT INTO items_extra_data (item_id,extra_data) VALUES ('" + @class.uint_0 + "' , @extra_data" + @class.uint_0 + "); ",
                                            }));
                                        }
                                        else
                                        {
                                            stringBuilder.Append(string.Concat(new object[]
                                            {
                                                "DELETE FROM items_extra_data WHERE item_id = '" + @class.uint_0 + "'; "
                                            }));
                                        }
                                    }
                                }
                            }
                            finally
                            {
                                IDisposable disposable = enumerator2 as IDisposable;
                                if (disposable != null)
                                {
                                    disposable.Dispose();
                                }
                            }
                        }
                        this.hashtable_3.Clear();
                    }
                    enumerator2 = this.hashtable_2.Values.GetEnumerator();
                    try
                    {
                        while (enumerator2.MoveNext())
                        {
                            RoomItem @class = (RoomItem)enumerator2.Current;
                            stringBuilder.Append(string.Concat(new object[]
							{
								"UPDATE items SET x = '",
								@class.GetX,
								"', y = '",
								@class.Int32_1,
								"', z = '",
								@class.Double_0.ToString().Replace(",", "."),
								"', rot = '",
								@class.int_3,
								"', wall_pos = '' WHERE Id = '",
								@class.uint_0,
								"' LIMIT 1; "
							}));
                        }
                    }
                    finally
                    {
                        IDisposable disposable = enumerator2 as IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                    this.hashtable_2.Clear();
                    foreach (Pet current in this.GetPets())
                    {
                        if (current.DBState == DatabaseUpdateState.NeedsInsert)
                        {
                            class6_0.AddParamWithValue("petname" + current.PetId, current.Name);
                            class6_0.AddParamWithValue("petcolor" + current.PetId, current.Color);
                            class6_0.AddParamWithValue("petrace" + current.PetId, current.Race);
                            stringBuilder.Append(string.Concat(new object[]
							{
								"INSERT INTO `user_pets` VALUES ('",
								current.PetId,
								"', '",
								current.OwnerId,
								"', '",
								current.RoomId,
								"', @petname",
								current.PetId,
								", @petrace",
								current.PetId,
								", @petcolor",
								current.PetId,
								", '",
								current.Type,
								"', '",
								current.Expirience,
								"', '",
								current.Energy,
								"', '",
								current.Nutrition,
								"', '",
								current.Respect,
								"', '",
								current.CreationStamp,
								"', '",
								current.X,
								"', '",
								current.Y,
								"', '",
								current.Z,
								"');"
							}));
                        }
                        else
                        {
                            if (current.DBState == DatabaseUpdateState.NeedsUpdate)
                            {
                                stringBuilder.Append(string.Concat(new object[]
								{
									"UPDATE user_pets SET room_id = '",
									current.RoomId,
									"', expirience = '",
									current.Expirience,
									"', energy = '",
									current.Energy,
									"', nutrition = '",
									current.Nutrition,
									"', respect = '",
									current.Respect,
									"', x = '",
									current.X,
									"', y = '",
									current.Y,
									"', z = '",
									current.Z,
									"' WHERE Id = '",
									current.PetId,
									"' LIMIT 1; "
								}));
                            }
                        }
                        current.DBState = DatabaseUpdateState.Updated;
                    }
                }
                if (stringBuilder.Length > 0)
                {
                    class6_0.ExecuteQuery(stringBuilder.ToString());
                }
            }
            catch (Exception ex)
            {
                Logging.LogCriticalException(string.Concat(new object[]
				{
					"Error during saving furniture for room ",
					this.Id,
					". Stack: ",
					ex.ToString()
				}));
            }
        }
示例#23
0
        public void LoadMagicTiles(DatabaseClient dbClient)
        {
            Logging.Write("Loading Magic Tiles..");

            this.MagicTiles.Clear();
            DataTable magist = dbClient.ReadDataTable("SELECT * FROM room_magictiles");
            if (magist != null)
            {
                foreach (DataRow daatapankki in magist.Rows)
                {
                   // int MagiID = (int)dataRow["id"];
                    //uint HuoneId = (uint)dataRow["room_id"];
                    this.MagicTiles.Add(int.Parse(daatapankki["id"].ToString()), new MagicTile(uint.Parse(daatapankki["room_id"].ToString()), int.Parse(daatapankki["x"].ToString()), int.Parse(daatapankki["y"].ToString()), daatapankki["action"].ToString(), int.Parse(daatapankki["to_room"].ToString()), int.Parse(daatapankki["next_x"].ToString()), int.Parse(daatapankki["next_y"].ToString()), int.Parse(daatapankki["next_z"].ToString()), int.Parse(daatapankki["next_pos"].ToString())));
                }
                Logging.WriteLine("completed!", ConsoleColor.Green);
            }
			
        }
示例#24
0
		public void Initialize(DatabaseClient class6_0)
		{
			Logging.Write(EssentialEnvironment.GetExternalText("emu_loadroles"));
            this.ClearDictionaries();
			DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM ranks ORDER BY Id ASC;");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					this.dictionary_2.Add((uint)dataRow["Id"], dataRow["badgeid"].ToString());
				}
			}
			dataTable = class6_0.ReadDataTable("SELECT * FROM permissions_users ORDER BY userid ASC;");
            if (dataTable != null)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    List<string> list = new List<string>();
                    if (Essential.StringToBoolean(dataRow["cmd_update_settings"].ToString()))
                    {
                        list.Add("cmd_update_settings");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_bans"].ToString()))
                    {
                        list.Add("cmd_update_bans");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_bots"].ToString()))
                    {
                        list.Add("cmd_update_bots");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_catalogue"].ToString()))
                    {
                        list.Add("cmd_update_catalogue");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_navigator"].ToString()))
                    {
                        list.Add("cmd_update_navigator");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_items"].ToString()))
                    {
                        list.Add("cmd_update_items");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_award"].ToString()))
                    {
                        list.Add("cmd_award");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_coords"].ToString()))
                    {
                        list.Add("cmd_coords");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_override"].ToString()))
                    {
                        list.Add("cmd_override");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_coins"].ToString()))
                    {
                        list.Add("cmd_coins");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_pixels"].ToString()))
                    {
                        list.Add("cmd_pixels");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_ha"].ToString()))
                    {
                        list.Add("cmd_ha");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_hal"].ToString()))
                    {
                        list.Add("cmd_hal");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_freeze"].ToString()))
                    {
                        list.Add("cmd_freeze");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_enable"].ToString()))
                    {
                        list.Add("cmd_enable");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roommute"].ToString()))
                    {
                        list.Add("cmd_roommute");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_setspeed"].ToString()))
                    {
                        list.Add("cmd_setspeed");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_masscredits"].ToString()))
                    {
                        list.Add("cmd_masscredits");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_globalcredits"].ToString()))
                    {
                        list.Add("cmd_globalcredits");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_masspixels"].ToString()))
                    {
                        list.Add("cmd_masspixels");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_globalpixels"].ToString()))
                    {
                        list.Add("cmd_globalpixels");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roombadge"].ToString()))
                    {
                        list.Add("cmd_roombadge");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_massbadge"].ToString()))
                    {
                        list.Add("cmd_massbadge");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_userinfo"].ToString()))
                    {
                        list.Add("cmd_userinfo");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_userinfo_viewip"].ToString()))
                    {
                        list.Add("cmd_userinfo_viewip");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_shutdown"].ToString()))
                    {
                        list.Add("cmd_shutdown");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_givebadge"].ToString()))
                    {
                        list.Add("cmd_givebadge");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_removebadge"].ToString()))
                    {
                        list.Add("cmd_removebadge");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_summon"].ToString()))
                    {
                        list.Add("cmd_summon");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_invisible"].ToString()))
                    {
                        list.Add("cmd_invisible");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_ban"].ToString()))
                    {
                        list.Add("cmd_ban");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_superban"].ToString()))
                    {
                        list.Add("cmd_superban");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roomkick"].ToString()))
                    {
                        list.Add("cmd_roomkick");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roomalert"].ToString()))
                    {
                        list.Add("cmd_roomalert");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_mute"].ToString()))
                    {
                        list.Add("cmd_mute");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_unmute"].ToString()))
                    {
                        list.Add("cmd_unmute");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_alert"].ToString()))
                    {
                        list.Add("cmd_alert");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_motd"].ToString()))
                    {
                        list.Add("cmd_motd");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_kick"].ToString()))
                    {
                        list.Add("cmd_kick");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_filter"].ToString()))
                    {
                        list.Add("cmd_update_filter");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_permissions"].ToString()))
                    {
                        list.Add("cmd_update_permissions");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_sa"].ToString()))
                    {
                        list.Add("cmd_sa");
                    }
                    if (Essential.StringToBoolean(dataRow["receive_sa"].ToString()))
                    {
                        list.Add("receive_sa");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_ipban"].ToString()))
                    {
                        list.Add("cmd_ipban");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_spull"].ToString()))
                    {
                        list.Add("cmd_spull");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_disconnect"].ToString()))
                    {
                        list.Add("cmd_disconnect");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_achievements"].ToString()))
                    {
                        list.Add("cmd_update_achievements");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_update_texts"].ToString()))
                    {
                        list.Add("cmd_update_texts");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_teleport"].ToString()))
                    {
                        list.Add("cmd_teleport");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_points"].ToString()))
                    {
                        list.Add("cmd_points");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_masspoints"].ToString()))
                    {
                        list.Add("cmd_masspoints");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_globalpoints"].ToString()))
                    {
                        list.Add("cmd_globalpoints");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_empty"].ToString()))
                    {
                        list.Add("cmd_empty");
                    }
                    if (Essential.StringToBoolean(dataRow["ignore_roommute"].ToString()))
                    {
                        list.Add("ignore_roommute");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_anyroomrights"].ToString()))
                    {
                        list.Add("acc_anyroomrights");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_anyroomowner"].ToString()))
                    {
                        list.Add("acc_anyroomowner");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_supporttool"].ToString()))
                    {
                        list.Add("acc_supporttool");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_chatlogs"].ToString()))
                    {
                        list.Add("acc_chatlogs");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_enter_fullrooms"].ToString()))
                    {
                        list.Add("acc_enter_fullrooms");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_enter_anyroom"].ToString()))
                    {
                        list.Add("acc_enter_anyroom");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_restrictedrooms"].ToString()))
                    {
                        list.Add("acc_restrictedrooms");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_unkickable"].ToString()))
                    {
                        list.Add("acc_unkickable");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_unbannable"].ToString()))
                    {
                        list.Add("acc_unbannable");
                    }
                    if (Essential.StringToBoolean(dataRow["ignore_friendsettings"].ToString()))
                    {
                        list.Add("ignore_friendsettings");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_sql"].ToString()))
                    {
                        list.Add("wired_give_sql");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_badge"].ToString()))
                    {
                        list.Add("wired_give_badge");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_effect"].ToString()))
                    {
                        list.Add("wired_give_effect");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_award"].ToString()))
                    {
                        list.Add("wired_give_award");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_dance"].ToString()))
                    {
                        list.Add("wired_give_dance");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_send"].ToString()))
                    {
                        list.Add("wired_give_send");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_credits"].ToString()))
                    {
                        list.Add("wired_give_credits");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_pixels"].ToString()))
                    {
                        list.Add("wired_give_pixels");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_points"].ToString()))
                    {
                        list.Add("wired_give_points");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_rank"].ToString()))
                    {
                        list.Add("wired_give_rank");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_respect"].ToString()))
                    {
                        list.Add("wired_give_respect");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_handitem"].ToString()))
                    {
                        list.Add("wired_give_handitem");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_alert"].ToString()))
                    {
                        list.Add("wired_give_alert");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_roomusers"].ToString()))
                    {
                        list.Add("wired_cnd_roomusers");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userhasachievement"].ToString()))
                    {
                        list.Add("wired_cnd_userhasachievement");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userhasbadge"].ToString()))
                    {
                        list.Add("wired_cnd_userhasbadge");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userhasvip"].ToString()))
                    {
                        list.Add("wired_cnd_userhasvip");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userhaseffect"].ToString()))
                    {
                        list.Add("wired_cnd_userhaseffect");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userrank"].ToString()))
                    {
                        list.Add("wired_cnd_userrank");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_usercredits"].ToString()))
                    {
                        list.Add("wired_cnd_usercredits");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userpixels"].ToString()))
                    {
                        list.Add("wired_cnd_userpixels");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_userpoints"].ToString()))
                    {
                        list.Add("wired_cnd_userpoints");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_usergroups"].ToString()))
                    {
                        list.Add("wired_cnd_usergroups");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_wearing"].ToString()))
                    {
                        list.Add("wired_cnd_wearing");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_carrying"].ToString()))
                    {
                        list.Add("wired_cnd_carrying");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_give_wiredactived"].ToString()))
                    {
                        list.Add("wired_give_wiredactived");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_wiredactived"].ToString()))
                    {
                        list.Add("wired_cnd_wiredactived");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_unlimitedselects"].ToString()))
                    {
                        list.Add("wired_unlimitedselects");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_dance"].ToString()))
                    {
                        list.Add("cmd_dance");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_rave"].ToString()))
                    {
                        list.Add("cmd_rave");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roll"].ToString()))
                    {
                        list.Add("cmd_roll");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_control"].ToString()))
                    {
                        list.Add("cmd_control");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_makesay"].ToString()))
                    {
                        list.Add("cmd_makesay");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_sitdown"].ToString()))
                    {
                        list.Add("cmd_sitdown");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_lay"].ToString()))
                    {
                        list.Add("cmd_lay");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_push"].ToString()))
                    {
                        list.Add("cmd_push");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_pull"].ToString()))
                    {
                        list.Add("cmd_pull");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_flagme"].ToString()))
                    {
                        list.Add("cmd_flagme");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_mimic"].ToString()))
                    {
                        list.Add("cmd_mimic");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_moonwalk"].ToString()))
                    {
                        list.Add("cmd_moonwalk");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_follow"].ToString()))
                    {
                        list.Add("cmd_follow");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_handitem"].ToString()))
                    {
                        list.Add("cmd_handitem");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_startquestion"].ToString()))
                    {
                        list.Add("cmd_startquestion");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_vipha"].ToString()))
                    {
                        list.Add("cmd_vipha");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_spush"].ToString()))
                    {
                        list.Add("cmd_spush");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roomeffect"].ToString()))
                    {
                        list.Add("cmd_roomeffect");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_viphal"].ToString()))
                    {
                        list.Add("cmd_viphal");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_moveotheruserstodoor"].ToString()))
                    {
                        list.Add("acc_moveotheruserstodoor");
                    }
                    this.dictionary_0.Add((uint)dataRow["userid"], list);
                }
            }
			dataTable = class6_0.ReadDataTable("SELECT * FROM permissions_ranks ORDER BY rank ASC;");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					this.dictionary_3.Add((uint)dataRow["rank"], (int)dataRow["floodtime"]);
				}
				foreach (DataRow dataRow in dataTable.Rows)
				{
					List<string> list = new List<string>();
					if (Essential.StringToBoolean(dataRow["cmd_update_settings"].ToString()))
					{
						list.Add("cmd_update_settings");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_bans"].ToString()))
					{
						list.Add("cmd_update_bans");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_bots"].ToString()))
					{
						list.Add("cmd_update_bots");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_catalogue"].ToString()))
					{
						list.Add("cmd_update_catalogue");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_navigator"].ToString()))
					{
						list.Add("cmd_update_navigator");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_items"].ToString()))
					{
						list.Add("cmd_update_items");
					}
					if (Essential.StringToBoolean(dataRow["cmd_award"].ToString()))
					{
						list.Add("cmd_award");
					}
					if (Essential.StringToBoolean(dataRow["cmd_coords"].ToString()))
					{
						list.Add("cmd_coords");
					}
					if (Essential.StringToBoolean(dataRow["cmd_override"].ToString()))
					{
						list.Add("cmd_override");
					}
					if (Essential.StringToBoolean(dataRow["cmd_coins"].ToString()))
					{
						list.Add("cmd_coins");
					}
					if (Essential.StringToBoolean(dataRow["cmd_pixels"].ToString()))
					{
						list.Add("cmd_pixels");
					}
					if (Essential.StringToBoolean(dataRow["cmd_ha"].ToString()))
					{
						list.Add("cmd_ha");
					}
					if (Essential.StringToBoolean(dataRow["cmd_hal"].ToString()))
					{
						list.Add("cmd_hal");
					}
					if (Essential.StringToBoolean(dataRow["cmd_freeze"].ToString()))
					{
						list.Add("cmd_freeze");
					}
					if (Essential.StringToBoolean(dataRow["cmd_enable"].ToString()))
					{
						list.Add("cmd_enable");
					}
					if (Essential.StringToBoolean(dataRow["cmd_roommute"].ToString()))
					{
						list.Add("cmd_roommute");
					}
					if (Essential.StringToBoolean(dataRow["cmd_setspeed"].ToString()))
					{
						list.Add("cmd_setspeed");
					}
					if (Essential.StringToBoolean(dataRow["cmd_masscredits"].ToString()))
					{
						list.Add("cmd_masscredits");
					}
					if (Essential.StringToBoolean(dataRow["cmd_globalcredits"].ToString()))
					{
						list.Add("cmd_globalcredits");
					}
					if (Essential.StringToBoolean(dataRow["cmd_masspixels"].ToString()))
					{
						list.Add("cmd_masspixels");
					}
					if (Essential.StringToBoolean(dataRow["cmd_globalpixels"].ToString()))
					{
						list.Add("cmd_globalpixels");
					}
					if (Essential.StringToBoolean(dataRow["cmd_roombadge"].ToString()))
					{
						list.Add("cmd_roombadge");
					}
					if (Essential.StringToBoolean(dataRow["cmd_massbadge"].ToString()))
					{
						list.Add("cmd_massbadge");
					}
					if (Essential.StringToBoolean(dataRow["cmd_userinfo"].ToString()))
					{
						list.Add("cmd_userinfo");
					}
					if (Essential.StringToBoolean(dataRow["cmd_userinfo_viewip"].ToString()))
					{
						list.Add("cmd_userinfo_viewip");
					}
					if (Essential.StringToBoolean(dataRow["cmd_shutdown"].ToString()))
					{
						list.Add("cmd_shutdown");
					}
					if (Essential.StringToBoolean(dataRow["cmd_givebadge"].ToString()))
					{
						list.Add("cmd_givebadge");
					}
					if (Essential.StringToBoolean(dataRow["cmd_removebadge"].ToString()))
					{
						list.Add("cmd_removebadge");
					}
					if (Essential.StringToBoolean(dataRow["cmd_summon"].ToString()))
					{
						list.Add("cmd_summon");
					}
					if (Essential.StringToBoolean(dataRow["cmd_invisible"].ToString()))
					{
						list.Add("cmd_invisible");
					}
					if (Essential.StringToBoolean(dataRow["cmd_ban"].ToString()))
					{
						list.Add("cmd_ban");
					}
					if (Essential.StringToBoolean(dataRow["cmd_superban"].ToString()))
					{
						list.Add("cmd_superban");
					}
					if (Essential.StringToBoolean(dataRow["cmd_roomkick"].ToString()))
					{
						list.Add("cmd_roomkick");
					}
					if (Essential.StringToBoolean(dataRow["cmd_roomalert"].ToString()))
					{
						list.Add("cmd_roomalert");
					}
					if (Essential.StringToBoolean(dataRow["cmd_mute"].ToString()))
					{
						list.Add("cmd_mute");
					}
					if (Essential.StringToBoolean(dataRow["cmd_unmute"].ToString()))
					{
						list.Add("cmd_unmute");
					}
					if (Essential.StringToBoolean(dataRow["cmd_alert"].ToString()))
					{
						list.Add("cmd_alert");
					}
					if (Essential.StringToBoolean(dataRow["cmd_motd"].ToString()))
					{
						list.Add("cmd_motd");
					}
					if (Essential.StringToBoolean(dataRow["cmd_kick"].ToString()))
					{
						list.Add("cmd_kick");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_filter"].ToString()))
					{
						list.Add("cmd_update_filter");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_permissions"].ToString()))
					{
						list.Add("cmd_update_permissions");
					}
					if (Essential.StringToBoolean(dataRow["cmd_sa"].ToString()))
					{
						list.Add("cmd_sa");
					}
					if (Essential.StringToBoolean(dataRow["receive_sa"].ToString()))
					{
						list.Add("receive_sa");
					}
					if (Essential.StringToBoolean(dataRow["cmd_ipban"].ToString()))
					{
						list.Add("cmd_ipban");
					}
					if (Essential.StringToBoolean(dataRow["cmd_spull"].ToString()))
					{
						list.Add("cmd_spull");
					}
					if (Essential.StringToBoolean(dataRow["cmd_disconnect"].ToString()))
					{
						list.Add("cmd_disconnect");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_achievements"].ToString()))
					{
						list.Add("cmd_update_achievements");
					}
					if (Essential.StringToBoolean(dataRow["cmd_update_texts"].ToString()))
					{
						list.Add("cmd_update_texts");
					}
					if (Essential.StringToBoolean(dataRow["cmd_teleport"].ToString()))
					{
						list.Add("cmd_teleport");
					}
					if (Essential.StringToBoolean(dataRow["cmd_points"].ToString()))
					{
						list.Add("cmd_points");
					}
					if (Essential.StringToBoolean(dataRow["cmd_masspoints"].ToString()))
					{
						list.Add("cmd_masspoints");
					}
					if (Essential.StringToBoolean(dataRow["cmd_globalpoints"].ToString()))
					{
						list.Add("cmd_globalpoints");
					}
					if (Essential.StringToBoolean(dataRow["cmd_empty"].ToString()))
					{
						list.Add("cmd_empty");
					}
					if (Essential.StringToBoolean(dataRow["ignore_roommute"].ToString()))
					{
						list.Add("ignore_roommute");
					}
					if (Essential.StringToBoolean(dataRow["acc_anyroomrights"].ToString()))
					{
						list.Add("acc_anyroomrights");
					}
					if (Essential.StringToBoolean(dataRow["acc_anyroomowner"].ToString()))
					{
						list.Add("acc_anyroomowner");
					}
					if (Essential.StringToBoolean(dataRow["acc_supporttool"].ToString()))
					{
						list.Add("acc_supporttool");
					}
					if (Essential.StringToBoolean(dataRow["acc_chatlogs"].ToString()))
					{
						list.Add("acc_chatlogs");
					}
					if (Essential.StringToBoolean(dataRow["acc_enter_fullrooms"].ToString()))
					{
						list.Add("acc_enter_fullrooms");
					}
					if (Essential.StringToBoolean(dataRow["acc_enter_anyroom"].ToString()))
					{
						list.Add("acc_enter_anyroom");
					}
					if (Essential.StringToBoolean(dataRow["acc_restrictedrooms"].ToString()))
					{
						list.Add("acc_restrictedrooms");
					}
					if (Essential.StringToBoolean(dataRow["acc_unkickable"].ToString()))
					{
						list.Add("acc_unkickable");
					}
					if (Essential.StringToBoolean(dataRow["acc_unbannable"].ToString()))
					{
						list.Add("acc_unbannable");
					}
					if (Essential.StringToBoolean(dataRow["ignore_friendsettings"].ToString()))
					{
						list.Add("ignore_friendsettings");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_sql"].ToString()))
					{
						list.Add("wired_give_sql");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_badge"].ToString()))
					{
						list.Add("wired_give_badge");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_effect"].ToString()))
					{
						list.Add("wired_give_effect");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_award"].ToString()))
					{
						list.Add("wired_give_award");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_dance"].ToString()))
					{
						list.Add("wired_give_dance");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_send"].ToString()))
					{
						list.Add("wired_give_send");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_credits"].ToString()))
					{
						list.Add("wired_give_credits");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_pixels"].ToString()))
					{
						list.Add("wired_give_pixels");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_points"].ToString()))
					{
						list.Add("wired_give_points");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_rank"].ToString()))
					{
						list.Add("wired_give_rank");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_respect"].ToString()))
					{
						list.Add("wired_give_respect");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_handitem"].ToString()))
					{
						list.Add("wired_give_handitem");
					}
					if (Essential.StringToBoolean(dataRow["wired_give_alert"].ToString()))
					{
						list.Add("wired_give_alert");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_roomusers"].ToString()))
					{
						list.Add("wired_cnd_roomusers");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userhasachievement"].ToString()))
					{
						list.Add("wired_cnd_userhasachievement");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userhasbadge"].ToString()))
					{
						list.Add("wired_cnd_userhasbadge");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userhasvip"].ToString()))
					{
						list.Add("wired_cnd_userhasvip");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userhaseffect"].ToString()))
					{
						list.Add("wired_cnd_userhaseffect");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userrank"].ToString()))
					{
						list.Add("wired_cnd_userrank");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_usercredits"].ToString()))
					{
						list.Add("wired_cnd_usercredits");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userpixels"].ToString()))
					{
						list.Add("wired_cnd_userpixels");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_userpoints"].ToString()))
					{
						list.Add("wired_cnd_userpoints");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_usergroups"].ToString()))
					{
						list.Add("wired_cnd_usergroups");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_wearing"].ToString()))
					{
						list.Add("wired_cnd_wearing");
					}
					if (Essential.StringToBoolean(dataRow["wired_cnd_carrying"].ToString()))
					{
						list.Add("wired_cnd_carrying");
					}
                    if (Essential.StringToBoolean(dataRow["wired_give_wiredactived"].ToString()))
                    {
                        list.Add("wired_give_wiredactived");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_cnd_wiredactived"].ToString()))
                    {
                        list.Add("wired_cnd_wiredactived");
                    }
                    if (Essential.StringToBoolean(dataRow["wired_unlimitedselects"].ToString()))
                    {
                        list.Add("wired_unlimitedselects");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_dance"].ToString()))
                    {
                        list.Add("cmd_dance");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_rave"].ToString()))
                    {
                        list.Add("cmd_rave");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roll"].ToString()))
                    {
                        list.Add("cmd_roll");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_control"].ToString()))
                    {
                        list.Add("cmd_control");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_makesay"].ToString()))
                    {
                        list.Add("cmd_makesay");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_sitdown"].ToString()))
                    {
                        list.Add("cmd_sitdown");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_lay"].ToString()))
                    {
                        list.Add("cmd_lay");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_push"].ToString()))
                    {
                        list.Add("cmd_push");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_pull"].ToString()))
                    {
                        list.Add("cmd_pull");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_flagme"].ToString()))
                    {
                        list.Add("cmd_flagme");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_mimic"].ToString()))
                    {
                        list.Add("cmd_mimic");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_moonwalk"].ToString()))
                    {
                        list.Add("cmd_moonwalk");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_follow"].ToString()))
                    {
                        list.Add("cmd_follow");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_handitem"].ToString()))
                    {
                        list.Add("cmd_handitem");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_startquestion"].ToString()))
                    {
                        list.Add("cmd_startquestion");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_vipha"].ToString()))
                    {
                        list.Add("cmd_vipha");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_spush"].ToString()))
                    {
                        list.Add("cmd_spush");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_roomeffect"].ToString()))
                    {
                        list.Add("cmd_roomeffect");
                    }
                    if (Essential.StringToBoolean(dataRow["cmd_viphal"].ToString()))
                    {
                        list.Add("cmd_viphal");
                    }
                    if (Essential.StringToBoolean(dataRow["acc_moveotheruserstodoor"].ToString()))
                    {
                        list.Add("acc_moveotheruserstodoor");
                    }
					this.dictionary_1.Add((uint)dataRow["rank"], list);
				}
			}

			dataTable = class6_0.ReadDataTable("SELECT * FROM permissions_vip;");

			if (dataTable != null)
			{
				ServerConfiguration.UnknownBoolean1 = false;
				ServerConfiguration.UnknownBoolean2 = false;
				ServerConfiguration.UnknownBoolean3 = false;
				ServerConfiguration.UnknownBoolean7 = false;
				ServerConfiguration.UnknownBoolean8 = false;
				ServerConfiguration.UnknownBoolean9 = false;

				foreach (DataRow dataRow in dataTable.Rows)
				{
					if (Essential.StringToBoolean(dataRow["cmdPush"].ToString()))
						ServerConfiguration.UnknownBoolean1 = true;

					if (Essential.StringToBoolean(dataRow["cmdPull"].ToString()))
						ServerConfiguration.UnknownBoolean2 = true;

					if (Essential.StringToBoolean(dataRow["cmdFlagme"].ToString()))
						ServerConfiguration.UnknownBoolean3 = true;

					if (Essential.StringToBoolean(dataRow["cmdMimic"].ToString()))
						ServerConfiguration.UnknownBoolean7 = true;

					if (Essential.StringToBoolean(dataRow["cmdMoonwalk"].ToString()))
						ServerConfiguration.UnknownBoolean8 = true;

					if (Essential.StringToBoolean(dataRow["cmdFollow"].ToString()))
						ServerConfiguration.UnknownBoolean9 = true;
				}
			}
			this.dictionary_5.Clear();
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_free"), 0);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_sit"), 1);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_down"), 2);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_here"), 3);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_beg"), 4);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_play_dead"), 5);
			this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_stay"), 6);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_follow"), 7);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_stand"), 8);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_jump"), 9);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_speak"), 10);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_play"), 11);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_silent"), 12);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_nest"), 13);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_drink"), 14);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_follow_left"), 15);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_follow_right"), 16);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_play_football"), 17);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_move_forwar"), 24);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_turn_left"), 25);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_turn_right"), 26);
            this.dictionary_5.Add(EssentialEnvironment.GetExternalText("pet_cmd_eat"), 43);
			this.dictionary_4.Clear();
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_about_name"), 1);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_alert_name"), 2);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_award_name"), 3);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_ban_name"), 4);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_buy_name"), 5);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_coins_name"), 6);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_coords_name"), 7);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_disablediagonal_name"), 8);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_emptyitems_name"), 9);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_empty_name"), 10);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_enable_name"), 11);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_flagme_name"), 12);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_follow_name"), 13);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_freeze_name"), 14);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_givebadge_name"), 15);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_globalcredits_name"), 16);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_globalpixels_name"), 17);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_globalpoints_name"), 18);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_hal_name"), 19);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_ha_name"), 20);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_invisible_name"), 21);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_ipban_name"), 22);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_kick_name"), 23);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_massbadge_name"), 24);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_masscredits_name"), 25);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_masspixels_name"), 26);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_masspoints_name"), 27);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_mimic_name"), 28);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_moonwalk_name"), 29);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_motd_name"), 30);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_mute_name"), 31);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_override_name"), 32);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_pickall_name"), 33);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_pixels_name"), 34);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_points_name"), 35);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_pull_name"), 36);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_push_name"), 37);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_redeemcreds_name"), 38);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_removebadge_name"), 39);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_ride_name"), 40);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roomalert_name"), 41);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roombadge_name"), 42);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roomkick_name"), 43);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roommute_name"), 44);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_sa_name"), 45);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_setmax_name"), 46);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_setspeed_name"), 47);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_shutdown_name"), 48);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_spull_name"), 49);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_summon_name"), 50);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_superban_name"), 51);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_teleport_name"), 52);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_unload_name"), 53);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_unmute_name"), 54);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_achievements_name"), 55);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_bans_name"), 56);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_bots_name"), 57);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_catalogue_name"), 58);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_filter_name"), 59);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_items_name"), 60);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_navigator_name"), 61);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_permissions_name"), 62);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_settings_name"), 63);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_userinfo_name"), 64);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_update_texts_name"), 65);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_disconnect_name"), 66);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_commands_name"), 67);
			this.dictionary_4.Add("about", 68);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roominfo_name"), 69);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_dance_name"), 71);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_rave_name"), 72);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roll_name"), 73);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_control_name"), 74);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_makesay_name"), 75);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_sitdown_name"), 76);
            this.dictionary_4.Add("exe", 77);
			this.dictionary_4.Add("giveitem", 79);
			this.dictionary_4.Add("sit", 80);
			this.dictionary_4.Add("dismount", 81);
			this.dictionary_4.Add("getoff", 82);
			this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_emptypets_name"), 83);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_startquestion_name"), 94);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_lay_name"), 86);
           // this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_handitem_name"), 85);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_spush_name"), 88);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_roomeffect_name"), 91);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_redeempixel_name"), 95);
            this.dictionary_4.Add(EssentialEnvironment.GetExternalText("cmd_redeemshell_name"), 96);
            this.dictionary_4.Add("kuss", 97);
            if (config.getData("cmd.sellroom.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.sellroom.name"), 100);

            if (config.getData("cmd.buyroom.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.buyroom.name"), 101);

            if (config.getData("cmd.handitem.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.handitem.name"), 104);

            if (config.getData("cmd.hipster.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.hipster.name"), 105);

            if (config.getData("cmd.noob.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.noob.name"), 106);

            if (config.getData("cmd.bkg.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.bkg.name"), 107);

            if (config.getData("cmd.drive.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.drive.name"), 109);

            if (config.getData("cmd.roomalert.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roomalert.name"), 110);

            if (config.getData("cmd.makemedance.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.makemedance.name"), 111);

            if (config.getData("cmd.rotate.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.rotate.name"), 112);

            if (config.getData("cmd.faceless.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.faceless.name"), 114);

            if (config.getData("cmd.roomfreeze.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roomfreeze.name"), 115);

            if (config.getData("cmd.habnam.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.habnam.name"), 120);

            if (config.getData("cmd.super.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.super.name"), 121);

            if (config.getData("cmd.laydown.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.laydown.name"), 122);


            if (config.getData("cmd.afk.enabled") == "1")
            {
                this.dictionary_4.Add(config.getData("cmd.afk.name").Split('|')[0], 124);
                this.dictionary_4.Add(config.getData("cmd.afk.name").Split('|')[1], 124);
            }
            if (config.getData("cmd.cpu.enabled") == "1")
                this.dictionary_4.Add("cpu", 128);
            if (config.getData("cmd.slap.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.slap.name"), 131);
            if (config.getData("cmd.miau.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.miau.name"), 123);
            if (config.getData("cmd.staff.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.staff.name"), 132);
            if (config.getData("cmd.howmanyrooms.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.howmanyrooms.name"), 133);
            if (config.getData("cmd.protect.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.protect.name"), 134);
            if (config.getData("cmd.trade.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.trade.name"), 135);
            if (config.getData("cmd.werber.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.werber.name"), 136);
            if (config.getData("cmd.customhotelalert.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.customhotelalert.name"), 137);
            if (config.getData("cmd.toggletrade.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.toggletrade.name"), 138);
            if (config.getData("cmd.eingang.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.eingang.name"), 139);
            if (config.getData("cmd.homeroom.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.homeroom.name"), 140);
            if (config.getData("cmd.infocenter.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.infocenter.name"), 141);
            if (config.getData("cmd.petcmds.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.petcmds.name"), 142);
            if (config.getData("cmd.eventha.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.eventha.name"), 143);
            if (config.getData("cmd.backup.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.backup.name"), 144);
            if (config.getData("cmd.emptybots.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.emptybots.name"), 145);
            if (config.getData("cmd.looktome.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.looktome.name"), 146);
            if (config.getData("cmd.stand.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.stand.name"), 147);
            if (config.getData("cmd.mutepets.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.mutepets.name"), 148);
            if (config.getData("cmd.mutebots.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.mutebots.name"), 149);
            if (config.getData("cmd.kickpets.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.kickpets.name"), 150);
            if (config.getData("cmd.kickbots.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.kickbots.name"), 151);
            if (config.getData("cmd.roompush.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roompush.name"), 152);
            if (config.getData("cmd.roompull.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roompull.name"), 153);
            if (config.getData("cmd.roomenable.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roomenable.name"), 154);
            if (config.getData("cmd.roomrespect.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.roomrespect.name"), 155);
            if (config.getData("cmd.disablegiftalerts.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.disablegiftalerts.name"), 156);
            if (config.getData("cmd.disablemimic.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.disablemimic.name"), 157);
            if (config.getData("cmd.deletegroup.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.deletegroup.name"), 158);
            if (config.getData("cmd.enablewalkunder.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.enablewalkunder.name"), 159);
            if (config.getData("cmd.disablewalkunder.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.disablewalkunder.name"), 160);
            if (config.getData("cmd.aws.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.aws.name"), 161);
            if (config.getData("cmd.hug.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.hug.name"), 162);
            if (config.getData("cmd.punch.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.punch.name"), 163);
            if (config.getData("cmd.eventwin.enabled") == "1")
                this.dictionary_4.Add(config.getData("cmd.eventwin.name"), 164);
			Logging.WriteLine("completed!", ConsoleColor.Green);
		}
示例#25
0
		public void method_0(DatabaseClient class6_0)
		{
			this.dataTable_0 = class6_0.ReadDataTable("SELECT * FROM group_memberships WHERE userid = " + this.Id);
			if (this.dataTable_0 != null)
			{
				foreach (DataRow dataRow in this.dataTable_0.Rows)
				{
					GroupsManager @class = Groups.GetGroupById((int)dataRow["groupid"]);
					if (@class == null)
					{
						DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM groups WHERE Id = " + (int)dataRow["groupid"] + " LIMIT 1;");
						IEnumerator enumerator2 = dataTable.Rows.GetEnumerator();
						try
						{
							while (enumerator2.MoveNext())
							{
								DataRow dataRow2 = (DataRow)enumerator2.Current;
								if (!Groups.GroupsManager.ContainsKey((int)dataRow2["Id"]))
								{
									Groups.GroupsManager.Add((int)dataRow2["Id"], new GroupsManager((int)dataRow2["Id"], dataRow2, class6_0));
								}
							}
							continue;
						}
						finally
						{
							IDisposable disposable = enumerator2 as IDisposable;
							if (disposable != null)
							{
								disposable.Dispose();
							}
						}
					}
					if ([email protected]((int)this.Id))
					{
                        @class.JoinGroup((int)this.Id);
					}
				}
				int num = class6_0.ReadInt32("SELECT groupid FROM user_stats WHERE Id = " + this.Id + " LIMIT 1");
				GroupsManager class2 = Groups.GetGroupById(num);
				if (class2 != null)
				{
                    this.FavouriteGroup = num;
				}
				else
				{
                    this.FavouriteGroup = 0;
				}
			}
			else
			{
                this.FavouriteGroup = 0;
			}
		}
示例#26
0
		public void Initialize(DatabaseClient class6_0)
		{
            if (!isLoading)
            {
                isLoading = true;
                Logging.Write("Loading Items..");
                this.dictionary_0 = new Dictionary<uint, Item>();
                // this.FurnitureAliases = new List<string>();

                DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM furniture;");
                //  DataTable dataTable2 = class6_0.ReadDataTable("SELECT * FROM furniture_aliases WHERE branding_enabled = '1';");
                if (dataTable != null)
                {
                    foreach (DataRow dataRow in dataTable.Rows)
                    {
                        try
                        {
                            this.dictionary_0.Add((uint)dataRow["Id"], new Item((uint)dataRow["Id"], (int)dataRow["sprite_id"], (string)dataRow["public_name"], (string)dataRow["item_name"], (string)dataRow["type"], (int)dataRow["width"], (int)dataRow["length"], (double)dataRow["stack_height"], Essential.StringToBoolean(dataRow["can_stack"].ToString()), Essential.StringToBoolean(dataRow["is_walkable"].ToString()), Essential.StringToBoolean(dataRow["can_sit"].ToString()), Essential.StringToBoolean(dataRow["allow_recycle"].ToString()), Essential.StringToBoolean(dataRow["allow_trade"].ToString()), Essential.StringToBoolean(dataRow["allow_marketplace_sell"].ToString()), Essential.StringToBoolean(dataRow["allow_gift"].ToString()), Essential.StringToBoolean(dataRow["allow_inventory_stack"].ToString()), (string)dataRow["interaction_type"], (int)dataRow["interaction_modes_count"], (string)dataRow["vending_ids"], dataRow["height_adjustable"].ToString(), Convert.ToByte((int)dataRow["EffectF"]), Convert.ToByte((int)dataRow["EffectM"]), Essential.StringToBoolean(dataRow["HeightOverride"].ToString())));
                        }
                        catch (Exception e)
                        {
                            Logging.WriteLine("Could not load item #" + (uint)dataRow["Id"] + ", please verify the data is okay.");
                            Logging.LogItemError(e.Message);
                        }
                    }
                }
                /* if (dataTable2 != null)
                 {
                     foreach (DataRow dataRow in dataTable2.Rows)
                     {
                         try
                         {
                             this.FurnitureAliases.Add((string)dataRow["item_name"]);
                         }
                         catch (Exception e)
                         {
                             Logging.WriteLine("Could not load furniture alias " + (string)dataRow["item_name"] + ".");
                             Logging.LogItemError(e.Message);
                         }
                     }
                 }
                 * */
                Logging.WriteLine("completed!", ConsoleColor.Green);
                /*Logging.smethod_0("Loading Soundtracks.."); //OMA LUOTU :3
                this.dictionary_1 = new Dictionary<int, Soundtrack>();
                DataTable dataTable2 = class6_0.ReadDataTable("SELECT * FROM soundtracks;");
                if (dataTable2 != null)
                {
                    foreach (DataRow dataRow in dataTable2.Rows)
                    {
                        try
                        {
                            this.dictionary_1.Add((int)dataRow["Id"], new Soundtrack((int)dataRow["Id"], (string)dataRow["name"], (string)dataRow["author"], (string)dataRow["track"], (int)dataRow["length"]));
                        }
                        catch (Exception)
                        {
                            Logging.WriteLine("Could not load item #" + (uint)dataRow["Id"] + ", please verify the data is okay.");
                        }
                    }
                }
                Logging.WriteLine("completed!", ConsoleColor.Green);*/
                Logging.Write("Loading Soundtracks..");
                SongManager.Initialize();
                Logging.WriteLine("completed!", ConsoleColor.Green);
                isLoading = false;
            }
		}
示例#27
0
		internal void method_1(DatabaseClient class6_0)
		{
			this.OwnedRooms.Clear();
			class6_0.AddParamWithValue("name", this.Username);
			DataTable dataTable = class6_0.ReadDataTable("SELECT * FROM rooms WHERE owner = @name ORDER BY Id ASC");
			foreach (DataRow dataRow in dataTable.Rows)
			{
				this.OwnedRooms.Add(Essential.GetGame().GetRoomManager().method_17((uint)dataRow["Id"], dataRow));
			}
		}
		internal void SavePets(DatabaseClient dbClient, bool consoleOutput)
		{
			try
			{
				if (this.list_1.Count > 0 || this.hashtable_1.Count > 0 || this.Pets.Count > 0)
				{
					StringBuilder stringBuilder = new StringBuilder();

					foreach (Pet pet in Pets.Values)
					{
						if (pet.DBState == DatabaseUpdateState.NeedsInsert)
						{
							dbClient.AddParamWithValue("petname" + pet.PetId, pet.Name);
							dbClient.AddParamWithValue("petcolor" + pet.PetId, pet.Color);
							dbClient.AddParamWithValue("petrace" + pet.PetId, pet.Race);

							stringBuilder.Append(string.Concat(new object[]
							{
								"INSERT INTO `user_pets` VALUES ('",
								pet.PetId,
								"', '",
								pet.OwnerId,
								"', '",
								pet.RoomId,
								"', @petname",
								pet.PetId,
								", @petrace",
								pet.PetId,
								", @petcolor",
								pet.PetId,
								", '",
								pet.Type,
								"', '",
								pet.Expirience,
								"', '",
								pet.Energy,
								"', '",
								pet.Nutrition,
								"', '",
								pet.Respect,
								"', '",
								pet.CreationStamp,
								"', '",
								pet.X,
								"', '",
								pet.Y,
								"', '",
								pet.Z,
								"');"
							}));
						}
						else
						{
							if (pet.DBState == DatabaseUpdateState.NeedsUpdate)
							{
								stringBuilder.Append(string.Concat(new object[]
								{
									"UPDATE user_pets SET room_id = '",
									pet.RoomId,
									"', expirience = '",
									pet.Expirience,
									"', energy = '",
									pet.Energy,
									"', nutrition = '",
									pet.Nutrition,
									"', respect = '",
									pet.Respect,
									"', x = '",
									pet.X,
									"', y = '",
									pet.Y,
									"', z = '",
									pet.Z,
									"' WHERE Id = '",
									pet.PetId,
									"' LIMIT 1; "
								}));
							}
						}

						pet.DBState = DatabaseUpdateState.Updated;
					}

					if (stringBuilder.Length > 0)
					{
						dbClient.ExecuteQuery(stringBuilder.ToString());
					}
				}

				if (consoleOutput)
				{
					Console.WriteLine("Inventory for user: "******" saved.");
				}
			}
			catch (Exception ex)
			{
                Logging.LogCacheError("FATAL ERROR DURING DB UPDATE: " + ex.ToString());
			}
		}