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