修复AdventureStateInfo 入库
parent
6fef8b2297
commit
8c51272314
|
@ -23,6 +23,7 @@ public class AdventureManager extends MongoBase {
|
||||||
|
|
||||||
public void station(AdventureStateInfo adventureStateInfo) throws Exception {
|
public void station(AdventureStateInfo adventureStateInfo) throws Exception {
|
||||||
int position = adventureStateInfo.getPosition();
|
int position = adventureStateInfo.getPosition();
|
||||||
|
adventureStateInfo.init(getRootId(), getMongoKey() + ".adventureStateInfoMap."+ position);
|
||||||
updateString("adventureStateInfoMap." + position, adventureStateInfo);
|
updateString("adventureStateInfoMap." + position, adventureStateInfo);
|
||||||
adventureStateInfoMap.put(position,adventureStateInfo);
|
adventureStateInfoMap.put(position,adventureStateInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,12 @@ public class CombatLogic {
|
||||||
FightInfoProto.GetAdventureStateInfoResponse response = FightInfoProto.GetAdventureStateInfoResponse.newBuilder().addAllAdventureStateInfoList(result).setDrop(dropBuilder.build()).setOutTime(offLineTime).
|
FightInfoProto.GetAdventureStateInfoResponse response = FightInfoProto.GetAdventureStateInfoResponse.newBuilder().addAllAdventureStateInfoList(result).setDrop(dropBuilder.build()).setOutTime(offLineTime).
|
||||||
build();
|
build();
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.GET_ADVENTURE_INFO_RESPONSE_VALUE,response,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.GET_ADVENTURE_INFO_RESPONSE_VALUE,response,true);
|
||||||
|
List<CommonProto.Item> itemlistList = dropBuilder.getItemlistList();
|
||||||
|
for(CommonProto.Item item: itemlistList){
|
||||||
|
LOGGER.info("the uid={},itemID={}",uid,item.getItemId());
|
||||||
|
}
|
||||||
|
LOGGER.info("the uid={},offlineTimeLong={}",uid,offLineTime);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,8 +147,9 @@ public class CombatLogic {
|
||||||
adventureStateInfoTmp.setStartTime(startTime+times*adventureRefresh);
|
adventureStateInfoTmp.setStartTime(startTime+times*adventureRefresh);
|
||||||
SAdventureConfig sAdventureConfig = SAdventureConfig.getSAdventureConfigByPosition(positionTmp);
|
SAdventureConfig sAdventureConfig = SAdventureConfig.getSAdventureConfigByPosition(positionTmp);
|
||||||
int leaveBonus = sAdventureConfig.getLeaveBonus();
|
int leaveBonus = sAdventureConfig.getLeaveBonus();
|
||||||
|
int maxTimes = leaveBonus * 3600 / adventureRefresh;
|
||||||
if(!isOnLine){
|
if(!isOnLine){
|
||||||
times = times>leaveBonus?leaveBonus:times;
|
times = times>maxTimes?maxTimes:times;
|
||||||
}
|
}
|
||||||
int baseRewardGroup[] = sAdventureConfig.getBaseRewardGroup();
|
int baseRewardGroup[] = sAdventureConfig.getBaseRewardGroup();
|
||||||
float rewardRation = calRation(size,sAdventureConfig.getNumIncome());
|
float rewardRation = calRation(size,sAdventureConfig.getNumIncome());
|
||||||
|
|
|
@ -680,7 +680,14 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringBuilder getHeroProperty(User user, Hero hero, StringBuilder sb){
|
public StringBuilder getHeroProperty(User user, Hero hero, StringBuilder sb){
|
||||||
Map<Integer, Integer> heroAttributeMap = calHeroFinalAttributeWhenInMap(user, hero);
|
int curMapId = user.getMapManager().getCurMapId();
|
||||||
|
Map<Integer, Integer> heroAttributeMap;
|
||||||
|
if(curMapId == 0){
|
||||||
|
heroAttributeMap=calHeroNotBufferAttribute(user, hero);
|
||||||
|
}else {
|
||||||
|
heroAttributeMap=calHeroFinalAttributeWhenInMap(user, hero);
|
||||||
|
}
|
||||||
|
|
||||||
sb.append(hero.getLevel()).append(DIVISION);
|
sb.append(hero.getLevel()).append(DIVISION);
|
||||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||||
List<Integer> templatePropetyIds = transTemplateByHeroPropertyName.get(scHero.getPropertyName());
|
List<Integer> templatePropetyIds = transTemplateByHeroPropertyName.get(scHero.getPropertyName());
|
||||||
|
|
Loading…
Reference in New Issue