地图type
parent
be06376686
commit
6047c1e151
|
@ -51,7 +51,7 @@ import java.util.*;
|
||||||
public abstract class AbstractMap implements IMap {
|
public abstract class AbstractMap implements IMap {
|
||||||
static final Logger LOGGER = LoggerFactory.getLogger(AbstractMap.class);
|
static final Logger LOGGER = LoggerFactory.getLogger(AbstractMap.class);
|
||||||
private Map<Integer, BaseBehavior> baseBehaviorMap = new HashMap<>();
|
private Map<Integer, BaseBehavior> baseBehaviorMap = new HashMap<>();
|
||||||
|
int type;
|
||||||
public void init(ConfigurableApplicationContext configurableApplicationContext) {
|
public void init(ConfigurableApplicationContext configurableApplicationContext) {
|
||||||
Map<String, BaseBehavior> beansOfType = configurableApplicationContext.getBeansOfType(BaseBehavior.class);
|
Map<String, BaseBehavior> beansOfType = configurableApplicationContext.getBeansOfType(BaseBehavior.class);
|
||||||
for (BaseBehavior baseBehavior : beansOfType.values()) {
|
for (BaseBehavior baseBehavior : beansOfType.values()) {
|
||||||
|
@ -150,14 +150,16 @@ public abstract class AbstractMap implements IMap {
|
||||||
LOGGER.info("当前层使用时间{}",time);
|
LOGGER.info("当前层使用时间{}",time);
|
||||||
//清除副本中增加的怪物被动技能
|
//清除副本中增加的怪物被动技能
|
||||||
user.getMapManager().removeMonsterTempSkill();
|
user.getMapManager().removeMonsterTempSkill();
|
||||||
boolean result = MapLogic.getInstance().onlyLevelMap(user, true);
|
if(outType==0){
|
||||||
if (!result) {
|
boolean result = MapLogic.getInstance().onlyLevelMap(user, true);
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
if (!result) {
|
||||||
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int getMapType(int mapId){
|
public AbstractMap(int type){
|
||||||
return 1;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterNewMap(User user,int mapId,int teamId,MapInfoProto.MapEnterResponse.Builder mapEnterResponse)throws Exception{
|
public void enterNewMap(User user,int mapId,int teamId,MapInfoProto.MapEnterResponse.Builder mapEnterResponse)throws Exception{
|
||||||
|
@ -542,7 +544,7 @@ public abstract class AbstractMap implements IMap {
|
||||||
public void refreshHp(User user,int teamId,int[] checkResult){
|
public void refreshHp(User user,int teamId,int[] checkResult){
|
||||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||||
user.getMapManager().updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+2]);
|
user.getMapManager().updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public int monsterGroupChange(int groupId){
|
public int monsterGroupChange(int groupId){
|
||||||
|
|
|
@ -68,4 +68,7 @@ public class DifficultMap extends AbstractMap {
|
||||||
MapLogic.getInstance().initMap(user.getMapManager(), user);
|
MapLogic.getInstance().initMap(user.getMapManager(), user);
|
||||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserGameType,type,mapId);
|
KtEventUtils.onKtEvent(user, ParamEventBean.UserGameType,type,mapId);
|
||||||
}
|
}
|
||||||
|
public DifficultMap(int type){
|
||||||
|
super();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue