Beispiel #1
0
        public static TES3Lib.Enums.Attribute CastActorValueToAttributeMW(TES4Lib.Enums.ActorValue actorValue)
        {
            switch (actorValue)
            {
            case ActorValue.Strength:
                return(TES3Lib.Enums.Attribute.Strength);

            case ActorValue.Intelligence:
                return(TES3Lib.Enums.Attribute.Intelligence);

            case ActorValue.Willpower:
                return(TES3Lib.Enums.Attribute.Willpower);

            case ActorValue.Agility:
                return(TES3Lib.Enums.Attribute.Agility);

            case ActorValue.Speed:
                return(TES3Lib.Enums.Attribute.Speed);

            case ActorValue.Endurance:
                return(TES3Lib.Enums.Attribute.Endurance);

            case ActorValue.Personality:
                return(TES3Lib.Enums.Attribute.Personality);

            case ActorValue.Luck:
                return(TES3Lib.Enums.Attribute.Luck);

            default:
                return(TES3Lib.Enums.Attribute.Strength);
            }
        }
Beispiel #2
0
        public static TES3Lib.Enums.Attribute CastActorValueToAttributeEffectMW(TES4Lib.Enums.ActorValue actorValue, TES3Lib.Enums.MagicEffect magicEffect)
        {
            bool isAttributeEffect =
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.AbsorbAttribute) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.DamageAttribute) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.DrainAttribute) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.FortifyAttribute) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.RestoreAttribute);

            if (!isAttributeEffect)
            {
                return(TES3Lib.Enums.Attribute.None);
            }

            return((TES3Lib.Enums.Attribute)Enum.Parse(typeof(TES3Lib.Enums.Attribute), actorValue.ToString()));
        }
Beispiel #3
0
        public static TES3Lib.Enums.Skill CastActorValueToSkillMW(TES4Lib.Enums.ActorValue actorValue)
        {
            switch (actorValue)
            {
            case ActorValue.Armorer:
                return(TES3Lib.Enums.Skill.Armorer);

            case ActorValue.Athletics:
                return(TES3Lib.Enums.Skill.Athletics);

            case ActorValue.Blade:
                return(TES3Lib.Enums.Skill.LongBlade);

            case ActorValue.Block:
                return(TES3Lib.Enums.Skill.Block);

            case ActorValue.Blunt:
                return(TES3Lib.Enums.Skill.BluntWeapon);

            case ActorValue.HandToHand:
                return(TES3Lib.Enums.Skill.HandToHand);

            case ActorValue.HeavyArmor:
                return(TES3Lib.Enums.Skill.HeavyArmor);

            case ActorValue.Alchemy:
                return(TES3Lib.Enums.Skill.Alchemy);

            case ActorValue.Alteration:
                return(TES3Lib.Enums.Skill.Alteration);

            case ActorValue.Conjuration:
                return(TES3Lib.Enums.Skill.Conjuration);

            case ActorValue.Destruction:
                return(TES3Lib.Enums.Skill.Destruction);

            case ActorValue.Illusion:
                return(TES3Lib.Enums.Skill.Illusion);

            case ActorValue.Mysticism:
                return(TES3Lib.Enums.Skill.Mysticism);

            case ActorValue.Restoration:
                return(TES3Lib.Enums.Skill.Restoration);

            case ActorValue.Acrobatics:
                return(TES3Lib.Enums.Skill.Acrobatics);

            case ActorValue.LightArmor:
                return(TES3Lib.Enums.Skill.LightArmor);

            case ActorValue.Marksman:
                return(TES3Lib.Enums.Skill.Marksman);

            case ActorValue.Mercantile:
                return(TES3Lib.Enums.Skill.Mercantile);

            case ActorValue.Security:
                return(TES3Lib.Enums.Skill.Security);

            case ActorValue.Sneak:
                return(TES3Lib.Enums.Skill.Sneak);

            case ActorValue.Speechcraft:
                return(TES3Lib.Enums.Skill.Speechcraft);

            default:
                return(TES3Lib.Enums.Skill.None);
            }
        }
Beispiel #4
0
        public static TES3Lib.Enums.Skill CastActorValueToSkillEffectMW(TES4Lib.Enums.ActorValue actorValue, TES3Lib.Enums.MagicEffect magicEffect)
        {
            bool isSkillEffect =
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.AbsorbSkill) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.DamageSkill) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.DrainSkill) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.FortifySkill) ||
                magicEffect.Equals(TES3Lib.Enums.MagicEffect.RestoreSkill);

            if (!isSkillEffect)
            {
                return(TES3Lib.Enums.Skill.None);
            }

            var rnd = new Random(DateTime.Now.Millisecond).Next(0, 2);

            switch (actorValue)
            {
            case TES4Lib.Enums.ActorValue.Armorer:
                return(TES3Lib.Enums.Skill.Armorer);

            case TES4Lib.Enums.ActorValue.Athletics:
                return(TES3Lib.Enums.Skill.Athletics);

            case TES4Lib.Enums.ActorValue.Blade:
                return(rnd.Equals(0) ? TES3Lib.Enums.Skill.ShortBlade : TES3Lib.Enums.Skill.LongBlade);

            case TES4Lib.Enums.ActorValue.Block:
                return(TES3Lib.Enums.Skill.Block);

            case TES4Lib.Enums.ActorValue.Blunt:
                return(rnd.Equals(0) ? TES3Lib.Enums.Skill.BluntWeapon : TES3Lib.Enums.Skill.Axe);

            case TES4Lib.Enums.ActorValue.HandToHand:
                return(TES3Lib.Enums.Skill.HandToHand);

            case TES4Lib.Enums.ActorValue.HeavyArmor:
                return(rnd.Equals(0) ? TES3Lib.Enums.Skill.HeavyArmor : TES3Lib.Enums.Skill.MediumArmor);

            case TES4Lib.Enums.ActorValue.Alchemy:
                return(TES3Lib.Enums.Skill.Alchemy);

            case TES4Lib.Enums.ActorValue.Alteration:
                return(TES3Lib.Enums.Skill.Alteration);

            case TES4Lib.Enums.ActorValue.Conjuration:
                return(TES3Lib.Enums.Skill.Conjuration);

            case TES4Lib.Enums.ActorValue.Destruction:
                return(TES3Lib.Enums.Skill.Destruction);

            case TES4Lib.Enums.ActorValue.Illusion:
                return(TES3Lib.Enums.Skill.Illusion);

            case TES4Lib.Enums.ActorValue.Mysticism:
                return(TES3Lib.Enums.Skill.Mysticism);

            case TES4Lib.Enums.ActorValue.Restoration:
                return(TES3Lib.Enums.Skill.Restoration);

            case TES4Lib.Enums.ActorValue.Acrobatics:
                return(TES3Lib.Enums.Skill.Acrobatics);

            case TES4Lib.Enums.ActorValue.LightArmor:
                return(rnd.Equals(0) ? TES3Lib.Enums.Skill.LightArmor : TES3Lib.Enums.Skill.MediumArmor);

            case TES4Lib.Enums.ActorValue.Marksman:
                return(TES3Lib.Enums.Skill.Marksman);

            case TES4Lib.Enums.ActorValue.Mercantile:
                return(TES3Lib.Enums.Skill.Mercantile);

            case TES4Lib.Enums.ActorValue.Security:
                return(TES3Lib.Enums.Skill.Security);

            case TES4Lib.Enums.ActorValue.Sneak:
                return(TES3Lib.Enums.Skill.Sneak);

            case TES4Lib.Enums.ActorValue.Speechcraft:
                return(TES3Lib.Enums.Skill.Speechcraft);

            default:
                return(TES3Lib.Enums.Skill.None);
            }
        }