diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/JourneyMap.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/JourneyMap.java index ae5045320..2d81730a6 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/JourneyMap.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/JourneyMap.java @@ -4,6 +4,8 @@ import com.ljsd.jieling.core.GlobalsDef; import com.ljsd.jieling.exception.ErrorCode; import com.ljsd.jieling.exception.ErrorCodeException; import com.ljsd.jieling.globals.BIReason; +import com.ljsd.jieling.ktbeans.ReportEventEnum; +import com.ljsd.jieling.ktbeans.ReportUtil; import com.ljsd.jieling.logic.dao.UserManager; import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.fight.FightDispatcher; @@ -268,7 +270,9 @@ public class JourneyMap { } /** + * 逍遥游 * 投骰子,进行游历 + * 0、普通节点 1、奖励节点 2、双倍节点 3、额外骰子节点 4、招募英雄节点 5、怪物节点 6、转盘 7、最终奖励 * @param session * @param messageType */ @@ -308,13 +312,15 @@ public class JourneyMap { //取总点数和最大格子数,算出走的步数 diceAmount =Math.min(diceAmount,pathInfo.getAllPathInfo().length-pathInfo.getCurrentPath()); + // 服务器调试,一次走一格 // diceAmount = 1; +// randomNum.clear(); +// randomNum.add(1); + if(diceAmount==0){ throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE); } -// randomNum.clear(); -// randomNum.add(1); pathInfo.setCurrentPath(pathInfo.getCurrentPath()+diceAmount); Path arrivePath = pathInfo.getAllPathInfo()[pathInfo.getCurrentPath() - 1]; int mapPointId = arrivePath.getMapPointId(); @@ -444,6 +450,16 @@ public class JourneyMap { break; } builder.setPathType(pathType); + + // 逍遥游仙缘埋点 + if (pathType == 4 || pathType == 5 || pathType == 6){ + ReportUtil.onReportEvent(user, ReportEventEnum.START_IMMORTAL_BOOD.getType(), pathType, mapId); + } + // 逍遥游最终奖励埋点 + if (pathType == 7){ + ReportUtil.onReportEvent(user, ReportEventEnum.COMPLETE_TRAVEL.getType(), pathType, mapId); + } + } drop = ItemUtil.drop(user,commonRewardArray,1,0, BIReason.JOURNEY_COMMON_REWARD); @@ -513,10 +529,15 @@ public class JourneyMap { int[] checkResult = fightResult.getCheckResult(); MapInfoProto.JourneyFightResponse.Builder response =MapInfoProto.JourneyFightResponse.newBuilder(); + String combat_results = "失败"; + if(checkResult[0]==1){ CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{monster.getReward()}, 1, 0, BIReason.JOURNEY_FIGHT_REWARD); response.setDrop(drop); pathInfo.removeMonster(bossIndex); + + // 埋点数据 + combat_results = "成功"; }else if(checkResult[0]==0){ long allHp = 0; for(int i = 2;i dropResult){ + List list = drop.build().getItemlistList(); + for (int i = 0; i < list.size(); i++) { + String str = list.get(i).getItemId() + "#" + list.get(i).getItemNum(); + dropResult.add(str); + } + } } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/SituationLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/SituationLogic.java index f9504a597..a37b10a09 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/SituationLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/SituationLogic.java @@ -9,6 +9,8 @@ import com.ljsd.jieling.exception.ErrorCode; 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.dao.PlayerManager; import com.ljsd.jieling.logic.dao.TeamPosHeroInfo; import com.ljsd.jieling.logic.dao.UserManager; @@ -195,6 +197,10 @@ public class SituationLogic { throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE); } + // 埋点用的 + List dropResult = new ArrayList<>(); + String combat_results = "失败"; + boolean consumeCount = false; if(type==2){ if(!situationPass.containsKey(sRaceTowerConfig.getType())||situationPass.get(sRaceTowerConfig.getType())0){ CommonProto.Drop.Builder drop = ItemUtil.drop(user, sRaceTowerConfig.getFirstReward(), 1, 0, BIReason.SITUATION_CHALLENGE_REWARD); builder.setDrop(drop); + + // 埋点用的 + ReportUtil.dropToString(drop,dropResult); + combat_results = "成功"; + situationPass.put(sRaceTowerConfig.getType(),id); playerInfoManager.updateSituationPass(situationPass); AbstractRank rankEnum = RankContext.getRankEnum(RankEnum.SITUATION_RANK.getType()); @@ -273,6 +288,9 @@ public class SituationLogic { throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE); } } + // 埋点报送 + ReportUtil.onReportEvent(user, ReportEventEnum.START_SKY_REALM.getType(), sRaceTowerConfig.getType(),id,combat_results,dropResult); + // user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType()); MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build()); }