public void Update_OnTick(Timer t) { Profiles.Save(); GMenuItem item = this.m_Shard.Menu; if (item == null) { Engine.UpdateSmartLoginMenu(); } else { for (int i = 0; i < this.m_Shard.Characters.Length; i++) { GMenuItem item2 = this.m_Shard.Characters[i].Menu; if (item2 == null) { item.Add(this.m_Shard.Characters[i].Menu = item2 = new GPlayCharacterMenu(this.m_Shard.Characters[i])); } else { item2.Text = this.m_Shard.Characters[i].Name; } } Gump[] gumpArray = item.Children.ToArray(); for (int j = 0; j < gumpArray.Length; j++) { GPlayCharacterMenu child = gumpArray[j] as GPlayCharacterMenu; if ((child != null) && !this.m_Shard.Contains(child.Character)) { item.Remove(child); } } } }
public void Update_OnTick(Timer t) { Profiles.Save(); GMenuItem item = this.m_Account.Menu; if ((item == null) || ((item == this.m_Server.Menu) && (this.m_Account.Shards.Length != 1))) { Engine.UpdateSmartLoginMenu(); } else if (this.m_Account.Shards.Length > 1) { for (int i = 0; i < this.m_Account.Shards.Length; i++) { GMenuItem item2 = this.m_Account.Shards[i].Menu; if (item2 == null) { item.Add(this.m_Account.Shards[i].Menu = item2 = new GShardMenu(this.m_Account.Shards[i])); } else { item2.Text = this.m_Account.Shards[i].Name; } } Gump[] gumpArray = item.Children.ToArray(); for (int j = 0; j < gumpArray.Length; j++) { GShardMenu child = gumpArray[j] as GShardMenu; if ((child != null) && !this.m_Account.Contains(child.Shard)) { item.Remove(child); } } } }