protected override void OnDeleted() { Guild1 = null; Guild2 = null; base.OnDeleted(); }
public ClientGuildAllianceInfo ToClientInfo(GuildInfo guild) { int count = 0; foreach (GuildMemberInfo member in Guild1 == guild ? Guild2.Members : Guild1.Members) { if (member.Account.Connection?.Player != null) { count++; } } return(new ClientGuildAllianceInfo { Index = Index, Name = Guild1 == guild ? Guild2.GuildName : Guild1.GuildName, OnlineCount = count, }); }