活动抽卡埋点,升星埋点修改,灵兽升级修改
parent
c96a16f112
commit
09d9d1d536
|
@ -24,7 +24,7 @@ public enum ReportEventEnum {
|
|||
ENTER_STAGE(10,"enter_stage", new CommonEventHandler(),new String[]{"stage_id","stage_name"}),
|
||||
PASS_STAGE(11,"pass_stage", new PassStageEventHandler(),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"}),
|
||||
HERO_STRENGTHEN(13,"hero_strengthen", new CommonEventHandler(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list","cost_hero_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"}),
|
||||
|
@ -80,6 +80,8 @@ public enum ReportEventEnum {
|
|||
TREASURE_COMPOSITION(54,"treasure_composition",new CommonEventHandler(),new String[]{"hero_id","item_level","reward_list","reward_nums_list"}),
|
||||
|
||||
LEAVE_PANOPTIC_MIRROR(55,"leave_panoptic_mirror",new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}),
|
||||
TIME_SUMMON(56,"Time_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}),
|
||||
FATALITY_SUMMON(57,"fatality_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}),
|
||||
|
||||
VIP_LEVEL_UP(100,"", new VipLevelUpEventHandler(),new String[]{""});
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.ljsd.jieling.globals.Global;
|
|||
import com.ljsd.jieling.globals.GlobalItemType;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.HeroFiveStarGetEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.LeveGiftEventHander;
|
||||
|
@ -350,6 +351,7 @@ public class HeroLogic{
|
|||
private void reportRandom(User user,SLotterySetting sLotterySetting,int[][] resultRandom,int[] costItem) {
|
||||
int lotteryType = sLotterySetting.getLotteryType();
|
||||
ReportEventEnum eventEnum = null;
|
||||
int activityId = 0;
|
||||
switch (lotteryType) {
|
||||
case 5:
|
||||
eventEnum = ReportEventEnum.NORMAL_SUMMON;
|
||||
|
@ -360,6 +362,15 @@ public class HeroLogic{
|
|||
case 1:
|
||||
eventEnum = ReportEventEnum.GODS_SUMMON;
|
||||
break;
|
||||
case 3:
|
||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(sLotterySetting.getActivityId());
|
||||
if(activity.getType()== ActivityType.LIMIT_RANDOM_CARD){
|
||||
eventEnum = ReportEventEnum.TIME_SUMMON;
|
||||
}else if (activity.getType()==ActivityType.BEAUTY_BAG){
|
||||
eventEnum = ReportEventEnum.FATALITY_SUMMON;
|
||||
}
|
||||
activityId = sLotterySetting.getActivityId();
|
||||
break;
|
||||
case 2:
|
||||
eventEnum = ReportEventEnum.SUMMON_HERO;
|
||||
default:
|
||||
|
@ -387,11 +398,11 @@ public class HeroLogic{
|
|||
}
|
||||
}
|
||||
if (costItem.length == 1) {
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), "", String.valueOf(sLotterySetting.getPerCount()), String.valueOf(costItem[0]), 0, result);
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), activityId==0?"":activityId, String.valueOf(sLotterySetting.getPerCount()), String.valueOf(costItem[0]), 0, result);
|
||||
} else if (costItem.length >= 2) {
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), "", String.valueOf(sLotterySetting.getPerCount()), String.valueOf(costItem[0]), costItem[1], result);
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), activityId==0?"":activityId, String.valueOf(sLotterySetting.getPerCount()), String.valueOf(costItem[0]), costItem[1], result);
|
||||
} else {
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), "", String.valueOf(sLotterySetting.getPerCount()), "", "", result);
|
||||
ReportUtil.onReportEvent(user, eventEnum.getType(), activityId==0?"":activityId, String.valueOf(sLotterySetting.getPerCount()), "", "", result);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -919,6 +930,7 @@ public class HeroLogic{
|
|||
}
|
||||
}
|
||||
|
||||
StringBuilder reportConsumeHero = new StringBuilder();
|
||||
for(HeroInfoProto.ConsumeMaterial consumeMaterial1 : consumeMaterialsList){
|
||||
int position = consumeMaterial1.getPosition();
|
||||
SCHero.ConsumeMaterialInfo consumeMaterialInfo = consumeMaterialInfoByPosition.get(position);
|
||||
|
@ -935,6 +947,11 @@ public class HeroLogic{
|
|||
if( null == hero ){
|
||||
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
|
||||
}
|
||||
//上报消耗的英雄数据
|
||||
if(reportConsumeHero.length()>0){
|
||||
reportConsumeHero.append("|");
|
||||
}
|
||||
reportConsumeHero.append(hero.getTemplateId()).append("#lv.").append(hero.getLevel()).append("#star.").append(hero.getStar());
|
||||
|
||||
|
||||
if( 1 == isSame) {
|
||||
|
@ -1013,7 +1030,8 @@ 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()),"");
|
||||
String consume = StringUtil.parseArrayToString(consumeMaterial);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.HERO_STRENGTHEN.getType(),String.valueOf(targetHero.getTemplateId()),String.valueOf(oldStar),String.valueOf(targetHero.getStar()),consume,reportConsumeHero.toString());
|
||||
}
|
||||
private void rankUpHeroExecute(Hero hero)throws Exception {
|
||||
//是否解锁法宝
|
||||
|
@ -3030,6 +3048,12 @@ public class HeroLogic{
|
|||
}
|
||||
boolean b = ItemUtil.checkCost(user, costMap);
|
||||
if(!b){
|
||||
//把多的这一次减下去
|
||||
if(consume!=null&&consume.length>0) {
|
||||
for(int[] consumeOne:consume){
|
||||
costMap.put(consumeOne[0],costMap.getOrDefault(consumeOne[0],0)-consumeOne[1]);
|
||||
}
|
||||
}
|
||||
finalLevel = i;
|
||||
break;
|
||||
}
|
||||
|
@ -3037,8 +3061,10 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
ItemUtil.itemCost(user,costMap,BIReason.SPECIAL_LEVEL_UP_CONSUME,1);
|
||||
boolean itemCost = ItemUtil.itemCost(user, costMap, BIReason.SPECIAL_LEVEL_UP_CONSUME, 1);
|
||||
if(!itemCost){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
pokemonManager.updatePokemonLevel(pokemonId,finalLevel);
|
||||
|
||||
if(pokemonManager.getPokemonTeamMap().containsValue(pokemonId)){
|
||||
|
|
Loading…
Reference in New Issue