优化地图探索度
parent
8ad8890274
commit
abff2b134e
|
|
@ -11,35 +11,51 @@ import java.util.Map;
|
|||
@Table(name ="AccomplishmentConfig")
|
||||
public class SAccomplishmentConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
private int id;
|
||||
|
||||
private int mapId;
|
||||
private int mapId;
|
||||
|
||||
private int logic;
|
||||
private int logic;
|
||||
|
||||
private int[][] values;
|
||||
private int[][] values;
|
||||
|
||||
private int score;
|
||||
private int score;
|
||||
|
||||
private int[][] reward;
|
||||
private int[][] reward;
|
||||
|
||||
private static Map<Integer, List<SAccomplishmentConfig>> sAccomplishmentConfigByMapIdMap;
|
||||
private static Map<Integer, List<SAccomplishmentConfig>> sAccomplishmentConfigByMapIdMap;
|
||||
private static Map<Integer,Map<Integer,List<SAccomplishmentConfig>>> sAccomplishmentConfigByMapIdAndLogicMap;
|
||||
|
||||
private static Map<Integer, SAccomplishmentConfig> sAccomplishmentConfigByIdMap;
|
||||
|
||||
@Override
|
||||
private static Map<Integer, SAccomplishmentConfig> sAccomplishmentConfigByIdMap;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer, SAccomplishmentConfig> config = STableManager.getConfig(SAccomplishmentConfig.class);
|
||||
Map<Integer, List<SAccomplishmentConfig>> sAccomplishmentConfigByMapIdMapTmp = new HashMap<>();
|
||||
Map<Integer,Map<Integer,List<SAccomplishmentConfig>>> sAccomplishmentConfigByMapIdAndLogicMapTmp = new HashMap<>();
|
||||
for(SAccomplishmentConfig sAccomplishmentConfig : config.values()){
|
||||
int mapId = sAccomplishmentConfig.getMapId();
|
||||
if(!sAccomplishmentConfigByMapIdMapTmp.containsKey(mapId)){
|
||||
sAccomplishmentConfigByMapIdMapTmp.put(mapId,new ArrayList<>());
|
||||
sAccomplishmentConfigByMapIdAndLogicMapTmp.put(mapId,new HashMap<>());
|
||||
}
|
||||
int logic = sAccomplishmentConfig.getLogic();
|
||||
if(!sAccomplishmentConfigByMapIdAndLogicMapTmp.get(mapId).containsKey(logic)){
|
||||
sAccomplishmentConfigByMapIdAndLogicMapTmp.get(mapId).put(logic,new ArrayList<>());
|
||||
}
|
||||
sAccomplishmentConfigByMapIdAndLogicMapTmp.get(mapId).get(logic).add(sAccomplishmentConfig);
|
||||
sAccomplishmentConfigByMapIdMapTmp.get(mapId).add(sAccomplishmentConfig);
|
||||
}
|
||||
sAccomplishmentConfigByMapIdMap = sAccomplishmentConfigByMapIdMapTmp;
|
||||
sAccomplishmentConfigByIdMap = config;
|
||||
sAccomplishmentConfigByMapIdAndLogicMap = sAccomplishmentConfigByMapIdAndLogicMapTmp;
|
||||
}
|
||||
|
||||
public static List<SAccomplishmentConfig> getsAccomplishmentConfigByMapIdAndLogic(int mapId,int logic) {
|
||||
if(!sAccomplishmentConfigByMapIdAndLogicMap.containsKey(mapId)){
|
||||
return null;
|
||||
}
|
||||
return sAccomplishmentConfigByMapIdAndLogicMap.get(mapId).get(logic);
|
||||
}
|
||||
|
||||
public static List<SAccomplishmentConfig> getsAccomplishmentConfigByMapId(int mapId) {
|
||||
|
|
@ -58,15 +74,15 @@ public class SAccomplishmentConfig implements BaseConfig {
|
|||
return mapId;
|
||||
}
|
||||
|
||||
public int getLogic() {
|
||||
public int getLogic() {
|
||||
return logic;
|
||||
}
|
||||
|
||||
public int[][] getValues() {
|
||||
public int[][] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ public class MapLogic {
|
|||
|
||||
private Map<Integer, BaseBehavior> baseBehaviorMap = new HashMap<>();
|
||||
|
||||
private static final int STAR_1 = 1; // 完成任务
|
||||
private static final int STAR_2 = 2; // 100% 探索度
|
||||
private static final int STAR_3 = 3; // 复活次数少于N次
|
||||
public static final int STAR_1 = 1; // 完成任务
|
||||
public static final int STAR_2 = 2; // 100% 探索度
|
||||
public static final int STAR_3 = 3; // 复活次数少于N次
|
||||
|
||||
public void init(ConfigurableApplicationContext configurableApplicationContext) {
|
||||
Map<String, BaseBehavior> beansOfType = configurableApplicationContext.getBeansOfType(BaseBehavior.class);
|
||||
|
|
@ -159,7 +159,7 @@ public class MapLogic {
|
|||
}
|
||||
}
|
||||
|
||||
//todo 更新地圖次數
|
||||
//todo 更新地圖次數
|
||||
mapManager.setCurMapId(mapId);
|
||||
initMap(mapManager, user);
|
||||
user.setMapManager(mapManager);
|
||||
|
|
@ -555,8 +555,8 @@ public class MapLogic {
|
|||
}
|
||||
}
|
||||
}
|
||||
updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,optionId);
|
||||
updateMapMission(mapManager,EventType.updatePonintEvent, pointId,pointId);
|
||||
MapMissionManager.updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,optionId);
|
||||
MapMissionManager.updateMapMission(mapManager,EventType.updatePonintEvent, pointId,pointId);
|
||||
CommonProto.Drop.Builder dropBuilder = null;
|
||||
if (sOptionConfig.getReward().length > 0) {
|
||||
dropBuilder = ItemUtil.drop(user, sOptionConfig.getReward(), 1, 1, BIReason.MAP_EVENET_REWARD);
|
||||
|
|
@ -952,8 +952,8 @@ public class MapLogic {
|
|||
int teamId = mapManager.getTeamId();
|
||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : team){
|
||||
// Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId());
|
||||
// hero.setCurHp(checkResult[teamPosHeroInfo.getPosition()]);
|
||||
// Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId());
|
||||
// hero.setCurHp(checkResult[teamPosHeroInfo.getPosition()]);
|
||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(),HeroAttributeEnum.CurHP.getPropertyId(),checkResult[teamPosHeroInfo.getPosition()]);
|
||||
}
|
||||
|
||||
|
|
@ -972,7 +972,7 @@ public class MapLogic {
|
|||
fastFightResponse.addAllRemainHpList(remainHp);
|
||||
fastFightResponse.build();
|
||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||
updateMapMission(mapManager,EventType.fightEvent,groupId, groupId);
|
||||
MapMissionManager.updateMapMission(mapManager,EventType.fightEvent,groupId, groupId);
|
||||
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true);
|
||||
}
|
||||
|
|
@ -1166,7 +1166,7 @@ public class MapLogic {
|
|||
}
|
||||
fightEndResponse.setEventId(nextEventId);
|
||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||
updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId);
|
||||
MapMissionManager.updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId);
|
||||
// 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);
|
||||
|
|
@ -1196,126 +1196,9 @@ public class MapLogic {
|
|||
mapManager.setMapMissionProgres(mapMission);
|
||||
}
|
||||
|
||||
public void readySendCopyMission(MissionStateChangeInfo missionStateChangeInfo){
|
||||
MissionEventDistributor.getMissionStateChangeInfo(GameMisionType.COPYMISSION).add(missionStateChangeInfo);
|
||||
}
|
||||
|
||||
|
||||
public int updateMapMission(MapManager mapManager,int eventType,int eventId,int bossIdOrItemId){
|
||||
LOGGER.info("the eventtype ={},eventId={},bossItemId={}",eventType,eventId,bossIdOrItemId);
|
||||
int mapId = mapManager.getCurMapId();
|
||||
if(mapId==0){
|
||||
return 0;
|
||||
}
|
||||
MapMission mapMission = mapManager.getMapMissionProgres();
|
||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||
boolean copyMissionUpdate = false;
|
||||
if(sChallengeConfig.getType()==3){
|
||||
mapMission = mapManager.getCopyMissionProgres();
|
||||
copyMissionUpdate= true;
|
||||
}
|
||||
|
||||
if(mapMission == null ){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int addScore=0;
|
||||
Map<Integer, Integer> allMissionProgress = mapMission.getAllMissionProgress();
|
||||
boolean needUpdate = false;
|
||||
for(Map.Entry<Integer,Integer> missionItem : allMissionProgress.entrySet()){
|
||||
Integer missionId = missionItem.getKey();
|
||||
Integer missionValue = missionItem.getValue();
|
||||
SAccomplishmentConfig sAccomplishmentConfig = SAccomplishmentConfig.getsAccomplishmentConfigByIdMap(missionId);
|
||||
int score = sAccomplishmentConfig.getScore();
|
||||
int logic = sAccomplishmentConfig.getLogic();
|
||||
int[][] values = sAccomplishmentConfig.getValues();
|
||||
int targetEventValue = values[1][0];
|
||||
if(eventType == EventType.fightEvent){
|
||||
if(logic == MapMissionType.VICTORY_EVENT.getMissionTypeValue()){
|
||||
if(missionValue<targetEventValue){
|
||||
allMissionProgress.put(missionId,missionValue+1);
|
||||
MissionState misisionState = MissionState.DOING;
|
||||
needUpdate = true;
|
||||
if(missionValue+1 == targetEventValue){
|
||||
addScore+=score;
|
||||
misisionState=MissionState.FINISH;
|
||||
}
|
||||
if(copyMissionUpdate){
|
||||
MissionStateChangeInfo missionStateChangeInfo = new MissionStateChangeInfo(missionId,misisionState,missionValue+1);
|
||||
readySendCopyMission(missionStateChangeInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(eventType == EventType.updateOptionalEvent || eventType == EventType.fightEvent){
|
||||
if(logic ==MapMissionType.FINISH_EVEVNT.getMissionTypeValue() || logic == MapMissionType.KILL_BOSS.getMissionTypeValue()){
|
||||
for(int targetEventIdTmp : values[0]){
|
||||
if(targetEventIdTmp == eventId){
|
||||
if(missionValue<targetEventValue){
|
||||
allMissionProgress.put(missionId,missionValue+1);
|
||||
needUpdate = true;
|
||||
MissionState misisionState = MissionState.DOING;
|
||||
if(missionValue+1 == targetEventValue){
|
||||
addScore+=score;
|
||||
misisionState=MissionState.FINISH;
|
||||
}
|
||||
if(copyMissionUpdate){
|
||||
MissionStateChangeInfo missionStateChangeInfo = new MissionStateChangeInfo(missionId,misisionState,missionValue+1);
|
||||
readySendCopyMission(missionStateChangeInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
//updatePonintEvent optionalConfig获取
|
||||
if(eventType == EventType.updatePonintEvent){
|
||||
//处理采矿 、宝箱
|
||||
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(eventId);
|
||||
if(mapPointConfig!=null){
|
||||
if((mapPointConfig.getStyle() == 2 && logic == MapMissionType.DIGGER_EVENT.getMissionTypeValue() )|| (mapPointConfig.getStyle() == 7 && logic == MapMissionType.OPEN_BOX.getMissionTypeValue())){
|
||||
if(missionValue<targetEventValue){
|
||||
allMissionProgress.put(missionId,missionValue+1);
|
||||
needUpdate = true;
|
||||
MissionState misisionState = MissionState.DOING;
|
||||
if(missionValue+1 == targetEventValue){
|
||||
addScore+=score;
|
||||
misisionState=MissionState.FINISH;
|
||||
}
|
||||
if(copyMissionUpdate){
|
||||
MissionStateChangeInfo missionStateChangeInfo = new MissionStateChangeInfo(missionId,misisionState,missionValue+1);
|
||||
readySendCopyMission(missionStateChangeInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(addScore!=0){
|
||||
mapMission.setTotalWeight(mapMission.getTotalWeight()+addScore);
|
||||
if (!copyMissionUpdate&&mapMission.getTotalWeight() >= 100) {
|
||||
Set<Integer> stars = mapManager.getStars();
|
||||
if (stars == null) {
|
||||
stars = new HashSet<>(3);
|
||||
}
|
||||
stars.add(STAR_2);
|
||||
mapManager.setStars(stars);
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapManager.getCurMapId());
|
||||
if (crossInfo == null) {
|
||||
crossInfo = new CrossInfo();
|
||||
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(needUpdate){
|
||||
mapMission.setAllMissionProgress(allMissionProgress);
|
||||
mapManager.setMapMissionProgres(mapMission);
|
||||
}
|
||||
return mapMission.getTotalWeight();
|
||||
}
|
||||
|
||||
public int getLeftTime(User user,boolean needResetMap) throws Exception {
|
||||
int curMapId = user.getMapManager().getCurMapId();
|
||||
|
|
@ -1910,7 +1793,7 @@ public class MapLogic {
|
|||
}
|
||||
if(sendGiftGoods){
|
||||
rechargeInfo.setLevelBagMap(levelBagMap);
|
||||
BuyGoodsLogic.sendGiftGooodsIndication(user.getId());
|
||||
BuyGoodsLogic.sendGiftGooodsIndication(user.getId());
|
||||
}
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.USER_LEVELUP,oldLevel,playerInfoManager.getLevel());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
package com.ljsd.jieling.handler.map;
|
||||
|
||||
import com.ljsd.jieling.config.MapPointConfig;
|
||||
import com.ljsd.jieling.config.SAccomplishmentConfig;
|
||||
import com.ljsd.jieling.config.SChallengeConfig;
|
||||
import com.ljsd.jieling.logic.mission.GameMisionType;
|
||||
import com.ljsd.jieling.logic.mission.MissionState;
|
||||
import com.ljsd.jieling.logic.mission.event.MissionEventDistributor;
|
||||
import com.ljsd.jieling.logic.mission.main.MissionStateChangeInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class MapMissionManager {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MapMissionManager.class);
|
||||
private static final Map<Integer, List<MapMissionType>> typeByEventTypeMap = new HashMap<>();
|
||||
static {
|
||||
List<MapMissionType> missionTypes = new ArrayList<>(1);
|
||||
missionTypes.add(MapMissionType.FINISH_EVEVNT);
|
||||
typeByEventTypeMap.put(EventType.updateOptionalEvent,missionTypes);
|
||||
|
||||
missionTypes = new ArrayList<>(2);
|
||||
missionTypes.add(MapMissionType.VICTORY_EVENT);
|
||||
missionTypes.add(MapMissionType.KILL_BOSS);
|
||||
typeByEventTypeMap.put(EventType.fightEvent,missionTypes);
|
||||
|
||||
missionTypes = new ArrayList<>(1);
|
||||
missionTypes.add(MapMissionType.DIGGER_EVENT);
|
||||
missionTypes.add(MapMissionType.OPEN_BOX);
|
||||
typeByEventTypeMap.put(EventType.updatePonintEvent,missionTypes);
|
||||
}
|
||||
|
||||
public static int updateMapMission(MapManager mapManager, int eventType, int eventId, int bossIdOrItemId){
|
||||
LOGGER.info("the eventtype ={},eventId={},bossItemId={}",eventType,eventId,bossIdOrItemId);
|
||||
int mapId = mapManager.getCurMapId();
|
||||
if(mapId==0){
|
||||
return 0;
|
||||
}
|
||||
MapMission mapMission = mapManager.getMapMissionProgres();
|
||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||
mapId=sChallengeConfig.getMapId();
|
||||
boolean copyMissionUpdate = false;
|
||||
if(sChallengeConfig.getType()==2){
|
||||
mapMission = mapManager.getCopyMissionProgres();
|
||||
copyMissionUpdate= true;
|
||||
}
|
||||
if(mapMission == null ){
|
||||
return 0;
|
||||
}
|
||||
int addScore=0;
|
||||
boolean needUpdate = false;
|
||||
Map<Integer, Integer> allMissionProgress = mapMission.getAllMissionProgress();
|
||||
List<MapMissionType> mapMissionTypes = typeByEventTypeMap.get(eventType);
|
||||
for(MapMissionType mapMissionType : mapMissionTypes){
|
||||
List<SAccomplishmentConfig> sAccomplishmentConfigs = SAccomplishmentConfig.getsAccomplishmentConfigByMapIdAndLogic(mapId, mapMissionType.getMissionTypeValue());
|
||||
if(sAccomplishmentConfigs == null){
|
||||
continue;
|
||||
}
|
||||
boolean updateProgress = false;
|
||||
boolean isHit = false;
|
||||
//处理采矿 、宝箱
|
||||
if(mapMissionType == MapMissionType.DIGGER_EVENT || mapMissionType == MapMissionType.OPEN_BOX){
|
||||
isHit =true;
|
||||
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(eventId);
|
||||
if(mapPointConfig!=null){
|
||||
if((mapPointConfig.getStyle() == 2 && mapMissionType == MapMissionType.DIGGER_EVENT)|| (mapPointConfig.getStyle() == 7 && mapMissionType == MapMissionType.OPEN_BOX)){
|
||||
updateProgress = true;
|
||||
}
|
||||
}
|
||||
}else if(mapMissionType == MapMissionType.VICTORY_EVENT){
|
||||
updateProgress = true;
|
||||
isHit = true;
|
||||
}
|
||||
if(isHit && !updateProgress){
|
||||
continue;
|
||||
}
|
||||
for(SAccomplishmentConfig sAccomplishmentConfig : sAccomplishmentConfigs){
|
||||
int missionId = sAccomplishmentConfig.getId();
|
||||
Integer missionValue = allMissionProgress.get(missionId);
|
||||
if(missionValue == null){
|
||||
continue;
|
||||
}
|
||||
int score = sAccomplishmentConfig.getScore();
|
||||
int[][] values = sAccomplishmentConfig.getValues();
|
||||
int targetEventValue = values[1][0];
|
||||
if(!updateProgress){
|
||||
for(int targetEventIdTmp : values[0]){
|
||||
if(targetEventIdTmp == eventId){
|
||||
updateProgress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(updateProgress && missionValue<targetEventValue){
|
||||
allMissionProgress.put(missionId,missionValue+1);
|
||||
needUpdate = true;
|
||||
MissionState misisionState = MissionState.DOING;
|
||||
if(missionValue+1 == targetEventValue){
|
||||
addScore+=score;
|
||||
misisionState= MissionState.FINISH;
|
||||
}
|
||||
if(copyMissionUpdate){
|
||||
MissionStateChangeInfo missionStateChangeInfo = new MissionStateChangeInfo(missionId,misisionState,missionValue+1);
|
||||
readySendCopyMission(missionStateChangeInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(addScore!=0){
|
||||
mapMission.setTotalWeight(mapMission.getTotalWeight()+addScore);
|
||||
if (!copyMissionUpdate&&mapMission.getTotalWeight() >= 100) {
|
||||
Set<Integer> stars = mapManager.getStars();
|
||||
if (stars == null) {
|
||||
stars = new HashSet<>(3);
|
||||
}
|
||||
stars.add(MapLogic.STAR_2);
|
||||
mapManager.setStars(stars);
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapManager.getCurMapId());
|
||||
if (crossInfo == null) {
|
||||
crossInfo = new CrossInfo();
|
||||
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(needUpdate){
|
||||
mapMission.setAllMissionProgress(allMissionProgress);
|
||||
mapManager.setMapMissionProgres(mapMission);
|
||||
}
|
||||
return mapMission.getTotalWeight();
|
||||
}
|
||||
|
||||
|
||||
public static void readySendCopyMission(MissionStateChangeInfo missionStateChangeInfo){
|
||||
MissionEventDistributor.getMissionStateChangeInfo(GameMisionType.COPYMISSION).add(missionStateChangeInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.store.StoreLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
|
|
@ -54,7 +55,7 @@ public class WorkShopLogic {
|
|||
if(openRules!=null&&openRules.length>0){
|
||||
int preTechId = openRules[0];
|
||||
int preTechLevel = openRules[1];
|
||||
SWorkShopTechnology preSWorkShopTechnology = SWorkShopTechnology.getsWorkTechMapByTechIdAndLevel(techId, oldLevl);
|
||||
SWorkShopTechnology preSWorkShopTechnology = SWorkShopTechnology.getsWorkTechMapByTechIdAndLevel(preTechId, preTechLevel);
|
||||
int preProfession = preSWorkShopTechnology.getProfession();
|
||||
int preMineLevl = 0;
|
||||
if( workShopController.getTechnologyMap().containsKey(preProfession) && workShopController.getTechnologyMap().get(preProfession).containsKey(preTechId)){
|
||||
|
|
@ -86,6 +87,11 @@ public class WorkShopLogic {
|
|||
MessageUtil.sendErrorResponse(session,0,msgId,"没有科技点");
|
||||
return;
|
||||
}
|
||||
String err = StoreLogic.checkBuyGoodsAndUpdate(user,7,10011,1);
|
||||
if (!"".equals(err)){
|
||||
MessageUtil.sendErrorResponse(session,0,msgId,err);
|
||||
return;
|
||||
}
|
||||
Map<Integer,Integer> returnMap = new HashMap<>();
|
||||
for(Map.Entry<Integer,Integer> item : technologyByProfessionMap.entrySet()){
|
||||
SWorkShopTechnology sWorkShopTechnology = SWorkShopTechnology.getsWorkTechMapByTechIdAndLevel(item.getKey(), item.getValue());
|
||||
|
|
|
|||
Loading…
Reference in New Issue