修复玩家魂宝灵宝
parent
dc98d0fc75
commit
8903413162
|
|
@ -19,6 +19,9 @@ public class MongoPropertyConverter implements Converter<BasicDBObject, Property
|
|||
private static JsonWriterSettings jsonWriterSettings = new JsonWriterSettings();
|
||||
@Override
|
||||
public PropertyItem convert(BasicDBObject source) {
|
||||
if (!source.containsField("equipId")) {
|
||||
return null;
|
||||
}
|
||||
SItem equipId = STableManager.getConfig(SItem.class).get(source.getInt("equipId"));
|
||||
Class<? extends PropertyItem> target = PropertyItem.class;
|
||||
if(equipId.getItemType() == GlobalItemType.JEWEL){
|
||||
|
|
|
|||
|
|
@ -204,9 +204,15 @@ public class HeroLogic{
|
|||
//宝器
|
||||
if(type==4){
|
||||
Map<String, PropertyItem> equipMap = user.getEquipManager().getEquipMap();
|
||||
for(PropertyItem equipInfo: equipMap.values()){
|
||||
if(equipInfo instanceof Jewel) {
|
||||
equipList.add(CBean2Proto.getEquipProto(equipInfo));
|
||||
for(Map.Entry<String, PropertyItem> equipInfoEntry : equipMap.entrySet()){
|
||||
PropertyItem value = equipInfoEntry.getValue();
|
||||
if (value == null) {
|
||||
equipManager.remove(equipInfoEntry.getKey());
|
||||
LOGGER.info("getAllEquipInfo uid={} remove null jewel{}", uid, equipInfoEntry.getKey());
|
||||
continue;
|
||||
}
|
||||
if(value instanceof Jewel) {
|
||||
equipList.add(CBean2Proto.getEquipProto(value));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue