Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public unsafe static long $Invoke0(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ContractTimePerkUtils.CanApplyEffect((PerkEffectVO)GCHandledObjects.GCHandleToObject(*args), (BuildingTypeVO)GCHandledObjects.GCHandleToObject(args[1]))));
 }