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


C# Messages.PopFixedString方法代码示例

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


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

示例1: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            string Junk = Packet.PopFixedString();
            string MachineId = Packet.PopFixedString();

            Session.MachineId = MachineId;
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:7,代码来源:UniqueIDEvent.cs

示例2: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            int junk1 = Packet.PopWiredInt32();
            int junk2 = Packet.PopWiredInt32();
            uint RoomId = Packet.PopWiredUInt();
            string Name = Packet.PopFixedString();
            bool junk3 = Packet.PopWiredBoolean();
            string Desc = Packet.PopFixedString();
            SilverwaveEnvironment.GetGame().GetRoomEvents().AddNewEvent(RoomId, Name, Desc, Session);
            Session.SendMessage(new PurchaseOKComposer());

            Session.GetHabbo().Credits -= 500;
            Session.GetHabbo().UpdateCreditsBalance();
        }
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:14,代码来源:PurchaseRoomPromotionEvent.cs

示例3: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            uint RoomId = Packet.PopWiredUInt();
            string Password = Packet.PopFixedString();

            Session.GetMessageHandler().PrepareRoomForUser(RoomId, Password);
        }
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:7,代码来源:OpenFlatConnectionEvent.cs

示例4: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            string Type = Packet.PopFixedString();
            string PacketType = "";
            int PetId = PetRace.GetPetId(Type, out PacketType);

            Session.SendMessage(new SellablePetBreedsComposer(PacketType, PetId, PetRace.GetRacesForRaceId(PetId)));
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:8,代码来源:GetSellablePetBreedsEvent.cs

示例5: Parse

 public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
 {
     if (SilverwaveEnvironment.GetDBConfig().DBData["gifts_enabled"] != "1")
     {
         Session.SendNotif("The hotel managers have disabled gifting");
         return;
     }
     int PageId = Packet.PopWiredInt32();
     int ItemId = Packet.PopWiredInt32();
     string ExtraData = Packet.PopFixedString();
     string GiftUser = Packet.PopFixedString();
     string GiftMessage = Packet.PopFixedString();
     int SpriteId = Packet.PopWiredInt32();
     int Lazo = Packet.PopWiredInt32();
     int Color = Packet.PopWiredInt32();
     bool dnow = Packet.PopWiredBoolean();
     SilverwaveEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, 1, true, GiftUser, GiftMessage, SpriteId, Lazo, Color, dnow, 0);
 }
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:18,代码来源:PurchaseFromCatalogAsGiftEvent.cs

示例6: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            Silverwave.HabboHotel.Users.Habbo targetHabbo = Session.GetHabbo();

            if (targetHabbo == null)
            {
                return;
            }

            Session.SendMessage(SilverwaveEnvironment.GetGame().GetNavigator().SerializeNavigator(Session, int.Parse(Packet.PopFixedString())));
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:11,代码来源:PopularRoomsSearchEvent.cs

示例7: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            string CipherPublickey = Packet.PopFixedString();

            if (!SilverwaveEnvironment.globalCrypto.InitializeRC4ToSession(Session, CipherPublickey))
            {
                Session.SendNotif("There was an error logging you in, please try again!");
                return;
            }

            Session.SendMessage(new SecretKeyComposer(SilverwaveEnvironment.globalCrypto.PublicKey.ToString()));
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:12,代码来源:GenerateSecretKeyEvent.cs

示例8: Parse

 public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
 {
     if (Session.GetHabbo() == null)
     {
         Session.tryLogin(Packet.PopFixedString());
         if (Session != null)
             Session.TimePingedReceived = DateTime.Now;
     }
     else
     {
         Session.SendNotif("This user is already logged in.");
     }
 }
开发者ID:BjkGkh,项目名称:07052014,代码行数:13,代码来源:SSOTicketEvent.cs

示例9: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            /*if (SilverwaveEnvironment.GetDBConfig().DBData["catalogue_enabled"] != "1")
            {
                Session.SendNotif("The hotel managers have disabled the catalogue");
                return;
            }*/
            int PageId = Packet.PopWiredInt32();
            int ItemId = Packet.PopWiredInt32();
            string ExtraData = Packet.PopFixedString();
            int Amount = Packet.PopWiredInt32();

            SilverwaveEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, Amount, false, "", "", 0, 0, 0, false, 0);
        }
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:14,代码来源:PurchaseFromCatalogEvent.cs

示例10: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room = Session.GetHabbo().CurrentRoom;

            string Params = Packet.PopFixedString();
            string ToUser = Params.Split(' ')[0];
            string Message = Params.Substring(ToUser.Length + 1);
            int Bubble = Packet.PopWiredInt32();

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            RoomUser User2 = Room.GetRoomUserManager().GetRoomUserByHabbo(ToUser);

            Message = LanguageLocale.FilterSwearwords(Message);

            if (User == null || User2 == null)
            {
                return;
            }

            if (Session.GetHabbo().Rank < 4 && Room.CheckMute(Session))
            {
                Session.SendNotif("You are unable to whisper as you are muted");
                return;
            }

            bool ContainsBanned = LanguageLocale.CheckForBannedPhrases(Message) && Session.GetHabbo().Rank < 4;
            //Room.AddChatlog(Session.GetHabbo().Id, "<Whisper to " + ToUser + ">: " + Message, ContainsBanned);

            if (ContainsBanned)
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= Convert.ToInt32(SilverwaveEnvironment.GetDBConfig().DBData["spambans.limit"]))
                {
                    if (!String.IsNullOrWhiteSpace(Message))
                    {
                        SilverwaveEnvironment.GetGame().GetBanManager().BanUser(Session, "System", 788922000, "Spamming the following: " + Message, true, false);
                        return;
                    }
                }
                return;
            }

            int Colour = 0;

            int MuteTime;
            if (User.IncrementAndCheckFlood(out MuteTime))
            {
                Session.SendMessage(new FloodControlComposer(MuteTime));
                return;
            }

            SilverwaveEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, HabboHotel.Quests.QuestType.SOCIAL_CHAT);

            Colour = User.CheckChatColour(Bubble);

            User.UnIdle();
            User.GetClient().SendMessage(new WhisperComposer(User, Message, 0, Colour));

            if (User2 != null && !User2.IsBot && User2.userID != User.userID)
            {
                if (User2.GetClient().GetHabbo().DisableWhisper)
                {
                    User.GetClient().SendWhisper("This user does not allow whispers");
                    return;
                }
                else
                {
                    if (!User2.GetClient().GetHabbo().MutedUsers.Contains(Session.GetHabbo().Id))
                    {
                        User2.GetClient().SendMessage(new WhisperComposer(User, Message, 0, Colour));
                    }
                }
            }
            List<RoomUser> ToNotify = Room.GetRoomUserManager().GetRoomUserByRank(4);

            if (ToNotify.Count > 0)
            {
                foreach (RoomUser user in ToNotify)
                {
                    if (user != null)
                    {
                        if (user.HabboId != User2.HabboId && user.HabboId != User.HabboId)
                        {
                            if (user.GetClient() != null)
                            {
                                user.GetClient().SendMessage(new WhisperComposer(User, LanguageLocale.GetValue("moderation.whisper") + ToUser + ": " + Message, 0, Colour));
                            }
                        }
                    }
                }
            }
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:97,代码来源:WhisperEvent.cs

示例11: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            string Build = Packet.PopFixedString();

            SilverwaveEnvironment.ClientBuild = Build;
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:6,代码来源:GetClientVersionEvent.cs

示例12: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            string PetName = Packet.PopFixedString();

            Session.SendMessage(new CheckPetNameComposer(PetName, true));
        }
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:6,代码来源:CheckPetNameEvent.cs

示例13: Parse

        public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room = Session.GetHabbo().CurrentRoom;
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            string Message = Packet.PopFixedString();
            int Colour = Packet.PopWiredInt32();
            int CountUselessSulakeStuff = Packet.PopWiredInt32();

            if (User == null)
            {
                return;
            }

            if (Session.GetHabbo().Rank < 4 && Room.CheckMute(Session))
            {
                Session.SendNotif("You are unable to talk as you are muted");
                return;
            }

            if (Message.StartsWith(":"))
            {
                Colour = User.LastBubble;
            }
            else
            {
                User.LastBubble = Colour;
            }

            if (Message.StartsWith(":") && ChatCommandHandler.Parse(Session, Message))
            {
                return;
            }

            bool ContainsBanned = LanguageLocale.CheckForBannedPhrases(Message) && Session.GetHabbo().Rank < 4;
            //Room.AddChatlog(Session.GetHabbo().Id, Message, ContainsBanned);

            if (ContainsBanned)
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= Convert.ToInt32(SilverwaveEnvironment.GetDBConfig().DBData["spambans.limit"]))
                {
                    if (!String.IsNullOrWhiteSpace(Message))
                    {
                            SilverwaveEnvironment.GetGame().GetBanManager().BanUser(Session, "System", 788922000, "Spamming the following: " + Message, true, false);
                            return;
                    }
                }
                return;
            }

            Message = LanguageLocale.FilterSwearwords(Message);
            int MuteTime;
            if (User.IncrementAndCheckFlood(out MuteTime))
            {
                Session.SendMessage(new FloodControlComposer(MuteTime));
                return;
            }

            SilverwaveEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, HabboHotel.Quests.QuestType.SOCIAL_CHAT);

            User.UnIdle();
            //User.OnChat(Colour, Message, false);
            User.Chat(Session, Message, false,CountUselessSulakeStuff,Colour);
        }
开发者ID:BjkGkh,项目名称:07052014,代码行数:69,代码来源:ChatEvent.cs


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