天宫秘宝修改
parent
d0aebf10f3
commit
bb6a149f89
|
@ -39,7 +39,7 @@ public class TakeTreasureRewardHandler extends BaseHandler<Expedition.Expedition
|
|||
Map<Integer, Set<SWorldBossTreasureConfig>> idsByPeriods = worldBossTreasureStaticConfig.getIdsByPeriods();
|
||||
WorldTreasureReward worldTreasureReward = user.getExpeditionManager().getWorldTreasureReward();
|
||||
int round = worldTreasureReward.getRound();
|
||||
int changeState = getChangeState(user, round);
|
||||
int changeState = getChangeState(user);
|
||||
List<int[][]> drops = new ArrayList<>();
|
||||
if(id!=-1){
|
||||
SWorldBossTreasureConfig sWorldBossTreasureConfig = worldBossTreasureStaticConfig.getsWorldBossTreasureConfigByIdMap().get(id);
|
||||
|
@ -83,18 +83,19 @@ public class TakeTreasureRewardHandler extends BaseHandler<Expedition.Expedition
|
|||
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.EXPEDITION_TAKE_TREASURE_REWARD_RESPONSE_VALUE,build,true);
|
||||
}
|
||||
|
||||
private int getChangeState(User user,int round){
|
||||
private int getChangeState(User user){
|
||||
int changeState = ActivityType.HAD_TAKED;
|
||||
SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1);
|
||||
int[][] treasureTime = sExpeditionSetting.getTreasureTime();
|
||||
int targetGoodsId = -1;
|
||||
for(int[] item : treasureTime){
|
||||
if(item[0] == round){
|
||||
targetGoodsId = item[2];
|
||||
}
|
||||
}
|
||||
Integer buyTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().getOrDefault(targetGoodsId, 0);
|
||||
if(buyTimes != 0){
|
||||
int isBuy = user.getExpeditionManager().getWorldTreasureReward().getIsBuy();
|
||||
// SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1);
|
||||
// int[][] treasureTime = sExpeditionSetting.getTreasureTime();
|
||||
// int targetGoodsId = -1;
|
||||
// for(int[] item : treasureTime){
|
||||
// if(item[0] == round){
|
||||
// targetGoodsId = item[2];
|
||||
// }
|
||||
// }
|
||||
// Integer buyTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().getOrDefault(targetGoodsId, 0);
|
||||
if(isBuy != 0){
|
||||
changeState = ActivityType.FINISH_TAKED;
|
||||
}
|
||||
return changeState;
|
||||
|
|
|
@ -50,6 +50,8 @@ public class SGlobalActivity implements BaseConfig {
|
|||
|
||||
private int canBuyRechargeId;
|
||||
|
||||
private int isOpen;
|
||||
|
||||
public static Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByType;
|
||||
public static Map<Integer, List<SGlobalActivity>> sGlobalActivityMapByOpenRules;
|
||||
|
||||
|
@ -172,4 +174,8 @@ public class SGlobalActivity implements BaseConfig {
|
|||
public int getCanBuyRechargeId() {
|
||||
return canBuyRechargeId;
|
||||
}
|
||||
|
||||
public int getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue