diff --git a/common/constant.go b/common/constant.go index 4112649..d257a6e 100644 --- a/common/constant.go +++ b/common/constant.go @@ -330,6 +330,8 @@ const ( GainWayCompoundGain = 119 // 道具合成获得 GainWayItem_PigBankTakeCoin = 120 // 购买金币存钱罐奖励道具 GainWayItem_PigBankTakeDiamond = 121 // 购买钻石存钱罐奖励道具 + GainWayNianCost = 122 //年兽活动消耗 + GainWayNianGain = 123 //年兽活动获得 ) // 后台选择 金币变化类型 的充值 类型id号起始 @@ -562,27 +564,29 @@ const ( // 道具ID const ( - ItemIDCoin = 100001 // 金币对应的itemId - ItemIDDiamond = 100002 // 钻石对应的itemId - ItemIDMoneyPond = 100003 // 玩家金币池对应物品Id - ItemIDVipExp = 100005 // VIP经验对应的物品Id - ItemIDPhoneScore = 100006 // 手机抽奖积分 - ItemIDWeekScore = 100004 // 周活跃积分 - ItemIDGiftBox = 50001 // 碎片礼盒 - ItemIDCollectBox = 50002 // 集卡礼盒 - ItemIDLike = 100007 // 点赞 - ItemIDCoffee = 100008 // 咖啡 - ItemIDBucket = 100009 // 水桶 - ItemIDSlippers = 100010 // 拖鞋 - ItemIDPermit = 100011 // 赛季通行证积分 - ItemIDLong = 50013 // 龙币 - ItemIDPetSkill = 11001 //宠物技能升级道具 - ItemIDVCard = 30001 // v卡 - ItemIDJCard = 30002 // 金券 - ItemDiamondScore = 100012 //钻石积分 - ItemIDClawdoll = 40003 // 娃娃卡 - ItemDollCard = 40004 // 娃娃卡积分 - ItemIDRoomCard = 40002 // 房卡 + ItemIDCoin = 100001 // 金币对应的itemId + ItemIDDiamond = 100002 // 钻石对应的itemId + ItemIDMoneyPond = 100003 // 玩家金币池对应物品Id + ItemIDVipExp = 100005 // VIP经验对应的物品Id + ItemIDPhoneScore = 100006 // 手机抽奖积分 + ItemIDWeekScore = 100004 // 周活跃积分 + ItemIDGiftBox = 50001 // 碎片礼盒 + ItemIDCollectBox = 50002 // 集卡礼盒 + ItemIDLike = 100007 // 点赞 + ItemIDCoffee = 100008 // 咖啡 + ItemIDBucket = 100009 // 水桶 + ItemIDSlippers = 100010 // 拖鞋 + ItemIDPermit = 100011 // 赛季通行证积分 + ItemIDLong = 50013 // 龙币 + ItemIDPetSkill = 11001 //宠物技能升级道具 + ItemIDVCard = 30001 // v卡 + ItemIDJCard = 30002 // 金券 + ItemDiamondScore = 100012 //钻石积分 + ItemIDClawdoll = 40003 // 娃娃卡 + ItemDollCard = 40004 // 娃娃卡积分 + ItemIDRoomCard = 40002 // 房卡 + ItemIDLittleGuaranteed = 50014 //小爆竹 + ItemIDBigGuaranteed = 50015 //大爆竹 ) func ToItemId(id int32) int32 { @@ -694,6 +698,7 @@ const ( TaskTypeTienlenWinCoin = 29 // Tienlen赢取金币数量 TaskTypeRankMatchWinTimes = 30 // 排位胜利次数 TaskTypeBuyPermit = 31 // 购买典藏通行证 + TaskTypeBuyRedBag = 32 // 参与红包雨活动 ) const ( @@ -711,6 +716,8 @@ const ( TaskActivityTypeAchieve = 5 // 成就任务 TaskActivityTypePermitEveryDay = 6 // 赛季通行证每日任务 TaskActivityTypePermit = 7 // 赛季通行证任务 + TaskActivityTypeNianEveryDay = 8 // 年兽每日任务 + TaskActivityTypeNian = 9 // 活动期间年兽任务 ) const HeadRange = 3 // 机器人头像id范围 diff --git a/data/DB_GameItem.dat b/data/DB_GameItem.dat index 4c96186..fb28f10 100644 Binary files a/data/DB_GameItem.dat and b/data/DB_GameItem.dat differ diff --git a/data/DB_GameItem.json b/data/DB_GameItem.json index c7bfc88..954355e 100644 --- a/data/DB_GameItem.json +++ b/data/DB_GameItem.json @@ -7226,6 +7226,80 @@ "CompositionMax": 1, "Location": "0", "Describe": "作用:用于报名特殊钻石赛事;\n产出途径:存钱罐" + }, + { + "Id": 50014, + "Name": "爆竹", + "ShowLocation": [ + 0, + 0, + 0 + ], + "Classify": [ + 0, + 0, + 0 + ], + "Type": 28, + "Effect0": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "Effect": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "SaleType": 1, + "SaleGold": 5000, + "Composition": 1, + "CompositionMax": 9999, + "Location": "0", + "Describe": "可在年兽活动中击退年兽,获得奖品" + }, + { + "Id": 50015, + "Name": "火箭爆竹", + "ShowLocation": [ + 0, + 0, + 0 + ], + "Classify": [ + 0, + 0, + 0 + ], + "Type": 28, + "Effect0": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "Effect": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "SaleType": 1, + "SaleGold": 5000, + "Composition": 1, + "CompositionMax": 9999, + "Location": "0", + "Describe": "可在年兽活动中击退年兽,获得奖品" } ] } \ No newline at end of file diff --git a/data/DB_NewYearActivity.dat b/data/DB_NewYearActivity.dat new file mode 100644 index 0000000..e1daacd --- /dev/null +++ b/data/DB_NewYearActivity.dat @@ -0,0 +1,27 @@ + +4 +SignReward50014,10;100001,100000" 签到奖励 +. SignExcReward50015,1"签到额外奖励 +=SignExcRewardMax2"$签到额外奖励赠送次数上限 +9SignExcRewardProp30"签到额外奖励赠送概率 + BossExp6000000" +BOSS血量 +9 +BossReward100001,100000;100002,10"BOSS击杀奖励 +0 LuckyRankNeed110000"幸运榜上榜条件 +0RankNeed80000000"总伤害榜上榜条件 +@ LittleHurtGold 80000,120000"小爆竹造成的伤害范围 +> + BigHurtGold 400000,600000"大爆竹造成的伤害范围 +4  +BigHurtExc30001"大爆竹额外掉落道具ID +> BigHurtExcNumber10,30"!大爆竹额外掉落数量范围 +5 LittleGuaranteed30"小爆竹保底掉落次数 +ALittleGuaranteedReward100002,5"小爆竹保底掉落物品 +2 BigGuaranteed10"大爆竹保底掉落次数 +?BigGuaranteedReward 30001,100"大爆竹保底掉落物品 +. +GiftShopID991001,991002,991003"礼包ID +@ GiftShopLimit3,0,0"&礼包每日限购次数,0为不限购 +4 BossExcLimit30"年兽死亡额外掉落要求 +" BuffCount1"Buff生效次数 \ No newline at end of file diff --git a/data/DB_NewYearActivity.json b/data/DB_NewYearActivity.json new file mode 100644 index 0000000..2268940 --- /dev/null +++ b/data/DB_NewYearActivity.json @@ -0,0 +1,124 @@ +{ + "Arr": [ + { + "Id": 1, + "PorpName": "SignReward", + "PropValue": "50014,10;100001,100000", + "PropDec": "签到奖励" + }, + { + "Id": 2, + "PorpName": "SignExcReward", + "PropValue": "50015,1", + "PropDec": "签到额外奖励" + }, + { + "Id": 3, + "PorpName": "SignExcRewardMax", + "PropValue": "2", + "PropDec": "签到额外奖励赠送次数上限" + }, + { + "Id": 4, + "PorpName": "SignExcRewardProp", + "PropValue": "30", + "PropDec": "签到额外奖励赠送概率" + }, + { + "Id": 5, + "PorpName": "BossExp", + "PropValue": "6000000", + "PropDec": "BOSS血量" + }, + { + "Id": 6, + "PorpName": "BossReward", + "PropValue": "100001,100000;100002,10", + "PropDec": "BOSS击杀奖励" + }, + { + "Id": 7, + "PorpName": "LuckyRankNeed", + "PropValue": "110000", + "PropDec": "幸运榜上榜条件" + }, + { + "Id": 8, + "PorpName": "RankNeed", + "PropValue": "80000000", + "PropDec": "总伤害榜上榜条件" + }, + { + "Id": 9, + "PorpName": "LittleHurtGold", + "PropValue": "80000,120000", + "PropDec": "小爆竹造成的伤害范围" + }, + { + "Id": 10, + "PorpName": "BigHurtGold", + "PropValue": "400000,600000", + "PropDec": "大爆竹造成的伤害范围" + }, + { + "Id": 11, + "PorpName": "BigHurtExc", + "PropValue": "30001", + "PropDec": "大爆竹额外掉落道具ID" + }, + { + "Id": 12, + "PorpName": "BigHurtExcNumber", + "PropValue": "10,30", + "PropDec": "大爆竹额外掉落数量范围" + }, + { + "Id": 13, + "PorpName": "LittleGuaranteed", + "PropValue": "30", + "PropDec": "小爆竹保底掉落次数" + }, + { + "Id": 14, + "PorpName": "LittleGuaranteedReward", + "PropValue": "100002,5", + "PropDec": "小爆竹保底掉落物品" + }, + { + "Id": 15, + "PorpName": "BigGuaranteed", + "PropValue": "10", + "PropDec": "大爆竹保底掉落次数" + }, + { + "Id": 16, + "PorpName": "BigGuaranteedReward", + "PropValue": "30001,100", + "PropDec": "大爆竹保底掉落物品" + }, + { + "Id": 17, + "PorpName": "GiftShopID", + "PropValue": "991001,991002,991003", + "PropDec": "礼包ID" + }, + { + "Id": 18, + "PorpName": "GiftShopLimit", + "PropValue": "3,0,0", + "PropDec": "礼包每日限购次数,0为不限购" + }, + { + "Id": 19, + "PorpName": "BossExcLimit", + "PropValue": "30", + "PropDec": "年兽死亡额外掉落要求" + }, + { + "Id": 20, + "PorpName": "BuffCount", + "PropValue": "1", + "PropDec": "Buff生效次数" + } + ] +} \ No newline at end of file diff --git a/data/DB_NewYearRankReward.dat b/data/DB_NewYearRankReward.dat new file mode 100644 index 0000000..0748d61 --- /dev/null +++ b/data/DB_NewYearRankReward.dat @@ -0,0 +1,84 @@ + +""d" +""d" +""d" +"d" +""c +""b +""a +""` +  ""_ + + +""^ +  ""] +  ""\ +  ""[ +""Z +""Y +""X +""W +""V +""U +""T +""S +""R +""Q +""P +""O +""N +""M +""L +""K +""J +""I +  ""H +!!""G +""""F +##""E +$$""D +%%""C +&&"B" +''""A +((""@ +)""d" +*"d"" ++""d" +,"d" +-""c +.""b +/""a +0""` +1 ""_ +2 +""^ +3 ""] +4 ""\ +5 ""[ +6""Z +7""Y +8""X +9""W +:""V +;""U +<""T +=""S +>""R +?""Q +@"P" +A"O" +B""N +C""M +D""L +E""K +F""J +G""I +H ""H +I!""G +J"""F +K#""E +L$""D +M%""C +N&""B +O'""A +P(""@ \ No newline at end of file diff --git a/data/DB_NewYearRankReward.json b/data/DB_NewYearRankReward.json new file mode 100644 index 0000000..0715204 --- /dev/null +++ b/data/DB_NewYearRankReward.json @@ -0,0 +1,730 @@ +{ + "Arr": [ + { + "Id": 1, + "RankType": 1, + "RankLevelId": 1, + "AwardMap": { + "100001": 30, + "100002": 100, + "30009": 2 + } + }, + { + "Id": 2, + "RankType": 1, + "RankLevelId": 2, + "AwardMap": { + "100001": 30, + "100002": 100, + "30008": 2 + } + }, + { + "Id": 3, + "RankType": 1, + "RankLevelId": 3, + "AwardMap": { + "100001": 30, + "100002": 100, + "30008": 1 + } + }, + { + "Id": 4, + "RankType": 1, + "RankLevelId": 4, + "AwardMap": { + "100001": 30, + "100002": 100 + } + }, + { + "Id": 5, + "RankType": 1, + "RankLevelId": 5, + "AwardMap": { + "100001": 30, + "100002": 99 + } + }, + { + "Id": 6, + "RankType": 1, + "RankLevelId": 6, + "AwardMap": { + "100001": 30, + "100002": 98 + } + }, + { + "Id": 7, + "RankType": 1, + "RankLevelId": 7, + "AwardMap": { + "100001": 30, + "100002": 97 + } + }, + { + "Id": 8, + "RankType": 1, + "RankLevelId": 8, + "AwardMap": { + "100001": 30, + "100002": 96 + } + }, + { + "Id": 9, + "RankType": 1, + "RankLevelId": 9, + "AwardMap": { + "100001": 30, + "100002": 95 + } + }, + { + "Id": 10, + "RankType": 1, + "RankLevelId": 10, + "AwardMap": { + "100001": 30, + "100002": 94 + } + }, + { + "Id": 11, + "RankType": 1, + "RankLevelId": 11, + "AwardMap": { + "100001": 30, + "100002": 93 + } + }, + { + "Id": 12, + "RankType": 1, + "RankLevelId": 12, + "AwardMap": { + "100001": 30, + "100002": 92 + } + }, + { + "Id": 13, + "RankType": 1, + "RankLevelId": 13, + "AwardMap": { + "100001": 30, + "100002": 91 + } + }, + { + "Id": 14, + "RankType": 1, + "RankLevelId": 14, + "AwardMap": { + "100001": 30, + "100002": 90 + } + }, + { + "Id": 15, + "RankType": 1, + "RankLevelId": 15, + "AwardMap": { + "100001": 30, + "100002": 89 + } + }, + { + "Id": 16, + "RankType": 1, + "RankLevelId": 16, + "AwardMap": { + "100001": 30, + "100002": 88 + } + }, + { + "Id": 17, + "RankType": 1, + "RankLevelId": 17, + "AwardMap": { + "100001": 30, + "100002": 87 + } + }, + { + "Id": 18, + "RankType": 1, + "RankLevelId": 18, + "AwardMap": { + "100001": 30, + "100002": 86 + } + }, + { + "Id": 19, + "RankType": 1, + "RankLevelId": 19, + "AwardMap": { + "100001": 30, + "100002": 85 + } + }, + { + "Id": 20, + "RankType": 1, + "RankLevelId": 20, + "AwardMap": { + "100001": 30, + "100002": 84 + } + }, + { + "Id": 21, + "RankType": 1, + "RankLevelId": 21, + "AwardMap": { + "100001": 30, + "100002": 83 + } + }, + { + "Id": 22, + "RankType": 1, + "RankLevelId": 22, + "AwardMap": { + "100001": 30, + "100002": 82 + } + }, + { + "Id": 23, + "RankType": 1, + "RankLevelId": 23, + "AwardMap": { + "100001": 30, + "100002": 81 + } + }, + { + "Id": 24, + "RankType": 1, + "RankLevelId": 24, + "AwardMap": { + "100001": 30, + "100002": 80 + } + }, + { + "Id": 25, + "RankType": 1, + "RankLevelId": 25, + "AwardMap": { + "100001": 30, + "100002": 79 + } + }, + { + "Id": 26, + "RankType": 1, + "RankLevelId": 26, + "AwardMap": { + "100001": 30, + "100002": 78 + } + }, + { + "Id": 27, + "RankType": 1, + "RankLevelId": 27, + "AwardMap": { + "100001": 30, + "100002": 77 + } + }, + { + "Id": 28, + "RankType": 1, + "RankLevelId": 28, + "AwardMap": { + "100001": 30, + "100002": 76 + } + }, + { + "Id": 29, + "RankType": 1, + "RankLevelId": 29, + "AwardMap": { + "100001": 30, + "100002": 75 + } + }, + { + "Id": 30, + "RankType": 1, + "RankLevelId": 30, + "AwardMap": { + "100001": 30, + "100002": 74 + } + }, + { + "Id": 31, + "RankType": 1, + "RankLevelId": 31, + "AwardMap": { + "100001": 30, + "100002": 73 + } + }, + { + "Id": 32, + "RankType": 1, + "RankLevelId": 32, + "AwardMap": { + "100001": 30, + "100002": 72 + } + }, + { + "Id": 33, + "RankType": 1, + "RankLevelId": 33, + "AwardMap": { + "100001": 30, + "100002": 71 + } + }, + { + "Id": 34, + "RankType": 1, + "RankLevelId": 34, + "AwardMap": { + "100001": 30, + "100002": 70 + } + }, + { + "Id": 35, + "RankType": 1, + "RankLevelId": 35, + "AwardMap": { + "100001": 30, + "100002": 69 + } + }, + { + "Id": 36, + "RankType": 1, + "RankLevelId": 36, + "AwardMap": { + "100001": 30, + "100002": 68 + } + }, + { + "Id": 37, + "RankType": 1, + "RankLevelId": 37, + "AwardMap": { + "100001": 30, + "100002": 67 + } + }, + { + "Id": 38, + "RankType": 1, + "RankLevelId": 38, + "AwardMap": { + "100001": 30, + "100002": 66 + } + }, + { + "Id": 39, + "RankType": 1, + "RankLevelId": 39, + "AwardMap": { + "100001": 30, + "100002": 65 + } + }, + { + "Id": 40, + "RankType": 1, + "RankLevelId": 40, + "AwardMap": { + "100001": 30, + "100002": 64 + } + }, + { + "Id": 41, + "RankType": 2, + "RankLevelId": 1, + "AwardMap": { + "100001": 30, + "100002": 100, + "30009": 2 + } + }, + { + "Id": 42, + "RankType": 2, + "RankLevelId": 2, + "AwardMap": { + "100001": 30, + "100002": 100, + "30008": 2 + } + }, + { + "Id": 43, + "RankType": 2, + "RankLevelId": 3, + "AwardMap": { + "100001": 30, + "100002": 100, + "30008": 1 + } + }, + { + "Id": 44, + "RankType": 2, + "RankLevelId": 4, + "AwardMap": { + "100001": 30, + "100002": 100 + } + }, + { + "Id": 45, + "RankType": 2, + "RankLevelId": 5, + "AwardMap": { + "100001": 30, + "100002": 99 + } + }, + { + "Id": 46, + "RankType": 2, + "RankLevelId": 6, + "AwardMap": { + "100001": 30, + "100002": 98 + } + }, + { + "Id": 47, + "RankType": 2, + "RankLevelId": 7, + "AwardMap": { + "100001": 30, + "100002": 97 + } + }, + { + "Id": 48, + "RankType": 2, + "RankLevelId": 8, + "AwardMap": { + "100001": 30, + "100002": 96 + } + }, + { + "Id": 49, + "RankType": 2, + "RankLevelId": 9, + "AwardMap": { + "100001": 30, + "100002": 95 + } + }, + { + "Id": 50, + "RankType": 2, + "RankLevelId": 10, + "AwardMap": { + "100001": 30, + "100002": 94 + } + }, + { + "Id": 51, + "RankType": 2, + "RankLevelId": 11, + "AwardMap": { + "100001": 30, + "100002": 93 + } + }, + { + "Id": 52, + "RankType": 2, + "RankLevelId": 12, + "AwardMap": { + "100001": 30, + "100002": 92 + } + }, + { + "Id": 53, + "RankType": 2, + "RankLevelId": 13, + "AwardMap": { + "100001": 30, + "100002": 91 + } + }, + { + "Id": 54, + "RankType": 2, + "RankLevelId": 14, + "AwardMap": { + "100001": 30, + "100002": 90 + } + }, + { + "Id": 55, + "RankType": 2, + "RankLevelId": 15, + "AwardMap": { + "100001": 30, + "100002": 89 + } + }, + { + "Id": 56, + "RankType": 2, + "RankLevelId": 16, + "AwardMap": { + "100001": 30, + "100002": 88 + } + }, + { + "Id": 57, + "RankType": 2, + "RankLevelId": 17, + "AwardMap": { + "100001": 30, + "100002": 87 + } + }, + { + "Id": 58, + "RankType": 2, + "RankLevelId": 18, + "AwardMap": { + "100001": 30, + "100002": 86 + } + }, + { + "Id": 59, + "RankType": 2, + "RankLevelId": 19, + "AwardMap": { + "100001": 30, + "100002": 85 + } + }, + { + "Id": 60, + "RankType": 2, + "RankLevelId": 20, + "AwardMap": { + "100001": 30, + "100002": 84 + } + }, + { + "Id": 61, + "RankType": 2, + "RankLevelId": 21, + "AwardMap": { + "100001": 30, + "100002": 83 + } + }, + { + "Id": 62, + "RankType": 2, + "RankLevelId": 22, + "AwardMap": { + "100001": 30, + "100002": 82 + } + }, + { + "Id": 63, + "RankType": 2, + "RankLevelId": 23, + "AwardMap": { + "100001": 30, + "100002": 81 + } + }, + { + "Id": 64, + "RankType": 2, + "RankLevelId": 24, + "AwardMap": { + "100001": 30, + "100002": 80 + } + }, + { + "Id": 65, + "RankType": 2, + "RankLevelId": 25, + "AwardMap": { + "100001": 30, + "100002": 79 + } + }, + { + "Id": 66, + "RankType": 2, + "RankLevelId": 26, + "AwardMap": { + "100001": 30, + "100002": 78 + } + }, + { + "Id": 67, + "RankType": 2, + "RankLevelId": 27, + "AwardMap": { + "100001": 30, + "100002": 77 + } + }, + { + "Id": 68, + "RankType": 2, + "RankLevelId": 28, + "AwardMap": { + "100001": 30, + "100002": 76 + } + }, + { + "Id": 69, + "RankType": 2, + "RankLevelId": 29, + "AwardMap": { + "100001": 30, + "100002": 75 + } + }, + { + "Id": 70, + "RankType": 2, + "RankLevelId": 30, + "AwardMap": { + "100001": 30, + "100002": 74 + } + }, + { + "Id": 71, + "RankType": 2, + "RankLevelId": 31, + "AwardMap": { + "100001": 30, + "100002": 73 + } + }, + { + "Id": 72, + "RankType": 2, + "RankLevelId": 32, + "AwardMap": { + "100001": 30, + "100002": 72 + } + }, + { + "Id": 73, + "RankType": 2, + "RankLevelId": 33, + "AwardMap": { + "100001": 30, + "100002": 71 + } + }, + { + "Id": 74, + "RankType": 2, + "RankLevelId": 34, + "AwardMap": { + "100001": 30, + "100002": 70 + } + }, + { + "Id": 75, + "RankType": 2, + "RankLevelId": 35, + "AwardMap": { + "100001": 30, + "100002": 69 + } + }, + { + "Id": 76, + "RankType": 2, + "RankLevelId": 36, + "AwardMap": { + "100001": 30, + "100002": 68 + } + }, + { + "Id": 77, + "RankType": 2, + "RankLevelId": 37, + "AwardMap": { + "100001": 30, + "100002": 67 + } + }, + { + "Id": 78, + "RankType": 2, + "RankLevelId": 38, + "AwardMap": { + "100001": 30, + "100002": 66 + } + }, + { + "Id": 79, + "RankType": 2, + "RankLevelId": 39, + "AwardMap": { + "100001": 30, + "100002": 65 + } + }, + { + "Id": 80, + "RankType": 2, + "RankLevelId": 40, + "AwardMap": { + "100001": 30, + "100002": 64 + } + } + ] +} \ No newline at end of file diff --git a/data/DB_Task.dat b/data/DB_Task.dat index 3f51acb..d93409f 100644 Binary files a/data/DB_Task.dat and b/data/DB_Task.dat differ diff --git a/data/DB_Task.json b/data/DB_Task.json index 6577f2f..1d61204 100644 --- a/data/DB_Task.json +++ b/data/DB_Task.json @@ -1234,6 +1234,236 @@ "Award": { "100011": 50 } + }, + { + "Id": 13001, + "Order": 1, + "Name": "年兽活动", + "Des": "领取转盘签到奖励", + "ActivityType": 8, + "TaskType": 17, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + } + }, + { + "Id": 13002, + "Order": 2, + "Name": "年兽活动", + "Des": "在线时长60分钟", + "ActivityType": 8, + "TaskType": 21, + "TargetTimes": 3600, + "FinishTimes": 1, + "Award": { + "50014": 10 + } + }, + { + "Id": 13003, + "Order": 3, + "Name": "年兽活动", + "Des": "购买任意金币1次", + "ActivityType": 8, + "TaskType": 2, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "Position": [ + 0, + 1 + ] + }, + { + "Id": 13004, + "Order": 4, + "Name": "年兽活动", + "Des": "购买任意存钱罐1次", + "ActivityType": 8, + "TaskType": 22, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + } + }, + { + "Id": 13005, + "Order": 5, + "Name": "年兽活动", + "Des": "参与大众场对局获得胜利3次", + "ActivityType": 8, + "TaskType": 23, + "TargetTimes": 3, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "GameType": 1 + }, + { + "Id": 13006, + "Order": 6, + "Name": "年兽活动", + "Des": "参与排位赛获得胜利3次", + "ActivityType": 8, + "TaskType": 30, + "TargetTimes": 3, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "GameType": 1 + }, + { + "Id": 13007, + "Order": 7, + "Name": "年兽活动", + "Des": "邀请好友进行私人桌对局1次", + "ActivityType": 8, + "TaskType": 24, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "GameType": 1 + }, + { + "Id": 13008, + "Order": 8, + "Name": "年兽活动", + "Des": "成功参与比赛场3次", + "ActivityType": 8, + "TaskType": 25, + "TargetTimes": 3, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "GameType": 1 + }, + { + "Id": 13009, + "Order": 9, + "Name": "年兽活动", + "Des": "比赛场获得前十名1次", + "ActivityType": 8, + "TaskType": 26, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "GameType": 1 + }, + { + "Id": 13010, + "Order": 10, + "Name": "年兽活动", + "Des": "今日累计消耗100钻石", + "ActivityType": 8, + "TaskType": 27, + "TargetTimes": 100, + "FinishTimes": 1, + "Award": { + "50014": 10 + } + }, + { + "Id": 13011, + "Order": 11, + "Name": "年兽活动", + "Des": "充值任意金额", + "ActivityType": 8, + "TaskType": 7, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50014": 10 + }, + "Position": [ + 1, + 1 + ] + }, + { + "Id": 13012, + "Order": 12, + "Name": "年兽活动", + "Des": "累计领取转盘签到奖励7天", + "ActivityType": 9, + "TaskType": 17, + "TargetTimes": 7, + "FinishTimes": 1, + "Award": { + "50014": 10 + } + }, + { + "Id": 13013, + "Order": 13, + "Name": "年兽活动", + "Des": "参与红包雨活动1次", + "ActivityType": 8, + "TaskType": 32, + "TargetTimes": 1, + "FinishTimes": 1, + "Award": { + "50015": 10 + } + }, + { + "Id": 13014, + "Order": 14, + "Name": "年兽活动", + "Des": "累计充值$9.99", + "ActivityType": 9, + "TaskType": 7, + "TargetTimes": 999, + "FinishTimes": 1, + "Award": { + "50015": 10 + }, + "Position": [ + 1, + 1 + ] + }, + { + "Id": 13015, + "Order": 15, + "Name": "年兽活动", + "Des": "累计充值$19.99", + "ActivityType": 9, + "TaskType": 7, + "TargetTimes": 1999, + "FinishTimes": 1, + "Award": { + "50015": 10 + }, + "Position": [ + 1, + 1 + ] + }, + { + "Id": 13016, + "Order": 16, + "Name": "年兽活动", + "Des": "累计赚取10B金币", + "ActivityType": 9, + "TaskType": 11, + "TargetTimes": 10000000000, + "FinishTimes": 1, + "Award": { + "50015": 10 + }, + "GameType": 1 } ] } \ No newline at end of file diff --git a/etcd/keyconf.go b/etcd/keyconf.go index 0e0d5dc..2208bc4 100644 --- a/etcd/keyconf.go +++ b/etcd/keyconf.go @@ -51,4 +51,5 @@ const ( ETCDKEY_LotteryUser = "/game/user_lottery" //抽奖用户必中配置 ETCDKEY_PigBankDiamond = "/game/pigbank_diamond" //存钱罐消耗获得 ETCDKEY_PigBankProp = "/game/pigbank_prop" //存钱罐属性 + ETCDKEY_NianConfig = "/game/activity_nian" //年兽活动配置 ) diff --git a/model/config.go b/model/config.go index 6c40140..bca39ca 100644 --- a/model/config.go +++ b/model/config.go @@ -17,14 +17,14 @@ import ( */ const ( - OpAll = 0 - OpTurnplate = 1 - OpBlindBox = 2 - OpFirstPay = 3 - OpContinuousPay = 4 - OpPhoneLottery = 5 - OpCollect = 6 - OpDiamondLottery = 7 + OpAll = 0 + OpTurnplate = 1 + OpBlindBox = 2 + OpFirstPay = 3 + OpContinuousPay = 4 + OpPhoneLottery = 5 + OpCollect = 6 + OpNian = 7 ) const ( @@ -167,6 +167,8 @@ type AllConfig struct { *webapi.GamePigBankDiamondConfig // 存钱罐属性 *webapi.GamePigBankPropConfig + //年兽配置 + *webapi.ActivityNianConfig } type GlobalConfig struct { diff --git a/model/player.go b/model/player.go index 638a06c..7895fea 100644 --- a/model/player.go +++ b/model/player.go @@ -564,6 +564,7 @@ type WelfareData struct { DiamondBank *DiamondBankData // 钻石储存罐 PermitAward map[int32]int64 // 赛季通行证奖励领取时间 PermitExchange map[int32][]int64 // 赛季通行证兑换次数, 多次的兑换时间 + NianData *NianData //年兽活动数据 } func NewWelfareData() *WelfareData { @@ -580,6 +581,9 @@ func NewWelfareData() *WelfareData { }, PermitAward: make(map[int32]int64), PermitExchange: make(map[int32][]int64), + NianData: &NianData{ + OtherAwardNum: make(map[int32]int32), + }, } } @@ -672,6 +676,19 @@ type WebPlayerDataParam struct { Long, PermitScore int64 } +type NianData struct { + ActivityStartTime int64 //活动开始时间 + ActivityEndTime int64 //活动结束时间 + BossHp int64 //Boss当前血量 + BuffStatus bool //Buff领取状态 + BuffCount int64 //Buff剩余生效次数 + SignAwardTime int64 //签到奖励领取时间 + BossDieCount int32 //BOSS死亡次数 + LittleHurt int32 //小爆竹次数 + BigHurt int32 //大爆竹次数 + OtherAwardNum map[int32]int32 //奖励掉落数量 +} + func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData { if param == nil || param.PlayerData == nil { return nil diff --git a/protocol/activity/nian.pb.go b/protocol/activity/nian.pb.go new file mode 100644 index 0000000..cc51864 --- /dev/null +++ b/protocol/activity/nian.pb.go @@ -0,0 +1,1167 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1-devel +// protoc v3.19.4 +// source: protocol/activity/nian.proto + +package activity + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NianPacketID int32 + +const ( + NianPacketID_PACKET_Nian_ZERO NianPacketID = 0 // 弃用消息号 + NianPacketID_PACKET_CSNianData NianPacketID = 2660 // 获取年兽信息 + NianPacketID_PACKET_SCNianData NianPacketID = 2661 // 返回年兽信息 + NianPacketID_PACKET_CSNianBuff NianPacketID = 2662 // 请求领取BUFF + NianPacketID_PACKET_SCNianBuff NianPacketID = 2663 // 返回Buff信息 + NianPacketID_PACKET_CSNianRankData NianPacketID = 2664 // 请求排行榜信息 + NianPacketID_PACKET_SCNianRankData NianPacketID = 2665 // 返回排行榜信息 + NianPacketID_PACKET_CSNianAttack NianPacketID = 2666 //请求攻击年兽 + NianPacketID_PACKET_SCNianAttackData NianPacketID = 2667 //返回攻击年兽信息 + NianPacketID_PACKET_CSNianSignAward NianPacketID = 2668 //请求签到 + NianPacketID_PACKET_SCNianSignAward NianPacketID = 2669 //签到返回 +) + +// Enum value maps for NianPacketID. +var ( + NianPacketID_name = map[int32]string{ + 0: "PACKET_Nian_ZERO", + 2660: "PACKET_CSNianData", + 2661: "PACKET_SCNianData", + 2662: "PACKET_CSNianBuff", + 2663: "PACKET_SCNianBuff", + 2664: "PACKET_CSNianRankData", + 2665: "PACKET_SCNianRankData", + 2666: "PACKET_CSNianAttack", + 2667: "PACKET_SCNianAttackData", + 2668: "PACKET_CSNianSignAward", + 2669: "PACKET_SCNianSignAward", + } + NianPacketID_value = map[string]int32{ + "PACKET_Nian_ZERO": 0, + "PACKET_CSNianData": 2660, + "PACKET_SCNianData": 2661, + "PACKET_CSNianBuff": 2662, + "PACKET_SCNianBuff": 2663, + "PACKET_CSNianRankData": 2664, + "PACKET_SCNianRankData": 2665, + "PACKET_CSNianAttack": 2666, + "PACKET_SCNianAttackData": 2667, + "PACKET_CSNianSignAward": 2668, + "PACKET_SCNianSignAward": 2669, + } +) + +func (x NianPacketID) Enum() *NianPacketID { + p := new(NianPacketID) + *p = x + return p +} + +func (x NianPacketID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NianPacketID) Descriptor() protoreflect.EnumDescriptor { + return file_protocol_activity_nian_proto_enumTypes[0].Descriptor() +} + +func (NianPacketID) Type() protoreflect.EnumType { + return &file_protocol_activity_nian_proto_enumTypes[0] +} + +func (x NianPacketID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NianPacketID.Descriptor instead. +func (NianPacketID) EnumDescriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{0} +} + +//获取年兽活动信息 +//PACKET_CSNianData +type CSNianData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CSNianData) Reset() { + *x = CSNianData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianData) ProtoMessage() {} + +func (x *CSNianData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CSNianData.ProtoReflect.Descriptor instead. +func (*CSNianData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{0} +} + +//PACKET_SCNianData +type SCNianData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ActivityStartTime int64 `protobuf:"varint,1,opt,name=ActivityStartTime,proto3" json:"ActivityStartTime,omitempty"` //活动开始时间 + ActivityEndTime int64 `protobuf:"varint,2,opt,name=ActivityEndTime,proto3" json:"ActivityEndTime,omitempty"` //活动结束时间 + BossMaxHp int64 `protobuf:"varint,3,opt,name=BossMaxHp,proto3" json:"BossMaxHp,omitempty"` //Boss最大血量 + BossHp int64 `protobuf:"varint,4,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //Boss当前血量 + LuckData []*RankData `protobuf:"bytes,5,rep,name=LuckData,proto3" json:"LuckData,omitempty"` //幸运榜 + AwardTime int64 `protobuf:"varint,6,opt,name=AwardTime,proto3" json:"AwardTime,omitempty"` //每日签到领取时间 + BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //Buff剩余次数 + BuffStatus bool `protobuf:"varint,8,opt,name=BuffStatus,proto3" json:"BuffStatus,omitempty"` //Buff领取状态 + On int32 `protobuf:"varint,9,opt,name=On,proto3" json:"On,omitempty"` //活动开关 1开启 2关闭 + SignAwardTime int64 `protobuf:"varint,10,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取 +} + +func (x *SCNianData) Reset() { + *x = SCNianData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianData) ProtoMessage() {} + +func (x *SCNianData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCNianData.ProtoReflect.Descriptor instead. +func (*SCNianData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{1} +} + +func (x *SCNianData) GetActivityStartTime() int64 { + if x != nil { + return x.ActivityStartTime + } + return 0 +} + +func (x *SCNianData) GetActivityEndTime() int64 { + if x != nil { + return x.ActivityEndTime + } + return 0 +} + +func (x *SCNianData) GetBossMaxHp() int64 { + if x != nil { + return x.BossMaxHp + } + return 0 +} + +func (x *SCNianData) GetBossHp() int64 { + if x != nil { + return x.BossHp + } + return 0 +} + +func (x *SCNianData) GetLuckData() []*RankData { + if x != nil { + return x.LuckData + } + return nil +} + +func (x *SCNianData) GetAwardTime() int64 { + if x != nil { + return x.AwardTime + } + return 0 +} + +func (x *SCNianData) GetBuffCount() int64 { + if x != nil { + return x.BuffCount + } + return 0 +} + +func (x *SCNianData) GetBuffStatus() bool { + if x != nil { + return x.BuffStatus + } + return false +} + +func (x *SCNianData) GetOn() int32 { + if x != nil { + return x.On + } + return 0 +} + +func (x *SCNianData) GetSignAwardTime() int64 { + if x != nil { + return x.SignAwardTime + } + return 0 +} + +//贺春 +//请求领取BUFF +//PACKET_CSNianBuff +type CSNianBuff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CSNianBuff) Reset() { + *x = CSNianBuff{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianBuff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianBuff) ProtoMessage() {} + +func (x *CSNianBuff) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CSNianBuff.ProtoReflect.Descriptor instead. +func (*CSNianBuff) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{2} +} + +//PACKET_SCNianBuff +type SCNianBuff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BuffCount int64 `protobuf:"varint,1,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //BUFF剩余次数 +} + +func (x *SCNianBuff) Reset() { + *x = SCNianBuff{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianBuff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianBuff) ProtoMessage() {} + +func (x *SCNianBuff) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCNianBuff.ProtoReflect.Descriptor instead. +func (*SCNianBuff) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{3} +} + +func (x *SCNianBuff) GetBuffCount() int64 { + if x != nil { + return x.BuffCount + } + return 0 +} + +//排行榜数据 +//PACKET_CSNianRankData +type CSNianRankData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-幸运榜 2-总伤害榜 +} + +func (x *CSNianRankData) Reset() { + *x = CSNianRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianRankData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianRankData) ProtoMessage() {} + +func (x *CSNianRankData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CSNianRankData.ProtoReflect.Descriptor instead. +func (*CSNianRankData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{4} +} + +func (x *CSNianRankData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +//PACKET_SCNianRankData +type SCNianRankData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` + Data []*RankData `protobuf:"bytes,2,rep,name=Data,proto3" json:"Data,omitempty"` +} + +func (x *SCNianRankData) Reset() { + *x = SCNianRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianRankData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianRankData) ProtoMessage() {} + +func (x *SCNianRankData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCNianRankData.ProtoReflect.Descriptor instead. +func (*SCNianRankData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{5} +} + +func (x *SCNianRankData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *SCNianRankData) GetData() []*RankData { + if x != nil { + return x.Data + } + return nil +} + +type RankData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId int32 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + Icon int32 `protobuf:"varint,3,opt,name=Icon,proto3" json:"Icon,omitempty"` + Score int64 `protobuf:"varint,4,opt,name=Score,proto3" json:"Score,omitempty"` + Award []*RankAwardData `protobuf:"bytes,5,rep,name=Award,proto3" json:"Award,omitempty"` +} + +func (x *RankData) Reset() { + *x = RankData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RankData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RankData) ProtoMessage() {} + +func (x *RankData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankData.ProtoReflect.Descriptor instead. +func (*RankData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{6} +} + +func (x *RankData) GetRankId() int32 { + if x != nil { + return x.RankId + } + return 0 +} + +func (x *RankData) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RankData) GetIcon() int32 { + if x != nil { + return x.Icon + } + return 0 +} + +func (x *RankData) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *RankData) GetAward() []*RankAwardData { + if x != nil { + return x.Award + } + return nil +} + +type RankAwardData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"` + ItemNum int64 `protobuf:"varint,2,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` +} + +func (x *RankAwardData) Reset() { + *x = RankAwardData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RankAwardData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RankAwardData) ProtoMessage() {} + +func (x *RankAwardData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankAwardData.ProtoReflect.Descriptor instead. +func (*RankAwardData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{7} +} + +func (x *RankAwardData) GetItemId() int32 { + if x != nil { + return x.ItemId + } + return 0 +} + +func (x *RankAwardData) GetItemNum() int64 { + if x != nil { + return x.ItemNum + } + return 0 +} + +//攻击年兽 +//PACKET_CSNianAttack +type CSNianAttack struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-小爆竹 2-小爆竹*10 3-大爆竹 +} + +func (x *CSNianAttack) Reset() { + *x = CSNianAttack{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianAttack) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianAttack) ProtoMessage() {} + +func (x *CSNianAttack) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CSNianAttack.ProtoReflect.Descriptor instead. +func (*CSNianAttack) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{8} +} + +func (x *CSNianAttack) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +//PACKET_SCNianAttackData +type SCNianAttackData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-小爆竹 2-小爆竹*10 3-大爆竹 + BossHp int64 `protobuf:"varint,2,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //BOSS当前血量 + Award []*RankAwardData `protobuf:"bytes,3,rep,name=Award,proto3" json:"Award,omitempty"` //获得道具 + AttackHp int64 `protobuf:"varint,4,opt,name=AttackHp,proto3" json:"AttackHp,omitempty"` // 攻击伤害 + IsDie bool `protobuf:"varint,5,opt,name=IsDie,proto3" json:"IsDie,omitempty"` //BOSS是否死亡 + DieAward []*RankAwardData `protobuf:"bytes,6,rep,name=DieAward,proto3" json:"DieAward,omitempty"` //BOSS死亡奖励 + BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //BUFF剩余次数 + ExtraDrop []*RankAwardData `protobuf:"bytes,8,rep,name=ExtraDrop,proto3" json:"ExtraDrop,omitempty"` //大爆竹额外掉落 + FloorReward []*RankAwardData `protobuf:"bytes,9,rep,name=FloorReward,proto3" json:"FloorReward,omitempty"` //保底奖励 +} + +func (x *SCNianAttackData) Reset() { + *x = SCNianAttackData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianAttackData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianAttackData) ProtoMessage() {} + +func (x *SCNianAttackData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCNianAttackData.ProtoReflect.Descriptor instead. +func (*SCNianAttackData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{9} +} + +func (x *SCNianAttackData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *SCNianAttackData) GetBossHp() int64 { + if x != nil { + return x.BossHp + } + return 0 +} + +func (x *SCNianAttackData) GetAward() []*RankAwardData { + if x != nil { + return x.Award + } + return nil +} + +func (x *SCNianAttackData) GetAttackHp() int64 { + if x != nil { + return x.AttackHp + } + return 0 +} + +func (x *SCNianAttackData) GetIsDie() bool { + if x != nil { + return x.IsDie + } + return false +} + +func (x *SCNianAttackData) GetDieAward() []*RankAwardData { + if x != nil { + return x.DieAward + } + return nil +} + +func (x *SCNianAttackData) GetBuffCount() int64 { + if x != nil { + return x.BuffCount + } + return 0 +} + +func (x *SCNianAttackData) GetExtraDrop() []*RankAwardData { + if x != nil { + return x.ExtraDrop + } + return nil +} + +func (x *SCNianAttackData) GetFloorReward() []*RankAwardData { + if x != nil { + return x.FloorReward + } + return nil +} + +//领取签到奖励 +//PACKET_CSNianSignAward +type CSNianSignAward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CSNianSignAward) Reset() { + *x = CSNianSignAward{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianSignAward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianSignAward) ProtoMessage() {} + +func (x *CSNianSignAward) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CSNianSignAward.ProtoReflect.Descriptor instead. +func (*CSNianSignAward) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{10} +} + +//PACKET_SCNianSignAward +type SCNianSignAward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SignAwardTime int64 `protobuf:"varint,1,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` + SignAward []*RankAwardData `protobuf:"bytes,2,rep,name=SignAward,proto3" json:"SignAward,omitempty"` //签到奖励 +} + +func (x *SCNianSignAward) Reset() { + *x = SCNianSignAward{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianSignAward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianSignAward) ProtoMessage() {} + +func (x *SCNianSignAward) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCNianSignAward.ProtoReflect.Descriptor instead. +func (*SCNianSignAward) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{11} +} + +func (x *SCNianSignAward) GetSignAwardTime() int64 { + if x != nil { + return x.SignAwardTime + } + return 0 +} + +func (x *SCNianSignAward) GetSignAward() []*RankAwardData { + if x != nil { + return x.SignAward + } + return nil +} + +var File_protocol_activity_nian_proto protoreflect.FileDescriptor + +var file_protocol_activity_nian_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x2f, 0x6e, 0x69, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69, + 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x45, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x42, 0x6f, 0x73, 0x73, 0x4d, 0x61, 0x78, 0x48, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x42, 0x6f, 0x73, 0x73, 0x4d, 0x61, 0x78, 0x48, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x42, + 0x6f, 0x73, 0x73, 0x48, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x42, 0x6f, 0x73, + 0x73, 0x48, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x4c, 0x75, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x4c, 0x75, 0x63, 0x6b, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, + 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, + 0x75, 0x66, 0x66, 0x22, 0x2a, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, + 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x28, 0x0a, 0x0e, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0e, 0x53, 0x43, 0x4e, + 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, + 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x8f, 0x01, 0x0a, 0x08, + 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x49, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x49, 0x63, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2d, + 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, + 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x41, 0x0a, + 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, + 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, + 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, + 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0xe8, 0x02, 0x0a, 0x10, 0x53, 0x43, 0x4e, + 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, + 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x12, 0x2d, 0x0a, + 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44, 0x69, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x12, 0x33, + 0x0a, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x35, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, + 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, + 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, + 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, + 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6e, 0x0a, 0x0f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, + 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, + 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x35, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, + 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x53, 0x69, 0x67, + 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x2a, 0xae, 0x02, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x16, 0x0a, + 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x10, 0xe4, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe5, 0x14, 0x12, 0x16, 0x0a, + 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, + 0x66, 0x66, 0x10, 0xe6, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe7, 0x14, 0x12, 0x1a, 0x0a, + 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, + 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe8, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x10, 0xe9, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xea, 0x14, 0x12, + 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xeb, 0x14, 0x12, 0x1b, 0x0a, + 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, + 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xec, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, + 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, + 0x77, 0x61, 0x72, 0x64, 0x10, 0xed, 0x14, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, + 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_protocol_activity_nian_proto_rawDescOnce sync.Once + file_protocol_activity_nian_proto_rawDescData = file_protocol_activity_nian_proto_rawDesc +) + +func file_protocol_activity_nian_proto_rawDescGZIP() []byte { + file_protocol_activity_nian_proto_rawDescOnce.Do(func() { + file_protocol_activity_nian_proto_rawDescData = protoimpl.X.CompressGZIP(file_protocol_activity_nian_proto_rawDescData) + }) + return file_protocol_activity_nian_proto_rawDescData +} + +var file_protocol_activity_nian_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_protocol_activity_nian_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_protocol_activity_nian_proto_goTypes = []interface{}{ + (NianPacketID)(0), // 0: activity.NianPacketID + (*CSNianData)(nil), // 1: activity.CSNianData + (*SCNianData)(nil), // 2: activity.SCNianData + (*CSNianBuff)(nil), // 3: activity.CSNianBuff + (*SCNianBuff)(nil), // 4: activity.SCNianBuff + (*CSNianRankData)(nil), // 5: activity.CSNianRankData + (*SCNianRankData)(nil), // 6: activity.SCNianRankData + (*RankData)(nil), // 7: activity.RankData + (*RankAwardData)(nil), // 8: activity.RankAwardData + (*CSNianAttack)(nil), // 9: activity.CSNianAttack + (*SCNianAttackData)(nil), // 10: activity.SCNianAttackData + (*CSNianSignAward)(nil), // 11: activity.CSNianSignAward + (*SCNianSignAward)(nil), // 12: activity.SCNianSignAward +} +var file_protocol_activity_nian_proto_depIdxs = []int32{ + 7, // 0: activity.SCNianData.LuckData:type_name -> activity.RankData + 7, // 1: activity.SCNianRankData.Data:type_name -> activity.RankData + 8, // 2: activity.RankData.Award:type_name -> activity.RankAwardData + 8, // 3: activity.SCNianAttackData.Award:type_name -> activity.RankAwardData + 8, // 4: activity.SCNianAttackData.DieAward:type_name -> activity.RankAwardData + 8, // 5: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData + 8, // 6: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData + 8, // 7: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_protocol_activity_nian_proto_init() } +func file_protocol_activity_nian_proto_init() { + if File_protocol_activity_nian_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_protocol_activity_nian_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCNianData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianBuff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCNianBuff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianRankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCNianRankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankAwardData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianAttack); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCNianAttackData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianSignAward); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCNianSignAward); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protocol_activity_nian_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protocol_activity_nian_proto_goTypes, + DependencyIndexes: file_protocol_activity_nian_proto_depIdxs, + EnumInfos: file_protocol_activity_nian_proto_enumTypes, + MessageInfos: file_protocol_activity_nian_proto_msgTypes, + }.Build() + File_protocol_activity_nian_proto = out.File + file_protocol_activity_nian_proto_rawDesc = nil + file_protocol_activity_nian_proto_goTypes = nil + file_protocol_activity_nian_proto_depIdxs = nil +} diff --git a/protocol/activity/nian.proto b/protocol/activity/nian.proto new file mode 100644 index 0000000..12f2b76 --- /dev/null +++ b/protocol/activity/nian.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; +package activity; +option go_package = "mongo.games.com/game/protocol/activity"; + +enum NianPacketID { + PACKET_Nian_ZERO = 0; // 弃用消息号 + PACKET_CSNianData = 2660; // 获取年兽信息 + PACKET_SCNianData = 2661; // 返回年兽信息 + PACKET_CSNianBuff = 2662; // 请求领取BUFF + PACKET_SCNianBuff = 2663; // 返回Buff信息 + PACKET_CSNianRankData = 2664; // 请求排行榜信息 + PACKET_SCNianRankData = 2665; // 返回排行榜信息 + PACKET_CSNianAttack = 2666; //请求攻击年兽 + PACKET_SCNianAttackData = 2667; //返回攻击年兽信息 + PACKET_CSNianSignAward = 2668; //请求签到 + PACKET_SCNianSignAward = 2669; //签到返回 +} + +//获取年兽活动信息 +//PACKET_CSNianData +message CSNianData{ +} +//PACKET_SCNianData +message SCNianData{ + int64 ActivityStartTime = 1; //活动开始时间 + int64 ActivityEndTime = 2; //活动结束时间 + int64 BossMaxHp = 3; //Boss最大血量 + int64 BossHp = 4; //Boss当前血量 + repeated RankData LuckData = 5;//幸运榜 + int64 AwardTime = 6;//每日签到领取时间 + int64 BuffCount = 7;//Buff剩余次数 + bool BuffStatus = 8;//Buff领取状态 + int32 On = 9;//活动开关 1开启 2关闭 + int64 SignAwardTime = 10;//签到领取时间 0-未领取 +} + +//贺春 +//请求领取BUFF +//PACKET_CSNianBuff +message CSNianBuff{ +} +//PACKET_SCNianBuff +message SCNianBuff{ + int64 BuffCount = 1; //BUFF剩余次数 +} +//排行榜数据 +//PACKET_CSNianRankData +message CSNianRankData{ + int32 TypeId = 1;//1-幸运榜 2-总伤害榜 +} +//PACKET_SCNianRankData +message SCNianRankData{ + int32 TypeId = 1; + repeated RankData Data = 2; +} +message RankData{ + int32 RankId =1; + string Name = 2; + int32 Icon = 3; + int64 Score = 4; + repeated RankAwardData Award = 5; +} + +message RankAwardData{ + int32 ItemId =1; + int64 ItemNum = 2; +} +//攻击年兽 +//PACKET_CSNianAttack +message CSNianAttack{ + int32 TypeId = 1; //1-小爆竹 2-小爆竹*10 3-大爆竹 +} +//PACKET_SCNianAttackData +message SCNianAttackData{ + int32 TypeId = 1; //1-小爆竹 2-小爆竹*10 3-大爆竹 + int64 BossHp = 2; //BOSS当前血量 + repeated RankAwardData Award = 3; //获得道具 + int64 AttackHp = 4; // 攻击伤害 + bool IsDie = 5; //BOSS是否死亡 + repeated RankAwardData DieAward = 6;//BOSS死亡奖励 + int64 BuffCount = 7; //BUFF剩余次数 + repeated RankAwardData ExtraDrop = 8;//大爆竹额外掉落 + repeated RankAwardData FloorReward = 9;//保底奖励 +} +//领取签到奖励 +//PACKET_CSNianSignAward +message CSNianSignAward{ +} +//PACKET_SCNianSignAward +message SCNianSignAward{ + int64 SignAwardTime = 1; + repeated RankAwardData SignAward = 2;//签到奖励 +} \ No newline at end of file diff --git a/protocol/server/pbdata.proto b/protocol/server/pbdata.proto index bd35af5..531f3fd 100644 --- a/protocol/server/pbdata.proto +++ b/protocol/server/pbdata.proto @@ -1263,6 +1263,38 @@ message DB_NewPlayerArray { repeated DB_NewPlayer Arr = 1; } +message DB_NewYearActivity { + + int32 Id = 1; + + string PorpName = 2; + + string PropValue = 3; + + string PropDec = 4; + +} + +message DB_NewYearActivityArray { + repeated DB_NewYearActivity Arr = 1; +} + +message DB_NewYearRankReward { + + int32 Id = 1; + + int32 RankType = 2; + + int32 RankLevelId = 3; + + map AwardMap = 4; + +} + +message DB_NewYearRankRewardArray { + repeated DB_NewYearRankReward Arr = 1; +} + message DB_PassShow { int32 Id = 1; diff --git a/protocol/task/task.proto b/protocol/task/task.proto index 2f7f359..88b4474 100644 --- a/protocol/task/task.proto +++ b/protocol/task/task.proto @@ -44,7 +44,7 @@ message SCTaskList{ // 领取任务奖励 // PACKET_CSTaskReward message CSTaskReward{ - int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 + int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 8: 年兽每日任务 9:年兽活动任务 int32 Id = 2; // 任务id; 0 表示一键领取 } // PACKET_SCTaskReward diff --git a/protocol/webapi/common.proto b/protocol/webapi/common.proto index 7f20107..69bb367 100644 --- a/protocol/webapi/common.proto +++ b/protocol/webapi/common.proto @@ -1096,4 +1096,27 @@ message PigBankPropInfo { message GamePigBankPropConfig{ string Platform = 1; // 平台 repeated PigBankPropInfo PropInfo = 2; // 存钱罐属性 +} +//etcd /game/activity_nian +message ActivityNianConfig { + string Platform = 1; // 平台 + repeated NianInfo List = 2; + int32 Switch = 3; // 活动开关 1.开启 2.关闭 +} + +message NianInfo{ + string ActivityStart = 1; // 活动开始时间 + string ActivityEnd = 2; // 活动结束时间 + int64 BuffStartTime = 3; //Buff领取开始时间 18 + int64 BuffEndTime = 4; //Buff领取结束时间 21 + repeated ItemInfo SignReward = 5; // 签到奖励 + repeated ItemInfo BossDieReward = 6; // 击杀BOSS奖励 + repeated NianDropInfo BossDieOtherReward = 7; // 击杀Boss额外奖励 +} +message NianDropInfo{ + int32 Id = 1; + int32 ItemId = 2; // 物品ID + int64 ItemNum = 3; // 物品数量 + int32 DropRate = 4;//掉落概率 + int32 DropUp = 5;//掉落上限 } \ No newline at end of file diff --git a/srvdata/db_newyearactivity.go b/srvdata/db_newyearactivity.go new file mode 100644 index 0000000..b7224d7 --- /dev/null +++ b/srvdata/db_newyearactivity.go @@ -0,0 +1,77 @@ + +// Code generated by xlsx2proto. +// DO NOT EDIT! + +package srvdata + +import ( + "google.golang.org/protobuf/proto" + + "mongo.games.com/game/protocol/server" +) + +var PBDB_NewYearActivityMgr = &DB_NewYearActivityMgr{ + Datas: &server.DB_NewYearActivityArray{}, + pool: make(map[int32]*server.DB_NewYearActivity), + +} + +type DB_NewYearActivityMgr struct { + Datas *server.DB_NewYearActivityArray + pool map[int32]*server.DB_NewYearActivity + +} + +func (this *DB_NewYearActivityMgr) unmarshal(data []byte) error { + err := proto.Unmarshal(data, this.Datas) + if err == nil { + this.arrangeData() + } + return err +} + +func (this *DB_NewYearActivityMgr) reunmarshal(data []byte) error { + newDatas := &server.DB_NewYearActivityArray{} + err := proto.Unmarshal(data, newDatas) + if err == nil { + for _, item := range newDatas.Arr { + existItem := this.GetData(item.GetId()) + if existItem == nil { + this.pool[item.GetId()] = item + this.Datas.Arr = append(this.Datas.Arr, item) + + } else { + *existItem = *item + } + } + } + return err +} + +func (this *DB_NewYearActivityMgr) arrangeData() { + if this.Datas == nil { + return + } + + dataArr := this.Datas.GetArr() + if dataArr == nil { + return + } + + for _, data := range dataArr { + this.pool[data.GetId()] = data + + } +} + +func (this *DB_NewYearActivityMgr) GetData(id int32) *server.DB_NewYearActivity { + if data, ok := this.pool[id]; ok { + return data + } + return nil +} + + +func init() { + DataMgr.register("DB_NewYearActivity.dat", &ProtobufDataLoader{dh: PBDB_NewYearActivityMgr}) +} diff --git a/srvdata/db_newyearrankreward.go b/srvdata/db_newyearrankreward.go new file mode 100644 index 0000000..38c579f --- /dev/null +++ b/srvdata/db_newyearrankreward.go @@ -0,0 +1,77 @@ + +// Code generated by xlsx2proto. +// DO NOT EDIT! + +package srvdata + +import ( + "google.golang.org/protobuf/proto" + + "mongo.games.com/game/protocol/server" +) + +var PBDB_NewYearRankRewardMgr = &DB_NewYearRankRewardMgr{ + Datas: &server.DB_NewYearRankRewardArray{}, + pool: make(map[int32]*server.DB_NewYearRankReward), + +} + +type DB_NewYearRankRewardMgr struct { + Datas *server.DB_NewYearRankRewardArray + pool map[int32]*server.DB_NewYearRankReward + +} + +func (this *DB_NewYearRankRewardMgr) unmarshal(data []byte) error { + err := proto.Unmarshal(data, this.Datas) + if err == nil { + this.arrangeData() + } + return err +} + +func (this *DB_NewYearRankRewardMgr) reunmarshal(data []byte) error { + newDatas := &server.DB_NewYearRankRewardArray{} + err := proto.Unmarshal(data, newDatas) + if err == nil { + for _, item := range newDatas.Arr { + existItem := this.GetData(item.GetId()) + if existItem == nil { + this.pool[item.GetId()] = item + this.Datas.Arr = append(this.Datas.Arr, item) + + } else { + *existItem = *item + } + } + } + return err +} + +func (this *DB_NewYearRankRewardMgr) arrangeData() { + if this.Datas == nil { + return + } + + dataArr := this.Datas.GetArr() + if dataArr == nil { + return + } + + for _, data := range dataArr { + this.pool[data.GetId()] = data + + } +} + +func (this *DB_NewYearRankRewardMgr) GetData(id int32) *server.DB_NewYearRankReward { + if data, ok := this.pool[id]; ok { + return data + } + return nil +} + + +func init() { + DataMgr.register("DB_NewYearRankReward.dat", &ProtobufDataLoader{dh: PBDB_NewYearRankRewardMgr}) +} diff --git a/worldsrv/action_nian.go b/worldsrv/action_nian.go new file mode 100644 index 0000000..ca15794 --- /dev/null +++ b/worldsrv/action_nian.go @@ -0,0 +1,505 @@ +package main + +import ( + "math/rand" + "mongo.games.com/game/common" + "mongo.games.com/game/model" + "mongo.games.com/game/protocol/activity" + "mongo.games.com/game/srvdata" + "mongo.games.com/goserver/core/logger" + "mongo.games.com/goserver/core/netlib" + "strconv" + "strings" + "time" +) + +// 请求年兽信息 +func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) error { + if _, ok := data.(*activity.CSNianData); ok { + p := PlayerMgrSington.GetOnlinePlayer(sid) + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + BossMaxHp := int64(0) + for _, value := range sData { + if value.Id == 5 { + BossMaxHp, _ = strconv.ParseInt(value.PropValue, 10, 64) + break + } + } + logger.Logger.Trace("请求年兽信息!snid = ", p.SnId) + if p == nil { + logger.Logger.Warn("CSNianData p == nil") + return nil + } + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil || pool.Switch == model.WelfareClose { + return nil + } + startTime := pool.List[0].ActivityStart + endTime := pool.List[0].ActivityEnd + start, _ := time.Parse(time.DateTime, startTime) + // 转换为时间戳(以秒为单位) + timestamp := start.Unix() + end, _ := time.Parse(time.DateTime, endTime) + endTimestamp := end.Unix() + + if p.WelfData.NianData != nil && (p.WelfData.NianData.ActivityStartTime != timestamp || p.WelfData.NianData.ActivityEndTime != endTimestamp) { + logger.Logger.Infof("CSNianData 年兽活动时间变更 清除之前数据 snid= %d", p.SnId) + WelfareMgrSington.ClearActivityNianData(p) + } + + if p.WelfData.NianData == nil { + p.WelfData.NianData = &model.NianData{ + ActivityStartTime: timestamp, + ActivityEndTime: endTimestamp, + } + + } + + if p.WelfData.NianData.BossHp == 0 { + p.WelfData.NianData.BossHp = BossMaxHp + } + pack := &activity.SCNianData{} + pack.BossHp = p.WelfData.NianData.BossHp + pack.BossMaxHp = BossMaxHp + // pack.ActivityStartTime = timestamp + //pack.ActivityEndTime = endTimestamp + pack.ActivityStartTime = 0 + pack.ActivityEndTime = 0 + pack.AwardTime = p.WelfData.NianData.SignAwardTime + pack.BuffCount = p.WelfData.NianData.BuffCount + pack.BuffStatus = p.WelfData.NianData.BuffStatus + pack.LuckData = nil + pack.SignAwardTime = p.WelfData.NianData.SignAwardTime + logger.Logger.Trace("请求年兽活动信息 ", pack) + p.SendToClient(int(activity.NianPacketID_PACKET_SCNianData), pack) + } + return nil +} + +// 攻击年兽 +func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) error { + if msg, ok := data.(*activity.CSNianAttack); ok { + typeId := msg.TypeId + p := PlayerMgrSington.GetOnlinePlayer(sid) + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + BossMaxHp := int64(0) + for _, value := range sData { + if value.Id == 5 { + BossMaxHp, _ = strconv.ParseInt(value.PropValue, 10, 64) + break + } + } + if p.WelfData.NianData == nil { + p.WelfData.NianData = &model.NianData{} + } + if p.WelfData.NianData.BossHp <= 0 { + p.WelfData.NianData.BossHp = BossMaxHp + } + logger.Logger.Trace("客户端请求攻击年兽!snid = ", p.SnId) + if p == nil { + logger.Logger.Warn("CSNianAttack p == nil") + return nil + } + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil { + return nil + } + if pool.Switch == model.WelfareClose { + logger.Logger.Trace("CSNianAttack 活动关闭!") + return nil + } + //判断活动时间 + startTime := pool.List[0].ActivityStart + endTime := pool.List[0].ActivityEnd + t, _ := time.Parse(time.DateTime, startTime) + // 转换为时间戳(以秒为单位) + timestamp := t.Unix() + end, _ := time.Parse(time.DateTime, endTime) + endTimestamp := end.Unix() + nowTime := time.Now().Unix() + if nowTime < timestamp || nowTime > endTimestamp { + return nil + } + + pack := &activity.SCNianAttackData{} + itemId := 0 + itemNum := 1 + count := 1 + if typeId == 1 { + itemId = common.ItemIDLittleGuaranteed + } else if typeId == 2 { + itemId = common.ItemIDLittleGuaranteed + itemNum = 10 + count = 10 + } else if typeId == 3 { + itemId = common.ItemIDBigGuaranteed + } else { + return nil + } + var items []*model.Item + items = append(items, &model.Item{ + ItemId: int32(itemId), + ItemNum: int64(itemNum), + }) + _, _, result := BagMgrSingleton.AddItems(&model.AddItemParam{ + Platform: p.Platform, + SnId: p.SnId, + Change: items, + GainWay: common.GainWayNianCost, + Operator: "system", + Remark: "年兽活动消耗", + }) + if !result { + return nil + } + //本次攻击总血量 + AttackHp := int64(0) + //伤害范围 + var intSlice []int + if typeId == 1 || typeId == 2 { + for _, value := range sData { + if value.Id == 9 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, err := strconv.Atoi(s) + if err != nil { + return nil + } + intSlice = append(intSlice, num) + } + break + } + } + } + //保底奖励次数 + floorCount := 0 + for _, value := range sData { + if typeId == 1 || typeId == 2 { + if value.Id == 13 { + floorCount, _ = strconv.Atoi(value.PropValue) + break + } + } else { + if value.Id == 15 { + floorCount, _ = strconv.Atoi(value.PropValue) + break + } + } + } + if typeId == 3 { + for _, value := range sData { + if value.Id == 10 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, err := strconv.Atoi(s) + if err != nil { + return nil + } + intSlice = append(intSlice, num) + } + break + } + } + } + awardInfo := &activity.RankAwardData{} + + for i := 0; i < count; i++ { + //随机伤害值 + randomValue := int64(rand.Intn(intSlice[1]-intSlice[0]+1) + intSlice[0]) + logger.Logger.Tracef("随机到的伤害值是:%d", randomValue) + //计算BUFF + if p.WelfData.NianData.BuffCount > 0 { + randomValue = randomValue + randomValue/2 + p.WelfData.NianData.BuffCount -= 1 + } + AttackHp += randomValue + if typeId == 3 { + p.WelfData.NianData.BigHurt += 1 + //判断是否掉落保底奖励 + if p.WelfData.NianData.BigHurt%int32(floorCount) == 0 { + floorReward := &activity.RankAwardData{} + for _, value := range sData { + if value.Id == 16 { + strSlice := strings.Split(value.PropValue, ",") + FloorItemId, _ := strconv.Atoi(strSlice[0]) + FloorItemNum, _ := strconv.Atoi(strSlice[1]) + items = append(items, &model.Item{ + ItemId: int32(FloorItemId), + ItemNum: int64(FloorItemNum), + }) + floorReward.ItemId = int32(FloorItemId) + floorReward.ItemNum = int64(FloorItemNum) + pack.FloorReward = append(pack.FloorReward, floorReward) + break + } + } + } + //额外掉落 + extraItemId := 0 + extraItemNum := 0 + var intSlice1 []int + for _, value := range sData { + if value.Id == 11 { + extraItemId, _ = strconv.Atoi(value.PropValue) + break + } + } + for _, value := range sData { + if value.Id == 12 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, err := strconv.Atoi(s) + if err != nil { + return nil + } + intSlice1 = append(intSlice1, num) + } + break + } + } + //随机个数 + extraItemNum = rand.Intn(intSlice1[1]-intSlice1[0]+1) + intSlice1[0] + items = append(items, &model.Item{ + ItemId: int32(extraItemId), + ItemNum: int64(extraItemNum), + }) + extraDrop := &activity.RankAwardData{} + extraDrop.ItemId = int32(extraItemId) + extraDrop.ItemNum = int64(extraItemNum) + pack.ExtraDrop = append(pack.ExtraDrop, extraDrop) + } else { + p.WelfData.NianData.LittleHurt += 1 + //判断是否掉落保底奖励 + if p.WelfData.NianData.LittleHurt%int32(floorCount) == 0 { + floorReward := &activity.RankAwardData{} + for _, value := range sData { + if value.Id == 14 { + strSlice := strings.Split(value.PropValue, ",") + FloorItemId, _ := strconv.Atoi(strSlice[0]) + FloorItemNum, _ := strconv.Atoi(strSlice[1]) + items = append(items, &model.Item{ + ItemId: int32(FloorItemId), + ItemNum: int64(FloorItemNum), + }) + floorReward.ItemId = int32(FloorItemId) + floorReward.ItemNum = int64(FloorItemNum) + pack.FloorReward = append(pack.FloorReward, floorReward) + break + } + } + } + } + //上榜 幸运榜 总榜 + + } + p.WelfData.NianData.BossHp -= AttackHp + isDie := false //是否死亡 + //判断Boss是否死亡 + var bossDieAward []*model.Item + if p.WelfData.NianData.BossHp <= 0 { + isDie = true + p.WelfData.NianData.BossHp = BossMaxHp + p.WelfData.NianData.BossDieCount += 1 + //获取死亡奖励 + for _, value := range sData { + if value.Id == 6 { + str := value.PropValue + strSlice := strings.Split(str, ";") + for _, s := range strSlice { + strSlice1 := strings.Split(s, ",") + bossDieItemId, err := strconv.Atoi(strSlice1[0]) + if err != nil { + return nil + } + bossDieItemNum, err := strconv.ParseInt(strSlice1[1], 10, 64) + if err != nil { + return nil + } + bossDieAward = append(bossDieAward, &model.Item{ + ItemId: int32(bossDieItemId), + ItemNum: bossDieItemNum, + }) + items = append(items, &model.Item{ + ItemId: int32(bossDieItemId), + ItemNum: bossDieItemNum, + }) + } + break + } + } + //年兽死亡额外掉落 + BigHurtCount := 0 + for _, value := range sData { + if value.Id == 19 { + BigHurtCount, _ = strconv.Atoi(value.PropValue) + break + } + } + logger.Logger.Trace("年兽死亡额外掉落 当前已使用BigHurt :", p.WelfData.NianData.BigHurt, "BigHurtCount = ", BigHurtCount) + if p.WelfData.NianData.BigHurt >= int32(BigHurtCount) { + //后台配置额外掉落 + for _, info := range pool.List[0].BossDieOtherReward { + //value.BossDieOtherReward + if p.WelfData.NianData.OtherAwardNum[info.Id] >= info.DropUp { + logger.Logger.Trace("BOSS死亡 额外掉落达到上限 id = ", info.Id, "数量:", p.WelfData.NianData.OtherAwardNum[info.Id]) + continue + } + //随机 + if rand.Intn(100) < int(info.DropRate) { + otherItemId := info.ItemId + otherItemNum := info.ItemNum + if int32(otherItemNum)+p.WelfData.NianData.OtherAwardNum[info.Id] > info.DropUp { + otherItemNum = int64(info.DropUp - p.WelfData.NianData.OtherAwardNum[info.Id]) + } + p.WelfData.NianData.OtherAwardNum[info.Id] += int32(otherItemNum) + items = append(items, &model.Item{ + ItemId: otherItemId, + ItemNum: otherItemNum, + }) + bossDieAward = append(bossDieAward, &model.Item{ + ItemId: otherItemId, + ItemNum: otherItemNum, + }) + } + } + } + } + + items = append(items, &model.Item{ + ItemId: common.ItemIDCoin, + ItemNum: AttackHp, + }) + BagMgrSingleton.AddItems(&model.AddItemParam{ + Platform: p.Platform, + SnId: p.SnId, + Change: items, + GainWay: common.GainWayNianGain, + Operator: "system", + Remark: "年兽活动-攻击年兽获得", + }) + awardInfo.ItemId = common.ItemIDCoin + awardInfo.ItemNum = AttackHp + pack.Award = append(pack.Award, awardInfo) + pack.AttackHp = AttackHp + pack.TypeId = typeId + pack.BossHp = p.WelfData.NianData.BossHp + pack.IsDie = isDie + for _, item := range bossDieAward { + dieInfo := &activity.RankAwardData{} + dieInfo.ItemId = item.ItemId + dieInfo.ItemNum = item.ItemNum + pack.DieAward = append(pack.DieAward, dieInfo) + } + pack.BuffCount = p.WelfData.NianData.BuffCount + p.SendToClient(int(activity.NianPacketID_PACKET_SCNianAttackData), pack) + } + return nil +} + +// 请求领取BUFF +func CSNianBuff(s *netlib.Session, packetid int, data interface{}, sid int64) error { + if _, ok := data.(*activity.CSNianBuff); ok { + p := PlayerMgrSington.GetOnlinePlayer(sid) + //yearActivity := &server.DB_NewYearActivity{} + logger.Logger.Trace("客户端请求请求领取BUFF snid = ", p.SnId) + if p == nil { + return nil + } + if p.WelfData.NianData == nil { + p.WelfData.NianData = &model.NianData{} + } + if p.WelfData.NianData.BuffStatus { + return nil + } + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil { + return nil + } + if pool.Switch == model.WelfareClose { + logger.Logger.Trace("CSNianSignAward 活动关闭!") + return nil + } + //判断领取时间 + if time.Now().Hour() >= int(pool.List[0].BuffStartTime) && time.Now().Hour() <= int(pool.List[0].BuffEndTime) { + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + count := int64(0) + for _, value := range sData { + if value.Id == 20 { + count, _ = strconv.ParseInt(value.PropValue, 10, 64) + break + } + } + p.WelfData.NianData.BuffCount = count + p.WelfData.NianData.BuffStatus = true + pack := &activity.SCNianBuff{ + BuffCount: p.WelfData.NianData.BuffCount, + } + p.SendToClient(int(activity.NianPacketID_PACKET_SCNianBuff), pack) + } + } + return nil +} + +// 领取签到奖励 +func CSNianSignAward(s *netlib.Session, packetid int, data interface{}, sid int64) error { + if _, ok := data.(*activity.CSNianBuff); ok { + p := PlayerMgrSington.GetOnlinePlayer(sid) + logger.Logger.Trace("客户端请求请求领取BUFF snid = ", p.SnId) + if p == nil { + return nil + } + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil { + return nil + } + if pool.Switch == model.WelfareClose { + logger.Logger.Trace("CSNianSignAward 活动关闭!") + return nil + } + if p.WelfData.NianData == nil { + p.WelfData.NianData = &model.NianData{} + } + if p.WelfData.NianData.SignAwardTime > 0 { + return nil + } + p.WelfData.NianData.SignAwardTime = time.Now().Unix() + //奖励 + pack := &activity.SCNianSignAward{} + pack.SignAwardTime = p.WelfData.NianData.SignAwardTime + var items []*model.Item + for _, info := range pool.List[0].SignReward { + items = append(items, &model.Item{ + ItemId: info.ItemId, + ItemNum: info.ItemNum, + }) + award := &activity.RankAwardData{} + award.ItemId = info.ItemId + award.ItemNum = info.ItemNum + pack.SignAward = append(pack.SignAward, award) + } + + BagMgrSingleton.AddItems(&model.AddItemParam{ + Platform: p.Platform, + SnId: p.SnId, + Change: items, + GainWay: common.GainWayNianGain, + Operator: "system", + Remark: "年兽活动-领取签到奖励获得", + }) + p.SendToClient(int(activity.NianPacketID_PACKET_SCNianSignAward), pack) + } + return nil +} + +func init() { + common.Register(int(activity.NianPacketID_PACKET_CSNianData), activity.CSNianData{}, CSNianData) + common.Register(int(activity.NianPacketID_PACKET_CSNianAttack), activity.CSNianAttack{}, CSNianAttack) + common.Register(int(activity.NianPacketID_PACKET_CSNianBuff), activity.CSNianBuff{}, CSNianBuff) + common.Register(int(activity.NianPacketID_PACKET_CSNianSignAward), activity.CSNianSignAward{}, CSNianSignAward) +} diff --git a/worldsrv/action_task.go b/worldsrv/action_task.go index a88863d..877bea5 100644 --- a/worldsrv/action_task.go +++ b/worldsrv/action_task.go @@ -53,7 +53,7 @@ func IsTaskReward(p *Player, id int32) bool { if data := p.WelfData.Task[id]; data != nil && data.Ts > 0 { t := srvdata.PBDB_TaskMgr.GetData(id) switch t.ActivityType { - case common.TaskActivityTypeEveryDay, common.TaskActivityTypePermitEveryDay: + case common.TaskActivityTypeEveryDay, common.TaskActivityTypePermitEveryDay, common.TaskActivityTypeNianEveryDay: if common.TsInSameDay(time.Now().Unix(), data.Ts) { return true } @@ -74,6 +74,24 @@ func IsTaskReward(p *Player, id int32) bool { return data.Ts >= startTs && data.Ts < endTs } return true + case common.TaskActivityTypeNian: + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil { + return false + } + if pool.Switch == model.WelfareClose { + return false + } + startTime := pool.List[0].ActivityStart + endTime := pool.List[0].ActivityEnd + start, _ := time.Parse(time.DateTime, startTime) + timestamp := start.Unix() + end, _ := time.Parse(time.DateTime, endTime) + endTimestamp := end.Unix() + if timestamp > 0 { + return data.Ts >= timestamp && data.Ts < endTimestamp + } + return true } } } diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index c637fbe..e6ad23f 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -110,6 +110,8 @@ func init() { etcd.Register(etcd.ETCDKEY_PigBankDiamond, webapi.GamePigBankDiamondConfig{}, platformConfigEvent) // 存钱罐属性值 etcd.Register(etcd.ETCDKEY_PigBankProp, webapi.GamePigBankPropConfig{}, platformConfigEvent) + //年兽配置 + etcd.Register(etcd.ETCDKEY_NianConfig, webapi.ActivityNianConfig{}, platformConfigEvent) } @@ -356,6 +358,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e PlatformMgrSingleton.GetConfig(config.Platform).GamePigBankDiamondConfig = config case *webapi.GamePigBankPropConfig: PlatformMgrSingleton.GetConfig(config.Platform).GamePigBankPropConfig = config + case *webapi.ActivityNianConfig: + WelfareMgrSington.UpdateActivityNianStatus(config) default: logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) } diff --git a/worldsrv/player.go b/worldsrv/player.go index 7839929..bc7eaad 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -1681,6 +1681,9 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) { for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypePermitEveryDay) { this.WelfData.Task[v.GetId()] = &model.TaskData{} } + for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeNianEveryDay) { + this.WelfData.Task[v.GetId()] = &model.TaskData{} + } } } //周卡数据更新 diff --git a/worldsrv/taskmgr.go b/worldsrv/taskmgr.go index ee42382..356aac8 100644 --- a/worldsrv/taskmgr.go +++ b/worldsrv/taskmgr.go @@ -4,6 +4,7 @@ import ( "container/list" "math" "mongo.games.com/goserver/core/logger" + "time" "mongo.games.com/game/common" "mongo.games.com/game/model" @@ -191,6 +192,25 @@ func (t *TaskHandle) AllTask(id int, data any) { } } } + if v.ActivityType == common.TaskActivityTypeNianEveryDay || v.ActivityType == common.TaskActivityTypeNian { + //判断是否在开启时间段内 + pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + if pool == nil || pool.List == nil { + continue + } + if pool.Switch == model.WelfareClose { + continue + } + startTime := pool.List[0].ActivityStart + endTime := pool.List[0].ActivityEnd + start, _ := time.Parse(time.DateTime, startTime) + timestamp := start.Unix() + end, _ := time.Parse(time.DateTime, endTime) + endTimestamp := end.Unix() + if time.Now().Unix() < timestamp || time.Now().Unix() > endTimestamp { + continue + } + } if p.WelfData.Task[v.Id] == nil { p.WelfData.Task[v.Id] = &model.TaskData{N: 0} // 初始化任务数据 @@ -292,4 +312,5 @@ func init() { TaskSubjectSingleton.Attach(common.TaskTypeTienlenWinCoin, taskHandle) TaskSubjectSingleton.Attach(common.TaskTypeRankMatchWinTimes, taskHandle) TaskSubjectSingleton.Attach(common.TaskTypeBuyPermit, taskHandle) + TaskSubjectSingleton.Attach(common.TaskTypeBuyRedBag, taskHandle) } diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 352855b..84bb667 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -291,6 +291,8 @@ func (this *WelfareMgr) OnDayChanged(player *Player) error { // 重置存钱罐 this.DayResetPigBank(player) + //重置年兽 + this.DayReserNian(player) return nil } @@ -305,8 +307,9 @@ func (this *WelfareMgr) MonitorWelfData(player *Player) { player.WelfData.PigBank = &model.PigBankData{} } else if player.WelfData.DiamondBank == nil { player.WelfData.DiamondBank = &model.DiamondBankData{} + } else if player.WelfData.NianData == nil { + player.WelfData.NianData = &model.NianData{} } - } // GetTurnplate 获取转盘奖励 @@ -1004,6 +1007,13 @@ func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) { } else { pack.WelfareSwitch = append(pack.WelfareSwitch, model.WelfareClose) } + //年兽活动 + nianConfig := info.ActivityNianConfig + if nianConfig != nil { + pack.WelfareSwitch = append(pack.WelfareSwitch, nianConfig.Switch) //年兽活动开关 + } else { + pack.WelfareSwitch = append(pack.WelfareSwitch, model.WelfareClose) + } if model.GameParamData.TestActSwitch { for k := range pack.WelfareSwitch { @@ -1118,7 +1128,7 @@ func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) { if cyc == 1 || blindBox.Cycle == model.WelfareOpen { p.WelfData.BlindBoxId = 0 } - } // == 1代表当日循环 + } // == 1代表当日循环 if p.WelfData.BlindBoxId == 0 { // 未领取过发随机Date idx := bid @@ -2155,6 +2165,51 @@ func (this *WelfareMgr) UpdateDiamondBankData(p *Player, coinNum int64, isWin bo logger.Logger.Tracef("玩家更新钻石存储罐数据 snid = %d,coinNum = %d,isWin = %s,当前钻石存储罐钻石数量:%f,本次增加钻石数量:%f", p.SnId, coinNum, isWin, p.WelfData.DiamondBank.BankDiamond, addDiamond) } +// 年兽活动 +func (this *WelfareMgr) UpdateActivityNianStatus(cfg *webapi_proto.ActivityNianConfig) { + if model.GameParamData.TestActSwitch { + cfg.Switch = model.WelfareOpen + } + s := int32(0) + info := this.GetConfig(cfg.Platform) + if info.ActivityNianConfig != nil { + s = info.ActivityNianConfig.Switch + } + info.ActivityNianConfig = cfg + //更新活动时间 + // 打开关闭要广播给客户端 + if s != 0 && s != cfg.Switch { + this.WelfareSwitch(nil, cfg.Platform, model.OpNian) + } +} + +// 每日重置年兽 +func (this *WelfareMgr) DayReserNian(p *Player) { + if time.Now().Unix() > p.WelfData.NianData.ActivityEndTime { + this.ClearActivityNianData(p) + } + if p != nil && p.WelfData != nil && p.WelfData.NianData != nil { + p.WelfData.NianData.BuffStatus = false + p.WelfData.NianData.BuffCount = 0 + p.WelfData.NianData.SignAwardTime = 0 + p.WelfData.NianData.OtherAwardNum = make(map[int32]int32) + } + +} + +// 年兽活动结束清除数据 +func (this *WelfareMgr) ClearActivityNianData(p *Player) { + if p != nil && p.WelfData != nil && p.WelfData.NianData != nil { + p.WelfData.NianData = nil + //清除任务数据 + for id, _ := range p.WelfData.Task { + data := srvdata.PBDB_TaskMgr.GetData(id) + if data.ActivityType == common.TaskActivityTypeNianEveryDay || data.ActivityType == common.TaskActivityTypeNian { + p.WelfData.Task[id] = nil + } + } + } +} func (this *WelfareMgr) Update() { } diff --git a/xlsx/DB_GameItem.xlsx b/xlsx/DB_GameItem.xlsx index 6df38f1..adf11e3 100644 Binary files a/xlsx/DB_GameItem.xlsx and b/xlsx/DB_GameItem.xlsx differ diff --git a/xlsx/DB_NewYearActivity.xlsx b/xlsx/DB_NewYearActivity.xlsx new file mode 100644 index 0000000..c47938b Binary files /dev/null and b/xlsx/DB_NewYearActivity.xlsx differ diff --git a/xlsx/DB_NewYearRankReward.xlsx b/xlsx/DB_NewYearRankReward.xlsx new file mode 100644 index 0000000..8aacb03 Binary files /dev/null and b/xlsx/DB_NewYearRankReward.xlsx differ diff --git a/xlsx/DB_Task.xlsx b/xlsx/DB_Task.xlsx index 6d465cc..d7d8acf 100644 Binary files a/xlsx/DB_Task.xlsx and b/xlsx/DB_Task.xlsx differ