Exemplo n.º 1
0
        protected override bool FilterAssistant(BaseSlotItemInfo baseSlotItem, UpgradeSlotItemInfo upgradeSlotItem,
            AssistantInfo assistant)
        {
            if (this.IsOnlyShowCurrentDay)
            {
                // 今日不可改修
                if (!assistant.IsAvailable(this.CurrentDay)) return false;
            }

            if (this.IsOnlyShowAvailable)
            {
                // 需要二号舰
                if (assistant.ShipInfo != null)
                {
                    // 检查是否拥有舰娘
                    var shipId = assistant.ShipInfo.Id;
                    var client = KanColleClient.Current;
                    var set = new HashSet<int>();
                    while (client.Homeport.Organization.Ships.Values.All(ship => ship.Info.Id != shipId))
                    {
                        // 改造链循环(如霞改二/乙)
                        if (!set.Add(shipId)) return false;

                        int.TryParse(client.Master.Ships[shipId].RawData.api_aftershipid, out shipId);
                        // 没有后续改造舰娘
                        if (shipId == 0) return false;
                    }
                }
            }

            return base.FilterAssistant(baseSlotItem, upgradeSlotItem, assistant);
        }
Exemplo n.º 2
0
 protected virtual bool FilterAssistant(BaseSlotItemInfo baseSlotItem, UpgradeSlotItemInfo upgradeSlotItem, AssistantInfo assistant)
 {
     return true;
 }
Exemplo n.º 3
0
 protected override bool FilterAssistant(BaseSlotItemInfo baseSlotItem, UpgradeSlotItemInfo upgradeSlotItem, AssistantInfo assistant)
 {
     return base.FilterAssistant(baseSlotItem, upgradeSlotItem, assistant) && assistant.IsAvailable(this.CurrentDay);
 }