• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Messages.Response类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetFeaturedResponse

        public Response GetFeaturedResponse()
        {
            try
            {
                Response Response = new Response(450);
                Response.AppendInt32(FeacturedItems.Count);

                foreach (FeacturedItem FeacturedItem in GetRoomsForCategory(-1))
                {
                    FeacturedItem.GetResponse(Response);

                    foreach (FeacturedItem Room in GetRoomsForCategory(FeacturedItem.Id))
                    {
                        Room.GetResponse(Response);
                    }
                }

                return Response;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                return null;
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:25,代码来源:NavigatorReactor.cs


示例2: CreateRoom

        private void CreateRoom(Client Client, Request Request)
        {
            int Limit = BrickEngine.GetConfigureFile().CallIntKey("max.rooms.amount");
            int RoomAmount = BrickEngine.GetRoomReactor().GetMe(Client.GetUser().HabboId).Count;

            if (RoomAmount >= Limit)
            {
                Client.Notif("You're over the rooms limit, first delete a room before you create a new one.", false);
                return;
            }

            string RawName = Request.PopFixedString();
            string RawModel = Request.PopFixedString();

            int RoomId = -1;

            if ((RoomId = BrickEngine.GetRoomReactor().CreateRoom(Client, RawName, RawModel)) > 0)
            {
                Response Response = new Response(59);
                Response.AppendInt32(RoomId);
                Response.AppendStringWithBreak(BrickEngine.CleanString(RawName));
                Client.SendResponse(Response);
            }
            else
            {
                CheckRoomCreate(Client, null);
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:28,代码来源:Navigator.cs


示例3: GetResponse

        public void GetResponse(Response Response)
        {
            StringBuilder PacketBuilder = new StringBuilder();
            Response.AppendInt32(ShopItemId);

            PacketBuilder.Append("HABBO_CLUB_");
            PacketBuilder.Append(MemberShipType.ToUpper());
            PacketBuilder.Append('_');
            PacketBuilder.Append(MonthsAmount);
            PacketBuilder.Append("_MONTH");

            if (MonthsAmount > 1)
            {
                PacketBuilder.Append('S');
            }

            Response.AppendStringWithBreak(PacketBuilder.ToString());
            Response.AppendInt32(BrickEngine.GetShopReactor().GetShopItem(ShopItemId).CreditsCost);
            Response.AppendBoolean(false);
            Response.AppendBoolean(MemberShipType == "VIP");
            Response.AppendInt32(MonthsAmount);
            Response.AppendInt32(MonthsAmount * 31);
            Response.AppendInt32(ExpireDate().Year);
            Response.AppendInt32(ExpireDate().Month);
            Response.AppendInt32(ExpireDate().Day);
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:26,代码来源:ShopClubItem.cs


示例4: GetEcotronInfo

 private void GetEcotronInfo(Client Client, Request Request)
 {
     Response Response = new Response(507);
     Response.AppendInt32(BrickEngine.GetEcotronReactor().GetTimerTime(Client.GetUser().HabboId));
     Response.AppendInt32(BrickEngine.GetEcotronReactor().GetTimeToWait(Client.GetUser().HabboId));
     Client.SendResponse(Response);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:7,代码来源:Shop.cs


示例5: ActivateEffect

        public void ActivateEffect(Client Client, Effect Effect)
        {
            if (Effect.RemainingTime == 0)
            {
                return;
            }

            Effect.Excecute();

            if (Client != null)
            {
                Response Response = new Response(462);
                Response.AppendInt32(Effect.EffectId);
                Response.AppendInt32(Effect.EffectLength);
                Client.SendResponse(Response);
            }

            using (QueryReactor Reactor = BrickEngine.GetQueryReactor())
            {
                Reactor.SetQuery("UPDATE user_effects SET activated = @dt WHERE id = @effectid LIMIT 1");
                Reactor.AddParam("dt", Effect.Activated);
                Reactor.AddParam("effectid", Effect.Id);
                Reactor.ExcuteQuery();
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:25,代码来源:EffectsHandler.cs


示例6: GetInternalResponse

 public void GetInternalResponse(Response Response)
 {
     Response.AppendInt32(Id);
     Response.AppendBoolean(MemberType == Items.MemberType.VIP);
     Response.AppendInt32(MemberdaysNeed);
     Response.AppendBoolean(true);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:7,代码来源:ShopGiftItem.cs


示例7: GetButtonData

        public Response GetButtonData()
        {
            Response Response = new Response(126);
            Response.AppendBoolean(true);
            Response.AppendBoolean(false);
            Response.AppendBoolean(false);
            Response.AppendInt32(-1);
            Response.AppendChar(2);
            Response.AppendInt32(GetButtonTreeAmount(-1));

            var SortedFirst = from pag in PagesForTree(-1)
                              orderby pag.OrderId ascending
                              select pag;

            foreach (ShopPage Page in SortedFirst)
            {
                Page.GetButtonData(Response);

                var SortedLast = from pag in PagesForTree(Page.Id)
                                 orderby pag.OrderId ascending
                                 select pag;

                foreach (ShopPage TreePage in SortedLast)
                {
                    TreePage.GetButtonData(Response);
                }
            }

            return Response;
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:30,代码来源:ShopReactor.cs


示例8: GetButtonData

 public void GetButtonData(Response Response)
 {
     Response.AppendBoolean(true); // always true
     Response.AppendUInt32(IconPaint);
     Response.AppendUInt32(IconId);
     Response.AppendInt32(Id);
     Response.AppendStringWithBreak(Name);
     Response.AppendInt32(BrickEngine.GetShopReactor().GetButtonTreeAmount(Id));
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:9,代码来源:ShopPage.cs


示例9: CheckRoomCreate

        private void CheckRoomCreate(Client Client, Request Request)
        {
            int Limit = BrickEngine.GetConfigureFile().CallIntKey("max.rooms.amount");
            int RoomAmount = BrickEngine.GetRoomReactor().GetMe(Client.GetUser().HabboId).Count;

            Response Response = new Response(512);
            Response.AppendBoolean(RoomAmount >= Limit);
            Response.AppendInt32(Limit);
            Client.SendResponse(Response);
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:10,代码来源:Navigator.cs


示例10: Drop

        public void Drop()
        {
            Response EndResponse = new Response(370);
            EndResponse.AppendRawInt32(-1);
            EndResponse.AppendChar(2);
            GetRoom().GetRoomEngine().BroadcastResponse(EndResponse);

            GetRoom().Event = null;

            BrickEngine.GetProgressReactor().GetCollector().Finialize(this);
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:11,代码来源:RoomEvent.cs


示例11: GetResponse

 public void GetResponse(Client Client, Response Response)
 {
     Response.AppendInt32(Id);
     Response.AppendBoolean((Client.GetUser().CurrentQuest.Equals(Id)) ? true : false);
     Response.AppendStringWithBreak(FilterAction);
     Response.AppendStringWithBreak(FilterParam);
     Response.AppendInt32(PixelReward);
     Response.AppendStringWithBreak(FilterReAction);
     Response.AppendInt32((Client.GetUser().CurrentQuest.Equals(Id)) ? Client.GetUser().CurrentQuestProgress : 0);
     Response.AppendInt32(ActionAmount);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:11,代码来源:Quest.cs


示例12: ChatWithFriend

        private void ChatWithFriend(Client Client, Request Request)
        {
            int FriendId = Request.PopWiredInt32();

            if (!BrickEngine.GetMessengerHandler().HasFriend(Client.GetUser().HabboId, FriendId))
            {
                return;
            }

            BrickEmulator.HabboHotel.Users.Handlers.Messenger.Friend Friend = BrickEngine.GetMessengerHandler().GetFriend(Client.GetUser().HabboId, FriendId);

            if (Friend == null)
            {
                Response Respose = new Response(261);
                Respose.AppendInt32(6);
                Respose.AppendInt32(FriendId);
                Client.SendResponse(Respose);
                return;
            }

            if (Client.GetUser().Muted)
            {
                Response Respose = new Response(261);
                Respose.AppendInt32(4);
                Respose.AppendInt32(FriendId);
                Client.SendResponse(Respose);
                return;
            }

            if (Friend.IsAlive)
            {
                if (Friend.GetClient().GetUser().Muted)
                {
                    Response Respose = new Response(261);
                    Respose.AppendInt32(3);
                    Respose.AppendInt32(FriendId);
                    Client.SendResponse(Respose);
                }

                Response Response = new Response(134);
                Response.AppendInt32(Client.GetUser().HabboId);
                Response.AppendStringWithBreak(BrickEngine.CleanString(Request.PopFixedString()));

                Friend.GetClient().SendResponse(Response);
            }
            else
            {
                Response Respose = new Response(261);
                Respose.AppendInt32(5);
                Respose.AppendInt32(FriendId);
                Client.SendResponse(Respose);
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:53,代码来源:Messenger.cs


示例13: GetResponse

        public void GetResponse(Response Response)
        {
            Response.AppendInt32(BackgroundId);
            Response.AppendInt32(ForegroundId);
            Response.AppendInt32(Items.Count);

            foreach (KeyValuePair<int, int> kvp in Items)
            {
                Response.AppendInt32(kvp.Key);
                Response.AppendInt32(kvp.Value);
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:12,代码来源:RoomIcon.cs


示例14: GetResponse

        public void GetResponse(Response Response, int UserId)
        {
            Response.AppendInt32(-1);
            Response.AppendInt32(BrickEngine.GetStreamHandler().GetPrimairStreamIndexer(StreamType));

            Response.AppendRawInt32(HabboId);
            Response.AppendChar(2);

            Response.AppendStringWithBreak(GetUsername());
            Response.AppendStringWithBreak(GetGender().ToLower());

            if (StreamType.Equals(StreamType.AchievedAchievement))
            {
                Response.AppendStringWithBreak("http://www.habbo.com/habbo-imaging/badge/" + AchievedItem.ToString() + ".png");
            }
            else
            {
                Response.AppendStringWithBreak(BrickEngine.GetConfigureFile().CallStringKey("site.link") + "/habbo-imaging/avatar/" + GetLook() + ".gif");
            }

            Response.AppendInt32(BrickEngine.GetConvertor().ObjectToInt32(RunningTime.TotalMinutes));

            if (StreamType.Equals(StreamType.MadeFriends))
            {
                Response.AppendInt32(BrickEngine.GetStreamHandler().GetFriendState(UserId, AchievedItemId));
            }
            else
            {
                Response.AppendInt32(BrickEngine.GetStreamHandler().GetSecondairStreamIndexer(StreamType));
            }

            Response.AppendBoolean(true);
            Response.AppendBoolean(true);

            if (StreamType.Equals(StreamType.RatedRoom) || StreamType.Equals(StreamType.MadeFriends))
            {
                Response.AppendRawInt32(AchievedItemId);
                Response.AppendChar(2);

                if (StreamType.Equals(StreamType.MadeFriends))
                {
                    Response.AppendStringWithBreak(BrickEngine.GetUserReactor().GetUsername(AchievedItemId));
                }
                else
                {
                    Response.AppendStringWithBreak(AchievedItem.ToString());
                }
            }
            else
            {
                Response.AppendStringWithBreak(AchievedItem.ToString());
            }
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:53,代码来源:Stream.cs


示例15: GetResponse

 public void GetResponse(Response Response)
 {
     Response.AppendRawInt32(GetRoom().OwnerId);
     Response.AppendChar(2);
     Response.AppendRawInt32(RoomId);
     Response.AppendChar(2);
     Response.AppendStringWithBreak(BrickEngine.GetUserReactor().GetUsername(GetRoom().OwnerId));
     Response.AppendInt32(CategoryId);
     Response.AppendStringWithBreak(Name);
     Response.AppendStringWithBreak(Description);
     Response.AppendStringWithBreak(Started.ToShortTimeString());
     Response.AppendInt32(Tags.Count);
     Tags.ToList().ForEach(Response.AppendStringWithBreak);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:14,代码来源:RoomEvent.cs


示例16: GetExternalResponse

 public void GetExternalResponse(Response Response)
 {
     Response.AppendInt32(Id);
     Response.AppendStringWithBreak(GetBaseItem().InternalName);
     Response.AppendBoolean(true);
     Response.AppendBoolean(false);
     Response.AppendBoolean(false);
     Response.AppendBoolean(true);
     Response.AppendStringWithBreak(GetBaseItem().InternalType.ToLower());
     Response.AppendInt32(GetBaseItem().SpriteId);
     Response.AppendChar(2);
     Response.AppendBoolean(true);
     Response.AppendInt32(-1);
     Response.AppendInt32((MemberType == Items.MemberType.VIP) ? 2 : 1);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:15,代码来源:ShopGiftItem.cs


示例17: GetFavoriteRooms

        public Response GetFavoriteRooms(Client Client)
        {
            Response Response = new Response(451);
            Response.AppendInt32(6);
            Response.AppendChar(2);

            var List = BrickEngine.GetRoomReactor().GetFavoriteRooms(Client);

            Response.AppendInt32(List.Count);

            foreach (VirtualRoom Room in List)
            {
                Room.GetNavigatorResponse(Response, false);
            }

            return Response;
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:17,代码来源:NavigatorReactor.cs


示例18: GetFurniture

        public void GetFurniture(Client Client, Request Request)
        {
            var Items = BrickEngine.GetItemReactor().GetItemsForUser(Client.GetUser().HabboId);

            var FloorItems = new List<Item>();
            var WallItems = new List<Item>();

            foreach (Item Item in Items)
            {
                if (Item.GetBaseItem().InternalType.ToLower() == "s")
                {
                    FloorItems.Add(Item);
                }
                else if (Item.GetBaseItem().InternalType.ToLower() == "i")
                {
                    WallItems.Add(Item);
                }
            }

            Response FloorItemsResponse = new Response(140);
            FloorItemsResponse.AppendStringWithBreak("S");
            FloorItemsResponse.AppendBoolean(true);
            FloorItemsResponse.AppendBoolean(true);
            FloorItemsResponse.AppendInt32(FloorItems.Count);

            foreach (Item Item in FloorItems)
            {
                Item.GetInventoryResponse(FloorItemsResponse);
            }

            Client.SendResponse(FloorItemsResponse);

            Response WallItemsResponse = new Response(140);
            WallItemsResponse.AppendStringWithBreak("I");
            WallItemsResponse.AppendBoolean(true);
            WallItemsResponse.AppendBoolean(true);
            WallItemsResponse.AppendInt32(WallItems.Count);

            foreach (Item Item in WallItems)
            {
                Item.GetInventoryResponse(WallItemsResponse);
            }

            Client.SendResponse(WallItemsResponse);
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:45,代码来源:Users.cs


示例19: GetEventRoomsResponse

        public Response GetEventRoomsResponse(int Category)
        {
            Response Response = new Response(451);
            Response.AppendInt32(12);
            Response.AppendRawInt32(Category);
            Response.AppendChar(2);

            var List = BrickEngine.GetRoomReactor().GetEventRooms(Category);

            Response.AppendInt32(List.Count);

            foreach (VirtualRoom Room in List)
            {
                Room.GetNavigatorResponse(Response, true);
            }

            return Response;
        }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:18,代码来源:NavigatorReactor.cs


示例20: GetResponse

 public void GetResponse(Response Response)
 {
     Response.AppendInt32(Id);
     Response.AppendInt32(State);
     Response.AppendInt32(CategoryId);
     Response.AppendInt32(ReportedCategoryId);
     Response.AppendInt32(0); // TimeStampInteger
     Response.AppendInt32(Priority);
     Response.AppendInt32(ReporterId);
     Response.AppendStringWithBreak(ReporterUsername);
     Response.AppendInt32(ModeratorId);
     Response.AppendStringWithBreak(ModeratorUsername);
     Response.AppendStringWithBreak(IssueMessage);
     Response.AppendInt32(RoomId);
     Response.AppendStringWithBreak(RoomName);
     Response.AppendInt32(0);
     Response.AppendStringWithBreak(string.Empty);
     Response.AppendInt32(RoomCategory);
     Response.AppendInt32(0);
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:20,代码来源:Issue.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Html5.Element类代码示例发布时间:2022-05-24
下一篇:
C# Users.Client类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap