Exemple #1
0
        public PartnerWrapper(FullWrapper info, int tax)
        {
            foreach (ResTypes res in Enum.GetValues(typeof(ResTypes)))
            {
                BoostsInfo[res] = new PartnerBoostInfo(info.BaseInfo.house, info.BaseInfo.equipmentEquipped, info.BaseInfo.boosts, res);
            }
            foreach (var pet in info.BaseInfo.pets)
            {
                PetsInfo[pet.id] = new PetInfo(pet);
            }
            GlobalInfo = new PartnerGlobalInfo(info.BaseInfo.kingdom, info.BaseInfo.village, tax, info.Vip);
            foreach (var partner in info.BaseInfo.partners)
            {
                PartnersInfo[partner.id] = new PartnerInfo(partner, info.BaseInfo.stats);
            }
            foreach (var partner in PartnersInfo)
            {
                PartnersIncomeInfo[partner.Key] = new PartnerIncomeInfo(partner.Value, BoostsInfo[partner.Value.ResType], GlobalInfo);
            }
            foreach (ResTypes res in Enum.GetValues(typeof(ResTypes)))
            {
                Totals[res] = new PartnerTotalInfo(res, PartnersIncomeInfo.Values.ToList(), PetsInfo.Values.ToList());
            }

            Difference = new PartnerDifference(PartnersInfo.Values.ToList(), Totals);
        }
 public PartnerIncomeInfo(PartnerInfo partnerInfo, PartnerBoostInfo boostInfo, PartnerGlobalInfo globalInfo)
 {
     PartnerInfo = partnerInfo;
     BoostInfo   = boostInfo;
     GlobalInfo  = globalInfo;
 }