public float GetContractTimeReductionMultiplierForPerks(IUpgradeableVO deployableVO, List <string> perkIds) { BuildingLookupController buildingLookupController = Service.BuildingLookupController; BuildingTypeVO minBuildingRequirement = buildingLookupController.GetMinBuildingRequirement(deployableVO); List <string> perkEffectIds = this.GetPerkEffectIds(perkIds); return(ContractTimePerkUtils.GetTimeReductionMultiplier(minBuildingRequirement, perkEffectIds)); }
public static float GetTimeReductionMultiplier(BuildingTypeVO contractBuildingVO, List <string> perkEffectIds) { float num = 0f; if (perkEffectIds != null) { StaticDataController staticDataController = Service.StaticDataController; int i = 0; int count = perkEffectIds.Count; while (i < count) { PerkEffectVO perkEffectVO = staticDataController.Get <PerkEffectVO>(perkEffectIds[i]); if (ContractTimePerkUtils.CanApplyEffect(perkEffectVO, contractBuildingVO)) { num += perkEffectVO.ContractTimeReduction; } i++; } } return(1f - num); }
public unsafe static long $Invoke1(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ContractTimePerkUtils.GetTimeReductionMultiplier((BuildingTypeVO)GCHandledObjects.GCHandleToObject(*args), (List <string>)GCHandledObjects.GCHandleToObject(args[1])))); }
public unsafe static long $Invoke0(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ContractTimePerkUtils.CanApplyEffect((PerkEffectVO)GCHandledObjects.GCHandleToObject(*args), (BuildingTypeVO)GCHandledObjects.GCHandleToObject(args[1])))); }