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


C# PacketOut.WriteUInt32R方法代码示例

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


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

示例1: Send

        public static void Send(LobbyClient client)
        {
            PacketOut Out = new PacketOut((UInt32)Opcodes.LOGIN_PUZZLE);
            Out.WriteInt32R(Program.Version[0]);
            Out.WriteInt32R(Program.Version[1]);
            Out.WriteInt32R(Program.Version[2]);
            Out.WriteInt32R(Program.Build);

            Out.WriteByte(0x05);

            Out.WriteInt64R(-313054979819954861);

            Out.WriteUInt32R(0);
            Out.WriteUInt32R(0);
            Out.WriteUInt32R(0);
            client.SendTCP(Out);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:17,代码来源:LOGIN_PUZZLE.cs

示例2: HandlePacket

        public static void HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient cclient = client as LobbyClient;
            Program.CharMgr.DeleteCharacter(cclient.Account.Id, packet.GetUint8());

            PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_DELETE);
            Out.WriteUInt32R(0);
            cclient.SendTCP(Out);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:9,代码来源:ASK_CHARACTER_DELETE.cs

示例3: Send

        public static void Send(LobbyClient client)
        {
            PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_LOGIN_SUCCESS);
            Out.WriteUnicodeString(client.Account.RealTag,48);

            Out.WriteUInt32R(21); // Account Type

            Out.WriteInt64R(TCPManager.GetTimeStamp());

            // Temps avant expiration du compte
            Out.WriteByte(0x13); // ms
            Out.WriteByte(0x29); // sec
            Out.WriteUInt16R(0x12); // Hour

            // Date de création
            Out.WriteByte(0x0E); // day
            Out.WriteByte(0x07); // month
            Out.WriteUInt16R(2010); // Year

            Out.WriteInt32R(1450); // Temps de jeu (secondes)
            Out.WriteInt32R(client.Account.Points); // Points APB

            for(int i=1;i<6;++i)
                Out.WriteInt32R(
                    Program.FileMgr.GetFileVersion(client.Account.Id, i, true, "", "")); // Config file, Server Version

            Out.WriteInt32R(0);

            Out.WriteUInt16(0x957D);
            Out.WriteUInt16(0x0400);

            Out.WriteUInt16(0x5052);
            Out.WriteUInt16(0x4F45);
            Out.WriteUInt16(0x552E);
            Out.WriteUInt16(0x3232);
            Out.WriteUInt16(0x3738);
            Out.WriteUInt16(0x3031);
            Out.WriteUInt16(0);

            Out.WriteUInt16(0x0067);

            Out.WriteUInt64(0x526C624331313256);
            Out.WriteUInt64(0x486E314100000000);
            Out.WriteUInt16(0);
            Out.WriteStringBytes("");
            Out.WriteByte(0);

            client.SendTCP(Out);

            ANS_CHARACTER_INFO.Send(client);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:51,代码来源:ANS_LOGIN_SUCCES.cs

示例4: HandlePacket

        public static void HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient cclient = (LobbyClient)client;

            byte sloid = packet.GetUint8();
            Program.CharMgr.SetEnter(cclient.Account.Id, sloid);

            WorldInfo Info = Program.CharMgr.GetWorldInfo(cclient.Account.WorldId);

            PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_WORLD_ENTER);

            if (Info == null)
                Out.WriteUInt32R(1);
            else
            {
                Out.WriteUInt32R(0);

                Out.WriteInt32R(Info.Ip); // WorldServerIp
                Out.WriteUInt16R((UInt16)Info.Port); // Port
                Out.WriteInt64R(TCPManager.GetTimeStamp());
            }

            cclient.SendTCP(Out);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:24,代码来源:ASK_WORLD_ENTER.cs

示例5: HandlePacket

        public static void HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient cclient = (LobbyClient)client;

            byte FileId = packet.GetUint8();
            UInt32 Version = packet.GetUint32R();

            byte[] File = new byte[packet.Length - packet.Position];
            packet.Read(File, 0, File.Length);

            File = ZlibMgr.Decompress(File);

            Log.Debug("ConfigSave", "Config saved : fileid=" + FileId + ", Version=" + Version + ",Size=" + File.Length);

            Program.FileMgr.SaveInfo(cclient.Account.Id, FileId, File);

            PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CONFIGFILE_SAVE);
            Out.WriteUInt32R(0);
            Out.WriteByte(FileId);
            Out.Write(File, 0, File.Length);
            cclient.SendTCP(Out);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:22,代码来源:ASK_CONFIGFILE_SAVE.cs

示例6: Send

        public static void Send(LobbyClient client)
        {
            List<WorldInfo> _Worlds = Program.CharMgr.GetWorlds();

            PacketOut Out = new PacketOut((UInt32)Opcodes.WORLD_LIST);
            Out.WriteInt32R(0); // Returned Code

            Out.WriteUInt16R((UInt16)_Worlds.Count); // World Count

            foreach (WorldInfo Info in _Worlds)
            {
                Out.WriteUInt32R((UInt32)Info._Info.Id); // WorldUid

                Out.WriteUnicodeString(Info._Info.Name, 32); // WorldName

                Out.WriteByte((byte)(Info.RpcID == 0 ? 0 : 1)); // Status
                Out.WriteByte(Info._Info.Population); // Pop  0:Low 1:Medium 2:High
                Out.WriteByte(Info._Info.Enf); // enf recommended , true or false
                Out.WriteByte(Info._Info.Crim); // crim recommended , true or false
            }

            client.SendTCP(Out);
        }
开发者ID:Novo,项目名称:apbprivateserver,代码行数:23,代码来源:WORLD_LIST.cs

示例7: SendMaxInventory

        public void SendMaxInventory(Player Plr) // 1.3.5
        {
            PacketOut Out = new PacketOut((byte)Opcodes.F_BAG_INFO);
            Out.WriteByte(0x0F);
            Out.WriteByte(GetTotalSlot()); // Nombre de slots disponibles
            Out.WriteUInt16((UInt16)INVENTORY_SLOT_COUNT);
            Out.WriteByte(0);
            Out.WriteUInt32R(GetBagPrice());

            Out.WriteUInt16(2);
            Out.WriteByte(0x50);
            Out.WriteUInt16(0x08);
            Out.WriteUInt16(0x60);
            Out.WriteByte(0xEA);
            Out.WriteUInt16(0);
            Plr.SendPacket(Out);
        }
开发者ID:dzikun,项目名称:WarEmu,代码行数:17,代码来源:ItemsInterface.cs

示例8: BuildCharacters

        public static byte[] BuildCharacters(int AccountId)
        {
            Log.Debug("BuildCharacters", "AcocuntId = " + AccountId);

            Character[] Chars = GetAccountChar(AccountId)._Chars;
            UInt16 Count = 0;

            // On Compte le nombre de personnages existant du joueur
            for (UInt16 c = 0; c < Chars.Length; ++c)
                if (Chars[c] != null) ++Count;

            PacketOut Out = new PacketOut(0);
            Out.Position = 0;

            Out.WriteByte(MAX_SLOT);
            Out.WriteUInt32(0xFF);
            Out.WriteByte(0x14);

            Character Char = null;
            for (int i = 0; i < MAX_SLOT; ++i)
            {
                Char = Chars[i];

                if (Char == null)
                    Out.Fill(0, 284); // 284
                else
                {
                    List<Character_item> Items = CharMgr.GetItemChar(Char.CharacterId);

                    Out.FillString(Char.Name, 48);
                    Out.WriteByte(Char.Value.Level);
                    Out.WriteByte(Char.Career);
                    Out.WriteByte(Char.Realm);
                    Out.WriteByte(Char.Sex);
                    Out.WriteByte(Char.ModelId);
                    Out.WriteUInt16(Char.Value.ZoneId);
                    Out.Fill(0, 5);

                    Character_item Item = null;
                    for (UInt16 SlotId = 14; SlotId < 30; ++SlotId)
                    {
                        Item = Items.Find(item => item != null && item.SlotId == SlotId);
                        if (Item == null)
                            Out.WriteUInt32(0);
                        else
                            Out.WriteUInt32R(Item.ModelId);

                        Out.Fill(0, 4);
                    }

                    Out.Fill(0, 6);

                    for (int j = 0; j < 5; ++j)
                    {
                        Out.Fill(0, 6);
                        Out.WriteUInt16(0xFF00);
                    }

                    for (UInt16 SlotId = 10; SlotId < 13; ++SlotId)
                    {
                        Item = Items.Find(item => item != null && item.SlotId == SlotId);
                        Out.WriteUInt16(0);
                        if (Item == null)
                            Out.WriteUInt16(0);
                        else
                            Out.WriteUInt16R((ushort)Item.ModelId);
                    }

                    Out.Fill(0, 10);
                    Out.WriteUInt16(0xFF00);
                    Out.WriteByte(0);
                    Out.WriteByte(Char.Race);
                    Out.WriteUInt16(0);
                    Out.Write(Char.bTraits, 0, Char.bTraits.Length);
                    Out.Fill(0, 14);// 272
                }
            }
            return Out.ToArray();
        }
开发者ID:oldSerge,项目名称:WarEmu,代码行数:79,代码来源:CharMgr.cs

示例9: SendSkills

 public void SendSkills()
 {
     PacketOut Out = new PacketOut((byte)Opcodes.F_CHARACTER_INFO);
     Out.WriteByte(3); // Skills
     Out.Fill(0, 3);
     Out.WriteByte(_Info.CareerLine);
     Out.WriteByte(_Info.Race);
     Out.WriteUInt32R(_Value.Skills);
     Out.WriteUInt16(_Value.RallyPoint);
     SendPacket(Out);
 }
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:11,代码来源:Player.cs


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