back_recharge
gaojie 2019-04-12 11:19:42 +08:00
commit db3d53cc35
4 changed files with 25 additions and 7 deletions

View File

@ -21,6 +21,7 @@ public class SItem implements BaseConfig {
private boolean isopen; private boolean isopen;
private int isSave; private int isSave;
private int[] heroStar; private int[] heroStar;
private int ifopen;
@Override @Override
public void init() throws Exception { public void init() throws Exception {
@ -78,4 +79,8 @@ public class SItem implements BaseConfig {
public int[] getHeroStar() { public int[] getHeroStar() {
return heroStar; return heroStar;
} }
public int getIfopen() {
return ifopen;
}
} }

View File

@ -58,6 +58,8 @@ public class GMRequestHandler extends BaseHandler{
prarm1 = Integer.parseInt(commandArray[1]); prarm1 = Integer.parseInt(commandArray[1]);
if (prarm1 ==1){ if (prarm1 ==1){
prarm3 = commandArray[2].replace(",","#"); prarm3 = commandArray[2].replace(",","#");
}else{
prarm2 = Integer.parseInt(commandArray[2]);
} }
} }
User cUser = UserManager.getUser(uid); User cUser = UserManager.getUser(uid);
@ -124,9 +126,22 @@ public class GMRequestHandler extends BaseHandler{
case GlobalGm.ONE_KEY_ITEM_OR_HERO:{ case GlobalGm.ONE_KEY_ITEM_OR_HERO:{
//道具 //道具
Map<Integer, SItem> sItemMap = SItem.getsItemMap(); Map<Integer, SItem> sItemMap = SItem.getsItemMap();
int[][] gmDrop = new int[sItemMap.size()][];
int i=0; int i=0;
int length = 0;
for(SItem sItem : sItemMap.values()){ for(SItem sItem : sItemMap.values()){
int ifopen = sItem.getIfopen();
if(ifopen == 0){
continue;
}
length++;
}
int[][] gmDrop = new int[length][];
for(SItem sItem : sItemMap.values()){
int ifopen = sItem.getIfopen();
if(ifopen == 0){
continue;
}
length++;
int itemId = sItem.getId(); int itemId = sItem.getId();
int itemType = sItem.getItemType(); int itemType = sItem.getItemType();
int itemNum = 999; int itemNum = 999;

View File

@ -59,12 +59,13 @@ public class ThreadManager {
public void go() { public void go() {
long now = System.currentTimeMillis();
scheduledExecutor = new ScheduledThreadPoolExecutor(16, new ScheduleThreadFactory()); scheduledExecutor = new ScheduledThreadPoolExecutor(16, new ScheduleThreadFactory());
// testTask 已秒为单位 延迟10s, 间隔30s为周期执行 // testTask 已秒为单位 延迟10s, 间隔30s为周期执行
scheduledExecutor.scheduleAtFixedRate(platConfigureTask, 10, PlatConfigureTask.SLEEP_INTEVAL_TIME, TimeUnit.SECONDS); scheduledExecutor.scheduleAtFixedRate(platConfigureTask, 10, PlatConfigureTask.SLEEP_INTEVAL_TIME, TimeUnit.SECONDS);
scheduledExecutor.scheduleAtFixedRate(new MinuteJob(), 0, 60, TimeUnit.SECONDS); long diff = now/1000 % 60 ;
scheduledExecutor.scheduleAtFixedRate(new MinuteJob(), 60 - diff, 60, TimeUnit.SECONDS);
LOGGER.info("All Task running ..."); LOGGER.info("All Task running ...");
} }

View File

@ -1,9 +1,6 @@
package com.ljsd.jieling.util; package com.ljsd.jieling.util;
import com.ljsd.jieling.config.SEquipConfig; import com.ljsd.jieling.config.*;
import com.ljsd.jieling.config.SItem;
import com.ljsd.jieling.config.SRewardGroup;
import com.ljsd.jieling.config.SRewardItem;
import com.ljsd.jieling.globals.GlobalItemType; import com.ljsd.jieling.globals.GlobalItemType;
import com.ljsd.jieling.handler.map.MapManager; import com.ljsd.jieling.handler.map.MapManager;
import com.ljsd.jieling.handler.map.TemporaryItems; import com.ljsd.jieling.handler.map.TemporaryItems;