戒灵秘宝逻辑修改
parent
82c102391b
commit
0846bdfe2d
|
@ -296,9 +296,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
openNewActivityIds.add(activityId);
|
openNewActivityIds.add(activityId);
|
||||||
checkNeedOpenStore(user,sGlobalActivity.getShopId(),startTime,endTime);
|
checkNeedOpenStore(user,sGlobalActivity.getShopId(),startTime,endTime);
|
||||||
} else {
|
} else {
|
||||||
// long endTime = sGlobalActivity.getEndTimeLong();
|
|
||||||
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),userCreateTime, 2);
|
long endTime = ToolsUtil.getTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),userCreateTime, 2);
|
||||||
|
|
||||||
goRewardActivity(user,activityId,builder,now>endTime + sGlobalActivity.getGapTime()*TimeUtils.ONE_DAY);
|
goRewardActivity(user,activityId,builder,now>endTime + sGlobalActivity.getGapTime()*TimeUtils.ONE_DAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public interface ActivityType {
|
||||||
int RechargeTotal = 5; //累计充值
|
int RechargeTotal = 5; //累计充值
|
||||||
int GrowthFund = 6; //成长基金
|
int GrowthFund = 6; //成长基金
|
||||||
int BLESSACTIVITY = 7;//云梦祈福
|
int BLESSACTIVITY = 7;//云梦祈福
|
||||||
int TREASURE = 8; //孙龙的宝藏
|
int TREASURE = 8; //戒灵秘宝(孙龙的宝藏)
|
||||||
int LUCKYCAT = 9;//招財貓
|
int LUCKYCAT = 9;//招財貓
|
||||||
int SERVERHAPPY = 10; //七日狂欢
|
int SERVERHAPPY = 10; //七日狂欢
|
||||||
int FORCERANK = 11; //战力排行
|
int FORCERANK = 11; //战力排行
|
||||||
|
|
|
@ -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_WEEK_REFRESH, sGlobalActivity.getId());
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.TREASH_REFRESH, sGlobalActivity.getId());
|
user.getUserMissionManager().onGameEvent(user, GameEvent.TREASH_REFRESH, sGlobalActivity.getId());
|
||||||
ActivityMission activityMission = new ActivityMission();
|
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)){
|
if(levels.contains(0)){
|
||||||
levels.remove(0);
|
levels.remove(0);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ public class TreasureActivity extends AbstractActivity {
|
||||||
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
||||||
}
|
}
|
||||||
private void dropByState(List<int[][]> dropList,int curState,int targetState,int missionId){
|
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){
|
if(curState==ActivityType.WILL_TAKE){
|
||||||
dropList.add(rewardConfig.getReward());
|
dropList.add(rewardConfig.getReward());
|
||||||
if(targetState == ActivityType.FINISH_TAKED){
|
if(targetState == ActivityType.FINISH_TAKED){
|
||||||
|
|
|
@ -25,19 +25,16 @@ public class STreasureSunlongConfig implements BaseConfig {
|
||||||
|
|
||||||
public static Map<Integer,STreasureSunlongConfig> treasureSunlongConfigMap;
|
public static Map<Integer,STreasureSunlongConfig> treasureSunlongConfigMap;
|
||||||
|
|
||||||
public static Map<Integer,STreasureSunlongConfig> levelTreasureConfigMap;
|
public static Map<Integer,Map<Integer,STreasureSunlongConfig>> levelTreasureConfigMap;
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
treasureSunlongConfigMap= STableManager.getConfig(STreasureSunlongConfig.class);
|
treasureSunlongConfigMap= STableManager.getConfig(STreasureSunlongConfig.class);
|
||||||
levelTreasureConfigMap= new HashMap<>(treasureSunlongConfigMap.size());
|
levelTreasureConfigMap= new HashMap<>();
|
||||||
for(Map.Entry<Integer,STreasureSunlongConfig> entry:treasureSunlongConfigMap.entrySet()){
|
for(Map.Entry<Integer,STreasureSunlongConfig> entry:treasureSunlongConfigMap.entrySet()){
|
||||||
STreasureSunlongConfig config = entry.getValue();
|
STreasureSunlongConfig config = entry.getValue();
|
||||||
if(config.getActivityId()!=40){
|
// levelTreasureConfigMap.put(config.getLevel(), config);
|
||||||
continue;
|
levelTreasureConfigMap.computeIfAbsent(config.getActivityId(),k->new HashMap<>()).put(config.getLevel(),config);
|
||||||
}
|
|
||||||
levelTreasureConfigMap.put(config.getLevel(), config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue