Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
dcc2aa541f
|
@ -44,6 +44,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.data.redis.core.ZSetOperations;
|
import org.springframework.data.redis.core.ZSetOperations;
|
||||||
import util.MathUtils;
|
import util.MathUtils;
|
||||||
|
import util.StringUtil;
|
||||||
import util.TimeUtils;
|
import util.TimeUtils;
|
||||||
import util.CellUtil;
|
import util.CellUtil;
|
||||||
|
|
||||||
|
@ -2074,7 +2075,7 @@ public class MapLogic {
|
||||||
user.getTeamPosManager().setCurTeamPosId(teamId);
|
user.getTeamPosManager().setCurTeamPosId(teamId);
|
||||||
String fightInfo = fightId + "#" + teamId;
|
String fightInfo = fightId + "#" + teamId;
|
||||||
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
||||||
RedisUtil.getInstence().set(key, fightInfo, sMainLevelConfig.getRankTime() + 100);
|
RedisUtil.getInstence().set(key, fightInfo, -1);
|
||||||
//扣除预先道具
|
//扣除预先道具
|
||||||
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
||||||
BehaviorUtil.getLevelDifficultyifficuFightInfo(user, sMainLevelConfig.getMonsterGroup(), teamId, sMainLevelConfig.getRankTime(), fightStartResponse, RedisKey.LEVE_DIFFICULTY_FIGHT);
|
BehaviorUtil.getLevelDifficultyifficuFightInfo(user, sMainLevelConfig.getMonsterGroup(), teamId, sMainLevelConfig.getRankTime(), fightStartResponse, RedisKey.LEVE_DIFFICULTY_FIGHT);
|
||||||
|
@ -2087,7 +2088,7 @@ public class MapLogic {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
String fightKey = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
String fightKey = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
||||||
String fightInfos = (String) RedisUtil.getInstence().get(fightKey);
|
String fightInfos = (String) RedisUtil.getInstence().get(fightKey);
|
||||||
if (fightInfos.isEmpty()) {
|
if (StringUtil.isEmpty(fightInfos)) {
|
||||||
LOGGER.info("endFight() uid=>{} fightKey={},fightId={} fightInfos == null", uid, fightKey, fightId);
|
LOGGER.info("endFight() uid=>{} fightKey={},fightId={} fightInfos == null", uid, fightKey, fightId);
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
|
@ -2099,7 +2100,7 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_FIGHT, Integer.toString(user.getId()), false);
|
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_FIGHT, Integer.toString(user.getId()), false);
|
||||||
Map<Object, Object> valueMap = RedisUtil.getInstence().hmget(key);
|
Map<Object, Object> valueMap = RedisUtil.getInstence().hmget(key);
|
||||||
RedisUtil.getInstence().del(key);
|
RedisUtil.getInstence().del(key,fightKey);
|
||||||
if (valueMap == null || valueMap.isEmpty()) {
|
if (valueMap == null || valueMap.isEmpty()) {
|
||||||
LOGGER.info("endFight() uid=>{} not start fight", uid);
|
LOGGER.info("endFight() uid=>{} not start fight", uid);
|
||||||
throw new ErrorCodeException(ErrorCode.newDefineCode("此战斗已结算过 !"));
|
throw new ErrorCodeException(ErrorCode.newDefineCode("此战斗已结算过 !"));
|
||||||
|
@ -2289,7 +2290,7 @@ public class MapLogic {
|
||||||
String fightInfo = fightId + "#" + teamId;
|
String fightInfo = fightId + "#" + teamId;
|
||||||
String key = RedisKey.getKey(RedisKey.CHALLENGE_MONSTER_INFO, String.valueOf(uid), false);
|
String key = RedisKey.getKey(RedisKey.CHALLENGE_MONSTER_INFO, String.valueOf(uid), false);
|
||||||
|
|
||||||
RedisUtil.getInstence().set(key, fightInfo, sFloodConfig.getBattleTime() + 100);
|
RedisUtil.getInstence().set(key, fightInfo, -1);
|
||||||
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
||||||
BehaviorUtil.getLevelDifficultyifficuFightInfo(user, sFloodConfig.getMonster(), teamId, sFloodConfig.getBattleTime(), fightStartResponse, RedisKey.CHALLENGE_MONSTER_ATTACK);
|
BehaviorUtil.getLevelDifficultyifficuFightInfo(user, sFloodConfig.getMonster(), teamId, sFloodConfig.getBattleTime(), fightStartResponse, RedisKey.CHALLENGE_MONSTER_ATTACK);
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.MONSTER_ATTACK_PLAY);
|
user.getUserMissionManager().onGameEvent(user,GameEvent.MONSTER_ATTACK_PLAY);
|
||||||
|
@ -2314,7 +2315,7 @@ public class MapLogic {
|
||||||
|
|
||||||
String key = RedisKey.getKey(RedisKey.CHALLENGE_MONSTER_ATTACK, Integer.toString(user.getId()), false);
|
String key = RedisKey.getKey(RedisKey.CHALLENGE_MONSTER_ATTACK, Integer.toString(user.getId()), false);
|
||||||
Map<Object, Object> valueMap = RedisUtil.getInstence().hmget(key);
|
Map<Object, Object> valueMap = RedisUtil.getInstence().hmget(key);
|
||||||
RedisUtil.getInstence().del(key);
|
RedisUtil.getInstence().del(key,fightKey);
|
||||||
if (valueMap == null || valueMap.isEmpty()) {
|
if (valueMap == null || valueMap.isEmpty()) {
|
||||||
LOGGER.info("endFight() uid=>{} not start fight", uid);
|
LOGGER.info("endFight() uid=>{} not start fight", uid);
|
||||||
throw new ErrorCodeException(ErrorCode.newDefineCode("此战斗已结算过!!"));
|
throw new ErrorCodeException(ErrorCode.newDefineCode("此战斗已结算过!!"));
|
||||||
|
|
|
@ -85,7 +85,7 @@ class ExpectRankActivity extends AbstractActivity {
|
||||||
SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
|
SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
|
||||||
//sendmail
|
//sendmail
|
||||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
String title = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_title");
|
String title = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_title", new Object[]{sGlobalActivity.getSesc()});
|
||||||
String content = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_txt", new Object[]{sGlobalActivity.getSesc(), rank++});
|
String content = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_txt", new Object[]{sGlobalActivity.getSesc(), rank++});
|
||||||
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
|
|
|
@ -37,6 +37,8 @@ public class SGlobalActivity implements BaseConfig {
|
||||||
|
|
||||||
private int resetGrade;
|
private int resetGrade;
|
||||||
|
|
||||||
|
private int openRanking;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
|
@ -56,6 +58,7 @@ public class SGlobalActivity implements BaseConfig {
|
||||||
}
|
}
|
||||||
sGlobalActivity.setStartTimeLong(Long.parseLong(startTime));
|
sGlobalActivity.setStartTimeLong(Long.parseLong(startTime));
|
||||||
sGlobalActivity.setEndTimeLong(Long.parseLong(endtime));
|
sGlobalActivity.setEndTimeLong(Long.parseLong(endtime));
|
||||||
|
|
||||||
}
|
}
|
||||||
sGlobalActivityMap = config;
|
sGlobalActivityMap = config;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue