public GroupWhoGump(WhoType type, Mobile owner, int page) : base(GumpOffsetX, GumpOffsetY) { owner.CloseGump(typeof(GroupWhoGump)); m_WhoType = type; m_Owner = owner; m_Mobiles = new ArrayList(); LoadList(m_WhoType, m_Owner); Initialize(page); }
public void LoadList(WhoType type, Mobile owner) { if (type == WhoType.Allied) { Guild g = owner.Guild as Guild; if (g == null || g.Allies == null) { return; } foreach (object ox in g.Allies) { if (ox is Guild == false) { continue; } if ((ox as Guild).Members != null && (ox as Guild).Members.Count > 0) { for (int ix = 0; ix < (ox as Guild).Members.Count; ix++) { if (((ox as Guild).Members[ix] as Mobile).NetState != null) { m_Mobiles.Add((ox as Guild).Members[ix]); } } } } } else if (type == WhoType.Guild) { Guild g = owner.Guild as Guild; if (g == null) { return; } if (g.Members != null && g.Members.Count > 0) { for (int ix = 0; ix < g.Members.Count; ix++) { if ((g.Members[ix] as Mobile).NetState != null) { m_Mobiles.Add(g.Members[ix]); } } } } else if (type == WhoType.Party) { if (owner.Party != null) { foreach (Server.Engines.PartySystem.PartyMemberInfo pmi in (owner.Party as Server.Engines.PartySystem.Party).Members) { if (pmi != null && pmi.Mobile != null && pmi.Mobile is PlayerMobile) { if (pmi.Mobile.NetState != null) { m_Mobiles.Add(pmi.Mobile); } } } } } }
public GroupWhoGump(WhoType type, Mobile owner) : this(type, owner, 0) { }