戒灵秘宝逻辑修改

back_recharge
lvxinran 2020-02-28 12:04:02 +08:00
parent 82c102391b
commit 0846bdfe2d
4 changed files with 7 additions and 12 deletions

View File

@ -296,9 +296,7 @@ public class ActivityLogic implements IEventHandler{
openNewActivityIds.add(activityId);
checkNeedOpenStore(user,sGlobalActivity.getShopId(),startTime,endTime);
} else {
// long endTime = sGlobalActivity.getEndTimeLong();
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),userCreateTime, 2);
goRewardActivity(user,activityId,builder,now>endTime + sGlobalActivity.getGapTime()*TimeUtils.ONE_DAY);
}
}

View File

@ -23,7 +23,7 @@ public interface ActivityType {
int RechargeTotal = 5; //累计充值
int GrowthFund = 6; //成长基金
int BLESSACTIVITY = 7;//云梦祈福
int TREASURE = 8; //孙龙的宝藏
int TREASURE = 8; //戒灵秘宝(孙龙的宝藏
int LUCKYCAT = 9;//招財貓
int SERVERHAPPY = 10; //七日狂欢
int FORCERANK = 11; //战力排行

View File

@ -45,7 +45,7 @@ public class TreasureActivity extends AbstractActivity {
user.getUserMissionManager().onGameEvent(user, GameEvent.TREASH_WEEK_REFRESH, sGlobalActivity.getId());
user.getUserMissionManager().onGameEvent(user, GameEvent.TREASH_REFRESH, sGlobalActivity.getId());
ActivityMission activityMission = new ActivityMission();
List<Integer> levels = new ArrayList<>(STreasureSunlongConfig.levelTreasureConfigMap.keySet());
List<Integer> levels = new ArrayList<>(STreasureSunlongConfig.levelTreasureConfigMap.get(id).keySet());
if(levels.contains(0)){
levels.remove(0);
}
@ -175,7 +175,7 @@ public class TreasureActivity extends AbstractActivity {
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
}
private void dropByState(List<int[][]> dropList,int curState,int targetState,int missionId){
STreasureSunlongConfig rewardConfig = STreasureSunlongConfig.levelTreasureConfigMap.get(missionId);
STreasureSunlongConfig rewardConfig = STreasureSunlongConfig.levelTreasureConfigMap.get(id).get(missionId);
if(curState==ActivityType.WILL_TAKE){
dropList.add(rewardConfig.getReward());
if(targetState == ActivityType.FINISH_TAKED){

View File

@ -25,19 +25,16 @@ public class STreasureSunlongConfig implements BaseConfig {
public static Map<Integer,STreasureSunlongConfig> treasureSunlongConfigMap;
public static Map<Integer,STreasureSunlongConfig> levelTreasureConfigMap;
public static Map<Integer,Map<Integer,STreasureSunlongConfig>> levelTreasureConfigMap;
@Override
public void init() throws Exception {
treasureSunlongConfigMap= STableManager.getConfig(STreasureSunlongConfig.class);
levelTreasureConfigMap= new HashMap<>(treasureSunlongConfigMap.size());
levelTreasureConfigMap= new HashMap<>();
for(Map.Entry<Integer,STreasureSunlongConfig> entry:treasureSunlongConfigMap.entrySet()){
STreasureSunlongConfig config = entry.getValue();
if(config.getActivityId()!=40){
continue;
}
levelTreasureConfigMap.put(config.getLevel(), config);
// levelTreasureConfigMap.put(config.getLevel(), config);
levelTreasureConfigMap.computeIfAbsent(config.getActivityId(),k->new HashMap<>()).put(config.getLevel(),config);
}
}