示例#1
0
        private static List <a20000_InvalidHitData.HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog)
        {
            List <a20000_InvalidHitData.HitData> hitDataList = new List <a20000_InvalidHitData.HitData>();
            int num = (int)p.readC();

            for (int index = 0; index < num; ++index)
            {
                a20000_InvalidHitData.HitData hitData = new a20000_InvalidHitData.HitData()
                {
                    _hitInfo = p.readUH(),
                    FirePos  = p.readUHVector(),
                    HitPos   = p.readUHVector()
                };
                if (!OnlyBytes)
                {
                    hitData.HitEnum = (HitType)AllUtils.getHitHelmet((uint)hitData._hitInfo);
                }
                if (!genLog)
                {
                    ;
                }
                hitDataList.Add(hitData);
            }
            return(hitDataList);
        }
示例#2
0
 public static void writeInfo(SendPacket s, List <a20000_InvalidHitData.HitData> hits)
 {
     s.writeC((byte)hits.Count);
     for (int index = 0; index < hits.Count; ++index)
     {
         a20000_InvalidHitData.HitData hit = hits[index];
         s.writeH(hit._hitInfo);
         s.writeHVector(hit.FirePos);
         s.writeHVector(hit.HitPos);
     }
 }