首通奖励添加
parent
89122562b5
commit
1fa383a2ed
|
@ -138,7 +138,10 @@ public class JourneyMap {
|
||||||
}
|
}
|
||||||
CommonProto.JourneyInfo info = CommonProto.JourneyInfo.newBuilder()
|
CommonProto.JourneyInfo info = CommonProto.JourneyInfo.newBuilder()
|
||||||
.setMapId(k)
|
.setMapId(k)
|
||||||
.setProcess(v.getCurrentPath()*100/v.getAllPathInfo().length).setRedPoint(redPoint).build();
|
.setProcess(v.getCurrentPath()*100/v.getAllPathInfo().length)
|
||||||
|
.setRedPoint(redPoint)
|
||||||
|
.setFirst(v.isFirstPass()?1:0)
|
||||||
|
.build();
|
||||||
response.addInfos(info);
|
response.addInfos(info);
|
||||||
});
|
});
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||||
|
@ -415,12 +418,18 @@ public class JourneyMap {
|
||||||
break;
|
break;
|
||||||
case EventType.journeyFinal:
|
case EventType.journeyFinal:
|
||||||
pathType = 7;
|
pathType = 7;
|
||||||
|
|
||||||
commonRewardArray = new int[randomNum.size()+1];
|
commonRewardArray = new int[randomNum.size()+1];
|
||||||
for(int i=0;i<commonRewardArray.length-1;i++){
|
for(int i=0;i<commonRewardArray.length-1;i++){
|
||||||
commonRewardArray[i] = common[randomNum.get(i)-1];
|
commonRewardArray[i] = common[randomNum.get(i)-1];
|
||||||
}
|
}
|
||||||
int finalReward = travelConfig.getFinalReward();
|
int finalReward = travelConfig.getFinalReward();
|
||||||
commonRewardArray[commonRewardArray.length-1] = finalReward;
|
commonRewardArray[commonRewardArray.length-1] = finalReward;
|
||||||
|
if(!pathInfo.isFirstPass()){
|
||||||
|
commonRewardArray = Arrays.copyOf(commonRewardArray,commonRewardArray.length+1);
|
||||||
|
commonRewardArray[commonRewardArray.length-1] = travelConfig.getFirstReward();
|
||||||
|
pathInfo.setFirstPass(true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class PathInfo {
|
||||||
|
|
||||||
private int remainRandomTime;
|
private int remainRandomTime;
|
||||||
|
|
||||||
|
private boolean firstPass;
|
||||||
|
|
||||||
public int getDiceNum() {
|
public int getDiceNum() {
|
||||||
return diceNum;
|
return diceNum;
|
||||||
}
|
}
|
||||||
|
@ -102,5 +104,13 @@ public class PathInfo {
|
||||||
public void setGoodsMap(Map<Integer, JourneyGoods> goodsMap) {
|
public void setGoodsMap(Map<Integer, JourneyGoods> goodsMap) {
|
||||||
this.goodsMap = goodsMap;
|
this.goodsMap = goodsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFirstPass() {
|
||||||
|
return firstPass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstPass(boolean firstPass) {
|
||||||
|
this.firstPass = firstPass;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ public class SFreeTravel implements BaseConfig {
|
||||||
|
|
||||||
private int[][] turntableGoods;
|
private int[][] turntableGoods;
|
||||||
|
|
||||||
|
private int firstReward;
|
||||||
|
|
||||||
public static Map<Integer,SFreeTravel> journeyMapByMapId;
|
public static Map<Integer,SFreeTravel> journeyMapByMapId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -106,5 +108,7 @@ public class SFreeTravel implements BaseConfig {
|
||||||
return turntableGoods;
|
return turntableGoods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getFirstReward() {
|
||||||
|
return firstReward;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue