Beispiel #1
0
        protected static void RemoveEffect(PlayerMobile pm, ThieveConsumableEffect effectType)
        {
            if (EffectTable.ContainsKey(pm))
            {
                EffectTable[pm].EffectTimer.Stop();
                EffectTable.Remove(pm);

                pm.SendLocalizedMessage(1095134);//The effects of the balm or lotion have worn off.

                if (effectType == ThieveConsumableEffect.BalmOfStrengthEffect || effectType == ThieveConsumableEffect.BalmOfSwiftnessEffect || effectType == ThieveConsumableEffect.BalmOfWisdomEffect)
                {
                    pm.RemoveStatMod("Balm");
                }
                else if (effectType == ThieveConsumableEffect.StoneSkinLotionEffect)
                {
                    List <ResistanceMod> list = pm.ResistanceMods;

                    for (int i = 0; i < list.Count; i++)
                    {
                        ResistanceMod curr = list[i];
                        if ((curr.Type == ResistanceType.Cold && curr.Offset == -5) || (curr.Type == ResistanceType.Fire && curr.Offset == -5) || (curr.Type == ResistanceType.Physical && curr.Offset == 30))
                        {
                            list.RemoveAt(i);
                            i--;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            _ = reader.ReadInt();

            m_EffectType     = (ThieveConsumableEffect)reader.ReadInt();
            m_EffectDuration = reader.ReadTimeSpan();
        }
Beispiel #3
0
 public static bool IsUnderThieveConsumableEffect(PlayerMobile pm, ThieveConsumableEffect eff)
 {
     if (EffectTable.ContainsKey(pm) && EffectTable[pm].Effect == eff)
     {
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 public InternalTimer(PlayerMobile p, ThieveConsumableEffect e, TimeSpan delay)
     : base(delay)
 {
     pm     = p;
     effect = e;
 }
Beispiel #5
0
 public ThieveConsumableInfo(BaseThieveConsumable.InternalTimer t, ThieveConsumableEffect e)
 {
     Effect      = e;
     EffectTimer = t;
 }