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