Merge branch 'master_test' of http://60.1.1.230/backend/jieling_server into master_test
commit
1f59c36e5e
|
|
@ -169,6 +169,9 @@ public class TowerMap extends AbstractMap {
|
|||
return;
|
||||
}
|
||||
int floor = mapManager.getTrialInfo().getFloor();
|
||||
if(floor==101){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
STrialConfig sTrialConfig;
|
||||
if(floor>10000){
|
||||
TreeMap<Integer,STrialConfig> sTrialConfigMap = (TreeMap<Integer,STrialConfig>) STrialConfig.sTrialConfigMap;
|
||||
|
|
@ -270,7 +273,7 @@ public class TowerMap extends AbstractMap {
|
|||
int i = 0;
|
||||
int[] monster = MathUtils.randomFromWeightWithTaking(sTrialConfig.getMonsterPoint(),4);
|
||||
while (cellMap4.size() < 4 ) {
|
||||
if (i >= 10000) {
|
||||
if (i >= 100) {
|
||||
break;
|
||||
}
|
||||
int cellLength = scMap1.getGroups().length;
|
||||
|
|
@ -282,13 +285,13 @@ public class TowerMap extends AbstractMap {
|
|||
int y = scMap1.getGroups()[i][1];
|
||||
int xy = CellUtil.xy2Pos(x, y);
|
||||
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(monster[i]);
|
||||
i++;
|
||||
if (mapPointConfig == null) {
|
||||
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent());
|
||||
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}",monster[i]);
|
||||
continue;
|
||||
}
|
||||
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
||||
cellMap4.put(xy, cellValue);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
|
||||
|
||||
//restart
|
||||
public class Cmd_restart extends GmRoleAbstract{
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
// User user = getUser();
|
||||
// user = MongoUtil.getInstence().getMyMongoTemplate().findById(User.getCollectionName(), user.getId(), User.class);
|
||||
// if (user == null) {
|
||||
// return false;
|
||||
// }
|
||||
// UserManager.addUser(user);
|
||||
// HeroLogic.getInstance().calTeamTotalForce(user,1,true);
|
||||
// BuyGoodsLogic.initOwernBagInfo(user);
|
||||
if(args.length!=1){
|
||||
return true;
|
||||
}
|
||||
String name = ProtocolsManager.handlerThreads[Integer.valueOf(args[0])].getName();
|
||||
LOGGER.error("Exception to change thread name"+ name);
|
||||
System.out.println("name = " + name);
|
||||
try {
|
||||
ProtocolsManager.handlerThreads[Integer.valueOf(args[0])].interrupt();
|
||||
}catch (Exception e){LOGGER.error(e.toString());}
|
||||
|
||||
ProtocolsManager.handlerThreads[Integer.valueOf(args[0])]= new HandlerLogicThread();
|
||||
ProtocolsManager.handlerThreads[Integer.valueOf(args[0])].setPriority(9);//优先级最高
|
||||
ProtocolsManager.handlerThreads[Integer.valueOf(args[0])].setName("h-n" + Integer.valueOf(args[0]));
|
||||
ProtocolsManager.handlerThreads[Integer.valueOf(args[0])].start();
|
||||
LOGGER.error("Exception new change thread ok");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue