private void OnTick() { if (DateTime.UtcNow > this.m_Destroy) this.Delete(); else if (this.m_MinDamage != 0) { foreach (Mobile m in this.GetMobilesInRange(0)) { if (m == null) continue; else if (this.m_Owner != null) { if (Ability.CanTarget(this.m_Owner, m, true, true, false)) this.m_List.Add(m); } else this.m_List.Add(m); } for (int i = 0; i < this.m_List.Count; i++) { if (this.m_List[i] != null) this.DealDamage(this.m_List[i]); } this.m_List.Clear(); this.m_List = new List<Mobile>(); } }
private void OnTick() { if (DateTime.UtcNow > this.m_Destroy) { this.Delete(); } else if (this.m_MinDamage != 0) { IPooledEnumerable eable = GetMobilesInRange(0); foreach (Mobile m in eable) { if (m == null) { continue; } else if (this.m_Owner != null) { if (Ability.CanTarget(this.m_Owner, m, true, true, false)) { this.m_List.Add(m); } } else { this.m_List.Add(m); } } eable.Free(); for (int i = 0; i < this.m_List.Count; i++) { if (this.m_List[i] != null) { this.DealDamage(this.m_List[i]); } } this.m_List.Clear(); this.m_List = new List <Mobile>(); } }
private void OnTick() { if (DateTime.Now > m_Destroy) { Delete(); } else if (m_MinDamage != 0) { foreach (Mobile m in GetMobilesInRange(0)) { if (m == null) { continue; } else if (m_Owner != null) { if (Ability.CanTarget(m_Owner, m, true, true, false)) { m_List.Add(m); } } else { m_List.Add(m); } } for (int i = 0; i < m_List.Count; i++) { if (m_List[i] != null) { DealDamage(m_List[i]); } } m_List.Clear(); m_List = new List <Mobile>(); } }