예제 #1
0
        public override void Deserialize(BinaryReader reader)
        {
            base.Deserialize(reader);

            var anims = reader.ReadInt32();
            Animations = new VMAnimationStateMarshal[anims];
            for (int i = 0; i < anims; i++) Animations[i] = new VMAnimationStateMarshal(reader);

            var carry = reader.ReadBoolean();
            if (carry) CarryAnimationState = new VMAnimationStateMarshal(reader);

            Message = reader.ReadString();
            MessageTimeout = reader.ReadInt32();

            var motCs = reader.ReadInt32();
            MotiveChanges = new VMMotiveChange[motCs];
            for (int i = 0; i < motCs; i++)
            {
                MotiveChanges[i] = new VMMotiveChange();
                MotiveChanges[i].Deserialize(reader);
            }
            MotiveDecay = new VMAvatarMotiveDecay();
            MotiveDecay.Deserialize(reader);

            var pdats = reader.ReadInt32();
            PersonData = new short[pdats];
            for (int i = 0; i < pdats; i++) PersonData[i] = reader.ReadInt16();

            var mdats = reader.ReadInt32();
            MotiveData = new short[mdats];
            for (int i = 0; i < mdats; i++) MotiveData[i] = reader.ReadInt16();

            HandObject = reader.ReadInt16();
            RadianDirection = reader.ReadSingle();

            if (Version > 1) KillTimeout = reader.ReadInt32();

            DefaultSuits = new VMAvatarDefaultSuits(reader);

            var aprs = reader.ReadInt32();
            BoundAppearances = new string[aprs];
            for (int i = 0; i < aprs; i++) BoundAppearances[i] = reader.ReadString();

            BodyOutfit = reader.ReadUInt64();
            HeadOutfit = reader.ReadUInt64();
            SkinTone = (AppearanceType)reader.ReadByte();
        }
예제 #2
0
파일: VMAvatar.cs 프로젝트: Daribon/FreeSO
        public VMAvatar(GameObject obj)
            : base(obj)
        {
            Name = "Sim";

            BodyStrings = Object.Resource.Get<STR>(Object.OBJ.BodyStringID);

            SetAvatarType(BodyStrings);
            SkinTone = AppearanceType.Light;

            if (UseWorld)
            {
                WorldUI = new AvatarComponent();
                var avatarc = (AvatarComponent)WorldUI;
                avatarc.Avatar = Avatar;
            }

            for (int i = 0; i < 16; i++)
            {
                MotiveChanges[i] = new VMMotiveChange();
                MotiveChanges[i].Motive = (VMMotive)i;
            }
        }