功能开启关闭
parent
d56b0b6a08
commit
5ef7afe587
|
@ -114,6 +114,9 @@ public class GlobalDataManaager implements IManager {
|
|||
int id = sGlobalSystemConfig.getId();
|
||||
long systemOpenLong = sGlobalSystemConfig.getSystemOpenLong();
|
||||
long systemEndLong = sGlobalSystemConfig.getSystemEndLong();
|
||||
if (now < systemOpenLong || now > systemEndLong) {
|
||||
continue;
|
||||
}
|
||||
if(openTimeOfFuntionCache.containsKey(id)){
|
||||
//强制关闭
|
||||
if(now<systemOpenLong || (now>systemEndLong)){
|
||||
|
@ -154,8 +157,8 @@ public class GlobalDataManaager implements IManager {
|
|||
long mod = passTims % (diffTime + seasonInterval); // 每个周期的时间+间隔时间
|
||||
if(mod < diffTime ){//新的周期开启 一轮周期的时间
|
||||
//开服几天后开启
|
||||
int[]limitDay = sGlobalSystemConfig.getIfOpen();
|
||||
if(getServerOpenTimeCompareSpecialTimeResult()){
|
||||
int[]limitDay = sGlobalSystemConfig.getIfOpen();
|
||||
if(limitDay.length > 0){
|
||||
if( limitDay[0] == 2 ){
|
||||
long day = TimeUtils.getGapDaysByTwoTime(GameApplication.serverConfig.getOpenTime(),TimeUtils.getTimeStamp2(TimeUtils.now()))+1;
|
||||
|
@ -165,9 +168,18 @@ public class GlobalDataManaager implements IManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
openList.add(id);
|
||||
|
||||
//计算开启时间、关闭时间
|
||||
long turns = passTims / ((diffTime + seasonInterval));
|
||||
if (limitDay.length > 0) {
|
||||
// 达到指定轮数,不再开启该功能
|
||||
if (limitDay[0] == 3) {
|
||||
if (turns > limitDay[1]) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
openList.add(id);
|
||||
long addTim = turns * (diffTime + seasonInterval);
|
||||
long timeOpenOfThis =seasonOpenLong+addTim;
|
||||
long timeCloseOfThis =seasonEndLong+addTim;
|
||||
|
|
Loading…
Reference in New Issue