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

C# Network.PacketReader类代码示例

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

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



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

示例1: OpenContainerPacket

 public OpenContainerPacket(PacketReader reader)
     : base(0x24, "Open Container")
 {
     m_serial = reader.ReadInt32();
     m_gumpId = reader.ReadUInt16();
     reader.ReadUInt16();
 }
开发者ID:denizsokmen,项目名称:UltimaXNA,代码行数:7,代码来源:ContainerPacket.cs


示例2: UpdateHealthPacket

 public UpdateHealthPacket(PacketReader reader)
     : base(0xA1, "Update Health")
 {
     m_serial = reader.ReadInt32();
     m_max = reader.ReadInt16();
     m_current = reader.ReadInt16();
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:UpdateHealthPacket.cs


示例3: SwingPacket

 public SwingPacket(PacketReader reader)
     : base(0x2F, "Swing")
 {
     m_flag = reader.ReadByte();
     m_attacker = reader.ReadInt32();
     m_defender = reader.ReadInt32();
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:SwingPacket.cs


示例4: ObjectInfoPacket

        public ObjectInfoPacket(PacketReader reader)
            : base(0x1A, "ObjectInfoPacket")
        {
            Serial = reader.ReadInt32();
            ItemID = reader.ReadUInt16();

            Amount = (ushort)(((Serial & 0x80000000) == 0x80000000) ? reader.ReadUInt16() : 0);

            X = reader.ReadInt16();
            Y = reader.ReadInt16();
                        
            Direction = (byte)(((X & 0x8000) == 0x8000) ? reader.ReadByte() : 0);

            Z = reader.ReadSByte();

            Hue = (ushort)(((Y & 0x8000) == 0x8000) ? reader.ReadUInt16() : 0);

            Flags = (byte)(((Y & 0x4000) == 0x4000) ? reader.ReadByte() : 0);

            // sanitize values
            Serial = (int)(Serial & 0x7FFFFFFF);
            ItemID = (ushort)(ItemID & 0x7FFF);
            X = (short)(X & 0x7FFF);
            Y = (short)(Y & 0x3FFF);
        }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:25,代码来源:ObjectInfoPacket.cs


示例5: UpdateStaminaPacket

 public UpdateStaminaPacket(PacketReader reader)
     : base(0xA3, "Update Stamina")
 {
     m_serial = reader.ReadInt32();
     m_max = reader.ReadInt16();
     m_current = reader.ReadInt16();
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:UpdateStaminaPacket.cs


示例6: DeathAnimationPacket

 public DeathAnimationPacket(PacketReader reader)
     : base(0xAF, "Death Animation")
 {
     PlayerSerial = reader.ReadInt32();
     CorpseSerial = reader.ReadInt32();
     reader.ReadInt32(); // unknown - all zero's.
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:DeathAnimationPacket.cs


示例7: ObjectPropertyListPacket

        public ObjectPropertyListPacket(PacketReader reader)
            : base(0xD6, "Object Property List")
        {
            reader.ReadInt16(); // Always 0x0001
            m_serial = reader.ReadInt32();

            reader.ReadInt16(); // Always 0x0000
            m_hash = reader.ReadInt32();

            m_clilocs = new List<int>();
            m_arguments = new List<string>();

            // Loop of all the item/creature's properties to display in the order to display them. The name is always the first entry.
            int clilocId = reader.ReadInt32();

            while (clilocId != 0)
            {
                m_clilocs.Add(clilocId);

                int textLength = reader.ReadUInt16();
                string args = string.Empty;

                if (textLength > 0)
                {
                    args = reader.ReadUnicodeStringReverse(textLength / 2);
                }

                m_arguments.Add(args);

                clilocId = reader.ReadInt32();
            }
        }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:32,代码来源:ObjectPropertyListPacket.cs


示例8: ChatPacket

 public ChatPacket(PacketReader reader)
     : base(0xB3, "Chat Packet")
 {
     m_language = reader.ReadString(3);
     reader.ReadInt16(); // unknown.
     m_commandtype = reader.ReadByte();
 }
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:7,代码来源:ChatPacket.cs


示例9: ServerRelayPacket

 public ServerRelayPacket(PacketReader reader)
     : base(0x8C, "Server Relay")
 {
     m_ipAddress = reader.ReadInt32();
     m_port = reader.ReadInt16();
     m_accountId = reader.ReadInt32();
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:ServerRelayPacket.cs


示例10: TimePacket

 public TimePacket(PacketReader reader)
     : base(0x5B, "Time")
 {
     m_hour = reader.ReadByte();
     m_minute = reader.ReadByte();
     m_second = reader.ReadByte();
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:TimePacket.cs


示例11: ContainerContentPacket

        public ContainerContentPacket(PacketReader reader)
            : base(0x3C, "Container ContentPacket")
        {
            int itemCount = reader.ReadUInt16();
            List<ContentItem> items = new List<ContentItem>(itemCount);

            for (int i = 0; i < itemCount; i++)
            {
                Serial serial = reader.ReadInt32();
                int iItemID = reader.ReadUInt16();
                int iUnknown = reader.ReadByte(); // signed, itemID offset. always 0 in RunUO.
                int iAmount = reader.ReadUInt16();
                int iX = reader.ReadInt16();
                int iY = reader.ReadInt16();
                int iGridLocation = 0;
                if (!NextContainerContentsIsPre6017)
                    iGridLocation = reader.ReadByte(); // always 0 in RunUO.
                int iContainerSerial = reader.ReadInt32();
                int iHue = reader.ReadUInt16();

                items.Add(new ContentItem(serial, iItemID, iAmount, iX, iY, iGridLocation, iContainerSerial, iHue));
            }

            m_items = items.ToArray();
            if (NextContainerContentsIsPre6017)
                NextContainerContentsIsPre6017 = false;
        }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:27,代码来源:ContainerContentPacket.cs


示例12: CustomHousePacket

        public CustomHousePacket(PacketReader reader)
            : base(0xD8, "Custom House Packet")
        {
            byte CompressionType = reader.ReadByte();
            if (CompressionType != 3)
            {
                m_houseSerial = Serial.Null;
                return;
            }
            reader.ReadByte(); // unknown, always 0?
            m_houseSerial = reader.ReadInt32();
            m_revisionHash = reader.ReadInt32();

            // this is for compression type 3 only
            int bufferLength = reader.ReadInt16();
            int trueBufferLength = reader.ReadInt16();
            m_numPlanes = reader.ReadByte();
            // end compression type 3

            m_planes = new CustomHousePlane[m_numPlanes];
            for (int i = 0; i < m_numPlanes; i++)
            {
                m_planes[i] = new CustomHousePlane(reader);
            }
        }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:25,代码来源:CustomHousePacket.cs


示例13: OpenPaperdollPacket

 public OpenPaperdollPacket(PacketReader reader)
     : base(0x88, "Open Paperdoll")
 {
     Serial = reader.ReadInt32();
     MobileName = reader.ReadStringSafe(60);
     //+flags
 }
开发者ID:KonssnoK,项目名称:UltimaXNA,代码行数:7,代码来源:OpenPaperdollPacket.cs


示例14: ExtendedStatsInfo

 public ExtendedStatsInfo(PacketReader reader)
 {
     int clientFlag = reader.ReadByte(); // (0x2 for 2D client, 0x5 for KR client)
     Serial = reader.ReadInt32();
     byte unknown0 = reader.ReadByte(); // (always 0)
     byte lockFlags = reader.ReadByte();
     // Lock flags = bitflags 00SSDDII
     //     00 = up
     //     01 = down
     //     10 = locked
     // FF = update mobile status animation ( KR only )
     if (lockFlags != 0xFF) {
         int strengthLock = (lockFlags >> 4) & 0x03;
         int dexterityLock = (lockFlags >> 2) & 0x03;
         int inteligenceLock = (lockFlags) & 0x03;
         Locks = new StatLocks(strengthLock, dexterityLock, inteligenceLock);
     }
     if (clientFlag == 5) {
         Tracer.Warn("ClientFlags == 5 in GeneralInfoPacket ExtendedStats 0x19. This is not a KR client.");
         // If(Lock flags = 0xFF) //Update mobile status animation
         //  BYTE[1] Status // Unveryfied if lock flags == FF the locks will be handled here
         //  BYTE[1] unknown (0x00)
         //  BYTE[1] Animation
         //  BYTE[1] unknown (0x00)
         //  BYTE[1] Frame
         // else
         //  BYTE[1] unknown (0x00)
         //  BYTE[4] unknown (0x00000000)
         // endif
     }
 }
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:31,代码来源:ExtendedStatsInfo.cs


示例15: ContainerContentPacket

        public ContainerContentPacket(PacketReader reader)
            : base(0x3C, "Container ContentPacket")
        {
            int itemCount = reader.ReadUInt16();
            List<ItemInContainer> items = new List<ItemInContainer>(itemCount);

            bool PacketIsPre6017 = (reader.Buffer.Length == 5 + (19 * itemCount));

            for (int i = 0; i < itemCount; i++)
            {
                Serial serial = reader.ReadInt32();
                int iItemID = reader.ReadUInt16();
                int iUnknown = reader.ReadByte(); // signed, itemID offset. always 0 in RunUO.
                int iAmount = reader.ReadUInt16();
                int iX = reader.ReadInt16();
                int iY = reader.ReadInt16();
                int iGridLocation = 0;
                if (!PacketIsPre6017)
                    iGridLocation = reader.ReadByte(); // always 0 in RunUO.
                int iContainerSerial = reader.ReadInt32();
                int iHue = reader.ReadUInt16();

                items.Add(new ItemInContainer(serial, iItemID, iAmount, iX, iY, iGridLocation, iContainerSerial, iHue));
            }

            m_items = items.ToArray();
        }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:27,代码来源:ContainerContentPacket.cs


示例16: TargetCursorPacket

 public TargetCursorPacket(PacketReader reader)
     : base(0x6C, "Target Cursor")
 {
     m_commandtype = reader.ReadByte(); // 0x00 = Select Object; 0x01 = Select X, Y, Z
     m_cursorid = reader.ReadInt32();
     m_cursortype = reader.ReadByte(); // 0 - 2 = unknown; 3 = Cancel current targetting RunUO seems to always send 0.
 }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:7,代码来源:TargetCursorPacket.cs


示例17: WeatherPacket

 public WeatherPacket(PacketReader reader)
     : base(0x65, "Set Weather")
 {
     m_weatherType = reader.ReadByte();
     m_effectId = reader.ReadByte();
     m_temperature = reader.ReadByte();
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:WeatherPacket.cs


示例18: ServerListEntry

 public ServerListEntry(PacketReader reader)
 {
     index = (ushort)reader.ReadInt16();
     name = reader.ReadString(30);
     percentFull = reader.ReadByte();
     timezone = reader.ReadByte();
     address = (uint)reader.ReadInt32();
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:8,代码来源:ServerListEntry.cs


示例19: PartyMemberListInfo

 public PartyMemberListInfo(PacketReader reader)
 {
     Count = reader.ReadByte();
     Serials = new int[Count];
     for (int i = 0; i < Count; i++) {
         Serials[i] = reader.ReadInt32();
     }
 }
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:8,代码来源:PartyMemberListInfo.cs


示例20: ServerListEntry

 public ServerListEntry(PacketReader reader)
 {
     Index = (ushort)reader.ReadInt16();
     Name = reader.ReadString(32);
     PercentFull = reader.ReadByte();
     Timezone = reader.ReadByte();
     Address = (uint)reader.ReadInt32();
 }
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:8,代码来源:ServerListEntry.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# UI.AControl类代码示例发布时间:2022-05-26
下一篇:
C# Graphics.SpriteBatchUI类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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