(@NotNull TimerContext context)
| 124 | |
| 125 | public static class ColdTimer implements TimerHandle { |
| 126 | @Override |
| 127 | public void onTimer(@NotNull TimerContext context) throws Exception { |
| 128 | var app = (Game.App)context.timer.zeze.getAppBase(); |
| 129 | var buf = (BKick)context.customData; |
| 130 | //logger.info("XYZ timer={} app={} buf={} counter={}", |
| 131 | // context.timerId, app.Zeze.getConfig().getServerId(), buf.getCode(), app.counterColdTimer); |
| 132 | if (buf.getCode() != app.counterColdTimer) |
| 133 | throw new RuntimeException("XYZ verify cold timer error." + buf.getCode() + " counter=" + app.counterColdTimer); |
| 134 | buf.setCode(app.counterColdTimer + 1); |
| 135 | Transaction.whileCommit(() -> app.counterColdTimer += 1); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | public void Stop() throws Exception { |
nothing calls this directly
no test coverage detected