public static bool IsUnderEffects(Mobile from, FishPieEffect type) { if (!m_EffectsList.ContainsKey(from) || m_EffectsList[from] == null) return false; return m_EffectsList[from].Contains(type); }
public static bool IsUnderEffects(Mobile from, FishPieEffect type) { if (!m_EffectsList.ContainsKey(from) || m_EffectsList[from] == null) { return(false); } return(m_EffectsList[from].Contains(type)); }
public static bool TryAddBuff(Mobile from, FishPieEffect type) { if (IsUnderEffects(from, type)) return false; if (!m_EffectsList.ContainsKey(from)) m_EffectsList.Add(from, new List<FishPieEffect>()); m_EffectsList[from].Add(type); return true; }
public static void RemoveBuff(Mobile from, FishPieEffect type) { if(!m_EffectsList.ContainsKey(from)) return; if (m_EffectsList[from] != null && m_EffectsList[from].Contains(type)) m_EffectsList[from].Remove(type); if (m_EffectsList[from] == null || m_EffectsList[from].Count == 0) m_EffectsList.Remove(from); BuffInfo.RemoveBuff(from, BuffIcon.FishPie); from.Delta(MobileDelta.WeaponDamage); }
public static bool TryAddBuff(Mobile from, FishPieEffect type) { if (IsUnderEffects(from, type)) { return(false); } if (!m_EffectsList.ContainsKey(from)) { m_EffectsList.Add(from, new List <FishPieEffect>()); } m_EffectsList[from].Add(type); return(true); }
public static void RemoveBuff(Mobile from, FishPieEffect type) { if (!m_EffectsList.ContainsKey(from)) { return; } if (m_EffectsList[from] != null && m_EffectsList[from].Contains(type)) { m_EffectsList[from].Remove(type); } if (m_EffectsList[from] == null || m_EffectsList[from].Count == 0) { m_EffectsList.Remove(from); } BuffInfo.RemoveBuff(from, BuffIcon.FishPie); from.Delta(MobileDelta.WeaponDamage); }
public InternalTimer(TimeSpan duration, Mobile from, FishPieEffect type) : base(duration) { m_From = from; m_EffectType = type; this.Start(); }
public InternalTimer(TimeSpan duration, Mobile from, FishPieEffect type) : base(duration) { m_From = from; m_EffectType = type; Start(); }