示例#1
0
 public void FillNull(uint mId)
 {
     this.Id               = mId;
     this.Name             = "Unknown Room";
     this.Description      = "-";
     this.Type             = "private";
     this.Owner            = "-";
     this.Category         = 0;
     this.UsersNow         = 0;
     this.UsersMax         = 0;
     this.ModelName        = "NO_MODEL";
     this.CCTs             = "";
     this.Score            = 0;
     this.Tags             = new List <string>();
     this.AllowPet         = true;
     this.AllowPetsEating  = false;
     this.AllowWalkthrough = true;
     this.Hidewall         = false;
     this.Wallthick        = 0;
     this.Floorthick       = 0;
     this.Password         = "";
     this.Wallpaper        = "0.0";
     this.Floor            = "0.0";
     this.Landscape        = "0.0";
     this.Event            = null;
     this.Achievement      = 0;
     this.bool_3           = false;
     this.myIcon           = new RoomIcon(1, 1, new Dictionary <int, int>());
     this.class28_0        = GoldTree.GetGame().GetRoomManager().GetModel(ModelName, mId);
 }
示例#2
0
 public void Fill(Room Room)
 {
     this.Id               = Room.Id;
     this.Name             = Room.Name;
     this.Description      = Room.Description;
     this.Type             = Room.Type;
     this.Owner            = Room.Owner;
     this.Category         = Room.Category;
     this.State            = Room.State;
     this.UsersNow         = Room.UsersNow;
     this.UsersMax         = Room.UsersMax;
     this.ModelName        = Room.ModelName;
     this.CCTs             = Room.CCTs;
     this.Score            = Room.Score;
     this.Tags             = Room.Tags;
     this.AllowPet         = Room.AllowPet;
     this.AllowPetsEating  = Room.AllowPetsEating;
     this.AllowWalkthrough = Room.AllowWalkthrough;
     this.Hidewall         = Room.Hidewall;
     this.Wallthick        = Room.Wallthick;
     this.Floorthick       = Room.Floorthick;
     this.myIcon           = Room.myIcon;
     this.Password         = Room.Password;
     this.Event            = Room.Event;
     this.Wallpaper        = Room.Wallpaper;
     this.Floor            = Room.Floor;
     this.Landscape        = Room.Landscape;
     this.Achievement      = Room.Achievement;
     this.class28_0        = GoldTree.GetGame().GetRoomManager().GetModel(ModelName, Id);
 }
示例#3
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);
        }