master_ob2
PC-202302260912\Administrator 2023-09-21 21:24:43 +08:00
parent c8a035fcdf
commit 1106721a87
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,7 @@
{
"version":"6",
"version":"7",
"classes":[
{"name":"ItemUtil.class","fullName":"com.ljsd.jieling.util.ItemUtil"}
{"name":"ItemUtil.class","fullName":"com.ljsd.jieling.util.ItemUtil"},
{"name":"GetPlayerInfoHandler.class","fullName":"com.ljsd.jieling.handler.GetPlayerInfoHandler"}
]
}

View File

@ -256,7 +256,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
ReportUtil.onReportEvent(user, ReportEventEnum.APP_LOGIN.getType());
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);//登陆更新数据
} catch (Exception e) {
e.printStackTrace();
LOGGER.error("获取玩家信息报错:{}",e.getMessage(),e);
}
//道具异常检查
ItemLogic.getInstance().checkItem(user);

View File

@ -1093,6 +1093,14 @@ public class ItemLogic {
throw new ErrorCodeException(ErrorCode.ACCOUNT_ERROR);
}
}
Item item7 = user.getItemManager().getItem(1004);
if(item7 != null){
if(item7.getItemNum() >= 300){
String format = MessageFormat.format("道具异常uid{0}itemId{1}itemNum{2}", user.getId(), item6.getItemId(),item6.getItemNum());
LOGGER.error(format);
throw new ErrorCodeException(ErrorCode.ACCOUNT_ERROR);
}
}
}
}