Merge branch 'master_test_gn_zf' into master_test_gn
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/logic/explorerMap/ExplorerMapLogic.javaback_recharge
commit
c3075fadb4
|
|
@ -56,7 +56,6 @@ public class ExplorerMapLogic {
|
|||
|
||||
PlayerInfoProto.ExplorerMapIndicationResponse.Builder indication = PlayerInfoProto.ExplorerMapIndicationResponse.newBuilder();
|
||||
indication.setExploreInfo(mapInfo);
|
||||
LOGGER.info("sendIndication::::::::::::::::::::"+dropKeyValList.size());
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationResponse_VALUE, indication.build(), true);
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +65,7 @@ public class ExplorerMapLogic {
|
|||
if (explorerInfo == null) {
|
||||
return;
|
||||
}
|
||||
LOGGER.info("开始战斗");
|
||||
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, teamId, false);
|
||||
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(explorerInfo.getMapId());
|
||||
if (exploreConfig == null) {
|
||||
|
|
@ -79,7 +79,7 @@ public class ExplorerMapLogic {
|
|||
if (exploreFightData == null) {
|
||||
return;
|
||||
}
|
||||
LOGGER.info("玩家开始战斗=>{},探索表id:={}",user.getId(),exploreFightData.getId());
|
||||
LOGGER.info("探索表id:={}", exploreFightData.getId());
|
||||
//掉血比例
|
||||
float reduceRatio = exploreFightData.getLoseFight();
|
||||
//玩家掉血
|
||||
|
|
@ -98,6 +98,7 @@ public class ExplorerMapLogic {
|
|||
//输赢判断
|
||||
if (reduceRatio > reduceRatioMonster) {
|
||||
//怪物赢了 保留血量 下次打
|
||||
LOGGER.info("怪物赢了:");
|
||||
explorerInfo.setEnemyHp(explorerInfo.getEnemyHp() - (reduceMonster));
|
||||
explorerInfo.setPlayerHp(0);
|
||||
LOGGER.info("怪物掉血:=》{},剩余血量-》{}", reduceMonster, explorerInfo.getEnemyHp());
|
||||
|
|
@ -111,7 +112,7 @@ public class ExplorerMapLogic {
|
|||
explorerInfo.setPlayerHp(explorerInfo.getPlayerHp() - reducePlayer);
|
||||
explorerInfo.setEnemyHp(0);
|
||||
LOGGER.info("玩家掉血:=》{},剩余血量-》{}", reducePlayer, explorerInfo.getPlayerHp());
|
||||
LOGGER.info("玩家赢了 怪物死 怪物走复活逻辑 掉落组=>{}", exploreConfig.getReward());
|
||||
LOGGER.info("玩家赢了 怪物死 怪物走复活逻辑 掉落组=>{}", explorerInfo.getEnemyReliveTime(), exploreConfig.getReward());
|
||||
for (Map.Entry<Integer, Integer> keyVal : itemMap.entrySet()) {
|
||||
if (dropMap.containsKey(keyVal.getKey())) {
|
||||
dropMap.put(keyVal.getKey(), dropMap.get(keyVal.getKey()) + keyVal.getValue());
|
||||
|
|
@ -141,13 +142,14 @@ public class ExplorerMapLogic {
|
|||
}
|
||||
LOGGER.info("怪物死亡=》重生时间{}", explorerInfo.getEnemyReliveTime());
|
||||
}
|
||||
|
||||
if (time == 0) {
|
||||
explorerInfo.setBatteTime(TimeUtils.nowInt() + exploreConfig.getBattleInterval());//设置下次战斗时间
|
||||
} else {
|
||||
explorerInfo.setBatteTime(time + exploreConfig.getBattleInterval());//设置下次战斗时间
|
||||
}
|
||||
//user.getPlayerInfoManager().addExplorer(explorerInfo, teamId);
|
||||
LOGGER.info("战斗结束=>{}",user.getId());
|
||||
LOGGER.info("战斗结束");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -192,16 +194,21 @@ public class ExplorerMapLogic {
|
|||
} else {
|
||||
offlineEndTime = keyVal.getValue().getSendEndTime();
|
||||
}
|
||||
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(keyVal.getValue().getMapId());
|
||||
int battleInterval = exploreConfig.getBattleInterval();
|
||||
if (exploreConfig == null) {
|
||||
if(keyVal.getValue() == null){
|
||||
LOGGER.info("ExplorerInfo 数据为空 =>{}",user.getId());
|
||||
continue;
|
||||
}
|
||||
if (keyVal.getValue().getBatteTime() >= offlineEndTime) {
|
||||
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(keyVal.getValue().getMapId());
|
||||
if (exploreConfig == null) {
|
||||
LOGGER.info("{} SExplore 不存在的id =>{}",user.getId(),keyVal.getValue().getMapId());
|
||||
continue;
|
||||
}
|
||||
int battleInterval = exploreConfig.getBattleInterval();
|
||||
if (keyVal.getValue().getBatteTime() +battleInterval >= offlineEndTime) {
|
||||
continue;
|
||||
}
|
||||
LOGGER.info("离线玩家队伍id",keyVal.getKey());
|
||||
for (int i = keyVal.getValue().getBatteTime(); i <= offlineEndTime; i = i + battleInterval) {
|
||||
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);
|
||||
|
|
@ -247,7 +254,7 @@ public class ExplorerMapLogic {
|
|||
if (keyVal.getValue().getPlayerHp() == 0 && keyVal.getValue().getPlayerReliveTime() <= TimeUtils.nowInt()) {
|
||||
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, keyVal.getKey(), false);
|
||||
keyVal.getValue().setPlayerHp(teamForce);
|
||||
LOGGER.info("玩家=>{}复活,复活队伍是=>{}",uid,keyVal.getKey());
|
||||
LOGGER.info("复活玩家:" + uid);
|
||||
sendIndication(user.getId(),keyVal.getValue(),keyVal.getKey());
|
||||
}
|
||||
//复活怪物
|
||||
|
|
@ -256,7 +263,7 @@ public class ExplorerMapLogic {
|
|||
if (exploreConfig == null) {
|
||||
continue;
|
||||
}
|
||||
LOGGER.info("玩家=>{}复活,复活队伍是=>{}",uid,exploreConfig.getId());
|
||||
LOGGER.info("复活怪物" + uid);
|
||||
//怪物的初始血量
|
||||
int mapMonsterForce = exploreConfig.getMonsterForce();
|
||||
keyVal.getValue().setEnemyHp(mapMonsterForce);
|
||||
|
|
@ -280,7 +287,7 @@ public class ExplorerMapLogic {
|
|||
Set<String> set = redisUtil.sGet(key);
|
||||
if (set.contains(String.valueOf(user.getId()))) {
|
||||
long remove = RedisUtil.getInstence().setRemove(key, String.valueOf(uid));
|
||||
LOGGER.info("uid=>{},remove:=>{}",uid,remove);
|
||||
LOGGER.info("remove:" + remove);
|
||||
}
|
||||
} else {
|
||||
//跨服分组
|
||||
|
|
@ -288,7 +295,7 @@ public class ExplorerMapLogic {
|
|||
Set<String> set = redisUtil.sGet(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key);
|
||||
if (set.contains(String.valueOf(user.getId()))) {
|
||||
long remove = RedisUtil.getInstence().setRemove(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key, String.valueOf(uid));
|
||||
LOGGER.info("uid=>{},remove cross:=>{}",uid,remove);
|
||||
LOGGER.info("remove cross:" + remove);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ public class GotSoulMarkManager extends AbstractDataManager {
|
|||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
CumulationData.Result result = null;
|
||||
int itemId = (int)parm[0];
|
||||
long num = (long)parm[1];
|
||||
Long num = Long.parseLong(parm[1].toString());
|
||||
if(missionType == MissionType.GOT_SOUL_MARK){
|
||||
data.addQualitySoulMarkNum(STableManager.getConfig(SItem.class).get(itemId).getQuantity(),(int)num);
|
||||
data.addQualitySoulMarkNum(STableManager.getConfig(SItem.class).get(itemId).getQuantity(),num.intValue());
|
||||
result = new CumulationData.Result(missionType);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue