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


C# ServerMessage.AppendBoolean方法代码示例

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


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

示例1: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (Session.GetHabbo().CurrentRoom.CheckRights(Session, true))
     {
         ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
         message.AppendBoolean(false);
         if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
             message.AppendInt32(1000000);
         else
             message.AppendInt32(5);
         message.AppendInt32(0);
         message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         message.AppendInt32(RoomItem_0.uint_0);
         message.AppendString("");
         message.AppendInt32(2);
         if (!string.IsNullOrEmpty(RoomItem_0.string_3))
         {
             message.AppendInt32(int.Parse(RoomItem_0.string_3.Split(';')[0]));
             message.AppendInt32(int.Parse(RoomItem_0.string_3.Split(';')[1]));
         }
         else
         {
             message.AppendInt32(1);
             message.AppendInt32(50);
         }
         message.AppendBoolean(false);
         message.AppendInt32(0);
         message.AppendInt32(1290);
         Session.SendMessage(message);
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:31,代码来源:InteractorConditionUserCount.cs

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

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

示例4: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            int GameId = Event.PopWiredInt32();


            ServerMessage InitGame = new ServerMessage(Outgoing.GameID);
            InitGame.AppendInt32(GameId);
            InitGame.AppendInt32(0);
            Session.SendMessage(InitGame);


           ServerMessage Game2WeeklyLeaderboardEvent = new ServerMessage(Outgoing.Game2WeeklyLeaderboard);
            Game2WeeklyLeaderboardEvent.AppendInt32(DateTime.Now.Year);
            Game2WeeklyLeaderboardEvent.AppendInt32(1); // ??
            Game2WeeklyLeaderboardEvent.AppendInt32(0); // ??
            Game2WeeklyLeaderboardEvent.AppendInt32(0); // ??
            Game2WeeklyLeaderboardEvent.AppendInt32(5231); // ??
            Game2WeeklyLeaderboardEvent.AppendInt32(1); // count:
            // foreach...
            Game2WeeklyLeaderboardEvent.AppendUInt(Session.GetHabbo().Id); // user id
            Game2WeeklyLeaderboardEvent.AppendInt32(DateTime.Now.Year); // time of clasification
            Game2WeeklyLeaderboardEvent.AppendInt32(1); // position
            Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Username); // username
            Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Figure);
            Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Gender.ToLower());

            Game2WeeklyLeaderboardEvent.AppendInt32(3);
            Game2WeeklyLeaderboardEvent.AppendInt32(GameId);
            Session.SendMessage(Game2WeeklyLeaderboardEvent);


            ServerMessage Game2AccountGameStatusMessageEvent = new ServerMessage(Outgoing.Game2AccountGameStatus); 
            Game2AccountGameStatusMessageEvent.AppendInt32(GameId);
            Game2AccountGameStatusMessageEvent.AppendInt32(-1);
            Game2AccountGameStatusMessageEvent.AppendInt32(132);
            Session.SendMessage(Game2AccountGameStatusMessageEvent);

            ServerMessage InitGame2 = new ServerMessage(Outgoing.InitGame);
            InitGame2.AppendInt32(GameId);
            InitGame2.AppendInt32(0);
            Session.SendMessage(InitGame2);


            ServerMessage GameCenterLayoutBestOfWeek = new ServerMessage(Outgoing.BestOfWeek);
            GameCenterLayoutBestOfWeek.AppendInt32(GameId);
            GameCenterLayoutBestOfWeek.AppendInt32(0); // enabled 0 : 1
            // if enabled
            GameCenterLayoutBestOfWeek.AppendString("s");
            GameCenterLayoutBestOfWeek.AppendInt32(4313);
            GameCenterLayoutBestOfWeek.AppendString("200");
            GameCenterLayoutBestOfWeek.AppendInt32(1);
            GameCenterLayoutBestOfWeek.AppendInt32(-1);
            GameCenterLayoutBestOfWeek.AppendBoolean(false);
            //
            GameCenterLayoutBestOfWeek.AppendInt32(5231); // minutos que quedan.
            GameCenterLayoutBestOfWeek.AppendBoolean(false); // enabled??
            Session.SendMessage(GameCenterLayoutBestOfWeek);

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

示例5: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0)
			{
                ServerMessage message = new ServerMessage(Outgoing.WiredFurniTrigger);
                message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                    message.AppendInt32(1000000);
                else
                    message.AppendInt32(5);
                message.AppendInt32(0);
                message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
                message.AppendInt32(RoomItem_0.uint_0);
                if (RoomItem_0.string_3.Length > 0)
                {
                    message.AppendString(RoomItem_0.string_3);
                }
                else
                {
                    message.AppendString("I");
                }
                message.AppendInt32(1);
                message.AppendInt32(1);
                message.AppendInt32(1);
                message.AppendInt32(3);
                message.AppendInt32(0);
                message.AppendInt32(0);
                Session.SendMessage(message);
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:30,代码来源:InteractorWiredAtTime.cs

示例6: Serialize

 internal void Serialize(ServerMessage Message)
 {
     try
     {
         Message.AppendInt32(this.Id);
         Message.AppendString((this.itemType != PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
         Message.AppendString(this.Description);
         Message.AppendInt32(this.Type);
         Message.AppendString((this.itemType == PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
         Message.AppendString(this.Image);
         Message.AppendInt32((this.ParentId > 0) ? this.ParentId : 0);
         Message.AppendInt32((this.RoomInfo != null) ? this.RoomInfo.UsersNow : 0);
         Message.AppendInt32((this.itemType == PublicItemType.NONE) ? 0 : ((this.itemType == PublicItemType.TAG) ? 1 : ((this.itemType == PublicItemType.FLAT) ? 2 : ((this.itemType == PublicItemType.PUBLIC_FLAT) ? 2 : ((this.itemType == PublicItemType.CATEGORY) ? 4 : 0)))));
         if (this.itemType == PublicItemType.TAG)
         {
             Message.AppendString(this.TagsToSearch);
         }
         else if (this.itemType == PublicItemType.CATEGORY)
         {
             Message.AppendBoolean(false);
         }
         else if (this.itemType == PublicItemType.FLAT)
         {
             this.RoomInfo.Serialize(Message, false, false);
         }
         else if (this.itemType == PublicItemType.PUBLIC_FLAT)
         {
             this.RoomInfo.Serialize(Message, false, false);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine("Exception on publicitems composing: " + exception.ToString());
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:35,代码来源:PublicItem.cs

示例7: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0)
			{
                ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
                Message.AppendBoolean(false);
                Message.AppendInt32(5);
                if (RoomItem_0.string_3 != "")
                {
                    Message.AppendInt32(RoomItem_0.string_3.Split(',').Length);

                    foreach (string ItemId in RoomItem_0.string_3.Split(','))
                    {
                        Message.AppendInt32(int.Parse(ItemId));
                    }
                }
                else
                {
                    Message.AppendInt32(0);
                }
                Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
                Message.AppendUInt(RoomItem_0.uint_0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(1);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:WiredInteractor.cs

示例8: Handle

 public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
 {
     using(DatabaseClient dbClient = Essential.GetDatabase().GetClient())
     {
         string username = Event.PopFixedString();
         string password = Event.PopFixedString(); //TODO: Hash undso..
         dbClient.AddParamWithValue("username", username);
         
         string currentpassword = "";
         try
         {
             currentpassword = dbClient.ReadString("SELECT password FROM users WHERE [email protected]");
         }
         catch { }
         if (currentpassword == "")
         { Session.SendMessage(new ServerMessage(Outgoing.InvalidUsername)); return; }
         if (currentpassword != password)
         { Session.SendMessage(new ServerMessage(Outgoing.InvalidPassword)); return; }
         ServerMessage asdf = new ServerMessage(12345);
         asdf.AppendBoolean(true);
         asdf.AppendString("Hi");
         asdf.AppendInt32(1337);
         asdf.AppendUInt(12345);
         Session.SendMessage(asdf);
         Session.tryLogin(dbClient.ReadString("SELECT auth_ticket FROM users WHERE [email protected]"));
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:LoginWithUsernameAndPasswordEvent.cs

示例9: OnTrigger

		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
            if (bool_0)
            {
                ServerMessage message = new ServerMessage(Outgoing.WiredEffect); // Updated
                message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                    message.AppendInt32(1000000);
                else
                    message.AppendInt32(5);
                message.AppendInt32(0);
                message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
                message.AppendInt32(RoomItem_0.uint_0);
                message.AppendString("");
                message.AppendInt32(2);
                if (RoomItem_0.string_2 != "")
                    message.AppendInt32(int.Parse(RoomItem_0.string_2));
                else
                    message.AppendInt32(5);
                if (RoomItem_0.string_3 != "")
                    message.AppendInt32(int.Parse(RoomItem_0.string_3));
                else
                    message.AppendInt32(1);
                message.AppendInt32(0);
                message.AppendInt32(6);
                message.AppendInt32(0);
                message.AppendInt32(0);
                message.AppendInt32(0);
                Session.SendMessage(message);
            }
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:31,代码来源:InteractorWiredGivePoints.cs

示例10: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0)
     {
         ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
         Message.AppendBoolean(false);
         if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
             Message.AppendInt32(1000000);
         else
             Message.AppendInt32(5);
         Message.AppendInt32(0);
         Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         Message.AppendUInt(RoomItem_0.uint_0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Session.SendMessage(Message);
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:InteractorWiredConditionTimeMoreOrLess.cs

示例11: SerializeItem

 internal void SerializeItem(ServerMessage Message)
 {
     Message.AppendString(this.Name);
     Message.AppendInt32(this.ItemId);
     Message.AppendInt32(this.X);
     Message.AppendInt32(this.Y);
     Message.AppendInt32(this.Rot);
     Message.AppendInt32(1);
     Message.AppendInt32(this.SpriteId);
     Message.AppendInt32(this.Name.Contains("background") ? 1 : 0);
     Message.AppendInt32(0);
     Message.AppendBoolean(true);
     if (this.Name.Contains("background"))
     {
         Message.AppendInt32(1);
         Message.AppendInt32(5);
         Message.AppendString("state");
         Message.AppendString("0");
         Message.AppendString("offsetZ");
         Message.AppendString("9920");
         Message.AppendString("offsetY");
         Message.AppendString("1520");
         Message.AppendString("imageUrl");
         Message.AppendString("http://localhost/r63B/c_images/DEV_tests/snst_bg_2_big.png");
         Message.AppendString("offsetX");
         Message.AppendString("-1070");
     }
     else
     {
         Message.AppendInt32(0);
         Message.AppendString(this.Extradata);
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:33,代码来源:SnowItems.cs

示例12: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
            RoomData @class = Essential.GetGame().GetRoomManager().method_12(num);
			if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
			{
			}
			else
			{
                ServerMessage Message2 = new ServerMessage(Outgoing.FavsUpdate); // Updated
				Message2.AppendUInt(num);
				Message2.AppendBoolean(true);
				Session.SendMessage(Message2);
				Session.GetHabbo().list_1.Add(num);
				using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
				{
					class2.ExecuteQuery(string.Concat(new object[]
					{
						"INSERT INTO user_favorites (user_id,room_id) VALUES ('",
						Session.GetHabbo().Id,
						"','",
						num,
						"')"
					}));
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:AddFavouriteRoomMessageEvent.cs

示例13: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage message = new ServerMessage(Outgoing.SendGuildParts); //Rootkit
     message.AppendInt32(10);
     message.AppendInt32((int)(Session.GetHabbo().OwnedRooms.Count - this.GetMyRoomsGuilds(Session)));
     foreach (RoomData data in Session.GetHabbo().OwnedRooms)
     {
         if (data.GuildId == 0)
         {
             message.AppendInt32(data.Id);
             message.AppendString(data.Name);
             message.AppendBoolean(false);
         }
     }
     message.AppendInt32(5);
     message.AppendInt32(10);
     message.AppendInt32(3);
     message.AppendInt32(4);
     message.AppendInt32(0x19);
     message.AppendInt32(0x11);
     message.AppendInt32(5);
     message.AppendInt32(0x19);
     message.AppendInt32(0x11);
     message.AppendInt32(3);
     message.AppendInt32(0x1d);
     message.AppendInt32(11);
     message.AppendInt32(4);
     message.AppendInt32(0);
     message.AppendInt32(0);
     message.AppendInt32(0);
     Session.SendMessage(message);
     Session.SendMessage(Essential.GetGame().GetCatalog().groupsDataMessage);
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:33,代码来源:OpenGuildPageMessageEvent.cs

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

示例15: Serialize

		public void Serialize(ServerMessage Message, GameClient Session, bool Single)
		{
			Message.AppendStringWithBreak(this.Type);
			if (Session.GetHabbo().CompletedQuests.Contains(this.Id))
			{
				Message.AppendInt32(this.Level);
			}
			else
			{
				Message.AppendInt32(this.Level - 1);
			}
			Message.AppendInt32(Essential.GetGame().GetQuestManager().GetHighestLevelForType(this.Type));
			if (Essential.GetGame().GetQuestManager().GetHighestLevelForType(this.Type) == this.Level && Session.GetHabbo().CompletedQuests.Contains(this.Id) && !Single)
			{
				Message.AppendInt32(0);
				Message.AppendInt32(0);
                Message.AppendBoolean(false);
				Message.AppendStringWithBreak("");
				Message.AppendStringWithBreak("");
				Message.AppendInt32(0);
				Message.AppendStringWithBreak("");
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
                Message.AppendStringWithBreak("");
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(true);
			}
			else
			{
                Message.AppendInt32(-1);
                Message.AppendUInt(this.Id);
				//Message.AppendBoolean(false);
			//	Message.AppendUInt(this.Id);
				Message.AppendBoolean(Session.GetHabbo().CurrentQuestId == this.Id);
				Message.AppendStringWithBreak(this.Action.StartsWith("FIND") ? "FIND_STUFF" : this.Action);
				Message.AppendStringWithBreak("_2");
				Message.AppendInt32(this.PixelReward);
				Message.AppendStringWithBreak(this.Action.Replace("_", ""));
				Message.AppendInt32(Session.GetHabbo().CurrentQuestProgress);
				Message.AppendInt32(this.NeedForLevel);
				Message.AppendInt32(Essential.GetGame().GetQuestManager().GetIntValue(this.Type));
                Message.AppendStringWithBreak("set_kuurna");
                Message.AppendStringWithBreak("MAIN_CHAIN");
                Message.AppendBoolean(true);
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:47,代码来源:Quest.cs


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