back_recharge
wangyuan 2019-09-16 21:34:32 +08:00
parent dc00f02962
commit 200905d5a3
2 changed files with 16 additions and 10 deletions

View File

@ -433,12 +433,12 @@ public class HeroLogic {
if (hero == null) { if (hero == null) {
break; break;
} }
if(heroAllAttributeMap.get(heroInfo)!=null){ if(heroAllAttributeMap.get(heroInfo.getHeroId())!=null){
continue; continue;
} }
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId); Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
Map<String, Integer> endlessHeroInfo = user.getMapManager().getEndlessMapInfo().getEndlessHeroInfo(); Map<String, Integer> endlessHeroInfo = user.getMapManager().getEndlessMapInfo().getEndlessHeroInfo();
if(endlessHeroInfo!=null&& endlessHeroInfo.size()>0){ if(endlessHeroInfo!=null&& endlessHeroInfo.containsKey(heroInfo.getHeroId())){
int curHp = (int)(endlessHeroInfo.get(heroInfo.getHeroId()) /10000.00 * heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())); int curHp = (int)(endlessHeroInfo.get(heroInfo.getHeroId()) /10000.00 * heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId()));
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(), curHp); heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(), curHp);
} }

View File

@ -545,10 +545,13 @@ public class ItemUtil {
continue; continue;
} }
Equip equip = new Equip(user.getId(), entry.getKey()); Integer nums = entry.getValue();
equips.add(equip); for(int i=0;i<nums;i++){
equipProtoList.add(CBean2Proto.getEquipProto(equip)); Equip equip = new Equip(user.getId(), entry.getKey());
LOGGER.info("the uid={},the curMapId={},add equip={},equipNum={},totalEquipNum={}",user.getId(),user.getMapManager().getCurMapId(),entry.getKey(),1,equips.size()); equips.add(equip);
equipProtoList.add(CBean2Proto.getEquipProto(equip));
}
LOGGER.info("the uid={},the curMapId={},add equip={},equipNum={},totalEquipNum={}",user.getId(),user.getMapManager().getCurMapId(),entry.getKey(),nums,equips.size());
} }
for (Map.Entry<Integer, Integer> entry : equipMap.entrySet()) { for (Map.Entry<Integer, Integer> entry : equipMap.entrySet()) {
@ -556,10 +559,13 @@ public class ItemUtil {
if (sEquipSign == null) { if (sEquipSign == null) {
continue; continue;
} }
SoulEquip soulEquip1 = new SoulEquip(user.getId(), entry.getKey()); Integer nums = entry.getValue();
soulEquips.add(soulEquip1); for(int i=0;i<nums;i++){
soulEquiplist.add(CBean2Proto.getEquipProto(soulEquip1)); SoulEquip soulEquip1 = new SoulEquip(user.getId(), entry.getKey());
LOGGER.info("the uid={},the curMapId={},add equip={},equipNum={},totalEquipNum={}",user.getId(),user.getMapManager().getCurMapId(),entry.getKey(),1,equips.size()); soulEquips.add(soulEquip1);
soulEquiplist.add(CBean2Proto.getEquipProto(soulEquip1));
}
LOGGER.info("the uid={},the curMapId={},add equip={},equipNum={},totalEquipNum={}",user.getId(),user.getMapManager().getCurMapId(),entry.getKey(),nums,equips.size());
} }
mapManager.setTemporaryItems(temporaryItems); mapManager.setTemporaryItems(temporaryItems);