private C0540_GoodsStrengthenRespMessage buildStrengthenRespMesage( RoleInstance role, RoleGoods equRG, GoodsEquipment goodsTemplate) { C0540_GoodsStrengthenRespMessage respMsg = new C0540_GoodsStrengthenRespMessage(); respMsg.setStatus(RespTypeStatus.FAILURE); try { int targetStrengThenNum = equRG.getStrengthenLevel() + 1; // int qualityType = goodsTemplate.getQualityType(); EquipStrengthenConfig strengthenObj = GameContext.getGoodsApp().getEquipStrengthenConfig(targetStrengThenNum); if (null == strengthenObj) { respMsg.setStatus(RespTypeStatus.FAILURE); respMsg.setInfo(GameContext.getI18n().getText(TextId.GOODS_MAX_STRENGTHEN_LV)); return respMsg; } respMsg.setFee(strengthenObj.getGameMoney()); // respMsg.setMaxRelegation((byte)strengthenObj.getMaxRelegation()); if (strengthenObj.getMaterialId() > 0) { GoodsLiteNamedItem mitem = strengthenObj.getMaterialGoods().getGoodsLiteNamedItem(); mitem.setNum((short) strengthenObj.getMaterialNum()); respMsg.setMaterialItem(mitem); } /*if(strengthenObj.getStoneId()>0){ GoodsLiteNamedItem sitem = strengthenObj.getStoneGoods().getGoodsLiteNamedItem(); sitem.setNum((short)strengthenObj.getStoneNum()); respMsg.setStoneItem(sitem); }*/ // 成功率从配置中获取 respMsg.setAttriList( GameContext.getEquipApp().getStrengthenAttriDifferent(equRG, goodsTemplate, 1)); respMsg.setSuccessRate(strengthenObj.getShowHitProb()); // 开启vip等级 respMsg.setOneKeyVipLevel( (byte) GameContext.getVipApp() .getOpenVipLevel(VipPrivilegeType.EQUIP_ONEKEY_STRENGTHEN.getType(), "")); respMsg.setStatus(RespTypeStatus.SUCCESS); return respMsg; } catch (Exception e) { logger.error("buildStrengthenRespMesage ", e); return respMsg; } }