离线探索
parent
bb1bea214f
commit
16fc0ffbbb
|
@ -194,27 +194,34 @@ public class ExplorerMapLogic {
|
|||
} else {
|
||||
offlineEndTime = keyVal.getValue().getSendEndTime();
|
||||
}
|
||||
if (keyVal.getValue().getBatteTime() + 300 >= offlineEndTime) {
|
||||
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(keyVal.getValue().getMapId());
|
||||
int battleInterval = exploreConfig.getBattleInterval();
|
||||
if (exploreConfig == null) {
|
||||
continue;
|
||||
}
|
||||
for (int i = keyVal.getValue().getBatteTime() + 300; i < offlineEndTime; i = i + 300) {
|
||||
if (keyVal.getValue().getBatteTime() +battleInterval >= offlineEndTime) {
|
||||
continue;
|
||||
}
|
||||
LOGGER.info("离线玩家队伍id",keyVal.getKey());
|
||||
for (int i = keyVal.getValue().getBatteTime() + battleInterval; i < offlineEndTime; i = i + battleInterval) {
|
||||
//复活玩家
|
||||
if (keyVal.getValue().getPlayerHp() == 0 && keyVal.getValue().getPlayerReliveTime() <= i) {
|
||||
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, keyVal.getKey(), false);
|
||||
keyVal.getValue().setPlayerHp(teamForce);
|
||||
LOGGER.info("复活玩家:");
|
||||
LOGGER.info("离线复活玩家:"+i);
|
||||
}
|
||||
//复活怪物
|
||||
if (keyVal.getValue().getEnemyHp() == 0 && keyVal.getValue().getEnemyReliveTime() <= i) {
|
||||
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(keyVal.getValue().getMapId());
|
||||
exploreConfig = STableManager.getConfig(SExplore.class).get(keyVal.getValue().getMapId());
|
||||
if (exploreConfig == null) {
|
||||
continue;
|
||||
}
|
||||
//怪物的初始血量
|
||||
int mapMonsterForce = exploreConfig.getMonsterForce();
|
||||
LOGGER.info("复活怪物:");
|
||||
LOGGER.info("离线复活怪物:"+i);
|
||||
keyVal.getValue().setEnemyHp(mapMonsterForce);
|
||||
}
|
||||
LOGGER.info("离线战斗:"+i);
|
||||
singleBattle(user, keyVal.getValue(), keyVal.getKey(), i);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue