异妖上阵修改
parent
e823180834
commit
5e817c87ff
|
@ -23,6 +23,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionLoigc;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
|
@ -551,13 +552,33 @@ public class HeroLogic{
|
|||
}
|
||||
}
|
||||
int size = pokemonoIds.size();
|
||||
boolean allowed = user.getPlayerInfoManager().check(VipPrivilegeType.POKEMON_NUM, size);
|
||||
// boolean allowed = user.getPlayerInfoManager().check(VipPrivilegeType.POKEMON_NUM, size);
|
||||
boolean allowed =checkPokeManPos(user,size);
|
||||
if(!allowed){
|
||||
return "now allowd";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private boolean checkPokeManPos(User user ,int size){
|
||||
int[][] differLocation = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getDifferLocation();
|
||||
for(int i=0;i<size;i++){
|
||||
int[] condition = differLocation[i];
|
||||
switch (condition[0]){
|
||||
case 1:
|
||||
if(!MissionLoigc.checkMainLevel(user, condition[1])){
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(user.getPlayerInfoManager().getLevel()<condition[1]){
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void upHeroLevel(ISession session,String heroId,int targetLevel) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
|
@ -469,18 +469,7 @@ public class MissionLoigc {
|
|||
count = cumulationData.getsEquipQualityCount()[missionSubType[0]-1];
|
||||
break;
|
||||
case LEVEL_STORY_PASS:
|
||||
if(SMainLevelConfig.config.containsKey(missionSubType[0])){
|
||||
int virtureId = SMainLevelConfig.config.get(missionSubType[0]).getVirtureId();
|
||||
int fightId = user.getMainLevelManager().getFightId();
|
||||
SMainLevelConfig mineMainLevelConfig = SMainLevelConfig.fightPreMap.get(fightId);
|
||||
if(user.getMainLevelManager().getState() == 2 ){
|
||||
mineMainLevelConfig = SMainLevelConfig.config.get(user.getMainLevelManager().getFightId());
|
||||
}
|
||||
if(mineMainLevelConfig!=null){
|
||||
count =virtureId <= mineMainLevelConfig.getVirtureId() ?1:0;
|
||||
}
|
||||
|
||||
}
|
||||
count = checkMainLevel(user,missionSubType[0])?1:0;
|
||||
break;
|
||||
case GENERAL_STORY_PASS:
|
||||
Map<Integer, CrossInfo> crossInfoGenMap = user.getMapManager().getCrossInfoMap();
|
||||
|
@ -718,7 +707,24 @@ public class MissionLoigc {
|
|||
user.getUserMissionManager().updateString("missingRoomMissionType",missingRoomMissionType);
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||
}
|
||||
public static boolean checkMainLevel(User user,int levelId){
|
||||
if(!SMainLevelConfig.config.containsKey(levelId)){
|
||||
return false;
|
||||
}
|
||||
int vid = SMainLevelConfig.config.get(levelId).getVirtureId();
|
||||
int fightId = user.getMainLevelManager().getFightId();
|
||||
SMainLevelConfig mineMainLevelConfig = SMainLevelConfig.fightPreMap.get(fightId);
|
||||
if(user.getMainLevelManager().getState() == 2 ){
|
||||
mineMainLevelConfig = SMainLevelConfig.config.get(user.getMainLevelManager().getFightId());
|
||||
}
|
||||
if(mineMainLevelConfig!=null){
|
||||
return vid <= mineMainLevelConfig.getVirtureId();
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ public class SGameSetting implements BaseConfig {
|
|||
|
||||
private int defaultHead;
|
||||
|
||||
private int[][] differLocation;
|
||||
|
||||
|
||||
|
||||
|
@ -318,4 +319,8 @@ public class SGameSetting implements BaseConfig {
|
|||
public int getDefaultHead() {
|
||||
return defaultHead;
|
||||
}
|
||||
|
||||
public int[][] getDifferLocation() {
|
||||
return differLocation;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue