Ejemplo n.º 1
0
        public void UpdateView(TankPartItem tankPart)
        {
            this.activeSlot.UpdateView();
            this.activeSlot2.UpdateView();
            this.passiveSlot.UpdateView();
            CalculateTankPartUpgradeCoeffEvent eventInstance = new CalculateTankPartUpgradeCoeffEvent();

            tankPart.MarketItem.ScheduleEvent(eventInstance);
            this.SetStars(eventInstance.UpgradeCoeff);
            VisualProperty property = tankPart.Properties[0];

            this.BasePartParam    = $"{property.InitialValue}";
            this.BonusFromModules = (int)(property.GetValue(eventInstance.UpgradeCoeff) - property.InitialValue);
        }
 public void CalculateWeaponUpgradeCoeff(CalculateTankPartUpgradeCoeffEvent e, SingleNode <WeaponItemComponent> weaponItemComponent, [JoinAll] SingleNode <SelfUserComponent> selfUser, [JoinByUser] ICollection <MountedModuleItemNode> mountedModules, [JoinAll] ICollection <SlotNode> slots, [JoinAll] ModuleUpgradeConfigNode moduleUpgradeConfig)
 {
     e.UpgradeCoeff = TankUpgradeUtils.CalculateUpgradeCoeff(this.GetTierAndLevelsDictionary(this.GetMountedModules(mountedModules, TankPartModuleType.WEAPON)), this.GetSlotsCount(slots, TankPartModuleType.WEAPON), moduleUpgradeConfig.moduleUpgradablePowerConfig);
 }