初始化三个编队

back_recharge
wangyuan 2019-03-07 15:00:05 +08:00
parent 9cdc8ff54c
commit 77212a2f30
3 changed files with 12 additions and 12 deletions

View File

@ -249,14 +249,15 @@ public class BeanUtil {
} }
Object key = getKey(entry.getKey(), (Class)types[0]); Object key = getKey(entry.getKey(), (Class)types[0]);
map.put(key,objects); map.put(key,objects);
return map; }else{
} Object obj = getObj(entry.getValue(), (Class)type);
Object obj = getObj(entry.getValue(), (Class)type);
// Object value = ((Class)types[1]).newInstance(); // Object value = ((Class)types[1]).newInstance();
// Object obj = dbObject2Bean((DBObject) entry.getValue(), value, root); // Object obj = dbObject2Bean((DBObject) entry.getValue(), value, root);
Object key = getKey(entry.getKey(), (Class)types[0]); Object key = getKey(entry.getKey(), (Class)types[0]);
map.put(key, obj); map.put(key, obj);
}
} }
return map; return map;
} }

View File

@ -55,6 +55,8 @@ public class TeamPosManager extends MongoBase {
teamPosHeroInfoList.add(teamPosHeroInfo); teamPosHeroInfoList.add(teamPosHeroInfo);
} }
teamPosForHero.put(1,teamPosHeroInfoList); teamPosForHero.put(1,teamPosHeroInfoList);
teamPosForHero.put(2,new ArrayList<>(1));
teamPosForHero.put(3,new ArrayList<>(1));
updateString("teamPosForHero",teamPosForHero); updateString("teamPosForHero",teamPosForHero);
} }

View File

@ -586,11 +586,8 @@ public class HeroLogic {
Integer propertyId = item.getKey(); Integer propertyId = item.getKey();
Integer propertyValue = item.getValue(); Integer propertyValue = item.getValue();
SPropertyConfig sPropertyConfig = SPropertyConfig.getsPropertyConfigByPID(propertyId); SPropertyConfig sPropertyConfig = SPropertyConfig.getsPropertyConfigByPID(propertyId);
int style = sPropertyConfig.getStyle();
float score = sPropertyConfig.getScore(); float score = sPropertyConfig.getScore();
if(style == GlobalsDef.PERCENT_TYPE){ LOGGER.info("the value is ={},propertyValue={},score={}",propertyValue*score,propertyValue,score);
score = score/100;
}
result += propertyValue*score; result += propertyValue*score;
} }
@ -602,7 +599,7 @@ public class HeroLogic {
Integer propertyId = item.getKey(); Integer propertyId = item.getKey();
Integer propertyValue = item.getValue(); Integer propertyValue = item.getValue();
if(heroAttributeMap.containsKey(propertyId)){ if(heroAttributeMap.containsKey(propertyId)){
propertyValue = heroAttributeMap.get(propertyId); propertyValue += heroAttributeMap.get(propertyId);
} }
heroAttributeMap.put(propertyId,propertyValue); heroAttributeMap.put(propertyId,propertyValue);
} }
@ -636,7 +633,7 @@ public class HeroLogic {
hero.updateEquipPositionMap(position,equipId); hero.updateEquipPositionMap(position,equipId);
//LOGGER.info("the heroTid={},the force={}",calHeoForce(user,hero)); LOGGER.info("the heroTid={},the force={}",calHeoForce(user,hero));
//发送成功消息 //发送成功消息
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE_VALUE,null,true); MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE_VALUE,null,true);