Example #1
0
        public void method_1(DataRow Row)
        {
            this.Id          = (uint)Row["Id"];
            this.Name        = (string)Row["caption"];
            this.Description = (string)Row["description"];
            this.Type        = (string)Row["roomtype"];
            this.Owner       = (string)Row["owner"];
            this.Achievement = Convert.ToUInt32(Row["achievement"]);
            string text = Row["state"].ToString().ToLower();

            if (text != null)
            {
                if (text == "open")
                {
                    this.State = 0;
                    goto IL_DF;
                }
                if (text == "password")
                {
                    this.State = 2;
                    goto IL_DF;
                }
                if (!(text == "locked"))
                {
                }
            }
            this.State = 1;
IL_DF:
            this.Category         = (int)Row["category"];
            this.UsersNow         = (int)Row["users_now"];
            this.UsersMax         = (int)Row["users_max"];
            this.ModelName        = (string)Row["model_name"];
            this.CCTs             = (string)Row["public_ccts"];
            this.Score            = (int)Row["score"];
            this.Tags             = new List <string>();
            this.AllowPet         = GoldTree.smethod_3(Row["allow_pets"].ToString());
            this.AllowPetsEating  = GoldTree.smethod_3(Row["allow_pets_eat"].ToString());
            this.AllowWalkthrough = GoldTree.smethod_3(Row["allow_walkthrough"].ToString());
            this.bool_3           = false;
            this.Hidewall         = GoldTree.smethod_3(Row["allow_hidewall"].ToString());
            this.Wallthick        = (int)Row["wallthick"];
            this.Floorthick       = (int)Row["floorthick"];
            this.Password         = (string)Row["password"];
            this.Wallpaper        = (string)Row["wallpaper"];
            this.Floor            = (string)Row["floor"];
            this.Landscape        = (string)Row["landscape"];
            this.Event            = null;
            Dictionary <int, int> IconItems = new Dictionary <int, int>();

            string[] array;
            if (Row["icon_items"].ToString() != "")
            {
                array = Row["icon_items"].ToString().Split(new char[]
                {
                    '|'
                });
                for (int i = 0; i < array.Length; i++)
                {
                    string text2 = array[i];
                    if (!string.IsNullOrEmpty(text2))
                    {
                        string[] array2 = text2.Replace('.', ',').Split(new char[]
                        {
                            ','
                        });
                        int key   = 0;
                        int value = 0;
                        int.TryParse(array2[0], out key);
                        if (array2.Length > 1)
                        {
                            int.TryParse(array2[1], out value);
                        }
                        try
                        {
                            if (!IconItems.ContainsKey(key))
                            {
                                IconItems.Add(key, value);
                            }
                        }
                        catch (Exception ex)
                        {
                            Logging.LogException(string.Concat(new string[]
                            {
                                "Exception: ",
                                ex.ToString(),
                                "[",
                                text2,
                                "]"
                            }));
                        }
                    }
                }
            }
            this.myIcon = new RoomIcon((int)Row["icon_bg"], (int)Row["icon_fg"], IconItems);
            array       = Row["tags"].ToString().Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                string Tag = array[i];
                this.Tags.Add(Tag);
            }
            this.class28_0 = GoldTree.GetGame().GetRoomManager().GetModel(this.ModelName, this.Id);
        }
 private RoomModel method_9(uint uint_0)
 {
     DataRow dataRow;
     using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
     {
         dataRow = @class.ReadDataRow("SELECT doorx,doory,height,modeldata FROM room_models_customs WHERE roomid = '" + uint_0 + "'");
     }
     RoomModel RoomModel = new RoomModel("custom", (int)dataRow["doorx"], (int)dataRow["doory"], (double)dataRow["height"], 2, (string)dataRow["modeldata"], "", false);
     if (RoomModel != null)
     {
         return RoomModel;
     }
     else
     {
         Room Room = this.GetRoom(uint_0);
         if (Room != null)
         {
             Room.method_34();
             return null;
         }
         else
         {
             return null;
         }
     }
 }
Example #3
0
 public Room(uint uint_2, string string_10, string string_11, string string_12, string string_13, int int_17, int int_18, int int_19, string string_14, string string_15, int int_20, List<string> list_18, bool bool_13, bool bool_14, bool bool_15, bool bool_16, RoomIcon class29_1, string string_16, string string_17, string string_18, string string_19, RoomData class27_1, bool bool_17, int int_21, int int_22, uint uint_3)
 {
     if (!(LicenseTools.String_0 == ""))
     {
         this.bool_12 = false;
         this.uint_0 = uint_2;
         this.Name = string_10;
         this.Description = string_11;
         this.Owner = string_13;
         this.Category = int_17;
         this.Type = string_12;
         this.State = int_18;
         this.UsersNow = 0;
         this.UsersMax = int_19;
         this.ModelName = string_14;
         this.CCTs = string_15;
         this.Score = int_20;
         this.Tags = list_18;
         this.AllowPet = bool_13;
         this.AllowPetsEating = bool_14;
         this.AllowWalkthrough = bool_15;
         this.Hidewall = bool_16;
         this.Wallthick = int_21;
         this.Floorthick = int_22;
         this.int_7 = 0;
         this.RoomUser_0 = new RoomUser[500];
         this.class29_0 = class29_1;
         this.Password = string_16;
         this.dictionary_0 = new Dictionary<uint, double>();
         this.Event = null;
         this.Wallpaper = string_17;
         this.Floor = string_18;
         this.Landscape = string_19;
         this.hashtable_4 = new Hashtable();
         this.hashtable_0 = new Hashtable();
         this.list_2 = new List<Trade>();
         this.class28_0 = GoldTree.GetGame().GetRoomManager().GetModel(this.ModelName, this.uint_0);
         this.bool_6 = false;
         this.bool_7 = false;
         this.bool_5 = true;
         this.class27_0 = class27_1;
         this.bool_8 = bool_17;
         this.list_17 = new List<GroupsManager>();
         this.list_4 = new List<uint>();
         this.list_5 = new List<RoomItem>();
         this.list_9 = new List<RoomItem>();
         this.list_7 = new List<RoomItem>();
         this.list_6 = new List<RoomItem>();
         this.list_8 = new List<RoomItem>();
         this.list_10 = new List<RoomItem>();
         this.list_11 = new List<RoomItem>();
         this.list_12 = new List<RoomItem>();
         this.list_13 = new List<RoomItem>();
         this.int_10 = 0;
         this.int_11 = 0;
         this.int_9 = 0;
         this.int_12 = 0;
         this.int_13 = 0;
         this.list_3 = new List<RoomItem>();
         this.list_14 = new List<RoomItem>();
         this.list_15 = new List<RoomItem>();
         this.list_16 = new List<RoomItem>();
         this.byte_0 = new byte[this.Class28_0.int_4, this.Class28_0.int_5];
         this.double_1 = new double[this.Class28_0.int_4, this.Class28_0.int_5];
         this.double_2 = new double[this.Class28_0.int_4, this.Class28_0.int_5];
         this.timer_0 = new Timer(new TimerCallback(this.method_32), null, 480, 480);
         this.int_8 = 0;
         this.bool_4 = false;
         this.bool_9 = true;
         this.bool_11 = false;
         this.int_16 = 0;
         this.int_15 = 4;
         this.Achievement = uint_3;
         this.bool_10 = false;
         this.hashtable_1 = new Hashtable();
         this.hashtable_2 = new Hashtable();
         this.hashtable_3 = new Hashtable();
         this.method_23();
         this.method_25();
         this.method_22();
         this.LoadMusic();
     }
 }