Merge branch 'master_test_gn_zf' into master_test_gn

back_recharge
jiahuiwen 2021-10-09 11:06:31 +08:00
commit f9115627b9
1 changed files with 7 additions and 1 deletions

View File

@ -204,10 +204,11 @@ public class HeroLogic{
//宝器
if(type==4){
Map<String, PropertyItem> equipMap = user.getEquipManager().getEquipMap();
Set<String> needRemove = new HashSet<>(equipMap.size());
for(Map.Entry<String, PropertyItem> equipInfoEntry : equipMap.entrySet()){
PropertyItem value = equipInfoEntry.getValue();
if (value == null) {
equipManager.remove(equipInfoEntry.getKey());
needRemove.add(equipInfoEntry.getKey());
LOGGER.info("getAllEquipInfo uid={} remove null jewel{}", uid, equipInfoEntry.getKey());
continue;
}
@ -215,6 +216,11 @@ public class HeroLogic{
equipList.add(CBean2Proto.getEquipProto(value));
}
}
if (!needRemove.isEmpty()) {
for (String id : needRemove) {
equipManager.remove(id);
}
}
}else {
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}