Exemplo n.º 1
0
        public virtual void Load(VMAvatarMarshal input)
        {
            base.Load(input);

            Animations = new List <VMAnimationState>();
            foreach (var anim in input.Animations)
            {
                Animations.Add(new VMAnimationState(anim));
            }
            CarryAnimationState = (input.CarryAnimationState == null) ? null : new VMAnimationState(input.CarryAnimationState);

            Message = input.Message;

            MessageTimeout = input.MessageTimeout;

            MotiveChanges   = input.MotiveChanges;
            MotiveDecay     = input.MotiveDecay;
            PersonData      = input.PersonData;
            MotiveData      = input.MotiveData;
            RadianDirection = input.RadianDirection;
            KillTimeout     = input.KillTimeout;
            DefaultSuits    = input.DefaultSuits;

            BoundAppearances = new HashSet <string>(input.BoundAppearances);

            foreach (var aprN in BoundAppearances)
            {
                var apr = FSO.Content.Content.Get().AvatarAppearances.Get(aprN);

                if (apr != null)
                {
                    Avatar.AddAccessory(apr);
                }
            }

            SkinTone = input.SkinTone;


            if (UseWorld)
            {
                WorldUI.ObjectID = ObjectID;
            }
        }
Exemplo n.º 2
0
        public virtual void Load(VMAvatarMarshal input)
        {
            base.Load(input);

            Animations = new List <VMAnimationState>();
            foreach (var anim in input.Animations)
            {
                Animations.Add(new VMAnimationState(anim));
            }
            CarryAnimationState = (input.CarryAnimationState == null) ? null : new VMAnimationState(input.CarryAnimationState);

            Message = input.Message;

            MessageTimeout = input.MessageTimeout;

            MotiveChanges   = input.MotiveChanges;
            MotiveDecay     = input.MotiveDecay;
            PersonData      = input.PersonData;
            MotiveData      = input.MotiveData;
            RadianDirection = input.RadianDirection;
            KillTimeout     = input.KillTimeout;
            DefaultSuits    = input.DefaultSuits;
            DynamicSuits    = input.DynamicSuits;
            Decoration      = input.Decoration;

            BoundAppearances = new HashSet <string>(input.BoundAppearances);

            if (VM.UseWorld)
            {
                foreach (var aprN in BoundAppearances)
                {
                    var apr = FSO.Content.Content.Get().AvatarAppearances.Get(aprN);
                    if (apr != null)
                    {
                        Avatar.AddAccessory(apr);
                    }
                }

                var oftProvider = Content.Content.Get().AvatarOutfits;
                if (Decoration.Back != 0)
                {
                    Avatar.DecorationBack = oftProvider.Get(Decoration.Back);
                }
                if (Decoration.Head != 0)
                {
                    Avatar.DecorationHead = oftProvider.Get(Decoration.Head);
                }
                if (Decoration.Tail != 0)
                {
                    Avatar.DecorationTail = oftProvider.Get(Decoration.Tail);
                }
                if (Decoration.Shoes != 0)
                {
                    Avatar.DecorationShoes = oftProvider.Get(Decoration.Shoes);
                }
            }

            SkinTone = input.SkinTone;

            if (UseWorld)
            {
                WorldUI.ObjectID = ObjectID;
            }
        }