Merge branch 'master_test_gn' into master_test_gn_xxp

xuexinpeng 2021-08-02 00:07:28 +08:00
commit 7f0131278d
7 changed files with 74 additions and 47 deletions

View File

@ -21,37 +21,39 @@ public abstract class GlobalProtocolsManager {
public static final Logger LOGGER = LoggerFactory.getLogger(GlobalProtocolsManager.class); public static final Logger LOGGER = LoggerFactory.getLogger(GlobalProtocolsManager.class);
private static Map<Integer, gtGBaseHandler> handlers = new HashMap<>(); private static Map<Integer, gtGBaseHandler> handlers = new HashMap<>();
//暂时不用了
public static void initHandler(String pck,ClassLoader classLoader) { public static void initHandler(String pck,ClassLoader classLoader) {
List<Class<?>> handlers = new LinkedList<>(); return;
try { // List<Class<?>> handlers = new LinkedList<>();
try { // try {
ClassLoaderHelper.findLocalClass(pck, gtGBaseHandler.class, classLoader, handlers); // try {
} catch (RuntimeException e) { // ClassLoaderHelper.findLocalClass(pck, gtGBaseHandler.class, classLoader, handlers);
LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e)); // } catch (RuntimeException e) {
} // LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e));
try { // }
ClassLoaderHelper.findClassJar(pck, gtGBaseHandler.class,classLoader, handlers); // try {
} catch (RuntimeException e) { // ClassLoaderHelper.findClassJar(pck, gtGBaseHandler.class,classLoader, handlers);
LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e)); // } catch (RuntimeException e) {
} // LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e));
// }
handlers.forEach(hand -> //
{ // handlers.forEach(hand ->
gtGBaseHandler baseHandler = null; // {
// gtGBaseHandler baseHandler = null;
try { //
baseHandler = (gtGBaseHandler) hand.newInstance(); // try {
} catch (Exception ex) { // baseHandler = (gtGBaseHandler) hand.newInstance();
LOGGER.info("request unknow Exception {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(ex)); // } catch (Exception ex) {
} // LOGGER.info("request unknow Exception {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(ex));
// }
if (null != baseHandler) { //
addHandler(baseHandler); // if (null != baseHandler) {
} // addHandler(baseHandler);
}); // }
} catch (RuntimeException e2) { // });
LOGGER.info("initHandler unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e2)); // } catch (RuntimeException e2) {
} // LOGGER.info("initHandler unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e2));
// }
} }

View File

@ -13,13 +13,6 @@ public class TowerRank extends AbstractRank {
public TowerRank(Integer type,String redisKey){ public TowerRank(Integer type,String redisKey){
super(type,redisKey); super(type,redisKey);
} }
@Override
public PlayerInfoProto.RankResponse getRank(int uid,String rkey,int page,int rankEndLine) throws Exception {
rankEndLine = SSpecialConfig.getIntegerValue(SSpecialConfig.TRIAL_RANKINGSHOWNUM);
return super.getRank(uid,rkey,1, rankEndLine);
}
// @Override // @Override
// public long[] getDataByScore(Double score) { // public long[] getDataByScore(Double score) {
// long[] array = new long [2]; // long[] array = new long [2];

View File

@ -128,7 +128,7 @@ public class MonsterUtil {
int[] monsterIds = groupIds[i]; int[] monsterIds = groupIds[i];
List<CommonProto.FightUnitInfo> monsterList = new ArrayList<>(); List<CommonProto.FightUnitInfo> monsterList = new ArrayList<>();
int position=1; int position=1;
/* for (int monsterId : monsterIds) { for (int monsterId : monsterIds) {
if(monsterId!=0){ if(monsterId!=0){
SMonsterConfig sMonsterConfig = STableManager.getConfig(SMonsterConfig.class).get(monsterId); SMonsterConfig sMonsterConfig = STableManager.getConfig(SMonsterConfig.class).get(monsterId);
monsterList.add( CBean2Proto.getMonster(sMonsterConfig, nodeConfig).setPosition(position++).build()); monsterList.add( CBean2Proto.getMonster(sMonsterConfig, nodeConfig).setPosition(position++).build());
@ -136,15 +136,15 @@ public class MonsterUtil {
position++; position++;
} }
}*/
for (int monsterId : monsterIds) {
if(monsterId!=0){
monsterList.add(monsterMap.get(monsterId).setPosition(position++).build());
}else{
position++;
}
} }
// for (int monsterId : monsterIds) {
// if(monsterId!=0){
// monsterList.add(monsterMap.get(monsterId).setPosition(position++).build());
// }else{
// position++;
// }
//
// }
map.put(i,monsterList); map.put(i,monsterList);
} }
return map; return map;

View File

@ -26,6 +26,8 @@ public class SEndlessHeroProp implements BaseConfig {
private int[][] props; private int[][] props;
private int heroRankId;
private int heroStarId; private int heroStarId;
public static Map<Integer,Map<Integer,Long>> propsMap = new HashMap<>(); public static Map<Integer,Map<Integer,Long>> propsMap = new HashMap<>();
@ -83,4 +85,8 @@ public class SEndlessHeroProp implements BaseConfig {
public int getHeroStarId() { public int getHeroStarId() {
return heroStarId; return heroStarId;
} }
public int getHeroRankId() {
return heroRankId;
}
} }

View File

@ -31,6 +31,8 @@ public class SHeroSkin implements BaseConfig {
private int[] headIcon; private int[] headIcon;
private int show;
public static Map<Integer,SHeroSkin> skinMapByType; public static Map<Integer,SHeroSkin> skinMapByType;
@ -94,4 +96,8 @@ public class SHeroSkin implements BaseConfig {
public int[] getHeadIcon() { public int[] getHeadIcon() {
return headIcon; return headIcon;
} }
public int getShow() {
return show;
}
} }

View File

@ -54,6 +54,10 @@ public class SRechargeCommodityNewConfig implements BaseConfig {
private String rechargeId5; private String rechargeId5;
private String rechargeId6; private String rechargeId6;
private String rechargeId7;
private String rechargeId8;
private String rechargeId9;
private String rechargeId10;
private int[] forbid; private int[] forbid;
@ -174,6 +178,22 @@ public class SRechargeCommodityNewConfig implements BaseConfig {
return rechargeId6; return rechargeId6;
} }
public String getRechargeId7() {
return rechargeId7;
}
public String getRechargeId8() {
return rechargeId8;
}
public String getRechargeId9() {
return rechargeId9;
}
public String getRechargeId10() {
return rechargeId10;
}
public String[][] getCondition() { public String[][] getCondition() {
return condition; return condition;
} }

View File

@ -197,7 +197,7 @@ public class STableManager {
LOGGER.error("file not find {}, do not find sheet with {} you need rebuild all sheet by gen sheet tool!", path, tableName); LOGGER.error("file not find {}, do not find sheet with {} you need rebuild all sheet by gen sheet tool!", path, tableName);
throw new NullPointerException("clazz.null" + clazz.getName()); throw new NullPointerException("clazz.null" + clazz.getName());
} }
LOGGER.info("initMap:{}", clazz.getSimpleName()); LOGGER.info("initConfig:{}", clazz.getSimpleName());
readFileToCache(clazz, map, file); readFileToCache(clazz, map, file);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();