Пример #1
0
        public static BountyInfo FromPackage(ZPackage pkg)
        {
            var result  = new BountyInfo();
            var version = pkg.ReadInt();

            result.Interval            = pkg.ReadInt();
            result.PlayerID            = pkg.ReadLong();
            result.Biome               = (Heightmap.Biome)pkg.ReadInt();
            result.State               = (BountyState)pkg.ReadInt();
            result.Target              = BountyTargetInfo.FromPackage(pkg);
            result.TargetName          = pkg.ReadString();
            result.RewardIron          = pkg.ReadInt();
            result.RewardGold          = pkg.ReadInt();
            result.Position            = SerializableVector3.FromPackage(pkg);
            result.MinimapCircleOffset = SerializableVector3.FromPackage(pkg);

            var addsCount = pkg.ReadInt();

            result.Adds = new List <BountyTargetInfo>();
            for (var index = 0; index < addsCount; index++)
            {
                result.Adds.Add(BountyTargetInfo.FromPackage(pkg));
            }

            result.Slain = pkg.ReadBool();

            return(result);
        }
Пример #2
0
        public static BountyTargetInfo FromPackage(ZPackage pkg)
        {
            var result = new BountyTargetInfo();

            result.MonsterID = pkg.ReadString();
            result.Count     = pkg.ReadInt();
            result.Level     = pkg.ReadInt();
            return(result);
        }