Example #1
0
        public static void AddExp(this ExpTarget target, int exp)
        {
            switch (target.TargetType())
            {
            case ExpTargetType.Attribute:
                //Util.WriteToChat($"Add experience to attribute {target}");
                Globals.Host.Actions.AddAttributeExperience(target.AsAttribute(), exp);
                break;

            case ExpTargetType.Vital:
                //Util.WriteToChat($"Add experience to vital {target}");
                Globals.Host.Actions.AddVitalExperience(target.AsVital(), exp);
                break;

            case ExpTargetType.Specialized:
            case ExpTargetType.Trained:
                //Util.WriteToChat($"Add experience to skill {target}");
                Globals.Host.Actions.AddSkillExperience(target.AsSkill(), exp);
                break;

            default:
                Util.WriteToChat($"Failed to add {exp} exp to {target.GetName()}");
                break;
            }
        }
Example #2
0
        public static int GetTimesLeveled(this ExpTarget target)
        {
            switch (target.TargetType())
            {
            case ExpTargetType.Attribute:
                return(Globals.Host.Actions.AttributeClicks[target.AsAttribute()]);

            //
            //    Globals.Host.Actions.VitalClicks
            case ExpTargetType.Vital:
                return(Globals.Host.Actions.VitalClicks[target.AsVital()]);

                break;

            case ExpTargetType.Trained:
            case ExpTargetType.Specialized:
                return(Globals.Host.Actions.SkillClicks[target.AsSkill()]);

                break;
            }

            return(-1);
        }