数据上报 ,限时抽卡活动修改
parent
558c784472
commit
0854536e34
|
@ -6,6 +6,8 @@ import com.ljsd.jieling.db.redis.RedisKey;
|
|||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.handler.map.MapLogic;
|
||||
import com.ljsd.jieling.handler.map.MapManager;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
|
@ -177,6 +179,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
.addAllDailyChallengeInfo(playerInfoManager.getDailyPass())
|
||||
.setExpeditionLeve(user.getExpeditionManager().getExpeditionLeve())
|
||||
.build();
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.APP_LOGIN.getType());
|
||||
try {
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ import com.ljsd.jieling.handler.mission.CheckMissionReturn;
|
|||
import com.ljsd.jieling.handler.mission.Mission;
|
||||
import com.ljsd.jieling.ktbeans.KTGameType;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
|
@ -2092,7 +2094,8 @@ public class MapLogic {
|
|||
}
|
||||
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||
|
||||
KtEventUtils.onKtEvent(user,ParamEventBean.UserGameType,KTGameType.STORY.getIndex(),fightId);
|
||||
// KtEventUtils.onKtEvent(user,ParamEventBean.UserGameType,KTGameType.STORY.getIndex(),fightId);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.ENTER_STAGE.getType(),String.valueOf(fightId));
|
||||
user.getTeamPosManager().setCurTeamPosId(teamId);
|
||||
String fightInfo = fightId + "#" + teamId;
|
||||
String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_INFO, String.valueOf(uid), false);
|
||||
|
@ -2143,6 +2146,8 @@ public class MapLogic {
|
|||
// String rankKey = RedisKey.getKey(RedisKey.MAINLEVEL_RANK, "", false);
|
||||
// RedisUtil.getInstence().zsetAddOne(rankKey, String.valueOf(user.getId()), sMainLevelConfig.getVirtureId());
|
||||
RankContext.getRankEnum(RankEnum.MAIN_LEVEL_RANK.getType()).addRank(uid,"",sMainLevelConfig.getVirtureId(),user.getPlayerInfoManager().getMaxForce());
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.PASS_STAGE.getType(),String.valueOf(fightId),"",sMainLevelConfig.getReward());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,40 @@ import java.util.Map;
|
|||
*/
|
||||
public enum ReportEventEnum {
|
||||
|
||||
CREATE_ACCOUNT(1,"create_account", new CommonEventHandler(),new String[]{""});
|
||||
CREATE_ACCOUNT(1,"create_account", new CommonEventHandler(),new String[]{""}),
|
||||
APP_LOGIN(2,"app_login", new CommonEventHandler(),new String[]{""}),
|
||||
CREATE_ROLE(3,"create_role ", new CommonEventHandler(),new String[]{"role_name"}),
|
||||
GUILD(4,"guild", new CommonEventHandler(),new String[]{"step_id","step_name","rewards_list","guild_start_time"}),
|
||||
LEVEL_UP(5,"level_up", new CommonEventHandler(),new String[]{"promotion_level","improved_level"}),
|
||||
MISSION_START(6,"mission_start", new CommonEventHandler(),new String[]{"mission_id","mission_name"}),
|
||||
MISSION_COMPLETE(7,"mission_complete", new CommonEventHandler(),new String[]{"mission_id","mission_name","reward_list","mission_start_time"}),
|
||||
JOIN_ACTIVITY(8,"join_activity", new CommonEventHandler(),new String[]{"activity_id","activity_name"}),
|
||||
COMPLETE_ACTIVITY(9,"complete_activity", new CommonEventHandler(),new String[]{"activity_id","activity_name","reward_list"}),
|
||||
ENTER_STAGE(10,"enter_stage", new CommonEventHandler(),new String[]{"stage_id","stage_name"}),
|
||||
PASS_STAGE(11,"pass_stage", new CommonEventHandler(),new String[]{"stage_id","stage_name"}),
|
||||
GET_HERO(12,"get_hero", new CommonEventHandler(),new String[]{"hero_id","quality","get_type"}),
|
||||
HERO_STRENGTHEN(13,"hero_strengthen", new CommonEventHandler(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list"}),
|
||||
GET_EQUIP(14,"get_equip", new CommonEventHandler(),new String[]{"equip_id","quality","get_type"}),
|
||||
EQUIP_STRENGTHEN(15,"equip_strengthen", new CommonEventHandler(),new String[]{"equip_id","old_quality","new_quality","strengthen_type","cost_item_list"}),
|
||||
GET_ITEM(16,"get_item", new CommonEventHandler(),new String[]{"get_amount","get_entrance","item_id","item_name","price"}),
|
||||
COST_ITEM(17,"cost_item", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance","item_id","item_name"}),
|
||||
GET_COINS(18,"get_coins", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}),
|
||||
COST_COINS(19,"cost_coins", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}),
|
||||
GET_AMULET(20,"get_amulet", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}),
|
||||
COST_AMULET(21,"cost_amulet", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}),
|
||||
GET_DIAMOND(22,"get_diamond", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}),
|
||||
COST_DIAMOND(23,"cost_diamond", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}),
|
||||
CREATE_GUILD(24,"create_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity"}),
|
||||
JOIN_GUILD(25,"join_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}),
|
||||
QUIT_GUILD(26,"quit_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}),
|
||||
CREATE_ORDER(27,"create_order", new CommonEventHandler(),new String[]{"order_id","order_money_amount","Bundle_id","entrance","item_id","item_name","goods_id","item_list"}),
|
||||
ORDER_COMPLETE(28,"order_complete", new CommonEventHandler(),new String[]{"order_id","order_money_amount","Bundle_id","entrance","item_id","item_name","goods_id","item_list"}),
|
||||
CHECK_RANKING(29,"check_ranking", new CommonEventHandler(),new String[]{"ranking_type"}),
|
||||
ASK_FOR_BEING_FRIENDS(30,"ask_for_being_friends", new CommonEventHandler(),new String[]{"target_id","target_name","target_level","entrance"}),
|
||||
ALLOW_FRIENDS_ASK(31,"allow_friends_ask", new CommonEventHandler(),new String[]{"target_id","target_name","target_level","entrance"}),
|
||||
SEND_MESSAGE(32,"send_message", new CommonEventHandler(),new String[]{"message_type","message_content"}),
|
||||
OPEN_MAIL(33,"open_mail", new CommonEventHandler(),new String[]{""});
|
||||
|
||||
|
||||
private int type;
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ public class CommonEventHandler implements IReportEvent {
|
|||
return null;
|
||||
}
|
||||
String[] paramName= eventEnum.getParam();
|
||||
if(param.length!=paramName.length){
|
||||
return null;
|
||||
}
|
||||
for(int i = 0 ; i <param.length;i++){
|
||||
int length = Math.min(paramName.length,param.length);
|
||||
for(int i = 0 ; i <length;i++){
|
||||
resultMap.put(paramName[i],param[i]);
|
||||
}
|
||||
return resultMap;
|
||||
|
|
|
@ -6,6 +6,8 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.jbean.*;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.ActivityStateChangeEvent;
|
||||
|
@ -161,7 +163,8 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
sendActivityProgress(session, activityMission, Collections.singleton(missionId));
|
||||
}
|
||||
}
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserActivityEvent, id, missionId);
|
||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserActivityEvent, id, missionId);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.COMPLETE_ACTIVITY.getType(),String.valueOf(id),String.valueOf(missionId),reward);
|
||||
PlayerInfoProto.TakeActivityRewardResponse build = PlayerInfoProto.TakeActivityRewardResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
||||
return true;
|
||||
|
|
|
@ -13,6 +13,8 @@ import com.ljsd.jieling.jbean.ActivityManager;
|
|||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
||||
import com.ljsd.jieling.jbean.LuckWheelMission;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
|
@ -320,6 +322,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
|
||||
abstractActivity.initActivity(user);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(openActivityId));
|
||||
int activityOpenState = getActivityOpenState(user, openActivityId);
|
||||
abstractActivity.setOpenState(user,activityOpenState);
|
||||
if(activityOpenState == ActivityType.UNOPEN_STATE){
|
||||
|
@ -362,6 +365,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
if (null==abstractActivity) {
|
||||
continue;
|
||||
}
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.JOIN_ACTIVITY.getType(),String.valueOf(activityId));
|
||||
abstractActivity.initActivity(user);
|
||||
// if(!initOtherActivity(user, sGlobalActivity)){
|
||||
initAllActivityMission(activityManager.getActivityMissionMap(),activityId);
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
|||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.RandomCardEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.RandomMustCardEvent;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
|
@ -18,6 +19,7 @@ import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
|||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import config.*;
|
||||
import manager.STableManager;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import util.TimeUtils;
|
||||
|
||||
|
@ -38,6 +40,7 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
|||
public LimitRandomCardActivity(int id) {
|
||||
super(id);
|
||||
Poster.getPoster().listenEvent(this,RandomCardEvent.class);
|
||||
Poster.getPoster().listenEvent(this, RandomMustCardEvent.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,27 +50,37 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
|||
|
||||
@Override
|
||||
public void onEvent(IEvent event) throws Exception {
|
||||
if(! (event instanceof RandomCardEvent) ){
|
||||
return;
|
||||
}
|
||||
RandomCardEvent cardEvent =(RandomCardEvent) event;
|
||||
if(cardEvent.getType()!=3){
|
||||
return;
|
||||
}
|
||||
if(UserManager.getUser(cardEvent.getUid()).getActivityManager().getActivityMissionMap().get(id)==null){
|
||||
return;
|
||||
}
|
||||
AbstractRank randomRank= RankContext.getRankEnum(RankEnum.RANDOM_CARD_RANK.getType());
|
||||
int scoreById = Double.valueOf(randomRank.getScoreById(((RandomCardEvent) event).getUid(),String.valueOf(id))).intValue();
|
||||
if(scoreById==-1){
|
||||
scoreById=0;
|
||||
}
|
||||
randomRank.addRank(cardEvent.getUid(),String.valueOf(id),scoreById+cardEvent.getScore());
|
||||
Predicate<int[]> pre = a-> (SCHero.getHeroByPieceId(a[0])!=null&&SCHero.getHeroByPieceId(a[0]).getNatural()>=13);
|
||||
if(event instanceof RandomCardEvent){
|
||||
RandomCardEvent cardEvent =(RandomCardEvent) event;
|
||||
if(cardEvent.getType()!=3){
|
||||
return;
|
||||
}
|
||||
if(UserManager.getUser(cardEvent.getUid()).getActivityManager().getActivityMissionMap().get(id)==null){
|
||||
return;
|
||||
}
|
||||
AbstractRank randomRank= RankContext.getRankEnum(RankEnum.RANDOM_CARD_RANK.getType());
|
||||
int scoreById = Double.valueOf(randomRank.getScoreById(((RandomCardEvent) event).getUid(),String.valueOf(id))).intValue();
|
||||
if(scoreById==-1){
|
||||
scoreById=0;
|
||||
}
|
||||
randomRank.addRank(cardEvent.getUid(),String.valueOf(id),scoreById+cardEvent.getScore());
|
||||
Predicate<int[]> pre = a-> (SCHero.getHeroByPieceId(a[0])!=null&&SCHero.getHeroByPieceId(a[0]).getNatural()>=13);
|
||||
|
||||
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]);
|
||||
Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
||||
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getScore());
|
||||
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]);
|
||||
Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
||||
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getScore());
|
||||
}else if(event instanceof RandomMustCardEvent){
|
||||
RandomMustCardEvent cardEvent =(RandomMustCardEvent) event;
|
||||
Map<Integer, SLotterySetting> config = STableManager.getConfig(SLotterySetting.class);
|
||||
SLotterySetting sLotterySetting = config.get(cardEvent.getType());
|
||||
int activityId = sLotterySetting.getActivityId();
|
||||
if(activityId!=id){
|
||||
return;
|
||||
}
|
||||
Map<Integer, ActivityMission> activityMissionMap = UserManager.getUser(cardEvent.getUid()).getActivityManager().getActivityMissionMap();
|
||||
ActivityMission activityMission = activityMissionMap.get(id);
|
||||
activityMission.setV(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -135,11 +148,7 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
|||
|
||||
@Override
|
||||
void updateProgressWithUser(User user, ActivityMission activityMission, int count) {
|
||||
//150分赠一次
|
||||
// int[] onceArrayValue = SSpecialConfig.getOnceArrayValue(SSpecialConfig.TIME_LIMIT_RECRUITMENT_FREEINTEGRAL);
|
||||
// if((activityMission.getV()+count)/onceArrayValue[0]-activityMission.getV()/onceArrayValue[0]>0){
|
||||
// user.getPlayerInfoManager().updateVipPrivilage(onceArrayValue[1],-1);
|
||||
// }
|
||||
super.updateProgressWithUser(user, activityMission, count);
|
||||
activityMission.setV(activityMission.getV()+count);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package com.ljsd.jieling.logic.activity.event;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/8
|
||||
* @discribe
|
||||
*/
|
||||
public class RandomMustCardEvent implements IEvent {
|
||||
private int type;
|
||||
|
||||
private int uid;
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public RandomMustCardEvent(int type, int uid) {
|
||||
this.type = type;
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
|
@ -12,6 +12,8 @@ import com.ljsd.jieling.exception.ErrorCodeException;
|
|||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.HeroFiveStarGetEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.LeveGiftEventHander;
|
||||
|
@ -360,7 +362,6 @@ public class HeroLogic{
|
|||
}
|
||||
heroManager.updateRandomPoolByType(mergePool,randomPoolByType.get(mergePool));
|
||||
int result = sLotteryRewardConfig.getId();
|
||||
System.out.print(result+"、");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -884,6 +885,7 @@ public class HeroLogic{
|
|||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_hero_content", new Object[]{user.getPlayerInfoManager().getNickName(), scHero.getReadingName(),targetHero.getStar()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.DILIGENT,targetHero.getTemplateId(),0,0,0,0,0);
|
||||
}
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.HERO_STRENGTHEN.getType(),String.valueOf(targetHero.getTemplateId()),String.valueOf(oldStar),String.valueOf(targetHero.getStar()),"");
|
||||
}
|
||||
private void rankUpHeroExecute(Hero hero,int starCount,int unlockEspecialEquipStar) throws Exception {
|
||||
//是否解锁法宝
|
||||
|
|
|
@ -11,6 +11,8 @@ import com.ljsd.jieling.handler.map.MapLogic;
|
|||
import com.ljsd.jieling.handler.map.MapMission;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.logic.activity.event.MissingRoomBestEvent;
|
||||
|
@ -361,8 +363,9 @@ public class MissionLoigc {
|
|||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{rewardGroup}, 1.0f, 0, BIReason.TAKE_MISSION_REWARD);
|
||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
// Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),missionId,GameMisionType.BLOODYMISSION.toString(),rewardGroup);
|
||||
return;
|
||||
}
|
||||
if(type == GameMisionType.VIPMISSION.getType()){ //vip 任务
|
||||
|
@ -440,10 +443,11 @@ public class MissionLoigc {
|
|||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,missionId);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),String.valueOf(missionId),type,missionStateChangeInfos.get(0).getRewwardGroups());
|
||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
// Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
}else{
|
||||
//MessageUtil.sendErrorResponse(session,0, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,"mission can not get reward");
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("mission can not get reward"));
|
||||
|
|
|
@ -16,6 +16,8 @@ import com.ljsd.jieling.handler.map.MapManager;
|
|||
import com.ljsd.jieling.handler.map.TemporaryItems;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
|
@ -202,7 +204,7 @@ public class ItemUtil {
|
|||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static CommonProto.Drop.Builder drop(User user, int[] dropGroupIds,float dropRatio, int isMapping,int reason) throws Exception {
|
||||
public static CommonProto.Drop.Builder drop(User user, int[] dropGroupIds,float dropRatio, int isMapping,int reason) throws Exception {
|
||||
CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
|
||||
Map<Integer, Integer> itemMap = new HashMap<>();
|
||||
Map<Integer, Integer> cardMap = new HashMap<>();
|
||||
|
@ -674,6 +676,7 @@ public class ItemUtil {
|
|||
}
|
||||
playerInfoManager.setExp(curExp);
|
||||
if (playerInfoManager.getLevel() > oldLevel) {
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.LEVEL_UP.getType(),1,playerInfoManager.getLevel());
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.USER_LEVELUP,oldLevel+1,playerInfoManager.getLevel());
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1132,8 @@ public class ItemUtil {
|
|||
if(SItem.getsItemMap().get(scHero.getId()).getQuantity()>=5)
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(),scHero.getStar()));
|
||||
}
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserItemEvent,reason,GlobalsDef.addReason,cardId,1,heroStar[1]);
|
||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserItemEvent,reason,GlobalsDef.addReason,cardId,1,heroStar[1]);
|
||||
ReportUtil.onReportEvent(user,ReportEventEnum.GET_HERO.getType(),String.valueOf(cardId),String.valueOf(hero.getStar()),String.valueOf(reason));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue