玲珑宝阁新优化,活动优化
parent
e6221cfd40
commit
8692f5829f
|
@ -32,6 +32,6 @@ public class QiMenDunJiaDrawHandler extends BaseHandler<ActivityProto.qiMenDunJi
|
|||
if (user == null) {
|
||||
throw new ErrorCodeException(ErrorCode.UNKNOWN);
|
||||
}
|
||||
return ActivityLogic.getInstance().qiMenDunJiaDraw(user,proto.getActivityId());
|
||||
return ActivityLogic.getInstance().qiMenDunJiaDraw(user,proto.getActivityId(),proto.getNum());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1724,18 +1724,20 @@ public class ActivityLogic implements IEventHandler{
|
|||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ActivityProto.qiMenDunJiaDrawResponse qiMenDunJiaDraw(User user,int activityId) throws Exception {
|
||||
public ActivityProto.qiMenDunJiaDrawResponse qiMenDunJiaDraw(User user,int activityId,int num) throws Exception {
|
||||
// 道具消耗
|
||||
qiMenConsume(user);
|
||||
// 抽奖逻辑
|
||||
ActivityProto.qiMenDunJiaDrawResponse.Builder response = ActivityProto.qiMenDunJiaDrawResponse.newBuilder();
|
||||
ArrayList<Integer> hits = new ArrayList<>();
|
||||
List<int[]> list = new ArrayList<>();
|
||||
// 小圈抽奖,根据返回判断是否需要抽外圈
|
||||
boolean result = qiMenRandom(user, activityId,2, list, hits);
|
||||
if (result){
|
||||
// 大圈/外圈抽奖
|
||||
qiMenRandom(user, activityId, 1, list, hits);
|
||||
for (int i = 0; i < num; i++) {
|
||||
// 小圈抽奖,根据返回判断是否需要抽外圈
|
||||
boolean result = qiMenRandom(user, activityId,2, list, hits);
|
||||
if (result){
|
||||
// 大圈/外圈抽奖
|
||||
qiMenRandom(user, activityId, 1, list, hits);
|
||||
}
|
||||
}
|
||||
// 处理奖励
|
||||
int[][] rewards = Utils.changeList(list);
|
||||
|
|
|
@ -80,6 +80,7 @@ public interface ActivityType {
|
|||
int JADE_DYNASTY_SHOP = 20001;//破阵诛仙限时商市
|
||||
int JADE_DYNASTY_RARE_SHOP = 20002;//破阵诛仙珍奇宝阁
|
||||
int CHOICE_DRAW_CRAD = 20003;//心愿抽奖(选择抽卡)
|
||||
int LING_LONG_PAVILION = 20005;//玲珑宝阁
|
||||
int ITEMS_STORE= 6000;//百宝商会
|
||||
int TRIAL_EXPERT = 70;//幻境达人
|
||||
int SHEJI_ACTIVITY = 60;//社稷大典
|
||||
|
|
|
@ -84,6 +84,7 @@ public enum ActivityTypeEnum {
|
|||
THEME_ACTIVITY_SHOP(ActivityType.THEME_ACTIVITY_SHOP,DefaultEmptyActivity::new),
|
||||
XUN_BAO_MI_ZONG(ActivityType.XUN_BAO_MI_ZONG,XunBaoMiZongActivity::new),
|
||||
SEVEN_WORLD_TREASURE(ActivityType.SEVEN_WORLD_TREASURE,SevenWorldActivity::new),
|
||||
LING_LONG_PAVILION(ActivityType.LING_LONG_PAVILION,DefaultEmptyActivity::new),
|
||||
;
|
||||
|
||||
private int type;
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
package com.ljsd.jieling.logic.store.newRechargeInfo.bean;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.util.KeyGenUtils;
|
||||
import com.ljsd.jieling.util.UUIDEnum;
|
||||
import config.SGlobalActivity;
|
||||
import config.SRechargeCommodityNewConfig;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 时限礼包(活动)
|
||||
*/
|
||||
public class TimeLimitWelfareBag extends AbstractWelfareBag {
|
||||
|
||||
public TimeLimitWelfareBag(User user, SRechargeCommodityNewConfig config) throws Exception{
|
||||
public TimeLimitWelfareBag(User user, SRechargeCommodityNewConfig config){
|
||||
super(user,config);
|
||||
for(String[] I : getCondition()){
|
||||
if(I[0].equals("3")){
|
||||
|
|
Loading…
Reference in New Issue