命石增加每日抽卡次数上限
parent
8f44198312
commit
fa7487bf1d
|
@ -384,25 +384,15 @@ public class RedisKey {
|
|||
* value:map《玩家id,助战英雄》
|
||||
*/
|
||||
public final static String HELP_FIGHT = "HELP_FIGHT";
|
||||
|
||||
//七届积分排行
|
||||
public static final String SEVEN_WORLD_INTEGRAL_RANK = "SEVEN_WORLD_INTEGRAL_RANK";
|
||||
// 御剑飞行排行
|
||||
public static final String RIDING_SWARD_RANK = "RIDING_SWARD_RANK";
|
||||
// 御剑飞行记录
|
||||
public static final String RIDING_SWARD_RECORD = "RIDING_SWARD_RECORD";
|
||||
// 御剑飞行时间锁
|
||||
public static final String RIDING_SWARD_TIME_LOCK = "RIDING_SWARD_TIME_LOCK";
|
||||
//全民福利购买礼包次数
|
||||
public static final String ALL_PEOPLE_WELFARE_BUY_COUNT = "ALL_PEOPLE_WELFARE_BUY_COUNT";
|
||||
// 邮件奖励
|
||||
public static final String MAIL_REWARD_MARK = "MAIL_REWARD_MARK";
|
||||
// 罗浮称号奖励标记
|
||||
public static final String LUOFU_TITLE_REWARD_MARK = "LUOFU_TITLE_REWARD_MARK";
|
||||
// 首充标记
|
||||
public static final String First_Recharge = "First_Recharge";
|
||||
// 命格抽卡次数每日
|
||||
public static final String GEM_DRAW_COUNT_DAY = "GEM_DRAW_COUNT_DAY";
|
||||
public static final String SEVEN_WORLD_INTEGRAL_RANK = "SEVEN_WORLD_INTEGRAL_RANK";//七届积分排行
|
||||
public static final String RIDING_SWARD_RANK = "RIDING_SWARD_RANK";// 御剑飞行排行
|
||||
public static final String RIDING_SWARD_RECORD = "RIDING_SWARD_RECORD";// 御剑飞行记录
|
||||
public static final String RIDING_SWARD_TIME_LOCK = "RIDING_SWARD_TIME_LOCK";// 御剑飞行时间锁
|
||||
public static final String ALL_PEOPLE_WELFARE_BUY_COUNT = "ALL_PEOPLE_WELFARE_BUY_COUNT";//全民福利购买礼包次数
|
||||
public static final String MAIL_REWARD_MARK = "MAIL_REWARD_MARK";// 邮件奖励
|
||||
public static final String LUOFU_TITLE_REWARD_MARK = "LUOFU_TITLE_REWARD_MARK";// 罗浮称号奖励标记
|
||||
public static final String First_Recharge = "First_Recharge";// 首充标记
|
||||
public static final String GEM_DRAW_COUNT_DAY = "GEM_DRAW_COUNT_DAY";// 命格抽卡次数每日
|
||||
public static final String Redis_Timer = "Redis_Timer";
|
||||
|
||||
//进程排行 合区统一
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
|
|||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.equip.EquipLogic;
|
||||
import com.ljsd.jieling.logic.explorerMap.ExplorerMapLogic;
|
||||
import com.ljsd.jieling.logic.home.event.HomeEvent;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
|
@ -228,6 +229,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
.addAllFaBaoSoulInfos(faBaoSoulInfos)
|
||||
.addAllLifeGridInfos(getLifeGridInfos(heroManager))
|
||||
.addAllGiftIds(user.getPlayerInfoManager().getPlayerGiftEquipList())
|
||||
.addAllGemLotteryCountByDay(EquipLogic.getInstance().getGemLotteryCountByDay(userId))
|
||||
.build();
|
||||
|
||||
try {
|
||||
|
|
|
@ -305,6 +305,15 @@ public class EquipLogic {
|
|||
Poster.getPoster().dispatchEvent(new GemLotteryNumEvent(user.getId()));
|
||||
}
|
||||
|
||||
public List<Integer> getGemLotteryCountByDay(int uid){
|
||||
ArrayList<Integer> list = new ArrayList<>();
|
||||
int lotteryCount = getInstance().getDayLotteryCount(uid, 1);
|
||||
int advancedLotteryCount = getInstance().getDayLotteryCount(uid, 2);
|
||||
list.add(lotteryCount);
|
||||
list.add(advancedLotteryCount);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 宝石抽卡消耗
|
||||
*/
|
||||
|
@ -321,6 +330,13 @@ public class EquipLogic {
|
|||
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
|
||||
}
|
||||
|
||||
// 每日次数上限判断
|
||||
int lotteryCount = getDayLotteryCount(user.getId(), libraryId);
|
||||
int limit = SSpecialConfig.getIntegerArrayValue("Gem_Lottery_Number")[libraryId - 1];
|
||||
if (lotteryCount >= limit){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE,"已到达每日次数上限");
|
||||
}
|
||||
|
||||
// 消耗道具数量判断
|
||||
int[][] cost;
|
||||
if (libraryId == 1){
|
||||
|
|
|
@ -4405,7 +4405,6 @@ public class HeroLogic {
|
|||
returnItems.put(soulEquipByPositionMap.get(e.getPosition()), 1);
|
||||
}
|
||||
hero.updateSoulEquipPositionMap(e.getPosition(), e.getEquipId());
|
||||
|
||||
});
|
||||
ItemUtil.drop(user, ItemUtil.mapToArray(returnItems), BIReason.REPLACE_SOUL_REWARD);
|
||||
// 更新战力
|
||||
|
|
Loading…
Reference in New Issue