From 4e6d89c0621395d1a1c850d10b8eac4cf57afb53 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Tue, 29 Dec 2020 10:36:14 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=89=93=E7=82=B9=E5=8D=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/ktbeans/ReportEventEnum.java | 116 +++++++++--------- .../reportEvent/CommonEventHandler.java | 11 ++ 2 files changed, 69 insertions(+), 58 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java index d76907821..b0e404568 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java @@ -15,85 +15,85 @@ public enum ReportEventEnum { CREATE_ACCOUNT(1,"create_account", new CreateRoleEventHandler(),new String[]{""}), APP_LOGIN(2,"app_login", new LoginEventHandler(),new String[]{""}), CREATE_ROLE(3,"create_role", new CreateRoleEventHandler(),new String[]{"role_name"}), -// GUIDE(4,"guide", new CommonEventHandler(),new String[]{"step_id"}), +// GUIDE(4,"guide", CommonEventHandler.getInstance(),new String[]{"step_id"}), LEVEL_UP(5,"level_up", new UserLevelUpEventHandler(),new String[]{"level","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","mission_id","rewards_id_list","rewards_num_list","take_time"}), - ENTER_STAGE(10,"enter_stage", new CommonEventHandler(),new String[]{"stage_id","stage_name"}), + MISSION_START(6,"mission_start", CommonEventHandler.getInstance(),new String[]{"mission_id","mission_name"}), + MISSION_COMPLETE(7,"mission_complete", CommonEventHandler.getInstance(),new String[]{"mission_id","mission_name","reward_list","mission_start_time"}), + JOIN_ACTIVITY(8,"join_activity", CommonEventHandler.getInstance(),new String[]{"activity_id","activity_name"}), + COMPLETE_ACTIVITY(9,"complete_activity", CommonEventHandler.getInstance(),new String[]{"activity_id","mission_id","rewards_id_list","rewards_num_list","take_time"}), + ENTER_STAGE(10,"enter_stage", CommonEventHandler.getInstance(),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","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"}), - 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"}), + GET_HERO(12,"get_hero", CommonEventHandler.getInstance(),new String[]{"hero_id","quality","get_type"}), + HERO_STRENGTHEN(13,"hero_strengthen", CommonEventHandler.getInstance(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list","cost_hero_list"}), + GET_EQUIP(14,"get_equip", CommonEventHandler.getInstance(),new String[]{"equip_id","quality","get_type"}), + EQUIP_STRENGTHEN(15,"equip_strengthen", CommonEventHandler.getInstance(),new String[]{"equip_id","old_quality","new_quality","strengthen_type","cost_item_list"}), + GET_ITEM(16,"get_item", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","item_id","item_name","price"}), + COST_ITEM(17,"cost_item", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance","item_id","item_name"}), + GET_COINS(18,"get_coins", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_COINS(19,"cost_coins", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + GET_AMULET(20,"get_amulet", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_AMULET(21,"cost_amulet", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + GET_DIAMOND(22,"get_diamond", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_DIAMOND(23,"cost_diamond", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + CREATE_GUILD(24,"create_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity"}), + JOIN_GUILD(25,"join_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), + QUIT_GUILD(26,"quit_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), + CREATE_ORDER(27,"create_order", CommonEventHandler.getInstance(),new String[]{"order_id","order_money_amount","Bundle_id","entrance","item_id","item_name","goods_id","item_list"}), ORDER_COMPLETE(28,"order_complete", new ChargeAmountEventHandler(),new String[]{"order_id","order_money_amount","Bundle_id","channel_id","server_id","goods_id","goods_name","rewards_id_list","rewards_num_list","charge_time","device_id"}), - 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","send_time"}), - OPEN_MAIL(33,"open_mail", new CommonEventHandler(),new String[]{""}), + CHECK_RANKING(29,"check_ranking", CommonEventHandler.getInstance(),new String[]{"ranking_type"}), + ASK_FOR_BEING_FRIENDS(30,"ask_for_being_friends", CommonEventHandler.getInstance(),new String[]{"target_id","target_name","target_level","entrance"}), + ALLOW_FRIENDS_ASK(31,"allow_friends_ask", CommonEventHandler.getInstance(),new String[]{"target_id","target_name","target_level","entrance"}), + SEND_MESSAGE(32,"send_message", CommonEventHandler.getInstance(),new String[]{"message_type","message_content","send_time"}), + OPEN_MAIL(33,"open_mail", CommonEventHandler.getInstance(),new String[]{""}), //-------新一期 - COMPLETE_DAILY_DUNGEON(35,"complete_daily_dungeon", new CommonEventHandler(),new String[]{"stage_id","stage_type","enemy_id","enemy_capacity","start_time","enemy_hero_list","left_challenge_nums","rewards_id_list","rewards_num_list","pass_type","Combat_results"}), + COMPLETE_DAILY_DUNGEON(35,"complete_daily_dungeon", CommonEventHandler.getInstance(),new String[]{"stage_id","stage_type","enemy_id","enemy_capacity","start_time","enemy_hero_list","left_challenge_nums","rewards_id_list","rewards_num_list","pass_type","Combat_results"}), - COMPLETE_XINMO(37,"complete_xinmo", new CommonEventHandler(),new String[]{"stage_id","enemy_id","enemy_capacity","start_time","enemy_hero_list","rewards_id_list","rewards_num_list","Combat_results"}), + COMPLETE_XINMO(37,"complete_xinmo", CommonEventHandler.getInstance(),new String[]{"stage_id","enemy_id","enemy_capacity","start_time","enemy_hero_list","rewards_id_list","rewards_num_list","Combat_results"}), - COMPLETE_CHECHI(39,"start_chechi", new CommonEventHandler(),new String[]{"stage_id","stage_type","Integral_entrance","Integral"}), + COMPLETE_CHECHI(39,"start_chechi", CommonEventHandler.getInstance(),new String[]{"stage_id","stage_type","Integral_entrance","Integral"}), - START_PANOPTIC_MIRROR(40,"start_panoptic_mirror",new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}), + START_PANOPTIC_MIRROR(40,"start_panoptic_mirror",CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), - CHALLENGE_PANOPTIC_MIRROR_ENEMY(41,"challenge_panoptic_mirror_enemy", new CommonEventHandler(),new String[]{"Panoptic_Mirror_id","battle_result","hero_id"}), + CHALLENGE_PANOPTIC_MIRROR_ENEMY(41,"challenge_panoptic_mirror_enemy", CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id","battle_result","hero_id"}), - COMPLETE_PANOPTIC_MIRROR(42,"complete_panoptic_mirror", new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}), + COMPLETE_PANOPTIC_MIRROR(42,"complete_panoptic_mirror", CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), - EQUIP_SYNTHESIS(43,"equip_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), + EQUIP_SYNTHESIS(43,"equip_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), - TREASURE_SYNTHESIS(44,"treasure_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), + TREASURE_SYNTHESIS(44,"treasure_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), - FATALITY_SYNTHESIS(45,"fatality_synthesis", new CommonEventHandler(),new String[]{"item_id","item_name","cost_item_id"}), - NORMAL_SUMMON(46,"Normal_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FATALITY_SYNTHESIS(45,"fatality_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id","item_name","cost_item_id"}), + NORMAL_SUMMON(46,"Normal_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - FRIENDSHIP_SUMMON(47,"friendship_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FRIENDSHIP_SUMMON(47,"friendship_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - GODS_SUMMON(48,"gods_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + GODS_SUMMON(48,"gods_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - SUMMON_HERO(49,"summon_hero", new CommonEventHandler(),new String[]{"item_id","hero_group","get_amount"}),//四元阵 + SUMMON_HERO(49,"summon_hero", CommonEventHandler.getInstance(),new String[]{"item_id","hero_group","get_amount"}),//四元阵 - HERO_COMPOSITION(50,"hero_composition", new CommonEventHandler(),new String[]{"hero_id","hero_level","hero_quality","reward_list","reward_nums_list"}), + HERO_COMPOSITION(50,"hero_composition", CommonEventHandler.getInstance(),new String[]{"hero_id","hero_level","hero_quality","reward_list","reward_nums_list"}), - SEND_HERO(51,"send_hero", new CommonEventHandler(),new String[]{"hero_id","hero_level_list","hero_quality_list","reward_list","reward_nums_list"}), - TREASURE_DECOMPOSITION(52,"treasure_decomposition", new CommonEventHandler(),new String[]{"cost_item_list","reward_list","reward_nums_list"}), + SEND_HERO(51,"send_hero", CommonEventHandler.getInstance(),new String[]{"hero_id","hero_level_list","hero_quality_list","reward_list","reward_nums_list"}), + TREASURE_DECOMPOSITION(52,"treasure_decomposition", CommonEventHandler.getInstance(),new String[]{"cost_item_list","reward_list","reward_nums_list"}), - START_TIANGONG(53,"start_tiangong",new CommonEventHandler(),new String[]{"stage_level","stage_id","stage_type","Combat_results","rewards_id_list","rewards_num_list"}), - TREASURE_COMPOSITION(54,"treasure_composition",new CommonEventHandler(),new String[]{"hero_id","item_level","reward_list","reward_nums_list"}), + START_TIANGONG(53,"start_tiangong",CommonEventHandler.getInstance(),new String[]{"stage_level","stage_id","stage_type","Combat_results","rewards_id_list","rewards_num_list"}), + TREASURE_COMPOSITION(54,"treasure_composition",CommonEventHandler.getInstance(),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"}), - GET_BEAST(58,"get_beast",new CommonEventHandler(),new String[]{"beast_id","quality","get_type"}), - BEAST_LEVEL(59,"beast_level",new CommonEventHandler(),new String[]{"beast_id","old_level","new_level","cost_item_list_info"}), - BEAST_STAR(60,"beast_star",new CommonEventHandler(),new String[]{"beast_id","old_star","new_star","cost_item_list","cost_beast_list"}), - BEAST_SUMMON(61,"beast_summon",new CommonEventHandler(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), - BEAST_CABINET(62,"beast_cabinet",new CommonEventHandler(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), - GUESSING(63,"guessing",new CommonEventHandler(),new String[]{"season_id","guessing_type","stake_type","stake_num"}), + LEAVE_PANOPTIC_MIRROR(55,"leave_panoptic_mirror",CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), + TIME_SUMMON(56,"Time_summon",CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FATALITY_SUMMON(57,"fatality_summon",CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + GET_BEAST(58,"get_beast",CommonEventHandler.getInstance(),new String[]{"beast_id","quality","get_type"}), + BEAST_LEVEL(59,"beast_level",CommonEventHandler.getInstance(),new String[]{"beast_id","old_level","new_level","cost_item_list_info"}), + BEAST_STAR(60,"beast_star",CommonEventHandler.getInstance(),new String[]{"beast_id","old_star","new_star","cost_item_list","cost_beast_list"}), + BEAST_SUMMON(61,"beast_summon",CommonEventHandler.getInstance(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), + BEAST_CABINET(62,"beast_cabinet",CommonEventHandler.getInstance(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), + GUESSING(63,"guessing",CommonEventHandler.getInstance(),new String[]{"season_id","guessing_type","stake_type","stake_num"}), - GUESS_OVER(64,"guess_over",new CommonEventHandler(),new String[]{"season_id","guessing_type","stake_type","rewards_num"}), + GUESS_OVER(64,"guess_over",CommonEventHandler.getInstance(),new String[]{"season_id","guessing_type","stake_type","rewards_num"}), - GET_TREASURE(65,"get_treasure",new CommonEventHandler(),new String[]{"treasure_id","get_entrance"}), - ARENA_CHALLENGE(66,"arena_challenge",new CommonEventHandler(),new String[]{"battle_result","own_integral_num","rewards_num","own_new_integral_num","own_ranking","role_id","enemy_integral_num","new_enemy_integral_num","enemy_ranking","hero1","hero2","hero3","hero4","hero5","hero6","attack_pokemon","defend_hero1","defend_hero2","defend_hero3","defend_hero4","defend_hero5","defend_hero6","defend_pokemon"}), - CEREMONY(67,"ceremony",new CommonEventHandler(),new String[]{"cost_item_id","integral_num","new_integral_num","own_ranking","guild_ranking"}), + GET_TREASURE(65,"get_treasure",CommonEventHandler.getInstance(),new String[]{"treasure_id","get_entrance"}), + ARENA_CHALLENGE(66,"arena_challenge",CommonEventHandler.getInstance(),new String[]{"battle_result","own_integral_num","rewards_num","own_new_integral_num","own_ranking","role_id","enemy_integral_num","new_enemy_integral_num","enemy_ranking","hero1","hero2","hero3","hero4","hero5","hero6","attack_pokemon","defend_hero1","defend_hero2","defend_hero3","defend_hero4","defend_hero5","defend_hero6","defend_pokemon"}), + CEREMONY(67,"ceremony",CommonEventHandler.getInstance(),new String[]{"cost_item_id","integral_num","new_integral_num","own_ranking","guild_ranking"}), VIP_LEVEL_UP(100,"", new VipLevelUpEventHandler(),new String[]{""}); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java index d29c32474..bed053abb 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java @@ -13,6 +13,17 @@ import java.util.Map; * @discribe */ public class CommonEventHandler implements IReportEvent { + + public CommonEventHandler() { + } + + public static CommonEventHandler getInstance() { + return Instance.instance; + } + + public static class Instance { + public final static CommonEventHandler instance = new CommonEventHandler(); + } @Override public Map getEventProperties(ReportEventEnum eventEnum, Object... param) { Map resultMap = new HashMap<>(); From 5037916fd5cec4764bc675137722a84c276652c9 Mon Sep 17 00:00:00 2001 From: duhui Date: Tue, 29 Dec 2020 14:03:18 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=96=B0=E5=B0=86=E6=9D=A5=E8=A2=AD?= =?UTF-8?q?=E5=92=8C=E9=99=8D=E5=A6=96=E5=A4=BA=E5=AE=9D=E5=9F=8B=E7=82=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/activity/NewGeneralAttackHandler.java | 12 +++++++++++- .../com/ljsd/jieling/ktbeans/ReportEventEnum.java | 2 ++ .../java/com/ljsd/jieling/logic/hero/HeroLogic.java | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/activity/NewGeneralAttackHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/activity/NewGeneralAttackHandler.java index c6aa8eb84..4cc904e61 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/activity/NewGeneralAttackHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/activity/NewGeneralAttackHandler.java @@ -7,6 +7,8 @@ import com.ljsd.jieling.exception.ErrorCode; import com.ljsd.jieling.exception.ErrorCodeException; import com.ljsd.jieling.globals.BIReason; import com.ljsd.jieling.handler.BaseHandler; +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.*; @@ -24,6 +26,7 @@ import rpc.protocols.MessageTypeProto; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.List; /*** * @author hj @@ -99,9 +102,11 @@ public class NewGeneralAttackHandler extends BaseHandler dropResult = new ArrayList<>(); for (int i = 0; i < hurtList.length; i++) { // 当前类型奖励次数 float v = b / hurtList[i][0]; dropList[0] = hurtList[i][1]; ItemUtil.drop(user, dropList,drop,v,0, BIReason.NEW_GENERAL_ATTACK); - System.out.println(); + dropResult.add(dropList[0] + "#" + v); } // 消耗道具 PlayerLogic.getInstance().checkAndUpdate(user, proto.getPrivilageTypeId(),1); + // 埋点 + ReportUtil.onReportEvent(user, ReportEventEnum.VANQUISH_BOSS.getType(), monsterGroupId,checkResult[0],hurtResult,dropResult); + return ActivityProto.NewGeneralAttackResponse.newBuilder().setFightData(fightData).setDrop(drop).build(); } } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java index b0e404568..68926f388 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java @@ -94,6 +94,8 @@ public enum ReportEventEnum { GET_TREASURE(65,"get_treasure",CommonEventHandler.getInstance(),new String[]{"treasure_id","get_entrance"}), ARENA_CHALLENGE(66,"arena_challenge",CommonEventHandler.getInstance(),new String[]{"battle_result","own_integral_num","rewards_num","own_new_integral_num","own_ranking","role_id","enemy_integral_num","new_enemy_integral_num","enemy_ranking","hero1","hero2","hero3","hero4","hero5","hero6","attack_pokemon","defend_hero1","defend_hero2","defend_hero3","defend_hero4","defend_hero5","defend_hero6","defend_pokemon"}), CEREMONY(67,"ceremony",CommonEventHandler.getInstance(),new String[]{"cost_item_id","integral_num","new_integral_num","own_ranking","guild_ranking"}), + TREASURE_SUMMON(68,"treasure_summon",CommonEventHandler.getInstance(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}),// 降妖夺宝 + VANQUISH_BOSS(69,"vanquish_boss",CommonEventHandler.getInstance(),new String[]{"boss_id","battle_result","damage_num","reward_nums_list"}),// 新将来袭 VIP_LEVEL_UP(100,"", new VipLevelUpEventHandler(),new String[]{""}); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index 16353a452..cf4a5fe42 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -416,6 +416,9 @@ public class HeroLogic{ eventEnum = ReportEventEnum.BEAST_CABINET; activityId = sLotterySetting.getActivityId(); break; + case 11: + eventEnum = ReportEventEnum.TREASURE_SUMMON; + activityId = sLotterySetting.getActivityId(); default: break; From f6f5a3c60f33f806e5f9750eb1f79071e19642d5 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Wed, 30 Dec 2020 13:47:06 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=89=93=E7=82=B9=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/handler/arena/ArenaChallengeHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/arena/ArenaChallengeHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/arena/ArenaChallengeHandler.java index bce35ccd0..58760522f 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/arena/ArenaChallengeHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/arena/ArenaChallengeHandler.java @@ -171,6 +171,9 @@ public class ArenaChallengeHandler extends BaseHandler Date: Fri, 8 Jan 2021 10:16:49 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=BD=A6=E8=BF=9F=E6=96=97=E6=B3=95?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/db/redis/RedisUtil.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisUtil.java b/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisUtil.java index 1fc872363..23a525ea0 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisUtil.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisUtil.java @@ -145,13 +145,14 @@ public class RedisUtil { String oldName = key[i]; // 新名字 String newName = oldName+"BACK:"+System.currentTimeMillis(); - // 重命名 - if(get(oldName)==null){ - continue; + // key是否存在 + boolean aBoolean = hasKey(oldName); + if (aBoolean){ + // 重命名 + redisTemplate.rename(oldName,newName); + // 设置过期时间 + expire(newName,60*60*24-60); } - redisTemplate.rename(oldName,newName); - // 设置过期时间 - expire(newName,60*60*24-60); } } } From b69ffd63291c995e9daef3764dd77348c3ca8fc3 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Thu, 31 Dec 2020 13:54:27 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=89=93=E5=8D=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ljsd/jieling/logic/friend/FriendLogic.java | 1 + 1 file changed, 1 insertion(+) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/friend/FriendLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/friend/FriendLogic.java index 78b53e909..ecdd9f356 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/friend/FriendLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/friend/FriendLogic.java @@ -698,6 +698,7 @@ public class FriendLogic { friendManager.setHaveRewardMap(new HashMap<>()); for (Map.Entry entry: giveMap.entrySet()){ Integer friendId = entry.getKey(); + LOGGER.info("FriendId:{}",friendId); User friendUser = UserManager.getUser(friendId); FriendManager friendManager1 = friendUser.getFriendManager(); Map haveRewardMap = friendManager1.getHaveRewardMap(); From 9b4b01bedd8300fba5133c07146cfd50a6852de6 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Thu, 31 Dec 2020 14:52:21 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=89=B9=E6=9D=83=E5=88=B0=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/dao/PlayerManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/PlayerManager.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/PlayerManager.java index 581ce8ecb..119584bc7 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/PlayerManager.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/PlayerManager.java @@ -399,7 +399,12 @@ public class PlayerManager extends MongoBase { }else { maxTime = TimeUtils.now()/1000+config.getContinueTime()[0]; } - maxTime = (int)(TimeUtils.getLastOrUnderHour(maxTime*1000,0,0,true)/1000); + //todo 记得删掉 + if(privilageId==4013){ + maxTime = (int)(TimeUtils.getLastOrUnderHour(maxTime*1000,5,0,true)/1000); + }else{ + maxTime = (int)(TimeUtils.getLastOrUnderHour(maxTime*1000,0,0,true)/1000); + } newVipInfo.setEffectTime((int)maxTime); } this.vipInfo.put(privilageId,newVipInfo); From ca822eba4e2d6336c7751acfd406bfe0fd64ea50 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Thu, 31 Dec 2020 18:03:42 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java | 1 + 1 file changed, 1 insertion(+) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java index dac4262d3..b8d9e25e2 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java @@ -143,6 +143,7 @@ public class GuildLogic { for(Set members : guildInfo.getMembers().values()){ for(int uidOfMember : members){ + LOGGER.info("errorMember:{}",uidOfMember); User userMember = UserManager.getUser(uidOfMember); builder.addFamilyWalkIndicaiton(CBean2Proto.getFamilyWalkIndicaiton(userMember)); }