挂机奖励修改
parent
a4dca69532
commit
508eda57d8
|
@ -13,16 +13,23 @@ import java.util.Map;
|
|||
public class MainLevelManager extends MongoBase {
|
||||
public static final String _COLLECTION_NAME = "mainLevelManager";
|
||||
|
||||
private int fightId; // 当前关卡id
|
||||
private int state; //状态 -1表示有等级卡
|
||||
private int startTime;// 给前端展示的挂机时长
|
||||
private int lastTime; //上一个关卡记时时间
|
||||
// 当前关卡id
|
||||
private int fightId;
|
||||
//状态 -1表示有等级卡
|
||||
private int state;
|
||||
// 给前端展示的挂机时长
|
||||
private int startTime;
|
||||
//上一个关卡记时时间
|
||||
private int lastTime;
|
||||
|
||||
private Map<Integer,Integer> fightStateInfo = new HashMap<>();
|
||||
private Map<Integer,HashSet<String>> bossIds = new HashMap<>();
|
||||
|
||||
public void init(){
|
||||
this.startTime = (int)(System.currentTimeMillis()/1000);
|
||||
this.startTime = TimeUtils.nowInt();
|
||||
this.lastTime = TimeUtils.nowInt();
|
||||
updateString("startTime",startTime);
|
||||
updateString("lastTime",lastTime);
|
||||
updateFight(1011,1);
|
||||
}
|
||||
|
||||
|
@ -50,11 +57,11 @@ public class MainLevelManager extends MongoBase {
|
|||
// 更新时间
|
||||
if(adventureOffline <= times){
|
||||
times=0;
|
||||
}else {
|
||||
// 修改最后时间
|
||||
updateString("lastTime",TimeUtils.nowInt()+times*adventureRefresh);
|
||||
}
|
||||
|
||||
// 修改最后时间
|
||||
updateString("lastTime", lastTime + times * adventureRefresh);
|
||||
|
||||
fightStateInfo.put(fightId,times);
|
||||
updateString("fightStateInfo." + fightId,times);
|
||||
}
|
||||
|
@ -70,10 +77,10 @@ public class MainLevelManager extends MongoBase {
|
|||
}
|
||||
this.fightId = fightId;
|
||||
this.state = state;
|
||||
this.lastTime = TimeUtils.nowInt();
|
||||
updateString("fightId",fightId);
|
||||
updateString("state",state);
|
||||
updateString("lastTime",lastTime);
|
||||
// this.lastTime = TimeUtils.nowInt();
|
||||
// updateString("lastTime",lastTime);
|
||||
}
|
||||
|
||||
public void afterTakeStateReward(boolean needReset,int lastTakes,int time){
|
||||
|
|
|
@ -987,7 +987,7 @@ public class CombatLogic {
|
|||
MailLogic.getInstance().sendMail(user.getId(),title,content,reward,time, Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
mainLevelManager.afterTakeStateReward(true,0,time);
|
||||
// mainLevelManager.afterTakeStateReward(true,0,time);
|
||||
myResult = true;
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue