gm修改器购买

back_recharge
duhui 2022-09-20 14:48:31 +08:00
parent 3881e066ed
commit b39221e45f
2 changed files with 5 additions and 4 deletions

View File

@ -55,7 +55,7 @@ public class GmBuyGoodHandler extends BaseHandler<PlayerInfoProto.GmBuyGoodReque
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH); throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
} }
// 走礼包逻辑发送奖励 // 走礼包逻辑发送奖励
BuyGoodsNewLogic.gmBuyGoods(user, goodsId); BuyGoodsNewLogic.gmBuyGoods(iSession, goodsId);
} }
/** /**

View File

@ -137,18 +137,19 @@ public class BuyGoodsNewLogic {
/** /**
* gm * gm
* @param user * @param iSession
* @param goodsId * @param goodsId
* @throws Exception * @throws Exception
*/ */
public static void gmBuyGoods(User user, int goodsId) throws Exception { public static void gmBuyGoods(ISession iSession, int goodsId) throws Exception {
SRechargeCommodityNewConfig sRechargeCommodityConfig = SRechargeCommodityNewConfig.getConfigById(goodsId); SRechargeCommodityNewConfig sRechargeCommodityConfig = SRechargeCommodityNewConfig.getConfigById(goodsId);
if(sRechargeCommodityConfig == null){ if(sRechargeCommodityConfig == null){
throw new ErrorCodeException(ErrorCode.CFG_NULL); throw new ErrorCodeException(ErrorCode.CFG_NULL);
} }
String orderId = "gm_modifier"; String orderId = "gm_modifier";
int price = (int)sRechargeCommodityConfig.getPrice() * 100; int price = (int)sRechargeCommodityConfig.getPrice() * 100;
sendGoods(user.getId(), String.valueOf(goodsId), user.getPlayerInfoManager().getOpenId(), orderId, TimeUtils.now(), price); MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.TEST_BUY_GIGT_GOODS_RESPONSE_VALUE,null,true);
sendGoods(iSession.getUid(), String.valueOf(goodsId), "", orderId, TimeUtils.now(), price);
} }
/** /**