修复VIP错误 & 精英怪
parent
7b38c5206c
commit
eb2c08c614
|
|
@ -69,6 +69,8 @@ public class SGameSetting implements BaseConfig {
|
||||||
|
|
||||||
private int[][] returnMaterials;
|
private int[][] returnMaterials;
|
||||||
|
|
||||||
|
private int incidentalBossSave;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static SGameSetting gameSetting;
|
private static SGameSetting gameSetting;
|
||||||
|
|
@ -189,4 +191,8 @@ public class SGameSetting implements BaseConfig {
|
||||||
public int[][] getReturnMaterials() {
|
public int[][] getReturnMaterials() {
|
||||||
return returnMaterials;
|
return returnMaterials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIncidentalBossSave() {
|
||||||
|
return incidentalBossSave;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +78,7 @@ public class RedisKey {
|
||||||
public static final String LEVE_DIFFICULTY_INFO = "LEVE_DIFFICULTY_INFO";
|
public static final String LEVE_DIFFICULTY_INFO = "LEVE_DIFFICULTY_INFO";
|
||||||
|
|
||||||
public static final String LEVE_DIFFICULTY_FIGHT = "LEVE_DIFFICULTY_FIGHT";
|
public static final String LEVE_DIFFICULTY_FIGHT = "LEVE_DIFFICULTY_FIGHT";
|
||||||
|
public static final String SUDDLENLY_FIGHT = "SUDDLENLY_FIGHT";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ljsd.jieling.handler;
|
package com.ljsd.jieling.handler;
|
||||||
|
|
||||||
import com.ljsd.jieling.handler.map.MapLogic;
|
import com.ljsd.jieling.handler.map.MapLogic;
|
||||||
|
import com.ljsd.jieling.handler.map.MapManager;
|
||||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||||
|
|
@ -74,6 +75,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
RoomInfo roomInfo = user.getRoomInfo();
|
RoomInfo roomInfo = user.getRoomInfo();
|
||||||
|
MapManager mapManager = user.getMapManager();
|
||||||
CommonProto.Player player = CBean2Proto.getPlayer(userId, user.getPlayerInfoManager(), user.getPlayerInfoManager().getMapId(), user.getMapManager().getCurMapId(),user.getMapManager(),roomInfo);
|
CommonProto.Player player = CBean2Proto.getPlayer(userId, user.getPlayerInfoManager(), user.getPlayerInfoManager().getMapId(), user.getMapManager().getCurMapId(),user.getMapManager(),roomInfo);
|
||||||
RechargeInfo rechargeInfo = playerInfoManager.getRechargeInfo();
|
RechargeInfo rechargeInfo = playerInfoManager.getRechargeInfo();
|
||||||
PlayerInfoProto.GetPlayerInfoResponse getPlayerInfoResponse
|
PlayerInfoProto.GetPlayerInfoResponse getPlayerInfoResponse
|
||||||
|
|
@ -83,6 +85,8 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
.addAllPrivilege(privilegeList)
|
.addAllPrivilege(privilegeList)
|
||||||
.addAllGiftGoodsInfo(BuyGoodsLogic.getGoodsBagInfo(userId))
|
.addAllGiftGoodsInfo(BuyGoodsLogic.getGoodsBagInfo(userId))
|
||||||
.addAllBuyGoodsId(rechargeInfo.getBuyGoodsTimes().keySet())
|
.addAllBuyGoodsId(rechargeInfo.getBuyGoodsTimes().keySet())
|
||||||
|
.setSuddBossId(mapManager.getSuddenlyBoss())
|
||||||
|
.setEndTime(mapManager.getSuddenlyBossEndTime())
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ public class EventType {
|
||||||
public static final int box = 7;
|
public static final int box = 7;
|
||||||
public static final int hinder = 8;
|
public static final int hinder = 8;
|
||||||
public static final int allEvents = 9;
|
public static final int allEvents = 9;
|
||||||
|
public static final int suddenlyBoss = 11; //精英怪
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小事件类型
|
* 小事件类型
|
||||||
|
|
|
||||||
|
|
@ -266,6 +266,8 @@ public class MapLogic {
|
||||||
Map<Integer, StoreInfo> storeInfoMap = storeManager.getStoreInfoMap();
|
Map<Integer, StoreInfo> storeInfoMap = storeManager.getStoreInfoMap();
|
||||||
StoreLogic.checkStoreRefresh(storeManager,storeInfoMap);
|
StoreLogic.checkStoreRefresh(storeManager,storeInfoMap);
|
||||||
boolean alreadHadYunShop = storeManager.getStoreInfoMap().containsKey(3);
|
boolean alreadHadYunShop = storeManager.getStoreInfoMap().containsKey(3);
|
||||||
|
mapManager.checkSuddenlyBoss();
|
||||||
|
int suddenlyBoss = mapManager.getSuddenlyBoss();
|
||||||
for (Map.Entry<Integer, SCMap> entry : scMap.entrySet()) {
|
for (Map.Entry<Integer, SCMap> entry : scMap.entrySet()) {
|
||||||
SCMap scMap1 = entry.getValue();
|
SCMap scMap1 = entry.getValue();
|
||||||
// 必出现的事件点
|
// 必出现的事件点
|
||||||
|
|
@ -297,9 +299,11 @@ public class MapLogic {
|
||||||
if(alreadHadYunShop){
|
if(alreadHadYunShop){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
StoreLogic.initOneStore(user,3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mapPointConfig.getStyle() == EventType.suddenlyBoss && suddenlyBoss != 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
||||||
newMap.put(xy, cellValue);
|
newMap.put(xy, cellValue);
|
||||||
}
|
}
|
||||||
|
|
@ -515,6 +519,18 @@ public class MapLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(mapPointConfig.getStyle() == EventType.suddenlyBoss){
|
||||||
|
int suddenlyBoss = mapManager.getSuddenlyBoss();
|
||||||
|
if(suddenlyBoss==0){
|
||||||
|
int now = (int)(TimeUtils.now()/1000);
|
||||||
|
int bossId = option[0];
|
||||||
|
mapManager.findSuddenlyBoss(bossId,now);
|
||||||
|
}
|
||||||
|
}else if(mapPointConfig.getStyle() == EventType.businessman){
|
||||||
|
if(! user.getStoreManager().getStoreInfoMap().containsKey(3)){
|
||||||
|
StoreLogic.initOneStore(user,3);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mapPointConfig.getTriggerRules() == 1) {
|
if (mapPointConfig.getTriggerRules() == 1) {
|
||||||
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
|
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1145,8 +1161,12 @@ public class MapLogic {
|
||||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||||
updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId);
|
updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId);
|
||||||
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getMission(), fightEndResponse.getEnventDrop(), fightEndResponse.getMissionDrop());
|
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getMission(), fightEndResponse.getEnventDrop(), fightEndResponse.getMissionDrop());
|
||||||
|
if(monsterGroupId == mapManager.getSuddenlyBoss()){
|
||||||
|
mapManager.findSuddenlyBoss(0,0);
|
||||||
|
}
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1567,6 +1587,80 @@ public class MapLogic {
|
||||||
return levelDifficultyManager.getLevelDifficultyInfosMap();
|
return levelDifficultyManager.getLevelDifficultyInfosMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//挑战精英怪
|
||||||
|
public void startSuddlenlyFight(ISession session,int teamId,MessageTypeProto.MessageType messageType) throws Exception {
|
||||||
|
int uid = session.getUid();
|
||||||
|
User user = UserManager.getUser(uid);
|
||||||
|
user.getMapManager().checkSuddenlyBoss();
|
||||||
|
int suddenlyBoss = user.getMapManager().getSuddenlyBoss();
|
||||||
|
if(suddenlyBoss == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||||
|
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0){
|
||||||
|
LOGGER.info("startLevelDifficultyFight==> uid={},fightId={},teamId={}",uid,suddenlyBoss,teamId);
|
||||||
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "阵容有误!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
||||||
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getFindSuddenlyBossMapId());
|
||||||
|
BehaviorUtil.getLevelDifficultyifficuFightInfo(user,suddenlyBoss,teamId,sChallengeConfig.getMostTime(),fightStartResponse,RedisKey.SUDDLENLY_FIGHT);
|
||||||
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endSuddlenlyFight(ISession session, String frames ,MessageTypeProto.MessageType messageType) throws Exception {
|
||||||
|
int uid = session.getUid();
|
||||||
|
User user = UserManager.getUser(uid);
|
||||||
|
String fightKey = RedisKey.getKey(RedisKey.SUDDLENLY_FIGHT, String.valueOf(uid), false);
|
||||||
|
String fightInfos = (String) RedisUtil.getInstence().get(fightKey);
|
||||||
|
if (fightInfos.isEmpty()){
|
||||||
|
LOGGER.info("endFight() uid=>{} fightKey={},fightInfos is empty", uid, fightKey);
|
||||||
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_FIGHT, Integer.toString(user.getId()) , false);
|
||||||
|
Map<Object , Object> valueMap = RedisUtil.getInstence().hmget(key);
|
||||||
|
RedisUtil.getInstence().del(key);
|
||||||
|
if (valueMap == null || valueMap.isEmpty()) {
|
||||||
|
LOGGER.info("endFight() uid=>{} not start fight", uid);
|
||||||
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "此战斗已结算过 !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int seed = Integer.parseInt((String)valueMap.get(RedisKey.FIGHT_SEED));
|
||||||
|
CommonProto.FightTeamInfo.Builder builder = CommonProto.FightTeamInfo.newBuilder();
|
||||||
|
JsonFormat.merge((String)valueMap.get(RedisKey.FIGHT_HEROES), builder);
|
||||||
|
CommonProto.FightTeamInfo fightTeamInfo = builder.build();
|
||||||
|
List<CommonProto.FightTeamInfo> monsterTeamList = BehaviorUtil.getFightTeamInfos(valueMap);
|
||||||
|
LuaValue getFightData = FightDataUtil.getFinalFightData(fightTeamInfo,monsterTeamList);
|
||||||
|
LuaValue getOptionData = FightDataUtil.getOptionData(frames);
|
||||||
|
MapManager mapManager = user.getMapManager();
|
||||||
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapManager.getFindSuddenlyBossMapId());
|
||||||
|
int[] checkResult = CheckFight.getInstance().checkFight(seed,sChallengeConfig.getMostTime(),getFightData, getOptionData);
|
||||||
|
|
||||||
|
LevelDifficultyManager levelDifficultyManager = user.getLevelDifficultyManager();
|
||||||
|
//校验结果码 1:胜利
|
||||||
|
int resultCode = checkResult[0];
|
||||||
|
if (resultCode == -1){
|
||||||
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "战斗异常!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(resultCode == 1){
|
||||||
|
mapManager.findSuddenlyBoss(0,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
|
||||||
|
FightInfoProto.FightEndResponse fightEndResponse = FightInfoProto.FightEndResponse
|
||||||
|
.newBuilder()
|
||||||
|
.setResult(resultCode)
|
||||||
|
.build();
|
||||||
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse, true);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关卡开始战斗
|
* 关卡开始战斗
|
||||||
* @param session
|
* @param session
|
||||||
|
|
@ -1611,10 +1705,12 @@ public class MapLogic {
|
||||||
//扣除预先道具
|
//扣除预先道具
|
||||||
ItemUtil.itemCost(user,sLevelDifficultyConfig.getPreLevelCost(),BIReason.START_DIFFICULT,fightId);
|
ItemUtil.itemCost(user,sLevelDifficultyConfig.getPreLevelCost(),BIReason.START_DIFFICULT,fightId);
|
||||||
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
|
||||||
BehaviorUtil.getLevelDifficultyifficuFightInfo(user,sLevelDifficultyConfig.getMonsterGroup(),teamId,sLevelDifficultyConfig.getRankTime(),fightStartResponse);
|
BehaviorUtil.getLevelDifficultyifficuFightInfo(user,sLevelDifficultyConfig.getMonsterGroup(),teamId,sLevelDifficultyConfig.getRankTime(),fightStartResponse,RedisKey.LEVE_DIFFICULTY_INFO);
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int[][] getCost(SLevelDifficultyConfig sLevelDifficultyConfig,int sweepTimes) {
|
public int[][] getCost(SLevelDifficultyConfig sLevelDifficultyConfig,int sweepTimes) {
|
||||||
StringBuilder cost = new StringBuilder();
|
StringBuilder cost = new StringBuilder();
|
||||||
int[][] costArr = sLevelDifficultyConfig.getCost();
|
int[][] costArr = sLevelDifficultyConfig.getCost();
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.util.ItemUtil;
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
import com.ljsd.jieling.util.MathUtils;
|
import com.ljsd.jieling.util.MathUtils;
|
||||||
import com.ljsd.jieling.util.StringUtil;
|
import com.ljsd.jieling.util.StringUtil;
|
||||||
|
import com.ljsd.jieling.util.TimeUtils;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
@ -62,6 +63,13 @@ public class MapManager extends MongoBase {
|
||||||
|
|
||||||
private Set<Integer> stars;
|
private Set<Integer> stars;
|
||||||
|
|
||||||
|
private int suddenlyBoss;
|
||||||
|
|
||||||
|
private int suddenlyBossEndTime;
|
||||||
|
|
||||||
|
private int findSuddenlyBossMapId;
|
||||||
|
|
||||||
|
|
||||||
public MapManager() {
|
public MapManager() {
|
||||||
this.setRootCollection(User._COLLECTION_NAME);
|
this.setRootCollection(User._COLLECTION_NAME);
|
||||||
}
|
}
|
||||||
|
|
@ -358,4 +366,35 @@ public class MapManager extends MongoBase {
|
||||||
updateString("stars" , stars);
|
updateString("stars" , stars);
|
||||||
this.stars = stars;
|
this.stars = stars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getSuddenlyBoss() {
|
||||||
|
return suddenlyBoss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSuddenlyBossEndTime() {
|
||||||
|
return suddenlyBossEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void findSuddenlyBoss(int suddenlyBoss,int findsuddenlyBossTime) {
|
||||||
|
this.suddenlyBoss = suddenlyBoss;
|
||||||
|
if(findsuddenlyBossTime!=0){
|
||||||
|
findsuddenlyBossTime+=SGameSetting.getGameSetting().getIncidentalBossSave();
|
||||||
|
this.findSuddenlyBossMapId = curMapId;
|
||||||
|
updateString("findSuddenlyBossMapId" , findSuddenlyBossMapId);
|
||||||
|
}
|
||||||
|
this.suddenlyBossEndTime = findsuddenlyBossTime;
|
||||||
|
updateString("suddenlyBoss" , suddenlyBoss);
|
||||||
|
updateString("suddenlyBossEndTime" , suddenlyBossEndTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkSuddenlyBoss(){
|
||||||
|
int now = (int)(TimeUtils.now()/1000);
|
||||||
|
if(now>suddenlyBossEndTime){
|
||||||
|
findSuddenlyBoss(0,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFindSuddenlyBossMapId() {
|
||||||
|
return findSuddenlyBossMapId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,10 @@ public class StartFightRequestHandler extends BaseHandler{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MapLogic.getInstance().startLevelDifficultyFight(iSession,fightId,teamId,type,MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
MapLogic.getInstance().startLevelDifficultyFight(iSession,fightId,teamId,type,MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||||
}else{
|
}else if(type == 2){
|
||||||
|
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||||
|
|
||||||
|
}else if(type == 3){
|
||||||
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,16 +65,6 @@ public class BehaviorUtil {
|
||||||
public static void addBehaviorInfo(User user,int needDistoryPointId, MapManager mapManager, int mapId, int x, int y) throws Exception {
|
public static void addBehaviorInfo(User user,int needDistoryPointId, MapManager mapManager, int mapId, int x, int y) throws Exception {
|
||||||
int xy = CellUtil.xy2Pos(x, y);
|
int xy = CellUtil.xy2Pos(x, y);
|
||||||
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(needDistoryPointId);
|
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(needDistoryPointId);
|
||||||
if(mapPointConfig.getStyle() == EventType.businessman){
|
|
||||||
StoreManager storeManager = user.getStoreManager();
|
|
||||||
Map<Integer, StoreInfo> storeInfoMap = storeManager.getStoreInfoMap();
|
|
||||||
StoreLogic.checkStoreRefresh(storeManager,storeInfoMap);
|
|
||||||
boolean alreadHadYunShop = storeManager.getStoreInfoMap().containsKey(3);
|
|
||||||
if(alreadHadYunShop){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
StoreLogic.initOneStore(user,3);
|
|
||||||
}
|
|
||||||
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
||||||
mapManager.addOrUpdateCell(xy, cellValue);
|
mapManager.addOrUpdateCell(xy, cellValue);
|
||||||
}
|
}
|
||||||
|
|
@ -303,7 +293,7 @@ public class BehaviorUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getLevelDifficultyifficuFightInfo(User user,int groupId,int teamId, int maxTime,FightInfoProto.FightStartResponse.Builder fightStartRespons) {
|
public static void getLevelDifficultyifficuFightInfo(User user,int groupId,int teamId, int maxTime,FightInfoProto.FightStartResponse.Builder fightStartRespons,String fightKey) {
|
||||||
CommonProto.FightData.Builder fightData = CommonProto.FightData.newBuilder();
|
CommonProto.FightData.Builder fightData = CommonProto.FightData.newBuilder();
|
||||||
CommonProto.FightTeamInfo fightTeamInfo = getFightTeamInfo(user, teamId,true);
|
CommonProto.FightTeamInfo fightTeamInfo = getFightTeamInfo(user, teamId,true);
|
||||||
fightData.setHeroFightInfos(fightTeamInfo);
|
fightData.setHeroFightInfos(fightTeamInfo);
|
||||||
|
|
@ -321,7 +311,7 @@ public class BehaviorUtil {
|
||||||
fightStartRespons.setFightData(fightData);
|
fightStartRespons.setFightData(fightData);
|
||||||
|
|
||||||
|
|
||||||
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_FIGHT,Integer.toString(user.getId()), false);
|
String key = RedisKey.getKey(fightKey,Integer.toString(user.getId()), false);
|
||||||
Map<String,Object> fightInfo = new HashMap<>();
|
Map<String,Object> fightInfo = new HashMap<>();
|
||||||
fightInfo.put(RedisKey.FIGHT_HEROES, JsonFormat.printToString(fightTeamInfo));
|
fightInfo.put(RedisKey.FIGHT_HEROES, JsonFormat.printToString(fightTeamInfo));
|
||||||
fightInfo.put(RedisKey.FIGHT_MONSTERS_1, JsonFormat.printToString(monsterGroupList.get(0)));
|
fightInfo.put(RedisKey.FIGHT_MONSTERS_1, JsonFormat.printToString(monsterGroupList.get(0)));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue