namespace  { using ; using ; using †; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Runtime.InteropServices; using System.Text; using System.Threading; internal static class  { private static Hashtable ; private static Hashtable ; public static bool (string pageName) { return .ContainsKey(.ContainsKey(pageName)); } private static void –(int pageID) { DataRow row; “ “; using (“ = „..ž()) { row = “.Š("SELECT indexname,minrank,displayname,style_layout,img_header,img_side,label_description,label_misc,label_moredetails FROM catalogue_pages WHERE indexid = '" + pageID + "' LIMIT 1"); } if ((pageID <= 0) || (row.Table.Rows.Count != 0)) { DataTable table; object[] itemArray = row.ItemArray; string[] strArray = new string[itemArray.Length]; for (int i = 0; i < strArray.Length; i++) { strArray[i] = itemArray[i].ToString(); } string key = ""; StringBuilder builder = new StringBuilder(); .  = new .(); if (pageID > 0) { key = strArray[0]; . = strArray[2]; . = Convert.ToByte(bool.Parse(strArray[1])); builder.Append(string.Concat(new object[] { "i:", key, Convert.ToChar(13), "n:", strArray[2], Convert.ToChar(13), "l:", strArray[3], Convert.ToChar(13) })); if (strArray[4] != "") { builder.Append("g:" + strArray[4] + Convert.ToChar(13)); } if (strArray[5] != "") { builder.Append("e:" + strArray[5] + Convert.ToChar(13)); } if (strArray[6] != "") { builder.Append("h:" + strArray[6] + Convert.ToChar(13)); } if (strArray[8] != "") { builder.Append("w:" + strArray[8] + Convert.ToChar(13)); } if (strArray[7] != "") { string[] strArray2 = strArray[7].Split(new char[] { Convert.ToChar(13) }); for (int j = 0; j < strArray2.Length; j++) { builder.Append(strArray2[j] + Convert.ToChar(13)); } } } using (“ = „..ž()) { table = “.("SELECT tid, typeid, length, width, catalogue_cost, door, tradeable, recycleable, catalogue_name, catalogue_description, name_cct, colour, top FROM catalogue_items WHERE catalogue_id_page = '" + pageID + "' ORDER BY catalogue_id_index ASC"); } int count = table.Rows.Count; int[] numArray = new int[count]; int[] numArray2 = new int[count]; int[] numArray3 = new int[count]; int[] numArray4 = new int[count]; int[] numArray5 = new int[count]; int[] numArray6 = new int[count]; int[] numArray7 = new int[count]; int[] numArray8 = new int[count]; string[] strArray3 = new string[count]; string[] strArray4 = new string[count]; string[] strArray5 = new string[count]; string[] strArray6 = new string[count]; string[] strArray7 = new string[count]; int index = 0; foreach (DataRow row2 in table.Rows) { numArray[index] = Convert.ToInt32(row2["tid"]); numArray2[index] = Convert.ToInt32(row2["typeid"]); numArray3[index] = Convert.ToInt32(row2["length"]); numArray4[index] = Convert.ToInt32(row2["width"]); numArray5[index] = Convert.ToInt32(row2["catalogue_cost"]); numArray6[index] = Convert.ToInt32(row2["door"]); numArray7[index] = Convert.ToInt32(row2["tradeable"]); numArray8[index] = Convert.ToInt32(row2["recycleable"]); strArray3[index] = Convert.ToString(row2["catalogue_name"]); strArray4[index] = Convert.ToString(row2["catalogue_description"]); strArray5[index] = Convert.ToString(row2["name_cct"]); strArray6[index] = Convert.ToString(row2["colour"]); strArray7[index] = Convert.ToString(row2["top"]); index++; } for (index = 0; index < numArray.Length; index++) { if (–.(strArray5[index], 0, 4) != "deal") { .Add(numArray[index], new (strArray5[index], Convert.ToByte(numArray2[index]), strArray6[index], numArray3[index], numArray4[index], double.Parse(strArray7[index]), numArray6[index] == 1, numArray7[index] == 1, numArray8[index] == 1)); if (pageID != -1) { builder.Append(string.Concat(new object[] { "p:", strArray3[index], Convert.ToChar(9), strArray4[index], Convert.ToChar(9), numArray5[index], Convert.ToChar(9), Convert.ToChar(9) })); if (numArray2[index] == 0) { builder.Append("i"); } else { builder.Append("s"); } builder.Append(Convert.ToChar(9) + strArray5[index] + Convert.ToChar(9)); if (numArray2[index] == 0) { builder.Append(Convert.ToChar(9)); } else { builder.Append("0" + Convert.ToChar(9)); } if (numArray2[index] == 0) { builder.Append(Convert.ToChar(9)); } else { builder.Append(string.Concat(new object[] { numArray3[index], ",", numArray4[index], Convert.ToChar(9) })); } builder.Append(strArray5[index] + Convert.ToChar(9)); if (numArray2[index] > 0) { builder.Append(strArray6[index]); } builder.Append(Convert.ToChar(13)); } } else { int num5 = int.Parse(strArray5[index].Substring(4)); using (“ = „..ž()) { table = “.("SELECT tid, amount FROM catalogue_deals WHERE id = '" + num5 + "'"); } count = table.Rows.Count; int[] numArray9 = new int[count]; int[] numArray10 = new int[count]; int num6 = 0; foreach (DataRow row2 in table.Rows) { numArray9[num6] = Convert.ToInt32(row2["tid"]); numArray10[num6] = Convert.ToInt32(row2["amount"]); num6++; } builder.Append(string.Concat(new object[] { "p:", strArray3[index], Convert.ToChar(9), strArray4[index], Convert.ToChar(9), numArray5[index], Convert.ToChar(9), Convert.ToChar(9), "d" })); builder.Append(Convert.ToChar(9), 4); builder.Append(string.Concat(new object[] { "deal", num5, Convert.ToChar(9), Convert.ToChar(9), numArray9.Length, Convert.ToChar(9) })); for (int k = 0; k < numArray9.Length; k++) { using (“ = „..ž()) { row = “.Š("SELECT name_cct, colour FROM catalogue_items WHERE tid = '" + numArray9[k] + "' LIMIT 1"); } string str2 = Convert.ToString(row["name_cct"]); string str3 = Convert.ToString(row["colour"]); builder.Append(string.Concat(new object[] { str2, Convert.ToChar(9), numArray10[k], Convert.ToChar(9), str3, Convert.ToChar(9) })); } } } if (pageID != -1) { . = builder.ToString(); .Add(key, ); } } } public static string —(byte userRank) { try { DataColumn column; StringBuilder builder = new StringBuilder(); using (“ “ = „..ž()) { column = “.‹("SELECT indexname FROM catalogue_pages WHERE minrank <= '" + userRank + "' ORDER BY indexid ASC"); } string[] strArray = ’.Š(column); for (int i = 0; i < strArray.Length; i++) { if (.ContainsKey(strArray[i])) { builder.Append(string.Concat(new object[] { strArray[i], Convert.ToChar(9), (() [strArray[i]])., Convert.ToChar(13) })); } } return builder.ToString(); } catch { return Convert.ToChar(13).ToString(); } } public static string ˜(string pageName, byte userRank) { try { .  = (.) [pageName]; if (userRank < .) { return "holo.cast.catalogue.access_denied"; } return .; } catch { return "cast_catalogue.access_denied"; } } public static void ™(int templateID, int receiverID, int roomID, string decorID, int presentBoxID, int teleportID1) { int num; “ “; string input = (templateID).; bool flag = true; string key = input; if (key != null) { int num5; if (. == null) { Dictionary dictionary1 = new Dictionary(0x11); dictionary1.Add("landscape", 0); dictionary1.Add("wallpaper", 1); dictionary1.Add("floor", 2); dictionary1.Add("roomdimmer", 3); dictionary1.Add("door", 4); dictionary1.Add("env_telep", 5); dictionary1.Add("lostc_teleport", 6); dictionary1.Add("doorB", 7); dictionary1.Add("xmas08_telep", 8); dictionary1.Add("ads_cltele", 9); dictionary1.Add("ads_mall_tele", 10); dictionary1.Add("ads_idol_tele", 11); dictionary1.Add("doorC", 12); dictionary1.Add("doorD", 13); dictionary1.Add("teleport_door", 14); dictionary1.Add("post.it", 15); dictionary1.Add("post.it.vd", 0x10); . = dictionary1; } if (..TryGetValue(key, out num5)) { switch (num5) { case 0: case 1: case 2: num = š(); using (“ = „..ž()) { “.‰(string.Concat(new object[] { "UPDATE furniture SET var = '", decorID, "' WHERE id = '", num, "' LIMIT 1" })); } goto Label_0529; case 3: { num = š(); string str2 = "1,#000000,155"; string str3 = "1,1,1,#000000,155"; using (“ = „..ž()) { “.‰(string.Concat(new object[] { "INSERT INTO furniture_moodlight(id,roomid,preset_cur,preset_1,preset_2,preset_3) VALUES ('", num, "','0','1','", str2, "','", str2, "','", str2, "')" })); “.‰(string.Concat(new object[] { "UPDATE furniture SET var = '", str3, "' WHERE id = '", num, "' LIMIT 1" })); } goto Label_0529; } case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: { int num2 = teleportID1; using (“ = „..ž()) { “.‰(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid,roomid,teleportid) VALUES ('", templateID, "','", receiverID, "','", roomID, "','", num2, "')" })); int num3 = š(); “.‰(string.Concat(new object[] { "UPDATE furniture SET teleportid = '", num3, "' WHERE id = '", num2, "' LIMIT 1" })); if (presentBoxID > 0) { “.‰(string.Concat(new object[] { "INSERT INTO furniture_presents(id,itemid) VALUES ('", presentBoxID, "','", num2, "')" })); “.‰(string.Concat(new object[] { "INSERT INTO furniture_presents(id,itemid) VALUES ('", presentBoxID, "','", num3, "')" })); } } flag = false; goto Label_0529; } case 15: case 0x10: num = š(); using (“ = „..ž()) { “.‰("UPDATE furniture SET var = '20' WHERE id = '" + num + "' LIMIT 1"); } goto Label_0529; } } } if (–.(input, 0, 10) == "sound_set_") { num = š(); int num4 = int.Parse(input.Substring(10)); using (“ = „..ž()) { “.‰(string.Concat(new object[] { "UPDATE furniture SET soundmachine_soundset = '", num4, "' WHERE id = '", num, "' LIMIT 1" })); } } Label_0529: if ((presentBoxID > 0) && flag) { using (“ = „..ž()) { “.‰(string.Concat(new object[] { "INSERT INTO furniture_presents(id,itemid) VALUES ('", presentBoxID, "','", š(), "')" })); } } } public static string ›(int[] itemIDs) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < itemIDs.Length; i++) { if (itemIDs[i] != 0) { DataRow row; using (“ “ = „..ž()) { row = “.Š("SELECT tid, var FROM furniture WHERE id = '" + itemIDs[i] + "'"); } .  = (Convert.ToInt32(row["tid"])); builder.Append(string.Concat(new object[] { "SI", Convert.ToChar(30).ToString(), itemIDs[i], Convert.ToChar(30).ToString(), i, Convert.ToChar(30) })); if (. > 0) { builder.Append("S"); } else { builder.Append("I"); } builder.Append(string.Concat(new object[] { Convert.ToChar(30).ToString(), itemIDs[i], Convert.ToChar(30).ToString(), ., Convert.ToChar(30) })); if (. > 0) { builder.Append(string.Concat(new object[] { ., Convert.ToChar(30).ToString(), ., Convert.ToChar(30).ToString(), Convert.ToString(row["var"]), Convert.ToChar(30).ToString() })); } builder.Append(string.Concat(new object[] { ., Convert.ToChar(30).ToString(), i, Convert.ToChar(30).ToString(), "/" })); } } return builder.ToString(); } public static string œ(string wallPosition) { try { string[] strArray = wallPosition.Split(new char[] { ' ' }); if ((strArray[2] != "l") && (strArray[2] != "r")) { return ""; } string[] strArray2 = strArray[0].Substring(3).Split(new char[] { ',' }); int num = int.Parse(strArray2[0]); int num2 = int.Parse(strArray2[1]); if ((((num < 0) || (num2 < 0)) || (num > 200)) || (num2 > 200)) { return ""; } string[] strArray3 = strArray[1].Substring(2).Split(new char[] { ',' }); int num3 = int.Parse(strArray3[0]); int num4 = int.Parse(strArray3[1]); if ((((num3 < 0) || (num4 < 0)) || (num3 > 200)) || (num4 > 200)) { return ""; } return string.Concat(new object[] { ":w=", num, ",", num2, " l=", num3, ",", num4, " ", strArray[2] }); } catch { return ""; } } public static  (int templateID) { try { return () [templateID]; } catch { return new (); } } public static void ž(bool Update) { DataColumn column; Ž.WriteLine("Starting caching of catalogue + items..."); using (“ “ = „..ž()) { column = “.‹("SELECT indexid FROM catalogue_pages ORDER BY indexid"); }  = new Hashtable();  = new Hashtable(); foreach (DataRow row in column.Table.Rows) { –(Convert.ToInt32(row["indexid"])); } –(-1); Ž.WriteLine(string.Concat(new object[] { "Successfully cached ", .Count, " catalogue pages and ", .Count, " item templates!" })); if (Update) { Thread.CurrentThread.Abort(); } } public static int lastItemID { get { using (“ “ = „..ž()) { return “.("SELECT MAX(id) FROM furniture"); } } } [StructLayout(LayoutKind.Sequential)] private struct  { internal string ; internal string ; internal byte ; } [StructLayout(LayoutKind.Sequential)] internal struct  { internal byte ; internal string ; internal string ; internal int ; internal int ; internal double ; internal bool ; internal bool ; internal bool ; public (bool b) { this. = 1; this. = ""; this. = "null"; this. = 1; this. = 1; this. = 0.0; this. = false; this. = true; this. = false; } public (string Sprite, byte typeID, string Colour, int Length, int Width, double topH, bool isDoor, bool isTradeable, bool isRecycleable) { if (Sprite.Contains(" ")) { this. = Sprite.Split(new char[] { ' ' })[0]; this. = Sprite.Split(new char[] { ' ' })[1]; } else { this. = Sprite; this. = Colour; } this. = typeID; this. = Length; this. = Width; this. = topH; this. = isDoor; this. = isTradeable; this. = isRecycleable; } } } }