大闹天宫,商店刷新优化

back_recharge
duhui 2021-09-08 14:13:23 +08:00
parent e0612fe088
commit 40911b8f24
1 changed files with 15 additions and 9 deletions

View File

@ -192,20 +192,26 @@ public class ExpeditionLogic {
int state = nodeInfo1.getLay() == oldlay ? (nodeInfo1.getSortId() == passNode ? ExpeditionLogic.NODESTATE_PASS : ExpeditionLogic.NODESTATE_OVER_PASS) : nextNodeId.contains(nodeInfo1.getSortId())?ExpeditionLogic.NODESTATE_NOT_PASS:ExpeditionLogic.NODESTATE_CLOSE; int state = nodeInfo1.getLay() == oldlay ? (nodeInfo1.getSortId() == passNode ? ExpeditionLogic.NODESTATE_PASS : ExpeditionLogic.NODESTATE_OVER_PASS) : nextNodeId.contains(nodeInfo1.getSortId())?ExpeditionLogic.NODESTATE_NOT_PASS:ExpeditionLogic.NODESTATE_CLOSE;
nodeInfo1.setState(state); nodeInfo1.setState(state);
if(nodeInfo1.getType()==ExpeditionLogic.NODETYPE_SHOP&&newlay==nodeInfo1.getLay()){ // if(nodeInfo1.getType()==ExpeditionLogic.NODETYPE_SHOP&&newlay==nodeInfo1.getLay()){
try { // try {
//更新商店 // //更新商店
StoreLogic.initOneStore(user, 56); // StoreLogic.initOneStore(user, 56);
}catch (Exception e){ // }catch (Exception e){
e.printStackTrace(); // e.printStackTrace();
} // }
} // }
//最后的奖励节点 前端显示跳转入口用 //最后的奖励节点 前端显示跳转入口用
if( nodeInfo1.getLay() == oldlay&&nodeInfo1.getType()==ExpeditionLogic.NODETYPE_REWARD){ if( nodeInfo1.getLay() == oldlay&&nodeInfo1.getType()==ExpeditionLogic.NODETYPE_REWARD){
if(user.getExpeditionManager().getExpeditionLeve()<=2){ if(user.getExpeditionManager().getExpeditionLeve()<=2){
nodeInfo1.setState(ExpeditionLogic.NODESTATE_NOT_GET); nodeInfo1.setState(ExpeditionLogic.NODESTATE_NOT_GET);
} }
//更新商店
try {
StoreLogic.initOneStore(user, 56);
} catch (Exception e) {
e.printStackTrace();
}
} }
nodeInfos.add(CommonProto.ExpeditionNodeInfo.newBuilder() nodeInfos.add(CommonProto.ExpeditionNodeInfo.newBuilder()
.setSortId(nodeInfo1.getSortId()) .setSortId(nodeInfo1.getSortId())
@ -535,7 +541,7 @@ public class ExpeditionLogic {
} }
private static void checkAndResetTreasure(User user) throws Exception { private static void checkAndResetTreasure(User user) throws Exception {
SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1); // SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1);
WorldTreasureReward worldTreasureReward = user.getExpeditionManager().getWorldTreasureReward(); WorldTreasureReward worldTreasureReward = user.getExpeditionManager().getWorldTreasureReward();
if(worldTreasureReward.getFirstStartTime()>TimeUtils.nowInt()){ if(worldTreasureReward.getFirstStartTime()>TimeUtils.nowInt()){
return; return;