public void DefragLooters() { if (Looters.Count == 0) { return; } for (int i = 0; i < Looters.Count; i++) { try { if (Looters[i] is TrashLooter) { m_Looter = (TrashLooter)Looters[i]; if (m_Looter.Time + m_LootWait < DateTime.Now || m_Looter.Looter == null) { Looters.RemoveAt(i--); } } else { Looters.RemoveAt(i--); } } catch (Exception e) { Console.WriteLine("/nException Caught in TrashPiles Defrag: /n{0}/n", e); } } }
public bool FindLooter(Mobile from) { bool rtn = false; if (Looters.Count == 0) { return(rtn); } foreach (Object obj in Looters) { if (obj is TrashLooter) { m_Looter = (TrashLooter)obj; if (m_Looter.Looter == from) { rtn = true; break; } } } return(rtn); }
public void DefragLooters() { if (Looters.Count == 0) return; for (int i = 0; i < Looters.Count; i++) { try { if (Looters[i] is TrashLooter) { m_Looter = (TrashLooter)Looters[i]; if (m_Looter.Time + m_LootWait < DateTime.Now || m_Looter.Looter == null) { Looters.RemoveAt(i--); } } else { Looters.RemoveAt(i--); } } catch (Exception e) { Console.WriteLine("/nException Caught in TrashPiles Defrag: /n{0}/n", e); } } }
public bool FindLooter(Mobile from) { bool rtn = false; if (Looters.Count == 0) return rtn; foreach (Object obj in Looters) { if (obj is TrashLooter) { m_Looter = (TrashLooter)obj; if (m_Looter.Looter == from) { rtn = true; break; } } } return rtn; }