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


C# ServerMessage.AppendStringWithBreak方法代码示例

本文整理汇总了C#中Essential.Messages.ServerMessage.AppendStringWithBreak方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendStringWithBreak方法的具体用法?C# ServerMessage.AppendStringWithBreak怎么用?C# ServerMessage.AppendStringWithBreak使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Essential.Messages.ServerMessage的用法示例。


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

示例1: SerializeTool

        public ServerMessage SerializeTool()
		{
            ServerMessage Message = new ServerMessage(Outgoing.OpenModTools); // Updated
            Message.AppendInt32(0);
			Message.AppendInt32(this.UserMessagePresets.Count);
			using (TimedLock.Lock(this.UserMessagePresets))
			{
				foreach (string current in this.UserMessagePresets)
				{
					Message.AppendStringWithBreak(current);
				}
			}
            Message.AppendInt32(0);
            Message.AppendBoolean(true); // ticket_queue fuse
            Message.AppendBoolean(true); // chatlog fuse
            Message.AppendBoolean(true); // message / caution fuse
            Message.AppendBoolean(true); // kick fuse
            Message.AppendBoolean(true); // band fuse
            Message.AppendBoolean(true); // broadcastshit fuse
            Message.AppendBoolean(true); // other shit fuse
            Message.AppendInt32(0);
			Message.AppendInt32(this.RoomMessagePresets.Count);
			using (TimedLock.Lock(this.RoomMessagePresets))
			{
				foreach (string current in this.RoomMessagePresets)
				{
					Message.AppendStringWithBreak(current);
				}
			}
			return Message;
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:31,代码来源:ModerationTool.cs

示例2: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			DataTable dataTable_ = Session.GetHabbo().dataTable_0;
			if (dataTable_ != null)
			{
                ServerMessage Message = new ServerMessage(Outgoing.UserGuilds);
				Message.AppendInt32(dataTable_.Rows.Count);
				foreach (DataRow dataRow in dataTable_.Rows)
				{
					GroupsManager @class = Groups.GetGroupById((int)dataRow["groupid"]);
					Message.AppendInt32(@class.Id);
                    Message.AppendStringWithBreak(@class.Name);
                    Message.AppendStringWithBreak(@class.Badge);
					if (Session.GetHabbo().FavouriteGroup == @class.Id) // is favorite group?
					{
						Message.AppendBoolean(true);
					}
					else
					{
						Message.AppendBoolean(false);
					}
				}
				Session.SendMessage(Message);
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:LoadUserGroupsEvent.cs

示例3: PollToServerMessage

 public ServerMessage PollToServerMessage(ServerMessage Message)
 {
     Message.AppendStringWithBreak(Question);
     Message.AppendInt32(Answers.Count);
     foreach (PollAnswer Answer in Answers)
     {
         Message.AppendInt32(Answer.ID);
         Message.AppendStringWithBreak(Answer.AnswerText);
     }
     return Message;
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:11,代码来源:Poll.cs

示例4: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
            ServerMessage Message = new ServerMessage(Outgoing.SoundMachinePlaylist); // Updated
			Message.AppendUInt(Session.GetHabbo().CurrentRoomId);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendStringWithBreak("Meh");
			Message.AppendStringWithBreak("Idk");
			Message.AppendInt32(1);
			Session.SendMessage(Message);
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:12,代码来源:GetSoundMachinePlayListMessageEvent.cs

示例5: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint uint_ = Event.PopWiredUInt();
			bool bool_ = Event.PopWiredBoolean();
			bool flag = Event.PopWiredBoolean();

            if (uint_ == Session.GetHabbo().CurrentRoomId)
            {
                return;
            }
           
            RoomData @class = Essential.GetGame().GetRoomManager().method_12(uint_);
			if (@class != null)
			{
                ServerMessage Message = new ServerMessage(Outgoing.GetGuestRoomResult); // Updated
                Message.AppendBoolean(false);
                Message.AppendUInt(@class.Id);
                Message.AppendBoolean(false);
                Message.AppendString(@class.Name);
                Message.AppendBoolean(true);
                Message.AppendInt32(@class.OwnerId);
                Message.AppendStringWithBreak(@class.Owner);
                Message.AppendInt32(@class.State); // @class state
                Message.AppendInt32(@class.UsersNow);
                Message.AppendInt32(@class.UsersMax);
                Message.AppendStringWithBreak(@class.Description);
                Message.AppendInt32(0); // dunno!
                Message.AppendInt32((@class.Category == 9) ? 2 : 0); // can trade!
                Message.AppendInt32(@class.Score);
                Message.AppendInt32(@class.Category);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendStringWithBreak("");
                Message.AppendInt32(@class.TagCount);

                foreach (string Tag in @class.Tags)
                {
                    Message.AppendStringWithBreak(Tag);
                }
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendBoolean(true);
                Message.AppendBoolean(false);
                Message.AppendBoolean(true);
                Message.AppendString("");
                Message.AppendBoolean(false);
				Session.SendMessage(Message);
          
                Session.GetClientMessageHandler().method_5(@class.Id, "");

			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:53,代码来源:GetGuestRoomMessageEvent.cs

示例6: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(Outgoing.WardrobeData); //Rootkit
     Message.AppendInt32(Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") ? 1 : 0);
     if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
     {
         using (DatabaseClient @class = Essential.GetDatabase().GetClient())
         {
             @class.AddParamWithValue("userid", Session.GetHabbo().Id);
             DataTable dataTable = @class.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
             if (dataTable == null)
             {
                 Message.AppendInt32(0);
             }
             else
             {
                 Message.AppendInt32(dataTable.Rows.Count);
                 foreach (DataRow dataRow in dataTable.Rows)
                 {
                     Message.AppendUInt((uint)dataRow["slot_id"]);
                     Message.AppendStringWithBreak((string)dataRow["look"]);
                     Message.AppendStringWithBreak((string)dataRow["gender"]);
                 }
             }
         }
         Session.SendMessage(Message);
     }
     else
     {
         using (DatabaseClient @class = Essential.GetDatabase().GetClient())
         {
             @class.AddParamWithValue("userid", Session.GetHabbo().Id);
             DataTable dataTable = @class.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
             if (dataTable == null)
             {
                 Message.AppendInt32(0);
             }
             else
             {
                 Message.AppendInt32(dataTable.Rows.Count);
                 foreach (DataRow dataRow in dataTable.Rows)
                 {
                     Message.AppendUInt((uint)dataRow["slot_id"]);
                     Message.AppendStringWithBreak((string)dataRow["look"]);
                     Message.AppendStringWithBreak((string)dataRow["gender"]);
                 }
             }
         }
         Session.SendMessage(Message);
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:51,代码来源:GetWardrobeMessageEvent.cs

示例7: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null)
			{
				RoomItem class2 = @class.method_28(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
                    ServerMessage Message = new ServerMessage(Outgoing.OpenPostIt); // Update
					Message.AppendStringWithBreak(class2.uint_0.ToString());
					Message.AppendStringWithBreak(class2.ExtraData);
					Session.SendMessage(Message);
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:15,代码来源:GetItemDataMessageEvent.cs

示例8: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
				{
                    ServerMessage Message = new ServerMessage(Outgoing.DimmerData); // Updated
					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(Essential.BooleanToString(current.BackgroundOnly)) + 1);
						Message.AppendStringWithBreak(current.ColorCode);
						Message.AppendInt32(current.ColorIntensity);
					}
					Session.SendMessage(Message);
				}
			}
			catch
			{
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:RoomDimmerGetPresetsMessageEvent.cs

示例9: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            if (!Session.GetHabbo().CurrentRoom.CCTs.Contains("park"))
            {
                return;
            }

            if (Session.GetHabbo().CurrentRoom.IsInfobusOpen == false)
            {
                ServerMessage InfobusClosed = new ServerMessage(Outgoing.InfobusMessage);
                InfobusClosed.AppendStringWithBreak("Ich bin zurzeit geschlossen! Komm später wieder.");
                Session.SendMessage(InfobusClosed);
            }
            else
            {
                Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).MoveTo(28, 5);

                if (Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).X == 28 && Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).Y == 5)
                {
                    ServerMessage Message = new ServerMessage(Outgoing.RoomForward);
                    Message.AppendBoolean(true);
                    Message.AppendInt32(56);
                    Session.SendMessage(Message);
                }
                    
                
            }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:EnterInfobusMessageEvent.cs

示例10: Handle

		public void Handle(GameClient session, ClientMessage message)
		{
			if (session != null && session.GetHabbo() != null)
			{
				Room room = Essential.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);

				if (room != null)
				{
					RoomUser targetUser = room.GetRoomUserByHabbo(message.PopWiredUInt());

					if (targetUser != null && !targetUser.IsBot && targetUser.GetClient() != null)
					{
                        ServerMessage Message = new ServerMessage(Outgoing.UpdateBadges); // Updated

						Message.AppendUInt(targetUser.GetClient().GetHabbo().Id);
						Message.AppendInt32(targetUser.GetClient().GetHabbo().GetBadgeComponent().VisibleBadges);

						using (TimedLock.Lock(targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges()))
						{
							foreach (Badge current in targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges())
							{
								if (current.Slot > 0)
								{
									Message.AppendInt32(current.Slot);
									Message.AppendStringWithBreak(current.Code);
								}
							}
						}

						session.SendMessage(Message);
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:34,代码来源:GetSelectedBadgesMessageEvent.cs

示例11: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
             ServerMessage Message = new ServerMessage(Outgoing.PetRace); //Rootkit
             string PetType = Event.PopFixedString();
             Message.AppendStringWithBreak(PetType);
             int petid = int.Parse(PetType.Substring(PetType.IndexOf('t'), PetType.Length - PetType.IndexOf('t')).Replace("t",""));
            if (PetRace.RaceGotRaces(petid))
            {
                List<PetRace> Races = PetRace.GetRacesForRaceId(petid);
                Message.AppendInt32(Races.Count);
                foreach (PetRace r in Races)
                {
                    Message.AppendInt32(petid);
                    Message.AppendInt32(r.Color1);
                    Message.AppendInt32(r.Color2);
                    Message.AppendBoolean(r.Has1Color);
                    Message.AppendBoolean(r.Has2Color); 
                }
            }
            else
            {
                Message.AppendInt32(0);
            }
				Session.SendMessage(Message);
			}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:GetSellablePetBreedsEvent.cs

示例12: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room Room = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (Room != null && Room.CheckRights(Session, true))
            {

                        ServerMessage LoadUsersWithRights = new ServerMessage(Outgoing.FlatControllerAdded);
                        LoadUsersWithRights.AppendUInt(Room.Id);
                        LoadUsersWithRights.AppendInt32(Room.UsersWithRights.Count);
                        foreach (uint current2 in Room.UsersWithRights)
                        {

                            LoadUsersWithRights.AppendUInt(current2);
                            LoadUsersWithRights.AppendString(Essential.GetGame().GetClientManager().GetNameById(current2));
                        }
                        Session.SendMessage(LoadUsersWithRights);

                        foreach (uint current3 in Room.UsersWithRights)
                        {
                            ServerMessage serverMessage = new ServerMessage(Outgoing.GivePowers); // Updated
                            serverMessage.AppendUInt(Room.Id);
                            serverMessage.AppendUInt(current3);
                            serverMessage.AppendStringWithBreak(Essential.GetGame().GetClientManager().GetNameById(current3));
                            Session.SendMessage(serverMessage);
                        }
        
            }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:GetFlatControlsMessageEvent.cs

示例13: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			int num = Event.PopWiredInt32();
			List<uint> list = new List<uint>();
			for (int i = 0; i < num; i++)
			{
				list.Add(Event.PopWiredUInt());
			}
			string text = Event.PopFixedString();
			
				text = Essential.DoFilter(text, true, false);
				text = ChatCommandHandler.ApplyFilter(text);
                ServerMessage Message = new ServerMessage(Outgoing.InstantInvite); // Update
				Message.AppendUInt(Session.GetHabbo().Id);
				Message.AppendStringWithBreak(text);
				foreach (uint current in list)
				{
					if (Session.GetHabbo().GetMessenger().method_9(Session.GetHabbo().Id, current))
					{
						GameClient @class = Essential.GetGame().GetClientManager().GetClient(current);
						if (@class == null)
						{
							break;
						}
						@class.SendMessage(Message);
					}
				}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:SendRoomInviteMessageEvent.cs

示例14: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            RoomData @class = Essential.GetGame().GetRoomManager().method_12(Session.GetHabbo().uint_2);

            ServerMessage Message = new ServerMessage(Outgoing.InitialRoomInformation); // P
            Message.AppendStringWithBreak(@class.ModelName);
            Message.AppendUInt(@class.Id);
            Session.SendMessage(Message);

        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:10,代码来源:GetInitParamsMessageEvent.cs

示例15: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Session.GetHabbo().GetBadgeComponent().ResetBadgeSlots();
			using (DatabaseClient @class = Essential.GetDatabase().GetClient())
			{
				@class.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 > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "WEARBADGE")
				{
                    Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
				}
				Session.GetHabbo().GetBadgeComponent().GetBadgeByCode(text).Slot = num;
				using (DatabaseClient @class = Essential.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(Outgoing.UpdateBadges); // Updated
			Message.AppendUInt(Session.GetHabbo().Id);
			Message.AppendInt32(Session.GetHabbo().GetBadgeComponent().VisibleBadges);
			foreach (Badge current in Session.GetHabbo().GetBadgeComponent().GetBadges())
			{
				if (current.Slot > 0)
				{
					Message.AppendInt32(current.Slot);
					Message.AppendStringWithBreak(current.Code);
				}
			}
            if (Session.GetHabbo().InRoom && Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
			{
				Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
			}
			else
			{
				Session.SendMessage(Message);
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:55,代码来源:SetActivatedBadgesEvent.cs


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