抽卡活动修改,部分打点类型修改
parent
cefd6ba749
commit
da8d764a75
|
@ -322,7 +322,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
}
|
}
|
||||||
|
|
||||||
abstractActivity.initActivity(user);
|
abstractActivity.initActivity(user);
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(openActivityId));
|
// ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(openActivityId));
|
||||||
int activityOpenState = getActivityOpenState(user, openActivityId);
|
int activityOpenState = getActivityOpenState(user, openActivityId);
|
||||||
abstractActivity.setOpenState(user,activityOpenState);
|
abstractActivity.setOpenState(user,activityOpenState);
|
||||||
if(activityOpenState == ActivityType.UNOPEN_STATE){
|
if(activityOpenState == ActivityType.UNOPEN_STATE){
|
||||||
|
@ -365,7 +365,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
if (null==abstractActivity) {
|
if (null==abstractActivity) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(activityId));
|
// ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(activityId));
|
||||||
abstractActivity.initActivity(user);
|
abstractActivity.initActivity(user);
|
||||||
// if(!initOtherActivity(user, sGlobalActivity)){
|
// if(!initOtherActivity(user, sGlobalActivity)){
|
||||||
initAllActivityMission(activityManager.getActivityMissionMap(),activityId);
|
initAllActivityMission(activityManager.getActivityMissionMap(),activityId);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public enum ActivityTypeEnum {
|
||||||
ECPEDITION_ACTIVITY(ActivityType.ECPEDITION_ACTIVITY,DefaultEmptyActivity::new),
|
ECPEDITION_ACTIVITY(ActivityType.ECPEDITION_ACTIVITY,DefaultEmptyActivity::new),
|
||||||
COPY_PASS(ActivityType.COPY_PASS,ChapterRewardActivity::new),
|
COPY_PASS(ActivityType.COPY_PASS,ChapterRewardActivity::new),
|
||||||
NEW_EIGHT_LOGIN(ActivityType.NEW_EIGHT_LOGIN,NewEightActivity::new),
|
NEW_EIGHT_LOGIN(ActivityType.NEW_EIGHT_LOGIN,NewEightActivity::new),
|
||||||
BEAUTY_BAG(ActivityType.BEAUTY_BAG,DefaultEmptyActivity::new)
|
BEAUTY_BAG(ActivityType.BEAUTY_BAG,LimitRandomCardActivity::new)
|
||||||
|
|
||||||
;
|
;
|
||||||
private int type;
|
private int type;
|
||||||
|
|
|
@ -50,121 +50,103 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
if(event instanceof RandomCardEvent){
|
if(event instanceof RandomCardEvent){
|
||||||
RandomCardEvent cardEvent =(RandomCardEvent) event;
|
RandomCardEvent cardEvent =(RandomCardEvent) event;
|
||||||
if(cardEvent.getType()!=3){
|
if(cardEvent.getType()==0||cardEvent.getType()!=id){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(UserManager.getUser(cardEvent.getUid()).getActivityManager().getActivityMissionMap().get(id)==null){
|
User user = UserManager.getUser(cardEvent.getUid());
|
||||||
|
if(user.getActivityManager().getActivityMissionMap().get(id)==null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<Integer, SLotterySetting> config = STableManager.getConfig(SLotterySetting.class);
|
|
||||||
|
|
||||||
SLotterySetting sLotterySetting = config.get(cardEvent.getType());
|
Map<Integer, Integer> mustAppear = cardEvent.getMustAppear();
|
||||||
|
int allCount = 0;
|
||||||
// if(sLotterySetting.getActivityId()!=id){
|
if(mustAppear.size()>2){
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
int index = 1;
|
||||||
update(UserManager.getUser(cardEvent.getUid()),cardEvent.isMustAppear()?0:1);
|
for(Map.Entry<Integer,Integer> entry:mustAppear.entrySet()){
|
||||||
|
int key = entry.getKey();
|
||||||
|
List<SLotterySpecialConfig> lotterySpecialConfigListByType = SLotterySpecialConfig.getLotteryListByDifferentType(key);
|
||||||
// AbstractRank randomRank= RankContext.getRankEnum(RankEnum.RANDOM_CARD_RANK.getType());
|
if(lotterySpecialConfigListByType==null||lotterySpecialConfigListByType.isEmpty()){
|
||||||
// int scoreById = Double.valueOf(randomRank.getScoreById(((RandomCardEvent) event).getUid(),String.valueOf(id))).intValue();
|
continue;
|
||||||
// if(scoreById==-1){
|
}
|
||||||
// scoreById=0;
|
for(SLotterySpecialConfig config:lotterySpecialConfigListByType){
|
||||||
// }
|
if(config==null||config.getIsNeedShow()==0){
|
||||||
// randomRank.addRank(cardEvent.getUid(),String.valueOf(id),scoreById+cardEvent.getScore());
|
continue;
|
||||||
// Predicate<int[]> pre = a-> (SCHero.getHeroByPieceId(a[0])!=null&&SCHero.getHeroByPieceId(a[0]).getNatural()>=13);
|
}
|
||||||
|
allCount +=entry.getValue()*index;
|
||||||
// Consumer<int[]> consumer = a->RankContext.getRankEnum(RankEnum.RANDOM_CARD_PERFECT_RANK.getType()).addRank(cardEvent.getUid(),String.valueOf(id), TimeUtils.now()/1000,a[0],a[1]);
|
index*=1000;
|
||||||
// Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
}
|
||||||
|
}
|
||||||
|
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||||
|
|
||||||
|
activityMission.setV(allCount);
|
||||||
|
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getCount());
|
||||||
|
|
||||||
}
|
}
|
||||||
// else if(event instanceof RandomMustCardEvent){
|
|
||||||
// RandomMustCardEvent cardEvent =(RandomMustCardEvent) event;
|
|
||||||
// int activityId = sLotterySetting.getActivityId();
|
|
||||||
// if(activityId!=id){
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityEnd() throws Exception {
|
public void onActivityEnd() throws Exception {
|
||||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
// SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
List<SActivityRankingReward> sActivityRankingReward = SActivityRankingReward.getsActivityRankingRewardMapByActivityId(id);
|
// List<SActivityRankingReward> sActivityRankingReward = SActivityRankingReward.getsActivityRankingRewardMapByActivityId(id);
|
||||||
if(null==sActivityRankingReward)
|
// if(null==sActivityRankingReward)
|
||||||
return;
|
// return;
|
||||||
int maxRank = 0;
|
// int maxRank = 0;
|
||||||
int maxRewardId = 0;
|
// int maxRewardId = 0;
|
||||||
Map<Integer, Integer> rank2miss = new HashMap<>();
|
// Map<Integer, Integer> rank2miss = new HashMap<>();
|
||||||
for (SActivityRankingReward sActivityRankingReward1 : sActivityRankingReward) {
|
// for (SActivityRankingReward sActivityRankingReward1 : sActivityRankingReward) {
|
||||||
if(sActivityRankingReward1.getMaxRank()==-1){
|
// if(sActivityRankingReward1.getMaxRank()==-1){
|
||||||
maxRank =-1;
|
// maxRank =-1;
|
||||||
maxRewardId = sActivityRankingReward1.getId();
|
// maxRewardId = sActivityRankingReward1.getId();
|
||||||
continue;
|
// continue;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if(maxRank!=-1)
|
||||||
|
// {
|
||||||
|
// maxRank = Math.max(maxRank, sActivityRankingReward1.getMaxRank());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// for (Integer rank : getRankSet(sActivityRankingReward1.getMinRank(), sActivityRankingReward1.getMaxRank())) {
|
||||||
|
// rank2miss.put(rank, sActivityRankingReward1.getId());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.RANDOM_CARD_RANK, Integer.toString(id), 0, (maxRank==-1?0:maxRank) - 1);
|
||||||
|
// int rank = 1;
|
||||||
|
// int nowTime = (int) (TimeUtils.now() / 1000);
|
||||||
|
// for (ZSetOperations.TypedTuple<String> item : rankInfo) {
|
||||||
|
// String value = item.getValue();
|
||||||
|
// int uid = Integer.parseInt(value);
|
||||||
|
// User user = UserManager.getUser(uid, true);
|
||||||
|
// if (null == user) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||||
|
// if (activityMission == null || activityMission.getOpenType() == 0) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// int missionId;
|
||||||
|
// if (rank2miss.containsKey(rank)) {
|
||||||
|
// missionId = rank2miss.get(rank);
|
||||||
|
// } else {
|
||||||
|
// if (maxRank == -1) {
|
||||||
|
// missionId = maxRewardId;
|
||||||
|
// } else {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //checkAndUpdate value
|
||||||
|
// SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
|
||||||
|
// //sendmail
|
||||||
|
//
|
||||||
|
// String title = SErrorCodeEerverConfig.getI18NMessage("east_fairy_title", new Object[]{sGlobalActivity.getSesc()});
|
||||||
|
// String content = SErrorCodeEerverConfig.getI18NMessage("east_fairy_txt", new Object[]{rank++});
|
||||||
|
// String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||||
|
// MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if(maxRank!=-1)
|
|
||||||
{
|
|
||||||
maxRank = Math.max(maxRank, sActivityRankingReward1.getMaxRank());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Integer rank : getRankSet(sActivityRankingReward1.getMinRank(), sActivityRankingReward1.getMaxRank())) {
|
|
||||||
rank2miss.put(rank, sActivityRankingReward1.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.RANDOM_CARD_RANK, Integer.toString(id), 0, (maxRank==-1?0:maxRank) - 1);
|
|
||||||
int rank = 1;
|
|
||||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
|
||||||
for (ZSetOperations.TypedTuple<String> item : rankInfo) {
|
|
||||||
String value = item.getValue();
|
|
||||||
int uid = Integer.parseInt(value);
|
|
||||||
User user = UserManager.getUser(uid, true);
|
|
||||||
if (null == user) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
|
||||||
if (activityMission == null || activityMission.getOpenType() == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int missionId;
|
|
||||||
if (rank2miss.containsKey(rank)) {
|
|
||||||
missionId = rank2miss.get(rank);
|
|
||||||
} else {
|
|
||||||
if (maxRank == -1) {
|
|
||||||
missionId = maxRewardId;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//checkAndUpdate value
|
|
||||||
SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
|
|
||||||
//sendmail
|
|
||||||
|
|
||||||
String title = SErrorCodeEerverConfig.getI18NMessage("east_fairy_title", new Object[]{sGlobalActivity.getSesc()});
|
|
||||||
String content = SErrorCodeEerverConfig.getI18NMessage("east_fairy_txt", new Object[]{rank++});
|
|
||||||
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
|
||||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
void updateProgressWithUser(User user, ActivityMission activityMission, int count) {
|
|
||||||
if(count==0){
|
|
||||||
activityMission.setV(0);
|
|
||||||
}else{
|
|
||||||
activityMission.setV(activityMission.getV()+count);
|
|
||||||
}
|
|
||||||
super.updateProgressWithUser(user, activityMission, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
|
|
||||||
User user = UserManager.getUser(session.getUid());
|
|
||||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
|
||||||
return sActivityRewardConfig.getValues()[0][0]<=activityMission.getV();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ljsd.jieling.logic.activity.event;
|
package com.ljsd.jieling.logic.activity.event;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lvxinran
|
* @author lvxinran
|
||||||
* @date 2019/11/27
|
* @date 2019/11/27
|
||||||
|
@ -8,11 +10,13 @@ package com.ljsd.jieling.logic.activity.event;
|
||||||
public class RandomCardEvent implements IEvent {
|
public class RandomCardEvent implements IEvent {
|
||||||
private int uid;
|
private int uid;
|
||||||
private int type;
|
private int type;
|
||||||
private boolean mustAppear;
|
private Map<Integer,Integer> mustAppear;
|
||||||
public RandomCardEvent(int uid,int type,boolean mustAppear) {
|
private int count;
|
||||||
|
public RandomCardEvent(int uid,int type,Map<Integer,Integer> mustAppear,int count) {
|
||||||
this.uid = uid;
|
this.uid = uid;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.mustAppear = mustAppear;
|
this.mustAppear = mustAppear;
|
||||||
|
this.count = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getType() {
|
public int getType() {
|
||||||
|
@ -31,11 +35,19 @@ public class RandomCardEvent implements IEvent {
|
||||||
this.uid = uid;
|
this.uid = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMustAppear() {
|
public Map<Integer, Integer> getMustAppear() {
|
||||||
return mustAppear;
|
return mustAppear;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMustAppear(boolean mustAppear) {
|
public void setMustAppear(Map<Integer, Integer> mustAppear) {
|
||||||
this.mustAppear = mustAppear;
|
this.mustAppear = mustAppear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(int count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,6 +253,7 @@ public class HeroLogic{
|
||||||
for(int i = 0;i<tenTimesMustGetItem.length;i++) {
|
for(int i = 0;i<tenTimesMustGetItem.length;i++) {
|
||||||
resultRandom[i+index+1] = tenTimesMustGetItem[i];
|
resultRandom[i+index+1] = tenTimesMustGetItem[i];
|
||||||
}
|
}
|
||||||
|
Poster.getPoster().dispatchEvent(new RandomCardEvent(user.getId(),sLotterySetting.getActivityId(),heroManager.getRandomPoolByType().get(sLotterySetting.getMergePool()),sLotterySetting.getPerCount()));
|
||||||
// //1群英招募
|
// //1群英招募
|
||||||
HeroInfoProto.HeroRandResponse.Builder builder = HeroInfoProto.HeroRandResponse.newBuilder();
|
HeroInfoProto.HeroRandResponse.Builder builder = HeroInfoProto.HeroRandResponse.newBuilder();
|
||||||
if(sLotterySetting.getLotteryType() == 1){
|
if(sLotterySetting.getLotteryType() == 1){
|
||||||
|
@ -364,7 +365,6 @@ public class HeroLogic{
|
||||||
}
|
}
|
||||||
heroManager.updateRandomPoolByType(mergePool,randomPoolByType.get(mergePool));
|
heroManager.updateRandomPoolByType(mergePool,randomPoolByType.get(mergePool));
|
||||||
int result = sLotteryRewardConfig.getId();
|
int result = sLotteryRewardConfig.getId();
|
||||||
Poster.getPoster().dispatchEvent(new RandomCardEvent(user.getId(),sLotterySetting.getLotteryType(),isBestCard));
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -2343,11 +2343,17 @@ public class HeroLogic{
|
||||||
|
|
||||||
heroManager.removeHero(uid,heroId);
|
heroManager.removeHero(uid,heroId);
|
||||||
int[] returnMaterials = sHeroReturn.getRankupReturn();
|
int[] returnMaterials = sHeroReturn.getRankupReturn();
|
||||||
int[][] returnHero = sHeroReturn.getReturnHero();
|
int returnHero = sHeroReturn.getHeroId();
|
||||||
//进阶材料返还乘万分比
|
//进阶材料返还乘万分比
|
||||||
returnMaterials[1]*=(double)returnPercent/10000;
|
returnMaterials[1]*=(double)returnPercent/10000;
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user,new int[][]{returnMaterials}, BIReason.HERO_BACK_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user,new int[][]{returnMaterials}, BIReason.HERO_BACK_REWARD);
|
||||||
ItemUtil.drop(user, returnHero,drop, BIReason.HERO_BACK_REWARD);
|
ItemUtil.drop(user, new int[][]{{returnHero,1}},drop, BIReason.HERO_BACK_REWARD);
|
||||||
|
CommonProto.Hero.Builder heroProto = drop.getHero(0).toBuilder();
|
||||||
|
String createHeroId = heroProto.getId();
|
||||||
|
heroProto.setStar(star);
|
||||||
|
drop.setHero(0,heroProto.build());
|
||||||
|
Hero newHero = user.getHeroManager().getHeroMap().get(createHeroId);
|
||||||
|
newHero.setStar(star);
|
||||||
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsHeroLevlConfigMap().get(hero.getLevel());
|
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsHeroLevlConfigMap().get(hero.getLevel());
|
||||||
int[][] levelUpReturn = sHeroLevlConfig.getSumConsume();
|
int[][] levelUpReturn = sHeroLevlConfig.getSumConsume();
|
||||||
ItemUtil.drop(user, ItemLogic.getInstance().itemReturnPercent(levelUpReturn,returnPercent),drop, BIReason.HERO_BACK_REWARD);
|
ItemUtil.drop(user, ItemLogic.getInstance().itemReturnPercent(levelUpReturn,returnPercent),drop, BIReason.HERO_BACK_REWARD);
|
||||||
|
|
|
@ -365,7 +365,7 @@ public class MissionLoigc {
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||||
// Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
// Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),missionId,GameMisionType.BLOODYMISSION.toString(),rewardGroup);
|
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),missionId,GameMisionType.BLOODYMISSION.toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(type == GameMisionType.VIPMISSION.getType()){ //vip 任务
|
if(type == GameMisionType.VIPMISSION.getType()){ //vip 任务
|
||||||
|
@ -443,7 +443,7 @@ public class MissionLoigc {
|
||||||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,missionId);
|
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,missionId);
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),String.valueOf(missionId),type,missionStateChangeInfos.get(0).getRewwardGroups());
|
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),String.valueOf(missionId),type);
|
||||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class BuyGoodsLogic {
|
||||||
if(isDiscount!=0){
|
if(isDiscount!=0){
|
||||||
price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
|
price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
|
||||||
}
|
}
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.ORDER_COMPLETE.getType(),"",price,"","","","",sRechargeCommodityConfig.getBaseReward());
|
ReportUtil.onReportEvent(user, ReportEventEnum.ORDER_COMPLETE.getType(),"",price,"","","","",String.valueOf(goodsId),sRechargeCommodityConfig.getBaseReward());
|
||||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,System.currentTimeMillis()+"",result.getResultCode(),price*10);
|
// KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,System.currentTimeMillis()+"",result.getResultCode(),price*10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,20 @@ public class SLotterySpecialConfig implements BaseConfig {
|
||||||
|
|
||||||
private int pool_id;
|
private int pool_id;
|
||||||
|
|
||||||
|
private int isNeedShow;
|
||||||
|
|
||||||
|
|
||||||
private static Map<Integer, List<SLotterySpecialConfig>> lotterySpecialConfigMap;
|
private static Map<Integer, List<SLotterySpecialConfig>> lotterySpecialConfigMap;
|
||||||
|
|
||||||
|
private static Map<Integer, List<SLotterySpecialConfig>> lotteryDifferentConfigMap;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
Map<Integer, SLotterySpecialConfig> config = STableManager.getConfig(SLotterySpecialConfig.class);
|
Map<Integer, SLotterySpecialConfig> config = STableManager.getConfig(SLotterySpecialConfig.class);
|
||||||
Map<Integer, List<SLotterySpecialConfig>> lotterySpecialConfigMapTmp = new HashMap<>();
|
Map<Integer, List<SLotterySpecialConfig>> lotterySpecialConfigMapTmp = new HashMap<>();
|
||||||
|
Map<Integer, List<SLotterySpecialConfig>> lotteryDifferentTypeMapTmp = new HashMap<>();
|
||||||
|
|
||||||
for(SLotterySpecialConfig sLotterySpecialConfig : config.values()){
|
for(SLotterySpecialConfig sLotterySpecialConfig : config.values()){
|
||||||
// int differentType = sLotterySpecialConfig.getDifferentType();
|
// int differentType = sLotterySpecialConfig.getDifferentType();
|
||||||
// if(!lotterySpecialConfigMapTmp.containsKey(differentType)){
|
// if(!lotterySpecialConfigMapTmp.containsKey(differentType)){
|
||||||
|
@ -44,15 +50,17 @@ public class SLotterySpecialConfig implements BaseConfig {
|
||||||
// }
|
// }
|
||||||
// lotterySpecialConfigMapTmp.get(differentType).get(type).add(sLotterySpecialConfig);
|
// lotterySpecialConfigMapTmp.get(differentType).get(type).add(sLotterySpecialConfig);
|
||||||
lotterySpecialConfigMapTmp.computeIfAbsent(sLotterySpecialConfig.getType(),n->new ArrayList<>()).add(sLotterySpecialConfig);
|
lotterySpecialConfigMapTmp.computeIfAbsent(sLotterySpecialConfig.getType(),n->new ArrayList<>()).add(sLotterySpecialConfig);
|
||||||
|
lotteryDifferentTypeMapTmp.computeIfAbsent(sLotterySpecialConfig.getDifferentType(),n->new ArrayList<>()).add(sLotterySpecialConfig);
|
||||||
}
|
}
|
||||||
lotterySpecialConfigMap = lotterySpecialConfigMapTmp;
|
lotterySpecialConfigMap = lotterySpecialConfigMapTmp;
|
||||||
|
lotteryDifferentConfigMap = lotteryDifferentTypeMapTmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<SLotterySpecialConfig> getLotterySpecialConfigListByType(int type) {
|
public static List<SLotterySpecialConfig> getLotterySpecialConfigListByType(int type) {
|
||||||
if(!lotterySpecialConfigMap.containsKey(type)){
|
return lotterySpecialConfigMap.getOrDefault(type,null);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
return lotterySpecialConfigMap.get(type);
|
public static List<SLotterySpecialConfig> getLotteryListByDifferentType(int type) {
|
||||||
|
return lotteryDifferentConfigMap.getOrDefault(type,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
@ -82,4 +90,8 @@ public class SLotterySpecialConfig implements BaseConfig {
|
||||||
public int getDifferentType() {
|
public int getDifferentType() {
|
||||||
return differentType;
|
return differentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIsNeedShow() {
|
||||||
|
return isNeedShow;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue