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