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