public TeamBase(int team, TourneyController cont) : base(0x1BC4) { Movable = false; Visible = false; m_Team = team; List <TeamBase> bases = cont.Bases; if (bases.Count < team) { while (bases.Count < team) { bases.Add(null); } bases.Add(this); } else { TeamBase old = bases[team]; bases[team] = this; if (old != null) { old.Delete(); } } Name = team == 0 ? "Home location" : String.Format("Team {0} Base", team); }
private void ResetPlayers() { foreach (KeyValuePair <PlayerMobile, TourneyEntry> item in m_Participants) { PlayerMobile m = item.Key; Refresh(m); m.Frozen = true; //Undress List <Item> dress = new List <Item>(m.Items); foreach (Item item2 in dress) { if (item2 == m.Backpack) { continue; } DeathMoveResult res = m.GetParentMoveResultFor(item2); if (res == DeathMoveResult.MoveToBackpack || res == DeathMoveResult.MoveToCorpse) { m.Backpack.AddItem(item2); } } //Clear backapck if (m_StolenBackpack.ContainsKey(m)) { m.Backpack.Delete(); } else { m.BankBox.DropItem(m.Backpack); } //New backpack Backpack pack = new Backpack(); pack.Movable = false; m.AddItem(pack); //Supply items AddItems(pack); //Robe m.EquipItem(new DeathRobe()); //Team colour m.SolidHueOverride = item.Value.Team; //Move to base TeamBase bas = bases[item.Value.Team]; if (bas != null) { m.MoveToWorld(bas.Location, bas.Map); } } }