Exemple #1
0
        public void RemoveUserFromRoom(GameClient Session, bool bool_13, bool bool_14)
        {
            int num = 1;
            if (!bool_14 || !Session.GetHabbo().isAaron)
            {
                if (this.bool_12)
                {
                    if (bool_13 && Session != null)
                    {
                        if (bool_14)
                        {
                            ServerMessage Message = new ServerMessage(33u);
                            Message.AppendInt32(4008);
                            Session.SendMessage(Message);
                        }
                        ServerMessage Message5_ = new ServerMessage(18u);
                        Session.SendMessage(Message5_);
                    }
                }
                else
                {
                    try
                    {
                        if (Session != null && Session.GetHabbo() != null)
                        {
                            num = 2;
                            RoomUser @class = this.GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (@class != null)
                            {
                                this.UserList[@class.CurrentFurniFX] = null;
                                @class.CurrentFurniFX = -1;
                                this.byte_0[@class.X, @class.Y] = @class.SqState;
                            }
                            num = 3;
                            if (bool_13)
                            {
                                if (bool_14)
                                {
                                    ServerMessage Message = new ServerMessage(33u);
                                    Message.AppendInt32(4008);
                                    Session.SendMessage(Message);
                                }
                                ServerMessage Message5_ = new ServerMessage(18u);
                                Session.SendMessage(Message5_);
                            }
                            num = 4;
                            if (@class != null && [email protected])
                            {
                                if (@class.byte_1 > 0 && @class.GetClient() != null)
                                {
                                    @class.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect = -1;
                                }
                                this.byte_0[@class.X, @class.Y] = @class.SqState;
                                if (!this.IsPublic)
                                {
                                    ServerMessage Message2 = new ServerMessage(700u);
                                    Message2.AppendBoolean(false);
                                    Session.SendMessage(Message2);
                                }
                                ServerMessage Message3 = new ServerMessage(29u);
                                Message3.AppendRawInt32(@class.VirtualId);
                                this.SendMessage(Message3, null);
                                if (this.HasActiveTrade(Session.GetHabbo().Id))
                                {
                                    this.TryStopTrade(Session.GetHabbo().Id);
                                }
                                num = 5;
                                if (Session.GetHabbo().Username.ToLower() == this.Owner.ToLower() && this.HasOngoingEvent)
                                {
                                    this.Event = null;
                                    ServerMessage Logging = new ServerMessage(370u);
                                    Logging.AppendStringWithBreak("-1");
                                    this.SendMessage(Logging, null);
                                }
                                num = 6;
                                if (@class.Riding != null)
                                {
                                    @class.Riding.Rider = null;
                                    @class.Riding = null;
                                    Session.GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect = -1;
                                }
                                Session.GetHabbo().OnLeaveRoom();
                                this.bool_10 = true;
                                this.method_51();
                                List<RoomUser> list = new List<RoomUser>();
                                for (int i = 0; i < this.UserList.Length; i++)
                                {
                                    RoomUser class2 = this.UserList[i];
                                    if (class2 != null && class2.IsBot)
                                    {
                                        list.Add(class2);
                                    }
                                }
                                num = 7;
                                foreach (RoomUser current in list)
                                {
                                    current.BotAI.OnUserLeaveRoom(Session);
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Logging.LogCriticalException(string.Concat(new object[]
						{
							"Error during removing user from room [Part: ",
							num,
							"]: ",
							ex.ToString()
						}));
                    }
                }
            }
        }
Exemple #2
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)
 {
     this.bool_12 = false;
     this.Id = 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.UserList = 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.mWallItems = new Hashtable();
     this.mFloorItems = new Hashtable();
     this.ActiveTrades = new List<Trade>();
     this.class28_0 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(this.ModelName, this.Id);
     this.bool_6 = false;
     this.bool_7 = false;
     this.bool_5 = true;
     this.mRoomData = class27_1;
     this.bool_8 = bool_17;
     this.list_17 = new List<Phoenix.HabboHotel.Groups.Group>();
     this.list_4 = new List<uint>();
     this.bbTiles = new List<RoomItem>();
     this.bbbTiles = new List<RoomItem>();
     this.bbgTiles = new List<RoomItem>();
     this.bbrTiles = new List<RoomItem>();
     this.bbyTiles = new List<RoomItem>();
     this.RedScoreboards = new List<RoomItem>();
     this.YellowScoreboards = new List<RoomItem>();
     this.BlueScoreboards = new List<RoomItem>();
     this.GreenScoreboards = new List<RoomItem>();
     this.int_10 = 0;
     this.int_11 = 0;
     this.int_9 = 0;
     this.int_12 = 0;
     this.int_13 = 0;
     this.StickiePoles = new List<RoomItem>();
     this.WF_Triggers = new List<RoomItem>();
     this.WF_Effects = new List<RoomItem>();
     this.WF_Conditions = new List<RoomItem>();
     this.byte_0 = new byte[this.Model.MapSizeX, this.Model.MapSizeY];
     this.double_1 = new double[this.Model.MapSizeX, this.Model.MapSizeY];
     this.double_2 = new double[this.Model.MapSizeX, this.Model.MapSizeY];
     this.timer_0 = new Timer(new TimerCallback(this.method_32), null, 480, 480);
     this.int_8 = 0;
     this.RoomMuted = false;
     this.bool_9 = true;
     this.mGotRollers = false;
     this.int_16 = 0;
     this.int_15 = 4;
     this.Achievement = uint_3;
     this.bool_10 = false;
     this.mRemovedItems = new Hashtable();
     this.mMovedItems = new Hashtable();
     this.mAddedItems = new Hashtable();
     this.method_23();
     this.LoadFurniture();
     this.GenerateMaps();
 }
Exemple #3
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 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(ModelName, mId);
		}
Exemple #4
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 = PhoenixEnvironment.EnumToBool(Row["allow_pets"].ToString());
			this.AllowPetsEating = PhoenixEnvironment.EnumToBool(Row["allow_pets_eat"].ToString());
			this.AllowWalkthrough = PhoenixEnvironment.EnumToBool(Row["allow_walkthrough"].ToString());
			this.bool_3 = false;
			this.Hidewall = PhoenixEnvironment.EnumToBool(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 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(this.ModelName, this.Id);
		}
Exemple #5
0
		public void Fill(Room Room)
		{
			this.Id = Room.RoomId;
			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 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(ModelName, Id);
		}