当前位置: 首页>>代码示例>>C#>>正文


C# GameClients.GameClient类代码示例

本文整理汇总了C#中Phoenix.HabboHotel.GameClients.GameClient的典型用法代码示例。如果您正苦于以下问题:C# GameClient类的具体用法?C# GameClient怎么用?C# GameClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GameClient类属于Phoenix.HabboHotel.GameClients命名空间,在下文中一共展示了GameClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo() == null)
			{
				Session.Login(Event.PopFixedString());
				if (Session.GetHabbo() != null && Session.GetHabbo().MutedUsers != null && Session.GetHabbo().MutedUsers.Count > 0)
				{
					using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
					{
						try
						{
							ServerMessage Message = new ServerMessage(420);
							Message.AppendInt32(Session.GetHabbo().MutedUsers.Count);
							foreach (uint Id in Session.GetHabbo().MutedUsers)
							{
								string string_ = adapter.ReadString("SELECT username FROM users WHERE Id = " + Id + " LIMIT 1;");
								Message.AppendStringWithBreak(string_);
							}
							Session.SendMessage(Message);
						}
						catch
						{
							Console.ForegroundColor = ConsoleColor.Red;
							Logging.WriteLine("Login error: User is ignoring a user that no longer exists");
							Console.ForegroundColor = ConsoleColor.Gray;
						}

					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:31,代码来源:SSOTicketMessageEvent.cs

示例2: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
		{
			if (UserHasRight)
			{
				ServerMessage Message = new ServerMessage(650);
				Message.AppendInt32(0);
				Message.AppendInt32(5);
				Message.AppendInt32(0);
				Message.AppendInt32(Item.GetBaseItem().SpriteId);
				Message.AppendUInt(Item.Id);
				Message.AppendStringWithBreak("");
				Message.AppendString("I");
				if (Item.Extra2.Length > 0)
				{
					Message.AppendString(Item.Extra2);
				}
				else
				{
					Message.AppendString("RB");
				}
				Message.AppendStringWithBreak("HRAH");
				Session.SendMessage(Message);
				Item.ReqUpdate(1);
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:25,代码来源:InteractorWiredTriggerTimer.cs

示例3: parse

		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());
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:26,代码来源:GetPetInfoMessageEvent.cs

示例4: parse

		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);
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:32,代码来源:IgnoreUserMessageEvent.cs

示例5: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(308);
			Message.AppendInt32(Session.GetHabbo().Volume);
			Message.AppendBoolean(false);
			Session.SendMessage(Message);
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:GetSoundSettingsEvent.cs

示例6: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
				{
					ServerMessage Message = new ServerMessage(365u);
					Message.AppendInt32(@class.MoodlightData.Presets.Count);
					Message.AppendInt32(@class.MoodlightData.CurrentPreset);
					int num = 0;
					foreach (MoodlightPreset current in @class.MoodlightData.Presets)
					{
						num++;
						Message.AppendInt32(num);
						Message.AppendInt32(int.Parse(PhoenixEnvironment.BoolToEnum(current.BackgroundOnly)) + 1);
						Message.AppendStringWithBreak(current.ColorCode);
						Message.AppendInt32(current.ColorIntensity);
					}
					Session.SendMessage(Message);
				}
			}
			catch
			{
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:26,代码来源:RoomDimmerGetPresetsMessageEvent.cs

示例7: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasRole("acc_chatlogs"))
			{
				Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeUserChatlog(Event.PopWiredUInt()));
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:GetUserChatlogMessageEvent.cs

示例8: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem Item, int int_0, bool bool_0)
		{
			RoomUser roomUserByHabbo = Item.GetRoom().GetRoomUserByHabbo(Session.GetHabbo().Id);
			if (roomUserByHabbo != null && roomUserByHabbo.Riding == null)
			{
				if ((roomUserByHabbo.Coordinate == Item.Coordinate) || (roomUserByHabbo.Coordinate == Item.SquareInFront))
				{
					if (Item.InteractingUser == 0u)
					{
						roomUserByHabbo.TeleDelay = -1;
						Item.InteractingUser = roomUserByHabbo.GetClient().GetHabbo().Id;
						roomUserByHabbo.Item = Item;
					}
				}
				else
				{
					if (roomUserByHabbo.CanWalk)
					{
						try
						{
							roomUserByHabbo.MoveTo(Item.SquareInFront);
						}
						catch
						{
						}
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:29,代码来源:InteractorTeleport.cs

示例9: OnPlace

		public override void OnPlace(GameClient Session, RoomItem RoomItem_0)
		{
			RoomItem_0.ExtraData = "0";
			if (RoomItem_0.InteractingUser != 0u)
			{
				RoomUser @class = RoomItem_0.GetRoom().GetRoomUserByHabbo(RoomItem_0.InteractingUser);
				if (@class != null)
				{
					@class.ClearMovement(true);
					@class.AllowOverride = false;
					@class.CanWalk = true;
				}
				RoomItem_0.InteractingUser = 0u;
			}
			if (RoomItem_0.InteractingUser2 != 0u)
			{
				RoomUser @class = RoomItem_0.GetRoom().GetRoomUserByHabbo(RoomItem_0.InteractingUser2);
				if (@class != null)
				{
					@class.ClearMovement(true);
					@class.AllowOverride = false;
					@class.CanWalk = true;
				}
				RoomItem_0.InteractingUser2 = 0u;
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:26,代码来源:InteractorTeleport.cs

示例10: parse

		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));
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:29,代码来源:AssignRightsMessageEvent.cs

示例11: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session != null && Session.GetHabbo() != null)
			{
				Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializeFloorItemInventory());
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:RequestFurniInventoryEvent.cs

示例12: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
            if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
			{
				Session.SendMessage(Session.GetHabbo().GetMessenger().SerializeUpdates());
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:FriendListUpdateEvent.cs

示例13: parse

		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);
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:29,代码来源:GetSelectedBadgesMessageEvent.cs

示例14: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			DataTable dataTable = null;
			using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
			{
				dataTable = adapter.ReadDataTable("SELECT asking_price FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
			}
			if (dataTable != null)
			{
				int num = 0;
				foreach (DataRow dataRow in dataTable.Rows)
				{
					num += (int)dataRow["asking_price"];
				}
				if (num >= 1)
				{
					Session.GetHabbo().Credits += num;
					Session.GetHabbo().UpdateCreditsBalance(true);
				}
				using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
				{
					adapter.ExecuteQuery("DELETE FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:25,代码来源:RedeemOfferCreditsMessageEvent.cs

示例15: OnPlace

 public override void OnPlace(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
     roomMusicController.Stop();
     Session.GetHabbo().CurrentRoom.LoadMusic();
 }
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:InteractorJukebox.cs


注:本文中的Phoenix.HabboHotel.GameClients.GameClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。