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


C# ByteBuffer.ReadString方法代码示例

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


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

示例1: PetUpdate

        public void PetUpdate(ByteBuffer buff)
        {
            SummonType = buff.ReadUInt32();
            ID = buff.ReadUInt32();

            X = buff.ReadUInt32();
            Y = buff.ReadUInt32();
            Z = buff.ReadUInt32();

            buff.ReadString(); //title

            Cur_Fed = buff.ReadUInt32();
            Max_Fed = buff.ReadUInt32();

            Cur_HP = buff.ReadUInt32();
            Max_HP = buff.ReadUInt32();

            Cur_MP = buff.ReadUInt32();
            Max_MP = buff.ReadUInt32();

            Level = buff.ReadUInt32();
            XP = buff.ReadUInt64();
            XP_ThisLevel = buff.ReadUInt64();
            XP_NextLevel = buff.ReadUInt64();

            if (Globals.gamedata.Chron >= Chronicle.CT3_0)
            {
                buff.ReadUInt32(); //00 00 00 00
            }
        }
开发者ID:stephenZh,项目名称:l2net,代码行数:30,代码来源:Pet_Info.cs

示例2: Load_Pet

        public void Load_Pet(ByteBuffer buff)
        {
            SummonType = buff.ReadUInt32(); //1 = summon, 2 = pet
            ID = buff.ReadUInt32();
            NPCID = buff.ReadUInt32();
            isAttackAble = buff.ReadUInt32();//attackable = 0

            X = buff.ReadUInt32();
            Y = buff.ReadUInt32();
            Z = buff.ReadUInt32();
            Heading = buff.ReadInt32();
            buff.ReadUInt32();//0x00

            MatkSpeed = buff.ReadUInt32();
            PatkSpeed = buff.ReadUInt32();
            RunSpeed = buff.ReadUInt32();
            WalkSpeed = buff.ReadUInt32();
            SwimRunSpeed = buff.ReadUInt32();
            SwimWalkSpeed = buff.ReadUInt32();
            flRunSpeed = buff.ReadUInt32();
            flWalkSpeed = buff.ReadUInt32();
            if (Globals.gamedata.Chron >= Chronicle.CT1)
            {
                FlyRunSpeed = buff.ReadUInt32();
                FlyWalkSpeed = buff.ReadUInt32();
            }

            MoveSpeedMult = System.Convert.ToSingle(buff.ReadDouble());
            AttackSpeedMult = System.Convert.ToSingle(buff.ReadDouble());
            CollisionRadius = System.Convert.ToSingle(buff.ReadDouble());
            CollisionHeight = System.Convert.ToSingle(buff.ReadDouble());

            LWeapon = buff.ReadUInt32();
            Armor = buff.ReadUInt32();
            RWeapon = buff.ReadUInt32();

            HasOwner = buff.ReadByte(); //owneronline
            isRunning = buff.ReadByte();
            isInCombat = buff.ReadByte();
            isAlikeDead = buff.ReadByte();
            isSummoned = buff.ReadByte(); //isSummoned 0=teleported  1=default   2=summoned

            if (Globals.gamedata.Chron >= Chronicle.CT3_0)
            {
                buff.ReadUInt32(); //FF FF FF FF
            }
            Name = buff.ReadString();
            if (string.IsNullOrWhiteSpace(Name))
            {
                Name = Util.GetNPCName(NPCID);//"Unnamed Pet";
            }
            if (Globals.gamedata.Chron >= Chronicle.CT3_0)
            {
                buff.ReadUInt32(); //FF FF FF FF
            }
            Title = buff.ReadString(); //OwnerName
            buff.ReadUInt32();//1

            PvPFlag = buff.ReadUInt32();
            Karma = buff.ReadInt32();

            Cur_Fed = buff.ReadUInt32();
            Max_Fed = buff.ReadUInt32();

            Cur_HP = buff.ReadUInt32();
            Max_HP = buff.ReadUInt32();

            Cur_MP = buff.ReadUInt32();
            Max_MP = buff.ReadUInt32();

            SP = buff.ReadUInt32();
            Level = buff.ReadUInt32();
            XP = buff.ReadUInt64();

            XP_ThisLevel = buff.ReadUInt64();
            XP_NextLevel = buff.ReadUInt64();

            Cur_Load = buff.ReadUInt32();
            Max_Load = buff.ReadUInt32();

            Patk = buff.ReadUInt32();
            PDef = buff.ReadUInt32();
            Accuracy = buff.ReadUInt32();// p
            Evasion = buff.ReadUInt32();//p
            Focus = buff.ReadUInt32();//p
            Matk = buff.ReadUInt32();
            MDef = buff.ReadUInt32();

            buff.ReadUInt32();//m acu
            buff.ReadUInt32();//m eva
            buff.ReadUInt32();//m crit

            buff.ReadUInt32();// speed
            buff.ReadUInt32();//patak sped
            buff.ReadUInt32();// cast

            /*if (Globals.gamedata.Chron < Chronicle.CT3_0)
            {
                AbnormalEffects = buff.ReadUInt32(); //AbnormalEffect bleed=1; poison=2; poison & bleed=3; flame=4;
            }
//.........这里部分代码省略.........
开发者ID:stephenZh,项目名称:l2net,代码行数:101,代码来源:Pet_Info.cs


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