Archaaz

Member
First of all I am using RunUO. My era is set to LBR, so I am using the old pre-AOS system. I want to crete a special suit of amor that allows a chance to avoid being poisoned when worn. Each piece will grant a percentage, up to 10% for a full suit.

I will include a method in BaseMobile to check each layer for a piece of the armor. If the layer contains the amror it sill add 1-2 points, and will calculate all at the end. This I am pretty sure I can manage.

Rather than include a check for each type of poisoning (mobs, traps, etc.) I hope to add only one check. My question is whether it would be sufficient to include it in ApplyPoisonResult in PlayerMobile? If so, could I simply have a success return ApplyPoisonResult.Immune? Here is the orignal method. I do not really need help with the code itself, just want to make sure this is enough, or if there is something I am missing.

Code:
        public override ApplyPoisonResult ApplyPoison( Mobile from, Poison poison )
        {
            if ( !Alive )
                return ApplyPoisonResult.Immune;

            if ( Spells.Necromancy.EvilOmenSpell.TryEndEffect( this ) )
                poison = PoisonImpl.IncreaseLevel( poison );

            ApplyPoisonResult result = base.ApplyPoison( from, poison );

            if ( from != null && result == ApplyPoisonResult.Poisoned && PoisonTimer is PoisonImpl.PoisonTimer )
                (PoisonTimer as PoisonImpl.PoisonTimer).From = from;

            return result;
        }


Thanks in advance for any help!
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back