コード例 #1
0
 @Override
 public String[] getStatCodes() {
   if (codes == null)
     codes =
         CMProps.getStatCodesList(
             CMParms.toStringArray(GenericBuilder.GenItemCode.values()), this);
   return codes;
 }
コード例 #2
0
 @Override
 public String[] getStatCodes() {
   if (codes != null) return codes;
   final String[] MYCODES = CMProps.getStatCodesList(GenThinArmor.MYCODES, this);
   final String[] superCodes = CMParms.toStringArray(GenericBuilder.GenItemCode.values());
   codes = new String[superCodes.length + MYCODES.length];
   int i = 0;
   for (; i < superCodes.length; i++) codes[i] = superCodes[i];
   for (int x = 0; x < MYCODES.length; i++, x++) codes[i] = MYCODES[x];
   return codes;
 }
コード例 #3
0
ファイル: GenShopkeeper.java プロジェクト: kingdavid127/MUD
 @Override
 public void setStat(String code, String val) {
   if (CMLib.coffeeMaker().getGenMobCodeNum(code) >= 0)
     CMLib.coffeeMaker().setGenMobStat(this, code, val);
   else
     switch (getCodeNum(code)) {
       case 0:
         {
           if ((val.length() == 0) || (CMath.isLong(val))) setWhatIsSoldMask(CMath.s_long(val));
           else if (CMParms.containsIgnoreCase(ShopKeeper.DEAL_DESCS, val))
             setWhatIsSoldMask(CMParms.indexOfIgnoreCase(ShopKeeper.DEAL_DESCS, val));
           break;
         }
       case 1:
         setPrejudiceFactors(val);
         break;
       case 2:
         setBudget(val);
         break;
       case 3:
         setDevalueRate(val);
         break;
       case 4:
         setInvResetRate(CMath.s_parseIntExpression(val));
         break;
       case 5:
         setIgnoreMask(val);
         break;
       case 6:
         setItemPricingAdjustments(
             (val.trim().length() == 0)
                 ? new String[0]
                 : CMParms.toStringArray(CMParms.parseCommas(val, true)));
         break;
       default:
         CMProps.setStatCodeExtensionValue(getStatCodes(), xtraValues, code, val);
         break;
     }
 }