public static int GetRelocationCostDiscount(List <string> perkEffectIds)
        {
            int num = 0;

            if (perkEffectIds != null)
            {
                IDataController dataController = Service.Get <IDataController>();
                int             i     = 0;
                int             count = perkEffectIds.Count;
                while (i < count)
                {
                    PerkEffectVO perkEffectVO = dataController.Get <PerkEffectVO>(perkEffectIds[i]);
                    if (RelocationCostPerkUtils.CanApplyEffect(perkEffectVO))
                    {
                        num += perkEffectVO.RelocationDiscount;
                    }
                    i++;
                }
            }
            return(num);
        }
Exemplo n.º 2
0
        public int GetRelocationCostDiscountForPerks(List <string> perkIds)
        {
            List <string> perkEffectIds = this.GetPerkEffectIds(perkIds);

            return(RelocationCostPerkUtils.GetRelocationCostDiscount(perkEffectIds));
        }
 public unsafe static long $Invoke1(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(RelocationCostPerkUtils.GetRelocationCostDiscount((List <string>)GCHandledObjects.GCHandleToObject(*args))));
 }
 public unsafe static long $Invoke0(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(RelocationCostPerkUtils.CanApplyEffect((PerkEffectVO)GCHandledObjects.GCHandleToObject(*args))));
 }