ServUO Version
Publish 57
Ultima Expansion
Endless Journey
I am working on doing some changes to spell buff timers.

What i am currently planning is making changes in the spellhelper.cs file.

What I plan to change is the following line.
return TimeSpan.FromSeconds(caster.Skills[SkillName.Magery].Value * 1.2);

to
return TimeSpan.FromSeconds(caster.Skills[Skillname.Magery].Value * 4.5 + caster.Skills[Skillname.Inscribe].Value * 4.5);

Im wanting it to give spells like bless a timer that is 15 minutes instead of the current like 2 minutes for my players that have 100 in both magery and inscription.

Wanting to make sure I am on the right track so I can make the changes when I get home this evening.

spellhelper.cs:
        public static TimeSpan GetDuration(Mobile caster, Mobile target)
        {
            if (Core.AOS)
            {
                int span = (((6 * caster.Skills.EvalInt.Fixed) / 50) + 1);

                if (caster.Spell is CurseSpell && Spells.SkillMasteries.ResilienceSpell.UnderEffects(target))
                    span /= 2;

                return TimeSpan.FromSeconds(span);
            }

            return TimeSpan.FromSeconds(caster.Skills[SkillName.Magery].Value * 1.2);
        }
 
If your using Core.AOS, than you'll need to edit the other condition
Code:
 return TimeSpan.FromSeconds(span);

Otherwise your on track!
Yep! Forgot to edit that part also. I just removed the AOS part of the code and the buffs now work correctly!

Thanks!

Now to edit all the resists of buff spells to gain bonus from additional skills.
Thinking along the lines of Forensic Eval gives a bonus to physical resist, camping to Fire.....etc
 
Back