助战刷新问题处理

back_recharge
duhui 2021-02-23 17:44:27 +08:00
parent fa6937881c
commit 0cca7ec7b4
3 changed files with 6 additions and 9 deletions

View File

@ -84,13 +84,8 @@ public class FourChallengeLogic {
*
*/
public void check() {
// 只检测一次
if (TimeUtils.getHourOfDay() != 0 && status != null) {
return;
}
// 空初始化长度为4
status = new int[4];
for (int[] statusConfig : config) {
for (int i = 1; i < statusConfig.length; i++) {
// 判断当前周几
@ -109,7 +104,7 @@ public class FourChallengeLogic {
*/
public void fourChallengeGetInfo(ISession session,boolean result) throws Exception {
PlayerInfoProto.FourChallengeGetInfoResponse.Builder builder = PlayerInfoProto.FourChallengeGetInfoResponse.newBuilder();
check();
User user = UserManager.getUser(session.getUid());
// 玩家当前层数
int[] fourChallenge = user.getPlayerInfoManager().getFourChallenge();

View File

@ -300,7 +300,7 @@ public class HelpHeroLogic {
*/
public void zeroClearRedisHelp() throws IOException {
// 不是零点
if (TimeUtils.getHourOfDay() != 0){
if (TimeUtils.getHourOfDay() != 0 || TimeUtils.getMiunte() != 0){
return;
}

View File

@ -46,6 +46,7 @@ import manager.STableManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
import util.TimeUtils;
import java.lang.reflect.Field;
import java.util.*;
@ -87,8 +88,9 @@ public class MinuteTask extends Thread {
LOGGER.error("Exception::=>{}",e.toString());
}
try {
if (TimeUtils.getHourOfDay() == 0 && TimeUtils.getMiunte() == 0){
FourChallengeLogic.getInstance().check();
}
}catch (Exception e){
LOGGER.error("Exception::=>{}",e.toString());
}