Beispiel #1
0
        void AddItemSkin(CharacterItemRecord record, ItemRecord template)
        {
            if (template.AppearanceId != 0)
            {
                switch (template.Type)
                {
                case ItemTypeEnum.PET:
                    Character.Look.subentities.Add(new SubEntity((sbyte)SubEntityBindingPointCategoryEnum.HOOK_POINT_CATEGORY_PET,
                                                                 0, ContextActorLook.SimpleBonesLook((ushort)template.AppearanceId, PET_SIZE).ToEntityLook()));
                    return;

                case ItemTypeEnum.PETSMOUNT:
                    Character.Look = Character.Look.CharacterToRider((ushort)template.AppearanceId, new List <ushort>(), Character.Look.indexedColors.Take(3).ToList(), 100);
                    return;

                default:
                    if (record.ContainEffect(EffectsEnum.Eff_Mimicry))
                    {
                        var mimicryEffect = record.GetFirstEffect <ObjectEffectInteger>(EffectsEnum.Eff_Mimicry);
                        var mimicryAppId  = (ushort)ItemRecord.GetItem(mimicryEffect.value).AppearanceId;
                        Character.Look.AddSkin(mimicryAppId);
                    }
                    else
                    {
                        Character.Look.AddSkin((ushort)template.AppearanceId);
                    }
                    break;
                }
            }
        }
Beispiel #2
0
        public Character(CharacterRecord record, WorldClient client)
        {
            this.Client       = client;
            this.Record       = record;
            this.Look         = ContextActorLook.Parse(Record.Look);
            this.HumanOptions = new List <HumanOption>();

            this.Inventory = new Inventory(this);

            this.PlayerStatus = new PlayerStatus((sbyte)PlayerStatusEnum.PLAYER_STATUS_AVAILABLE);
        }
        public ContextActorLook CharacterToRider(ushort bonesid, List <ushort> rskins, List <int> rcolors, short rscale)
        {
            this.bonesId = 2;
            ContextActorLook newLook = new ContextActorLook(bonesid, rskins, rcolors, new List <short>()
            {
                rscale
            }, new List <SubEntity>()
            {
                new SubEntity((sbyte)SubEntityBindingPointCategoryEnum.HOOK_POINT_CATEGORY_MOUNT_DRIVER, 0, ToEntityLook())
            });

            return(newLook);
        }
        public ContextActorLook RiderToCharacter()
        {
            var playerLook = this.subentities.Find(x => x.bindingPointCategory == (sbyte)SubEntityBindingPointCategoryEnum.HOOK_POINT_CATEGORY_MOUNT_DRIVER);

            if (playerLook != null)
            {
                playerLook.subEntityLook.bonesId = 1;
                return(ContextActorLook.FromEntityLook(playerLook.subEntityLook));
            }
            else
            {
                return(this);
            }
        }