Exemplo n.º 1
0
        public override void Deserialize(LittleEndianReader reader)
        {
            byte itemCount = reader.ReadByte();

            Items = new ItemData[itemCount];
            for (int i = 0; i < itemCount; i++)
            {
                var item = new ItemData();
                item.Deserialize(reader);
                Items[i] = item;
            }

            bool hasShield = reader.ReadBool();

            if (hasShield)
            {
                ShieldValues = new ShieldValues();
                ShieldValues.Deserialize(reader);
            }

            int countCharStack = reader.ReadInt();

            CharacterDataStack = new CharacterStackData[countCharStack];

            for (int i = 0; i < countCharStack; i++)
            {
                var data = new CharacterStackData();
                data.Deserialize(reader);
                CharacterDataStack[i] = data;
            }

            LookAtNetId    = reader.ReadUInt();
            LookAtType     = (LookAtType)reader.ReadByte();
            LookAtPosition = Core.Extensions.DeserializeVector3(reader);

            int numOfBuffCount = reader.ReadInt();

            for (int i = 0; i < numOfBuffCount; i++)
            {
                byte slot  = reader.ReadByte();
                int  count = reader.ReadInt();
                BuffCount.Add(new KeyValuePair <byte, int>(slot, count));
            }

            UnknownIsHero = reader.ReadBool();
        }
Exemplo n.º 2
0
        public static SpeedParams ReadWaypointSpeedParams(this LittleEndianReader reader)
        {
            var data = new SpeedParams();

            data.PathSpeedOverride   = reader.ReadFloat();
            data.ParabolicGravity    = reader.ReadFloat();
            data.ParabolicStartPoint = Extensions.DeserializeVector2(reader);
            data.Facing             = reader.ReadBool();
            data.FollowNetID        = reader.ReadUInt();
            data.FollowDistance     = reader.ReadFloat();
            data.FollowBackDistance = reader.ReadFloat();
            data.FollowTravelTime   = reader.ReadFloat();
            return(data);
        }
Exemplo n.º 3
0
 public override void Deserialize(LittleEndianReader reader)
 {
     Activated = reader.ReadBool();
 }