private void Reset() { if (BattleRegion == null) { return; } IEnumerable <BaseCreature> list = BattleRegion.GetEnumeratedMobiles().OfType <BaseCreature>(); foreach (BaseCreature bc in list.Where(b => b.Alive && !b.Controlled && !b.Summoned && b.GetMaster() == null)) { bc.Kill(); } foreach (KeyValuePair <int, List <BaseCreature> > kvp in MyrmidexTeam) { ColUtility.Free(kvp.Value); } foreach (KeyValuePair <int, List <BaseCreature> > kvp in TribeTeam) { ColUtility.Free(kvp.Value); } MyrmidexTeam.Clear(); TribeTeam.Clear(); }
public void RegionMessage(int message) { foreach (PlayerMobile pm in BattleRegion.GetEnumeratedMobiles().OfType <PlayerMobile>()) { pm.SendLocalizedMessage(message); } }
public bool HasPlayers(bool ignorestaff = true) { if (BattleRegion == null) { return(false); } return(BattleRegion.GetEnumeratedMobiles().Where(m => m is PlayerMobile && (!ignorestaff || m.AccessLevel == AccessLevel.Player)).Count() > 0); }
public IEnumerable <PlayerMobile> GetPlayers(Allegiance allegiance) { if (BattleRegion == null) { return(null); } return(BattleRegion.GetEnumeratedMobiles().OfType <PlayerMobile>().Where(p => MyrmidexInvasionSystem.IsAlliedWith(p, allegiance))); }
public void RegionMessage(int message) { ColUtility.ForEach(BattleRegion.GetEnumeratedMobiles().OfType <PlayerMobile>(), pm => pm.SendLocalizedMessage(message)); }
public bool HasPlayers(bool ignorestaff = true) { return(BattleRegion.GetEnumeratedMobiles().OfType <PlayerMobile>().Where(m => !ignorestaff || m.AccessLevel == AccessLevel.Player).Count() > 0); }