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


C# ServerMessage.AppendBoolean方法代码示例

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


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

示例1: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     string text = Event.PopFixedString();
     ServerMessage Message = new ServerMessage(7u);
     Message.AppendStringWithBreak(text.ToLower());
     if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip"))
     {
         double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1("habbo_vip").Int32_0;
         double num2 = num - GoldTree.GetUnixTimestamp();
         int num3 = (int)Math.Ceiling(num2 / 86400.0);
         int num4 = num3 / 31;
         if (num4 >= 1)
         {
             num4--;
         }
         Message.AppendInt32(num3 - num4 * 31);
         Message.AppendBoolean(true);
         Message.AppendInt32(num4);
         Message.AppendBoolean(true);
         Message.AppendBoolean(true);
         Message.AppendBoolean(Session.GetHabbo().Vip);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
     }
     else
     {
         if (Session.GetHabbo().GetSubscriptionManager().HasSubscription(text))
         {
             double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1(text).Int32_0;
             double num2 = num - GoldTree.GetUnixTimestamp();
             int num3 = (int)Math.Ceiling(num2 / 86400.0);
             int num4 = num3 / 31;
             if (num4 >= 1)
             {
                 num4--;
             }
             Message.AppendInt32(num3 - num4 * 31);
             Message.AppendBoolean(true);
             Message.AppendInt32(num4);
             if (Session.GetHabbo().Rank >= 2u)
             {
                 Message.AppendInt32(1);
                 Message.AppendInt32(1);
                 Message.AppendInt32(2);
             }
             else
             {
                 Message.AppendInt32(1);
             }
         }
         else
         {
             for (int i = 0; i < 3; i++)
             {
                 Message.AppendInt32(0);
             }
         }
     }
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:60,代码来源:ScrGetUserInfoMessageEvent.cs

示例2: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     DataTable dataTable_ = Session.GetHabbo().dataTable_0;
     if (dataTable_ != null)
     {
         ServerMessage Message = new ServerMessage(915u);
         Message.AppendInt32(dataTable_.Rows.Count);
         foreach (DataRow dataRow in dataTable_.Rows)
         {
             GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]);
             Message.AppendInt32(@class.int_0);
             Message.AppendStringWithBreak(@class.string_0);
             Message.AppendStringWithBreak(@class.string_2);
             if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group?
             {
                 Message.AppendBoolean(true);
             }
             else
             {
                 Message.AppendBoolean(false);
             }
         }
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:LoadUserGroupsEvent.cs

示例3: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && @class.CheckRights(Session, true))
     {
         ServerMessage Message = new ServerMessage(465u);
         Message.AppendUInt(@class.Id);
         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(GoldTree.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:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:34,代码来源:GetRoomSettingsMessageEvent.cs

示例4: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(512u);
     if (Session.GetHabbo().list_6.Count > LicenseTools.Int32_4)
     {
         Message.AppendBoolean(true);
         Message.AppendInt32(LicenseTools.Int32_4);
     }
     else
     {
         Message.AppendBoolean(false);
     }
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:14,代码来源:CanCreateRoomMessageEvent.cs

示例5: method_10

 public ServerMessage method_10(string string_0)
 {
     DataTable dataTable = null;
     using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
     {
         @class.AddParamWithValue("query", string_0);
         dataTable = @class.ReadDataTable("SELECT Id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query LIMIT 25");
     }
     ServerMessage Message = new ServerMessage(521u);
     ServerMessage result;
     if (dataTable == null)
     {
         Message.AppendBoolean(false);
         result = Message;
     }
     else
     {
         Message.AppendInt32(dataTable.Rows.Count);
         foreach (DataRow dataRow in dataTable.Rows)
         {
             Message.AppendUInt((uint)dataRow["Id"]);
             Message.AppendStringWithBreak((string)dataRow["title"]);
         }
         result = Message;
     }
     return result;
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:27,代码来源:HelpTool.cs

示例6: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(5u);
     Message.AppendStringWithBreak(Session.GetHabbo().Id.ToString());
     Message.AppendStringWithBreak(Session.GetHabbo().Username);
     Message.AppendStringWithBreak(Session.GetHabbo().Figure);
     Message.AppendStringWithBreak(Session.GetHabbo().Gender.ToUpper());
     Message.AppendStringWithBreak(Session.GetHabbo().Motto);
     Message.AppendStringWithBreak(Session.GetHabbo().RealName);
     Message.AppendBoolean(false);
     Message.AppendInt32(Session.GetHabbo().Respect);
     Message.AppendInt32(Session.GetHabbo().int_21);
     Message.AppendInt32(Session.GetHabbo().int_22);
     Message.AppendBoolean(false);
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:16,代码来源:InfoRetrieveMessageEvent.cs

示例7: Handle

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

示例8: Handle

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

示例9: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     Event.PopFixedString();
     Event.PopWiredInt32();
     RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
     if (@class != null)
     {
         if (@class.Type == "private")
         {
             ServerMessage Message = new ServerMessage(286u);
             Message.AppendBoolean(@class.IsPublicRoom);
             Message.AppendUInt(num);
             Session.SendMessage(Message);
         }
         else
         {
             ServerMessage Message2 = new ServerMessage(453u);
             Message2.AppendUInt(@class.Id);
             Message2.AppendStringWithBreak(@class.CCTs);
             Message2.AppendUInt(@class.Id);
             Session.SendMessage(Message2);
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:GetPublicSpaceCastLibsMessageEvent.cs

示例10: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(611u);
     Message.AppendBoolean(true);
     Message.AppendInt32(2);
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:7,代码来源:GetMarketplaceCanMakeOfferEvent.cs

示例11: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint uint_ = Event.PopWiredUInt();
     bool bool_ = Event.PopWiredBoolean();
     bool flag = Event.PopWiredBoolean();
     RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(uint_);
     if (@class != null)
     {
         ServerMessage Message = new ServerMessage(454u);
         Message.AppendBoolean(bool_);
         @class.method_3(Message, false, flag);
         Message.AppendBoolean(flag);
         Message.AppendBoolean(bool_);
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:16,代码来源:GetGuestRoomMessageEvent.cs

示例12: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     int num = Event.PopWiredInt32();
     if (num > 0 && (Session != null && Session.GetHabbo() != null))
     {
         Session.GetHabbo().int_0 = 0;
         if (Session.GetHabbo().InRoom)
         {
             Room class14_ = Session.GetHabbo().CurrentRoom;
             RoomUser @class = class14_.GetRoomUserByHabbo(Session.GetHabbo().Id);
             ServerMessage Message = new ServerMessage(28u);
             Message.AppendInt32(1);
             @class.method_14(Message);
             class14_.SendMessage(Message, null);
         }
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.ExecuteQuery("UPDATE user_stats SET groupid = 0 WHERE Id = " + Session.GetHabbo().Id + " LIMIT 1;");
         }
         DataTable dataTable_ = Session.GetHabbo().dataTable_0;
         if (dataTable_ != null)
         {
             ServerMessage Message2 = new ServerMessage(915u);
             Message2.AppendInt32(dataTable_.Rows.Count);
             foreach (DataRow dataRow in dataTable_.Rows)
             {
                 GroupsManager class3 = Groups.smethod_2((int)dataRow["groupid"]);
                 Message2.AppendInt32(class3.int_0);
                 Message2.AppendStringWithBreak(class3.string_0);
                 Message2.AppendStringWithBreak(class3.string_2);
                 if (Session.GetHabbo().int_0 == class3.int_0)
                 {
                     Message2.AppendBoolean(true);
                 }
                 else
                 {
                     Message2.AppendBoolean(false);
                 }
             }
             Session.SendMessage(Message2);
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:43,代码来源:RemoveGuildFavorite.cs

示例13: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Dictionary<Room, int> dictionary = GoldTree.GetGame().GetRoomManager().method_21();
     Room @class = null;
     IEnumerable<Room> arg_35_0 = dictionary.Keys;
     if (FindNewFriendsMessageEvent.func_0 == null)
     {
         FindNewFriendsMessageEvent.func_0 = new Func<Room, int>(FindNewFriendsMessageEvent.smethod_0);
     }
     IOrderedEnumerable<Room> orderedEnumerable = arg_35_0.OrderByDescending(FindNewFriendsMessageEvent.func_0);
     int num = 0;
     foreach (Room current in orderedEnumerable)
     {
         num++;
         string a = GoldTree.smethod_5(1, 5).ToString();
         if (a == "2")
         {
             goto IL_83;
         }
         if (num == orderedEnumerable.Count<Room>())
         {
             goto IL_83;
         }
         bool arg_A2_0 = true;
         IL_A2:
         if (arg_A2_0)
         {
             continue;
         }
         @class = current;
         break;
         IL_83:
         arg_A2_0 = (Session == null ||Session.GetHabbo() == null || Session.GetHabbo().CurrentRoom == null || Session.GetHabbo().CurrentRoom == current);
         goto IL_A2;
     }
     if (@class == null)
     {
         ServerMessage Message = new ServerMessage(831u);
         Message.AppendBoolean(false);
         Session.SendMessage(Message);
     }
     else
     {
         ServerMessage Message2 = new ServerMessage(286u);
         Message2.AppendBoolean(@class.Boolean_3);
         Message2.AppendUInt(@class.Id);
         Session.SendMessage(Message2);
         ServerMessage Message3 = new ServerMessage(831u);
         Message3.AppendBoolean(true);
         Session.SendMessage(Message3);
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:52,代码来源:FindNewFriendsMessageEvent.cs

示例14: 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(GoldTree.GetGame().GetQuestManager().GetHighestLevelForType(this.Type));
     if (GoldTree.GetGame().GetQuestManager().GetHighestLevelForType(this.Type) == this.Level && Session.GetHabbo().CompletedQuests.Contains(this.Id) && !Single)
     {
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendStringWithBreak("");
         Message.AppendStringWithBreak("");
         Message.AppendInt32(0);
         Message.AppendStringWithBreak("");
         Message.AppendInt32(0);
         Message.AppendInt32(0);
         Message.AppendInt32(0);
     }
     else
     {
         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(0);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:39,代码来源:Quest.cs

示例15: method_1

 public void method_1(GameClient Session, uint uint_0, int int_0)
 {
     UserItem @class = Session.GetHabbo().method_23().method_10(uint_0);
     if (@class == null || int_0 > LicenseTools.int_0 || !this.method_0(@class))
     {
         ServerMessage Message = new ServerMessage(610u);
         Message.AppendBoolean(false);
         Session.SendMessage(Message);
     }
     else
     {
         int num = this.method_2((float)int_0);
         int num2 = int_0 + num;
         int num3 = 1;
         if (@class.method_1().Type == 'i')
         {
             num3++;
         }
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.AddParamWithValue("public_name", @class.method_1().PublicName);
             class2.AddParamWithValue("extra_data", @class.string_0);
             class2.ExecuteQuery(string.Concat(new object[]
             {
                 "INSERT INTO catalog_marketplace_offers (furni_id, item_id,user_id,asking_price,total_price,public_name,sprite_id,item_type,timestamp,extra_data) VALUES ('",
                 uint_0,
                 "','",
                 @class.uint_1,
                 "','",
                 Session.GetHabbo().Id,
                 "','",
                 int_0,
                 "','",
                 num2,
                 "',@public_name,'",
                 @class.method_1().Sprite,
                 "','",
                 num3,
                 "','",
                 GoldTree.GetUnixTimestamp(),
                 "',@extra_data)"
             }));
         }
         Session.GetHabbo().method_23().method_12(uint_0, 0u, true);
         ServerMessage Message2 = new ServerMessage(610u);
         Message2.AppendBoolean(true);
         Session.SendMessage(Message2);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:49,代码来源:Marketplace.cs


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