コード例 #1
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				uint uint_ = Event.PopWiredUInt();
				RoomItem item = room.GetItem(uint_);
				string text = item.GetBaseItem().InteractionType.ToLower();
				if (text != null && (text == "wf_cnd_trggrer_on_frn" || text == "wf_cnd_furnis_hv_avtrs" || text == "wf_cnd_has_furni_on"))
				{
					Event.PopWiredBoolean();
					Event.PopFixedString();
					item.Extra1 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
					item.Extra1 = item.Extra1.Substring(0, item.Extra1.Length - 1);
					Event.ResetPointer();
					item = room.GetItem(Event.PopWiredUInt());
					Event.PopWiredBoolean();
					Event.PopFixedString();
					int num = Event.PopWiredInt32();
					item.Extra2 = "";
					for (int i = 0; i < num; i++)
					{
						item.Extra2 = item.Extra2 + "," + Convert.ToString(Event.PopWiredUInt());
					}
					if (item.Extra2.Length > 0)
					{
						item.Extra2 = item.Extra2.Substring(1);
					}
				}
			}
			catch
			{
			}
		}
コード例 #2
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Remove(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"DELETE FROM user_ignores WHERE user_id = ",
								Session.GetHabbo().Id,
								" AND ignore_id = ",
								uint_,
								" LIMIT 1;"
							}));
						}
						ServerMessage Message = new ServerMessage(419u);
						Message.AppendInt32(3);
						Session.SendMessage(Message);
					}
				}
			}
		}
コード例 #3
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && (@class.AllowPet || @class.CheckRights(Session, true)))
			{
				uint uint_ = Event.PopWiredUInt();
				Pet class2 = Session.GetHabbo().GetInventoryComponent().GetPet(uint_);
				if (class2 != null && !class2.PlacedInRoom)
				{
					int num = Event.PopWiredInt32();
					int num2 = Event.PopWiredInt32();
					if (@class.CanWalk(num, num2, 0.0, true, false))
					{
						if (@class.Int32_2 >= GlobalClass.MaxPetsPerRoom)
						{
							Session.SendNotif(TextManager.GetText("error_maxpets") + GlobalClass.MaxPetsPerRoom);
						}
						else
						{
							class2.PlacedInRoom = true;
							class2.RoomId = @class.RoomId;
							List<RandomSpeech> list = new List<RandomSpeech>();
							List<BotResponse> list2 = new List<BotResponse>();
							@class.method_4(new RoomBot(class2.PetId, class2.RoomId, AIType.Pet, "freeroam", class2.Name, "", class2.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), class2);
							if (@class.CheckRights(Session, true))
							{
								Session.GetHabbo().GetInventoryComponent().MovePetToRoom(class2.PetId, @class.RoomId);
							}
						}
					}
				}
			}
		}
コード例 #4
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session))
			{
				uint num = Event.PopWiredUInt();
				string a = Event.PopFixedString().ToUpper();
				string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
				text = text.Replace("hd-99999-99999", "");
				text += ".";
				RoomItem class2 = @class.Hashtable_0[num] as RoomItem;
				if (class2.ExtraData.Contains(','))
				{
					class2.Extra1 = class2.ExtraData.Split(new char[]
					{
						','
					})[0];
					class2.Extra2 = class2.ExtraData.Split(new char[]
					{
						','
					})[1];
				}
				if (a == "M")
				{
					class2.Extra1 = text;
				}
				else
				{
					class2.Extra2 = text;
				}
				class2.ExtraData = class2.Extra1 + "," + class2.Extra2;
				class2.UpdateState(true, true);
			}
		}
コード例 #5
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint Id = Event.PopWiredUInt();
			Event.PopFixedString();
			Event.PopWiredInt32();
            RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Id);
			if (Data != null)
			{
				if (Data.Type == "private")
				{
					ServerMessage Message = new ServerMessage(286);
					Message.AppendBoolean(Data.IsPublicRoom);
					Message.AppendUInt(Id);
					Session.SendMessage(Message);
				}
				else
				{
					ServerMessage Message2 = new ServerMessage(453);
					Message2.AppendUInt(Data.Id);
					Message2.AppendStringWithBreak(Data.CCTs);
					Message2.AppendUInt(Data.Id);
					Session.SendMessage(Message2);
				}
			}
		}
コード例 #6
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && [email protected])
			{
				RoomUser class2 = @class.method_48(num);
				if (class2 == null || class2.PetData == null)
				{
					DataRow dataRow = null;
					using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
					{
						class3.AddParamWithValue("petid", num);
						dataRow = class3.ReadDataRow("SELECT Id, user_id, room_id, name, type, race, color, expirience, energy, nutrition, respect, createstamp, x, y, z FROM user_pets WHERE Id = @petid LIMIT 1");
					}
					if (dataRow != null)
					{
						Session.SendMessage(PhoenixEnvironment.GetGame().GetCatalog().GeneratePetFromRow(dataRow).SerializeInfo());
					}
				}
				else
				{
					Session.SendMessage(class2.PetData.SerializeInfo());
				}
			}
		}
コード例 #7
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null)
			{
				RoomItem class2 = @class.GetItem(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
					string text = Event.PopFixedString();
					string text2 = text.Split(new char[]
					{
						' '
					})[0];
					string str = PhoenixEnvironment.FilterInjectionChars(text.Substring(text2.Length + 1), true, true);
					if (@class.CheckRights(Session) || text.StartsWith(class2.ExtraData))
					{
						string text3 = text2;
						if (text3 != null && (text3 == "FFFF33" || text3 == "FF9CFF" || text3 == "9CCEFF" || text3 == "9CFF9C"))
						{
							class2.ExtraData = text2 + " " + str;
							class2.UpdateState(true, true);
						}
					}
				}
			}
		}
コード例 #8
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			if (Session.GetHabbo().GetMessenger() != null)
			{
				if (num == 0 && Session.GetHabbo().HasRole("cmd_sa"))
				{
					ServerMessage Message = new ServerMessage(134);
					Message.AppendUInt(0);
					Message.AppendString(Session.GetHabbo().Username + ": " + text);
					PhoenixEnvironment.GetGame().GetClientManager().SendStaffChat(Session, Message);
				}
				else
				{
					if (num == 0)
					{
						ServerMessage Message2 = new ServerMessage(261);
						Message2.AppendInt32(4);
						Message2.AppendUInt(0);
						Session.SendMessage(Message2);
					}
					else
					{
						Session.GetHabbo().GetMessenger().method_18(num, text);
					}
				}
			}
		}
コード例 #9
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null && @class.GetClient().GetHabbo().Rank <= 2u)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (!Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Add(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"INSERT INTO user_ignores(user_id, ignore_id) VALUES (",
								Session.GetHabbo().Id,
								", ",
								uint_,
								");"
							}));
						}
						ServerMessage Message = new ServerMessage(419u);
						Message.AppendInt32(1);
						Session.SendMessage(Message);
					}
				}
			}
		}
コード例 #10
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				uint RoomId = Event.PopWiredUInt();
				bool LockRoom = Event.PopWiredBoolean();
				bool InappropriateRoom = Event.PopWiredBoolean();
				bool KickUsers = Event.PopWiredBoolean();
				string Act = "";
				if (LockRoom)
				{
					Act += "Apply Doorbell";
				}
				if (InappropriateRoom)
				{
					Act += " Change Name";
				}
				if (KickUsers)
				{
					Act += " Kick Users";
				}
				PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, "ModTool - Room Action", Act);
				PhoenixEnvironment.GetGame().GetModerationTool().PerformRoomAction(Session, RoomId, KickUsers, LockRoom, InappropriateRoom);
			}
		}
コード例 #11
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num);
			if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num))
			{
				room.UsersWithRights.Add(num);
				using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
				{
					adapter.ExecuteQuery(string.Concat(new object[]
					{
						"INSERT INTO room_rights (room_id,user_id) VALUES ('",
						room.RoomId,
						"','",
						num,
						"')"
					}));
				}
				ServerMessage Message = new ServerMessage(510);
				Message.AppendUInt(room.RoomId);
				Message.AppendUInt(num);
				Message.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
				Session.SendMessage(Message);
				roomUserByHabbo.AddStatus("flatctrl", "");
				roomUserByHabbo.UpdateNeeded = true;
				roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42));
			}
		}
コード例 #12
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_chatlogs"))
			{
				Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeUserChatlog(Event.PopWiredUInt()));
			}
		}
コード例 #13
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session != null && Session.GetHabbo() != null)
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null)
				{
					RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
					if (class2 != null && !class2.IsBot && class2.GetClient() != null)
					{
						ServerMessage Message = new ServerMessage(228u);
						Message.AppendUInt(class2.GetClient().GetHabbo().Id);
						Message.AppendInt32(class2.GetClient().GetHabbo().GetBadgeComponent().EquippedCount);
						using (TimedLock.Lock(class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList))
						{
							foreach (Badge current in class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList)
							{
								if (current.Slot > 0)
								{
									Message.AppendInt32(current.Slot);
									Message.AppendStringWithBreak(current.Code);
								}
							}
						}
						Session.SendMessage(Message);
					}
				}
			}
		}
コード例 #14
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				uint UserId = Event.PopWiredUInt();
				Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeRoomVisits(UserId));
			}
		}
コード例 #15
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint uint_ = Event.PopWiredUInt();
			HelpTopic @class = PhoenixEnvironment.GetGame().GetHelpTool().GetTopic(uint_);
			if (@class != null)
			{
				Session.SendMessage(PhoenixEnvironment.GetGame().GetHelpTool().SerializeTopic(@class));
			}
		}
コード例 #16
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				uint Id = Event.PopWiredUInt();
                RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateNullableRoomData(Id);
				Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeRoomTool(Data));
			}
		}
コード例 #17
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				Event.PopWiredInt32();
				uint TicketId = Event.PopWiredUInt();
				PhoenixEnvironment.GetGame().GetModerationTool().PickTicket(Session, TicketId);
			}
		}
コード例 #18
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null)
				{
					if (@class.method_72("stickiepole") > 0 || @class.CheckRights(Session))
					{
						uint uint_ = Event.PopWiredUInt();
						string text = Event.PopFixedString();
						string[] array = text.Split(new char[]
						{
							' '
						});
						if (array[0].Contains("-"))
						{
							array[0] = array[0].Replace("-", "");
						}
						UserItem class2 = Session.GetHabbo().GetInventoryComponent().GetItem(uint_);
						if (class2 != null)
						{
							if (array[0].StartsWith(":"))
							{
								string text2 = @class.method_98(text);
								if (text2 == null)
								{
									ServerMessage Message = new ServerMessage(516u);
									Message.AppendInt32(11);
									Session.SendMessage(Message);
									return;
								}
								RoomItem RoomItem_ = new RoomItem(class2.Id, @class.RoomId, class2.BaseItem, class2.ExtraData, 0, 0, 0.0, 0, text2, @class);
								if (@class.method_82(Session, RoomItem_, true, null))
								{
									Session.GetHabbo().GetInventoryComponent().RemoveItem(uint_, 1u, false);
								}
							}
							using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
							{
								class3.ExecuteQuery(string.Concat(new object[]
								{
									"UPDATE items SET room_id = '",
									@class.RoomId,
									"' WHERE Id = '",
									class2.Id,
									"' LIMIT 1"
								}));
							}
						}
					}
				}
			}
			catch
			{
			}
		}
コード例 #19
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			int PageId = Event.PopWiredInt32();
			uint ItemId = Event.PopWiredUInt();
			string ExtraData = Event.PopFixedString();
			string GiftUser = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			string GiftMessage = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			PhoenixEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, true, GiftUser, GiftMessage, true);
		}
コード例 #20
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint CategoryId = Event.PopWiredUInt();

			HelpCategory Category = PhoenixEnvironment.GetGame().GetHelpTool().GetCategory(CategoryId);
			if (Category != null)
			{
				Session.SendMessage(PhoenixEnvironment.GetGame().GetHelpTool().SerializeCategory(Category));
			}
		}
コード例 #21
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				uint UserId = Event.PopWiredUInt();
				string Message = Event.PopFixedString();

				PhoenixEnvironment.GetGame().GetModerationTool().AlertUser(Session, UserId, Message, true);
			}
		}
コード例 #22
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				uint UserId = Event.PopWiredUInt();
				string Message = Event.PopFixedString();
				int Length = Event.PopWiredInt32() * 3600;

				PhoenixEnvironment.GetGame().GetModerationTool().BanUser(Session, UserId, Length, Message);
			}
		}
コード例 #23
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string string_ = Event.PopFixedString();
			Event.PopWiredInt32();
			if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1")
			{
				Logging.WriteLine("[RoomMgr] Requesting Private Room [ID: " + num + "]");
			}
			Session.GetMessageHandler().PrepareRoomForUser(num, string_);
		}
コード例 #24
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().GetMessenger() != null)
			{
				int num = Event.PopWiredInt32();
				for (int i = 0; i < num; i++)
				{
					Session.GetHabbo().GetMessenger().method_13(Event.PopWiredUInt());
				}
			}
		}
コード例 #25
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session, true))
			{
				RoomItem class2 = @class.GetItem(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
					@class.RemoveFurniture(Session, class2.Id, true, true);
				}
			}
		}
コード例 #26
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_supporttool"))
			{
				int num = Event.PopWiredInt32();
				for (int i = 0; i < num; i++)
				{
					uint TicketId = Event.PopWiredUInt();
					PhoenixEnvironment.GetGame().GetModerationTool().ReleaseTicket(Session, TicketId);
				}
			}
		}
コード例 #27
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_chatlogs"))
			{
				Event.PopWiredInt32();
				uint roomID = Event.PopWiredUInt();
				if (PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(roomID) != null)
				{
					Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeRoomChatlog(roomID));
				}
			}
		}
コード例 #28
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room Room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (Room != null && Room.CanTradeInRoom)
			{
				Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
				UserItem User = Session.GetHabbo().GetInventoryComponent().GetItem(Event.PopWiredUInt());
				if (Trade != null && User != null)
				{
					Trade.OfferItem(Session.GetHabbo().Id, User);
				}
			}
		}
コード例 #29
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint Id = Event.PopWiredUInt();

			CatalogItem Item = PhoenixEnvironment.GetGame().GetCatalog().FindItem(Id);
			if (Item != null)
			{
				ServerMessage Message = new ServerMessage(622);
				Message.AppendUInt(Item.Id);
				Message.AppendBoolean(Item.GetBaseItem().AllowGift);
				Session.SendMessage(Message);
			}
		}
コード例 #30
0
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session))
			{
				RoomItem class2 = @class.GetItem(Event.PopWiredUInt());
				if (class2 != null)
				{
					string string_ = Event.PopFixedString();
					@class.method_82(Session, class2, false, string_);
				}
			}
		}