當前位置: 首頁>>代碼示例>>C#>>正文


C# ServerMessage.AppendInt32方法代碼示例

本文整理匯總了C#中Phoenix.Messages.ServerMessage.AppendInt32方法的典型用法代碼示例。如果您正苦於以下問題:C# ServerMessage.AppendInt32方法的具體用法?C# ServerMessage.AppendInt32怎麽用?C# ServerMessage.AppendInt32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phoenix.Messages.ServerMessage的用法示例。


在下文中一共展示了ServerMessage.AppendInt32方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
			roomUserByHabbo.Unidle();
			int i = Event.PopWiredInt32();
            
            if (i < 0 || i > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && i > 1))
			{
				i = 0;
			}
			if (i > 0 && roomUserByHabbo.CarryItemID > 0)
			{
				roomUserByHabbo.CarryItem(0);
			}
			roomUserByHabbo.DanceId = i;
			ServerMessage Message = new ServerMessage(480);
			Message.AppendInt32(roomUserByHabbo.VirtualId);
			Message.AppendInt32(i);
			room.SendMessage(Message, null);
			
            if (Session.GetHabbo().CurrentQuestId == 6)
			{
				PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(6, Session);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:26,代碼來源:DanceMessageEvent.cs

示例3: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			DataTable dataTable_ = Session.GetHabbo().GroupMemberships;
			if (dataTable_ != null)
			{
				ServerMessage Message = new ServerMessage(915u);
				Message.AppendInt32(dataTable_.Rows.Count);
				foreach (DataRow dataRow in dataTable_.Rows)
				{
                    Group @class = GroupManager.GetGroup((int)dataRow["groupid"]);
					Message.AppendInt32(@class.Id);
					Message.AppendStringWithBreak(@class.Name);
					Message.AppendStringWithBreak(@class.Badge);
					if (Session.GetHabbo().GroupID == @class.Id) // is favorite group?
					{
						Message.AppendBoolean(true);
					}
					else
					{
						Message.AppendBoolean(false);
					}
				}
				Session.SendMessage(Message);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:25,代碼來源:LoadUserGroupsEvent.cs

示例4: 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

示例5: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			int num = Event.PopWiredInt32();
			ServerMessage Message = new ServerMessage(300);
			Message.AppendInt32(num);
			if (num > 0)
			{
				for (int i = 0; i < num; i++)
				{
					int num2 = Event.PopWiredInt32();
                    if (num2 > 0)
                    {
                        /*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2);
                        Message.AppendInt32(@class.Id);
                        Message.AppendStringWithBreak(@class.Name);
                        Message.AppendStringWithBreak(@class.Track);
                        Message.AppendInt32(@class.Length);
                        Message.AppendStringWithBreak(@class.Author);*/

                        Message.AppendInt32(SongManager.GetSong(num2).Id);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Name);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Track);
                        Message.AppendInt32(SongManager.GetSong(num2).Length);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Author);
                    }
				}
			}
			Session.SendMessage(Message);
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:29,代碼來源:GetSongInfoMessageEvent.cs

示例6: 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

示例7: GiveBadge

        public void GiveBadge(GameClient Session, string Badge, Boolean InDatabase)
		{
			this.GiveBadge(Badge, 0, InDatabase);
			ServerMessage Message = new ServerMessage(832);
			Message.AppendInt32(1);
			Message.AppendInt32(4);
			Message.AppendInt32(1);
			Message.AppendUInt(PhoenixEnvironment.GetGame().GetAchievementManager().BadgeID(Badge));
			Session.SendMessage(Message);
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:10,代碼來源:BadgeComponent.cs

示例8: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Session.GetHabbo().GetBadgeComponent().ResetSlots();
			using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
			{
				adapter.ExecuteQuery("UPDATE user_badges SET badge_slot = '0' WHERE user_id = '" + Session.GetHabbo().Id + "'");
				goto IL_131;
			}
			IL_52:
			int num = Event.PopWiredInt32();
			string text = Event.PopFixedString();
			if (text.Length != 0)
			{
				if (!Session.GetHabbo().GetBadgeComponent().HasBadge(text) || num < 1 || num > 5)
				{
					return;
				}
				if (Session.GetHabbo().CurrentQuestId == 16u)
				{
					PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(16u, Session);
				}
				Session.GetHabbo().GetBadgeComponent().GetBadge(text).Slot = num;
				using (DatabaseClient @class = PhoenixEnvironment.GetDatabase().GetClient())
				{
					@class.AddParamWithValue("slotid", num);
					@class.AddParamWithValue("badge", text);
					@class.AddParamWithValue("userid", Session.GetHabbo().Id);
					@class.ExecuteQuery("UPDATE user_badges SET badge_slot = @slotid WHERE badge_id = @badge AND user_id = @userid LIMIT 1");
				}
			}
			IL_131:
			if (Event.RemainingLength > 0)
			{
				goto IL_52;
			}
			ServerMessage Message = new ServerMessage(228u);
			Message.AppendUInt(Session.GetHabbo().Id);
			Message.AppendInt32(Session.GetHabbo().GetBadgeComponent().EquippedCount);
			foreach (Badge current in Session.GetHabbo().GetBadgeComponent().BadgeList)
			{
				if (current.Slot > 0)
				{
					Message.AppendInt32(current.Slot);
					Message.AppendStringWithBreak(current.Code);
				}
			}
			if (Session.GetHabbo().InRoom && PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
			{
				PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
			}
			else
			{
				Session.SendMessage(Message);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:55,代碼來源:SetActivatedBadgesEvent.cs

示例9: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
		{
			if (UserHasRight && Session != null)
			{
				Item.method_10();
				ServerMessage Message = new ServerMessage(651);
				Message.AppendInt32(0);
				Message.AppendInt32(5);
				if (Item.Extra1.Length > 0)
				{
					Message.AppendString(Item.Extra1);
				}
				else
				{
					Message.AppendInt32(0);
				}
				Message.AppendInt32(Item.GetBaseItem().SpriteId);
				Message.AppendUInt(Item.Id);
				Message.AppendStringWithBreak("");
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendStringWithBreak("");
				Session.SendMessage(Message);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:28,代碼來源:InteractorWiredTriggerState.cs

示例10: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session, true))
			{
				ServerMessage Message = new ServerMessage(465u);
				Message.AppendUInt(@class.RoomId);
				Message.AppendStringWithBreak(@class.Name);
				Message.AppendStringWithBreak(@class.Description);
				Message.AppendInt32(@class.State);
				Message.AppendInt32(@class.Category);
				Message.AppendInt32(@class.UsersMax);
				Message.AppendInt32(100);
				Message.AppendInt32(@class.Tags.Count);
				foreach (string current in @class.Tags)
				{
					Message.AppendStringWithBreak(current);
				}
				Message.AppendInt32(@class.UsersWithRights.Count);
				foreach (uint current2 in @class.UsersWithRights)
				{
					Message.AppendUInt(current2);
					Message.AppendStringWithBreak(PhoenixEnvironment.GetGame().GetClientManager().GetNameById(current2));
				}
				Message.AppendInt32(@class.UsersWithRights.Count);
				Message.AppendBoolean(@class.AllowPet);
				Message.AppendBoolean(@class.AllowPetsEating);
				Message.AppendBoolean(@class.AllowWalkthrough);
				Message.AppendBoolean(@class.Hidewall);
				Message.AppendInt32(@class.Wallthick);
				Message.AppendInt32(@class.Floorthick);
				Session.SendMessage(Message);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:34,代碼來源:GetRoomSettingsMessageEvent.cs

示例11: Serialize

		public void Serialize(ServerMessage Message)
		{
			Message.AppendInt32(BackgroundImage);
			Message.AppendInt32(ForegroundImage);
			Message.AppendInt32(Items.Count);
			foreach (KeyValuePair<int, int> Item in Items)
			{
				Message.AppendInt32(Item.Key);
				Message.AppendInt32(Item.Value);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:11,代碼來源:RoomIcon.cs

示例12: parse

 public void parse(GameClient Session, ClientMessage Request)
 {
     string motto = PhoenixEnvironment.FilterInjectionChars(Request.PopFixedString());
     if (motto.Length <= 50 && !(motto != ChatCommandHandler.ApplyWordFilter(motto)) && !(motto == Session.GetHabbo().Motto))
     {
         Session.GetHabbo().Motto = motto;
         using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
         {
             adapter.AddParamWithValue("motto", motto);
             adapter.ExecuteQuery("UPDATE users SET motto = @motto WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
         }
         if (Session.GetHabbo().CurrentQuestId == 17)
         {
             PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(17, Session);
         }
         ServerMessage message = new ServerMessage(484);
         message.AppendInt32(-1);
         message.AppendStringWithBreak(Session.GetHabbo().Motto);
         Session.SendMessage(message);
         if (Session.GetHabbo().InRoom)
         {
             Room currentRoom = Session.GetHabbo().CurrentRoom;
             if (currentRoom == null)
             {
                 return;
             }
             RoomUser roomUserByHabbo = currentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
             if (roomUserByHabbo == null)
             {
                 return;
             }
             ServerMessage message2 = new ServerMessage(266);
             message2.AppendInt32(roomUserByHabbo.VirtualId);
             message2.AppendStringWithBreak(Session.GetHabbo().Look);
             message2.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
             message2.AppendStringWithBreak(Session.GetHabbo().Motto);
             message2.AppendInt32(Session.GetHabbo().AchievementScore);
             message2.AppendStringWithBreak("");
             currentRoom.SendMessage(message2, null);
         }
         PhoenixEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 5, 1);
         if (Session.GetHabbo().FriendStreamEnabled)
         {
             using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
             {
                 adapter.AddParamWithValue("motto", motto);
                 string look = PhoenixEnvironment.FilterInjectionChars(Session.GetHabbo().Look);
                 adapter.AddParamWithValue("look", look);
                 adapter.ExecuteQuery("INSERT INTO `friend_stream` (`id`, `type`, `userid`, `gender`, `look`, `time`, `data`) VALUES (NULL, '3', '" + Session.GetHabbo().Id + "', '" + Session.GetHabbo().Gender + "', @look, UNIX_TIMESTAMP(), @motto);");
             }
         }
     }
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:53,代碼來源:ChangeMottoMessageEvent.cs

示例13: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(323);
			Message.AppendUInt(Session.GetHabbo().CurrentRoomId);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendStringWithBreak("Watercolour");
			Message.AppendStringWithBreak("Pendulum");
			Message.AppendInt32(1);
			Session.SendMessage(Message);
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:12,代碼來源:GetSoundMachinePlayListMessageEvent.cs

示例14: Compose

 public static ServerMessage Compose(int PlaylistCapacity, List<SongInstance> Playlist)
 {
     ServerMessage message = new ServerMessage(334);
     message.AppendInt32(PlaylistCapacity);
     message.AppendInt32(Playlist.Count);
     foreach (SongInstance instance in Playlist)
     {
         message.AppendInt32(instance.DiskItem.itemID);
         message.AppendInt32(instance.SongData.Id);
     }
     return message;
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:12,代碼來源:JukeboxDiscksComposer.cs

示例15: AddEffect

		public void AddEffect(int EffectId, int Duration)
		{
			using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
			{
				adapter.ExecuteQuery("INSERT INTO user_effects (user_id,effect_id,total_duration,is_activated,activated_stamp) VALUES ('" + UserId + "','" + EffectId + "','" + Duration + "','0','0')");
			}
			this.Effects.Add(new AvatarEffect(EffectId, Duration, false, 0.0));
			ServerMessage Message = new ServerMessage(461);
			Message.AppendInt32(EffectId);
			Message.AppendInt32(Duration);
			this.GetClient().SendMessage(Message);
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:12,代碼來源:AvatarEffectsInventoryComponent.cs


注:本文中的Phoenix.Messages.ServerMessage.AppendInt32方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。