Exemplo n.º 1
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            byte box0 = reader.ReadByte();

            Sex                  = BooleanByteWrapper.GetFlag(box0, 1);
            IsRideable           = BooleanByteWrapper.GetFlag(box0, 2);
            IsFeconded           = BooleanByteWrapper.GetFlag(box0, 3);
            IsFecondationReady   = BooleanByteWrapper.GetFlag(box0, 4);
            Id_                  = reader.ReadVarLong();
            ExpirationDate       = reader.ReadVarLong();
            Model                = reader.ReadVarInt();
            Name                 = reader.ReadUTF();
            Owner                = reader.ReadUTF();
            Level                = reader.ReadByte();
            ReproductionCount    = reader.ReadVarInt();
            ReproductionCountMax = reader.ReadVarInt();
            var countEffects = reader.ReadShort();

            Effects = new List <ObjectEffectInteger>();
            for (short i = 0; i < countEffects; i++)
            {
                ObjectEffectInteger type = new ObjectEffectInteger();
                type.Deserialize(reader);
                Effects.Add(type);
            }
            var countCapacities = reader.ReadShort();

            Capacities = new List <int>();
            for (short i = 0; i < countCapacities; i++)
            {
                Capacities.Add(reader.ReadVarInt());
            }
        }
Exemplo n.º 2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            byte box0 = reader.ReadByte();

            Sex                = BooleanByteWrapper.GetFlag(box0, 1);
            IsRideable         = BooleanByteWrapper.GetFlag(box0, 2);
            IsWild             = BooleanByteWrapper.GetFlag(box0, 3);
            IsFecondationReady = BooleanByteWrapper.GetFlag(box0, 4);
            UseHarnessColors   = BooleanByteWrapper.GetFlag(box0, 5);
            Id_                = reader.ReadDouble();
            Model              = reader.ReadVarInt();
            var countAncestor = reader.ReadShort();

            Ancestor = new List <int>();
            for (short i = 0; i < countAncestor; i++)
            {
                Ancestor.Add(reader.ReadInt());
            }
            var countBehaviors = reader.ReadShort();

            Behaviors = new List <int>();
            for (short i = 0; i < countBehaviors; i++)
            {
                Behaviors.Add(reader.ReadInt());
            }
            Name                   = reader.ReadUTF();
            OwnerId                = reader.ReadInt();
            Experience             = reader.ReadVarLong();
            ExperienceForLevel     = reader.ReadVarLong();
            ExperienceForNextLevel = reader.ReadDouble();
            Level                  = reader.ReadByte();
            MaxPods                = reader.ReadVarInt();
            Stamina                = reader.ReadVarInt();
            StaminaMax             = reader.ReadVarInt();
            Maturity               = reader.ReadVarInt();
            MaturityForAdult       = reader.ReadVarInt();
            Energy                 = reader.ReadVarInt();
            EnergyMax              = reader.ReadVarInt();
            Serenity               = reader.ReadInt();
            AggressivityMax        = reader.ReadInt();
            SerenityMax            = reader.ReadVarInt();
            Love                   = reader.ReadVarInt();
            LoveMax                = reader.ReadVarInt();
            FecondationTime        = reader.ReadInt();
            BoostLimiter           = reader.ReadInt();
            BoostMax               = reader.ReadDouble();
            ReproductionCount      = reader.ReadInt();
            ReproductionCountMax   = reader.ReadVarInt();
            HarnessGID             = reader.ReadVarShort();
            var countEffectList = reader.ReadShort();

            EffectList = new List <ObjectEffectInteger>();
            for (short i = 0; i < countEffectList; i++)
            {
                ObjectEffectInteger type = new ObjectEffectInteger();
                type.Deserialize(reader);
                EffectList.Add(type);
            }
        }