增加法宝聚灵召唤
parent
972238a752
commit
270fcfdf42
|
|
@ -1997,7 +1997,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取新加入的心愿法宝
|
||||
* 获取新加入的心愿法宝聚灵
|
||||
*/
|
||||
public Set<Integer> getDesireOpenTrumpList() {
|
||||
Set<Integer> result = new HashSet<>();
|
||||
|
|
@ -2017,7 +2017,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取新加入的心愿法宝聚灵
|
||||
* 获取新加入的心愿法宝
|
||||
*/
|
||||
public Set<Integer> getDesireOpenFabaoList() {
|
||||
Set<Integer> result = new HashSet<>();
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ public class CumulationData {
|
|||
*/
|
||||
public int fangcunxunbao_num;
|
||||
/**
|
||||
* 天地烘炉次数
|
||||
* 天地烘炉(法宝聚灵召唤)次数
|
||||
*/
|
||||
public int tiandihonglu_num;
|
||||
/**
|
||||
|
|
@ -269,6 +269,7 @@ public class CumulationData {
|
|||
private int luofuFightNum;//罗浮争锋次数
|
||||
private int yuxuLv;//玉虚论道段位
|
||||
private int accumulativeRechargeNum;// 累计充值金额
|
||||
private int fabaojulingNum;//法宝聚灵召唤
|
||||
|
||||
public Result updateData(MissionType missionType, Object...parm) throws Exception {
|
||||
return DataManagerDistributor.updateData(this, missionType,parm);
|
||||
|
|
@ -754,4 +755,12 @@ public class CumulationData {
|
|||
public void addAccumulativeRechargeNum(int num) {
|
||||
this.accumulativeRechargeNum += num;
|
||||
}
|
||||
|
||||
public int getFabaojulingNum() {
|
||||
return fabaojulingNum;
|
||||
}
|
||||
|
||||
public void setFabaojulingNum(int fabaojulingNum) {
|
||||
this.fabaojulingNum = fabaojulingNum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -765,7 +765,6 @@ public class HeroLogic {
|
|||
user.getItemManager().getItem(10001);
|
||||
|
||||
}
|
||||
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.RANDOM_HERO, sLotterySetting.getLotteryType(), perCount);
|
||||
if (sLotterySetting.getLotteryType() == 11) {
|
||||
//只记录新将招募次数
|
||||
|
|
@ -943,10 +942,22 @@ public class HeroLogic {
|
|||
private int[] wishDrawCardCheck(User user, int[] item, int type) {
|
||||
// 查找物品
|
||||
SItem sItem = SItem.getsItemMap().get(item[0]);
|
||||
// 非5星英雄奖励直接返回
|
||||
if (sItem.getXinyuan() != 1) {
|
||||
return item;
|
||||
//法宝聚灵通过获取碎片的数量判断,大于等于50个代表抽中
|
||||
if(type == 15){
|
||||
if(item == null || item.length < 2){
|
||||
return item;
|
||||
}
|
||||
int num = item[1];
|
||||
if(num < 50){//未抽中直接返回
|
||||
return item;
|
||||
}
|
||||
}else{
|
||||
// 非5星英雄或法宝奖励直接返回
|
||||
if (sItem.getXinyuan() != 1) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
//记录抽中5星英雄或法宝的数量
|
||||
int fiveStarHeroCount = 0;
|
||||
if(type == 4){//法宝
|
||||
|
|
@ -955,6 +966,9 @@ public class HeroLogic {
|
|||
}else if(type == 1){//英雄
|
||||
fiveStarHeroCount = user.getHeroManager().getDrawFiveStarHeroNum() + 1;
|
||||
user.getHeroManager().setDrawFiveStarHeroNum(fiveStarHeroCount);
|
||||
}else if(type == 15){//法宝聚灵
|
||||
//法宝聚灵心愿概率为100%,抽中次数设置为3,取余必然中
|
||||
fiveStarHeroCount = 3;
|
||||
}
|
||||
//固定30%概率,次数个位数在3,6,9时固定出
|
||||
int value = fiveStarHeroCount % 10;
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ public enum MissionType {
|
|||
FABAO_DRAW_NUM(165),//法宝抽卡次数
|
||||
SOLDIER_LAYER(166),//小兵层数
|
||||
RECHARGE_ACCUMULATIVE_NUM(167),//累计充值金额
|
||||
FABAO_JULING_NUM(168),//法宝聚灵召唤次数
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ public class DataManagerDistributor {
|
|||
judges.put(MissionType.EXPLORE_ENEMYHISTORYHIGH_NUM,new ExploreEnemyHistoryHighManager());
|
||||
|
||||
judges.put(MissionType.RECHARGE_ACCUMULATIVE_NUM,new RechargeAccumulativeNumManager());//每日累充
|
||||
//法宝聚灵召唤
|
||||
judges.put(MissionType.FABAO_JULING_NUM,new FabaoJulingTaskManager());
|
||||
}
|
||||
|
||||
public static CumulationData.Result updateData(CumulationData data, MissionType missionType, Object...parm) throws Exception {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
/**
|
||||
* 法宝聚灵召唤任务处理器
|
||||
* @author dengdan
|
||||
* @date 2021/6/8
|
||||
* @discribe
|
||||
*/
|
||||
public class FabaoJulingTaskManager extends AbstractDataManager{
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
data.setFabaojulingNum(data.getFabaojulingNum() + (int)parm[1]);
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
||||
return data.getFabaojulingNum() ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFinish(User user, CumulationData data, int[][] cfgValue, Object... parm) {
|
||||
return data.getFabaojulingNum() >= cfgValue[1][0];
|
||||
}
|
||||
}
|
||||
|
|
@ -29,6 +29,17 @@ public class CumulationDataEventProcessor implements BaseGameEventProcessor{
|
|||
}
|
||||
}
|
||||
}
|
||||
if(type == MissionType.FABAO_JULING_NUM){
|
||||
if(event == GameEvent.RANDOM_HERO){
|
||||
if(parm!= null && parm.length > 0){
|
||||
int lotteryType = (int)parm[0];
|
||||
//不是法宝聚灵召唤,不处理,目前法宝聚灵召唤和法宝召唤,英雄抽卡用的同一个event
|
||||
if(lotteryType!=15){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
user.getUserMissionManager().calCumulationDataResult(user,type,misionTypeListMap,parm);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ public class MissionEventDistributor {
|
|||
typeList.add(MissionType.ELEMENT_RANDOM_TIMES);
|
||||
typeList.add(MissionType.CARD_RANDOM_TYPE);
|
||||
typeList.add(MissionType.RANDOM_All_TIMES);
|
||||
typeList.add(MissionType.FABAO_JULING_NUM);
|
||||
eventEnumListMap.put(GameEvent.RANDOM_HERO,typeList);
|
||||
eventProcessor.put(GameEvent.RANDOM_HERO,new CumulationDataEventProcessor());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue