diff --git a/bin/json/game_privilege.json b/bin/json/game_privilege.json index dd8b12486..e5294e4d2 100644 --- a/bin/json/game_privilege.json +++ b/bin/json/game_privilege.json @@ -1,79 +1,2030 @@ [ { - "privilege_id": 10001, + "privilege_id": 10101, + "privilege_type": 1, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10001", - "text": "特权描述1" + "key": "privilege_10101", + "text": "每日获得" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10001", - "text": "特权描述1" - } + "key": "PrivilegeAfter_10101", + "text": "60钻石" + }, + "privilege_parameter": 60 }, { - "privilege_id": 10002, + "privilege_id": 10201, + "privilege_type": 2, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10002", - "text": "特权描述2" + "key": "privilege_10201", + "text": "金币商店每日" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10002", - "text": "特权描述2" - } + "key": "PrivilegeAfter_10201", + "text": "免费刷新次数+1" + }, + "privilege_parameter": 1 }, { - "privilege_id": 10003, + "privilege_id": 10301, + "privilege_type": 7, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10003", - "text": "特权描述3" + "key": "privilege_10301", + "text": "巨怪商队" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10003", - "text": "特权描述3" - } + "key": "PrivilegeAfter_10301", + "text": "背包容量+1" + }, + "privilege_parameter": 1 }, { - "privilege_id": 10004, + "privilege_id": 10104, + "privilege_type": 1, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10004", - "text": "特权描述4" + "key": "privilege_10104", + "text": "每日获得" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10004", - "text": "特权描述4" - } + "key": "PrivilegeAfter_10104", + "text": "90钻石" + }, + "privilege_parameter": 0 }, { - "privilege_id": 10005, + "privilege_id": 10205, + "privilege_type": 2, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10005", - "text": "特权描述5" + "key": "privilege_10205", + "text": "金币商店每日" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10005", - "text": "特权描述5" - } + "key": "PrivilegeAfter_10205", + "text": "免费刷新次数+1" + }, + "privilege_parameter": 1 }, { - "privilege_id": 10006, + "privilege_id": 10306, + "privilege_type": 7, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10006", - "text": "特权描述6" + "key": "privilege_10306", + "text": "巨怪商队" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10006", - "text": "特权描述6" - } + "key": "PrivilegeAfter_10306", + "text": "背包容量+1" + }, + "privilege_parameter": 1 }, { - "privilege_id": 10007, + "privilege_id": 20101, + "privilege_type": 1, "privilege_DescribeFront": { - "key": "PrivilegeCardFront_10007", - "text": "特权描述7" + "key": "privilege_20101", + "text": "每日获得钻石*5" }, "privilege_DescribeAfter": { - "key": "PrivilegeCardAfter_10007", - "text": "特权描述7" - } + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20102, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20102", + "text": "每日获得钻石*10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20103, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20103", + "text": "每日获得钻石*15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20104, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20104", + "text": "每日获得钻石*25" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 25 + }, + { + "privilege_id": 20105, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20105", + "text": "每日获得钻石*35" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 35 + }, + { + "privilege_id": 20106, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20106", + "text": "每日获得钻石*45" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 45 + }, + { + "privilege_id": 20107, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20107", + "text": "每日获得钻石*60" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 55 + }, + { + "privilege_id": 20108, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20108", + "text": "每日获得钻石*75" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 65 + }, + { + "privilege_id": 20109, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20109", + "text": "每日获得钻石*90" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 75 + }, + { + "privilege_id": 20110, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20110", + "text": "每日获得钻石*110" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 90 + }, + { + "privilege_id": 20111, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20111", + "text": "每日获得钻石*130" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 130 + }, + { + "privilege_id": 20112, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20112", + "text": "每日获得钻石*150" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 150 + }, + { + "privilege_id": 20113, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20113", + "text": "每日获得钻石*180" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 180 + }, + { + "privilege_id": 20114, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20114", + "text": "每日获得钻石*210" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 210 + }, + { + "privilege_id": 20115, + "privilege_type": 1, + "privilege_DescribeFront": { + "key": "privilege_20115", + "text": "每日获得钻石*240" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 240 + }, + { + "privilege_id": 20201, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20201", + "text": "金币商店每日免费刷新次数+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20202, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20202", + "text": "金币商店每日免费刷新次数+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20203, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20203", + "text": "金币商店每日免费刷新次数+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20204, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20204", + "text": "金币商店每日免费刷新次数+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20205, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20205", + "text": "金币商店每日免费刷新次数+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20206, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20206", + "text": "金币商店每日免费刷新次数+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20207, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20207", + "text": "金币商店每日免费刷新次数+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20208, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20208", + "text": "金币商店每日免费刷新次数+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20209, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20209", + "text": "金币商店每日免费刷新次数+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20210, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20210", + "text": "金币商店每日免费刷新次数+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20211, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20211", + "text": "金币商店每日免费刷新次数+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20212, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20212", + "text": "金币商店每日免费刷新次数+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20213, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20213", + "text": "金币商店每日免费刷新次数+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20214, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20214", + "text": "金币商店每日免费刷新次数+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20215, + "privilege_type": 2, + "privilege_DescribeFront": { + "key": "privilege_20215", + "text": "金币商店每日免费刷新次数+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20301, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20301", + "text": "维京远征每日可购买挑战次数+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20302, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20302", + "text": "维京远征每日可购买挑战次数+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20303, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20303", + "text": "维京远征每日可购买挑战次数+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20304, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20304", + "text": "维京远征每日可购买挑战次数+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20305, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20305", + "text": "维京远征每日可购买挑战次数+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20306, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20306", + "text": "维京远征每日可购买挑战次数+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20307, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20307", + "text": "维京远征每日可购买挑战次数+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20308, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20308", + "text": "维京远征每日可购买挑战次数+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20309, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20309", + "text": "维京远征每日可购买挑战次数+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20310, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20310", + "text": "维京远征每日可购买挑战次数+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20311, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20311", + "text": "维京远征每日可购买挑战次数+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20312, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20312", + "text": "维京远征每日可购买挑战次数+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20313, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20313", + "text": "维京远征每日可购买挑战次数+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20314, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20314", + "text": "维京远征每日可购买挑战次数+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20315, + "privilege_type": 3, + "privilege_DescribeFront": { + "key": "privilege_20315", + "text": "维京远征每日可购买挑战次数+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20401, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20401", + "text": "狩猎每日可购买挑战次数+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20402, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20402", + "text": "狩猎每日可购买挑战次数+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20403, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20403", + "text": "狩猎每日可购买挑战次数+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20404, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20404", + "text": "狩猎每日可购买挑战次数+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20405, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20405", + "text": "狩猎每日可购买挑战次数+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20406, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20406", + "text": "狩猎每日可购买挑战次数+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20407, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20407", + "text": "狩猎每日可购买挑战次数+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20408, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20408", + "text": "狩猎每日可购买挑战次数+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20409, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20409", + "text": "狩猎每日可购买挑战次数+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20410, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20410", + "text": "狩猎每日可购买挑战次数+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20411, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20411", + "text": "狩猎每日可购买挑战次数+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20412, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20412", + "text": "狩猎每日可购买挑战次数+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20413, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20413", + "text": "狩猎每日可购买挑战次数+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20414, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20414", + "text": "狩猎每日可购买挑战次数+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20415, + "privilege_type": 4, + "privilege_DescribeFront": { + "key": "privilege_20415", + "text": "狩猎每日可购买挑战次数+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20501, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20501", + "text": "竞技场每日可购买挑战次数+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20502, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20502", + "text": "竞技场每日可购买挑战次数+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20503, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20503", + "text": "竞技场每日可购买挑战次数+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20504, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20504", + "text": "竞技场每日可购买挑战次数+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20505, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20505", + "text": "竞技场每日可购买挑战次数+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20506, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20506", + "text": "竞技场每日可购买挑战次数+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20507, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20507", + "text": "竞技场每日可购买挑战次数+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20508, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20508", + "text": "竞技场每日可购买挑战次数+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20509, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20509", + "text": "竞技场每日可购买挑战次数+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20510, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20510", + "text": "竞技场每日可购买挑战次数+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20511, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20511", + "text": "竞技场每日可购买挑战次数+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20512, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20512", + "text": "竞技场每日可购买挑战次数+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20513, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20513", + "text": "竞技场每日可购买挑战次数+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20514, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20514", + "text": "竞技场每日可购买挑战次数+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20515, + "privilege_type": 5, + "privilege_DescribeFront": { + "key": "privilege_20515", + "text": "竞技场每日可购买挑战次数+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20601, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20601", + "text": "梦境每日可购买挑战次数+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20602, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20602", + "text": "梦境每日可购买挑战次数+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20603, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20603", + "text": "梦境每日可购买挑战次数+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20604, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20604", + "text": "梦境每日可购买挑战次数+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20605, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20605", + "text": "梦境每日可购买挑战次数+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20606, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20606", + "text": "梦境每日可购买挑战次数+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20607, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20607", + "text": "梦境每日可购买挑战次数+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20608, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20608", + "text": "梦境每日可购买挑战次数+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20609, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20609", + "text": "梦境每日可购买挑战次数+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20610, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20610", + "text": "梦境每日可购买挑战次数+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20611, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20611", + "text": "梦境每日可购买挑战次数+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20612, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20612", + "text": "梦境每日可购买挑战次数+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20613, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20613", + "text": "梦境每日可购买挑战次数+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20614, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20614", + "text": "梦境每日可购买挑战次数+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20615, + "privilege_type": 6, + "privilege_DescribeFront": { + "key": "privilege_20615", + "text": "梦境每日可购买挑战次数+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20701, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20701", + "text": "巨怪商队背包容量+1" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 1 + }, + { + "privilege_id": 20702, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20702", + "text": "巨怪商队背包容量+2" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 2 + }, + { + "privilege_id": 20703, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20703", + "text": "巨怪商队背包容量+3" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 3 + }, + { + "privilege_id": 20704, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20704", + "text": "巨怪商队背包容量+4" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 4 + }, + { + "privilege_id": 20705, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20705", + "text": "巨怪商队背包容量+5" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 5 + }, + { + "privilege_id": 20706, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20706", + "text": "巨怪商队背包容量+6" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 6 + }, + { + "privilege_id": 20707, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20707", + "text": "巨怪商队背包容量+7" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 7 + }, + { + "privilege_id": 20708, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20708", + "text": "巨怪商队背包容量+8" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 8 + }, + { + "privilege_id": 20709, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20709", + "text": "巨怪商队背包容量+9" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 9 + }, + { + "privilege_id": 20710, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20710", + "text": "巨怪商队背包容量+10" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 10 + }, + { + "privilege_id": 20711, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20711", + "text": "巨怪商队背包容量+11" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 11 + }, + { + "privilege_id": 20712, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20712", + "text": "巨怪商队背包容量+12" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 12 + }, + { + "privilege_id": 20713, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20713", + "text": "巨怪商队背包容量+13" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 13 + }, + { + "privilege_id": 20714, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20714", + "text": "巨怪商队背包容量+14" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 14 + }, + { + "privilege_id": 20715, + "privilege_type": 7, + "privilege_DescribeFront": { + "key": "privilege_20715", + "text": "巨怪商队背包容量+15" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 15 + }, + { + "privilege_id": 20801, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20801", + "text": "美食馆每日最大制作时间+30分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 30 + }, + { + "privilege_id": 20802, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20802", + "text": "美食馆每日最大制作时间+45分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 45 + }, + { + "privilege_id": 20803, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20803", + "text": "美食馆每日最大制作时间+60分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 60 + }, + { + "privilege_id": 20804, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20804", + "text": "美食馆每日最大制作时间+75分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 75 + }, + { + "privilege_id": 20805, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20805", + "text": "美食馆每日最大制作时间+90分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 90 + }, + { + "privilege_id": 20806, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20806", + "text": "美食馆每日最大制作时间+105分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 105 + }, + { + "privilege_id": 20807, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20807", + "text": "美食馆每日最大制作时间+120分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 120 + }, + { + "privilege_id": 20808, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20808", + "text": "美食馆每日最大制作时间+135分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 135 + }, + { + "privilege_id": 20809, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20809", + "text": "美食馆每日最大制作时间+150分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 150 + }, + { + "privilege_id": 20810, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20810", + "text": "美食馆每日最大制作时间+165分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 165 + }, + { + "privilege_id": 20811, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20811", + "text": "美食馆每日最大制作时间+180分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 180 + }, + { + "privilege_id": 20812, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20812", + "text": "美食馆每日最大制作时间+195分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 195 + }, + { + "privilege_id": 20813, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20813", + "text": "美食馆每日最大制作时间+210分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 210 + }, + { + "privilege_id": 20814, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20814", + "text": "美食馆每日最大制作时间+225分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 225 + }, + { + "privilege_id": 20815, + "privilege_type": 8, + "privilege_DescribeFront": { + "key": "privilege_20815", + "text": "美食馆每日最大制作时间+240分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 240 + }, + { + "privilege_id": 20901, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20901", + "text": "武馆每日最大练功时间+30分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 30 + }, + { + "privilege_id": 20902, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20902", + "text": "武馆每日最大练功时间+45分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 45 + }, + { + "privilege_id": 20903, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20903", + "text": "武馆每日最大练功时间+60分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 60 + }, + { + "privilege_id": 20904, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20904", + "text": "武馆每日最大练功时间+75分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 75 + }, + { + "privilege_id": 20905, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20905", + "text": "武馆每日最大练功时间+90分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 90 + }, + { + "privilege_id": 20906, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20906", + "text": "武馆每日最大练功时间+105分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 105 + }, + { + "privilege_id": 20907, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20907", + "text": "武馆每日最大练功时间+120分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 120 + }, + { + "privilege_id": 20908, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20908", + "text": "武馆每日最大练功时间+135分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 135 + }, + { + "privilege_id": 20909, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20909", + "text": "武馆每日最大练功时间+150分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 150 + }, + { + "privilege_id": 20910, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20910", + "text": "武馆每日最大练功时间+165分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 165 + }, + { + "privilege_id": 20911, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20911", + "text": "武馆每日最大练功时间+180分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 180 + }, + { + "privilege_id": 20912, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20912", + "text": "武馆每日最大练功时间+195分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 195 + }, + { + "privilege_id": 20913, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20913", + "text": "武馆每日最大练功时间+210分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 210 + }, + { + "privilege_id": 20914, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20914", + "text": "武馆每日最大练功时间+225分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 225 + }, + { + "privilege_id": 20915, + "privilege_type": 9, + "privilege_DescribeFront": { + "key": "privilege_20915", + "text": "武馆每日最大练功时间+240分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 240 + }, + { + "privilege_id": 21001, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21001", + "text": "铁匠铺每日最大锻造时间+30分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 30 + }, + { + "privilege_id": 21002, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21002", + "text": "铁匠铺每日最大锻造时间+45分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 45 + }, + { + "privilege_id": 21003, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21003", + "text": "铁匠铺每日最大锻造时间+60分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 60 + }, + { + "privilege_id": 21004, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21004", + "text": "铁匠铺每日最大锻造时间+75分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 75 + }, + { + "privilege_id": 21005, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21005", + "text": "铁匠铺每日最大锻造时间+90分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 90 + }, + { + "privilege_id": 21006, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21006", + "text": "铁匠铺每日最大锻造时间+105分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 105 + }, + { + "privilege_id": 21007, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21007", + "text": "铁匠铺每日最大锻造时间+120分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 120 + }, + { + "privilege_id": 21008, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21008", + "text": "铁匠铺每日最大锻造时间+135分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 135 + }, + { + "privilege_id": 21009, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21009", + "text": "铁匠铺每日最大锻造时间+150分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 150 + }, + { + "privilege_id": 21010, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21010", + "text": "铁匠铺每日最大锻造时间+165分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 165 + }, + { + "privilege_id": 21011, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21011", + "text": "铁匠铺每日最大锻造时间+180分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 180 + }, + { + "privilege_id": 21012, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21012", + "text": "铁匠铺每日最大锻造时间+195分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 195 + }, + { + "privilege_id": 21013, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21013", + "text": "铁匠铺每日最大锻造时间+210分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 210 + }, + { + "privilege_id": 21014, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21014", + "text": "铁匠铺每日最大锻造时间+225分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 225 + }, + { + "privilege_id": 21015, + "privilege_type": 10, + "privilege_DescribeFront": { + "key": "privilege_21015", + "text": "铁匠铺每日最大锻造时间+240分钟" + }, + "privilege_DescribeAfter": { + "key": "", + "text": "" + }, + "privilege_parameter": 240 } ] \ No newline at end of file diff --git a/bin/json/game_privilegecard.json b/bin/json/game_privilegecard.json index b925f7b1b..460b2ca84 100644 --- a/bin/json/game_privilegecard.json +++ b/bin/json/game_privilegecard.json @@ -20,9 +20,9 @@ } ], "privilege_id": [ - 10001, - 10002, - 10003 + 10101, + 10201, + 10301 ] }, { @@ -46,9 +46,9 @@ } ], "privilege_id": [ - 10004, - 10005, - 10006 + 10401, + 10501, + 10601 ] }, { @@ -59,8 +59,6 @@ "renew_day": 0, "day_reward": [], "disposable_reward": [], - "privilege_id": [ - 10007 - ] + "privilege_id": [] } ] \ No newline at end of file diff --git a/comm/const.go b/comm/const.go index a16c17b18..20367f6bc 100644 --- a/comm/const.go +++ b/comm/const.go @@ -228,7 +228,7 @@ const ( //Rpc Rpc_ModuleRtaskSendTask core.Rpc_Key = "Rpc_ModuleRtaskSendTask" //随机任务触发 // friend Rpc_ModuleFriendUseAssitHero core.Rpc_Key = "Rpc_ModuleFriendUseAssitHero" //使用助战英雄 - + Rpc_ModuleFriendDB core.Rpc_Key = "Rpc_ModuleFriendDB" // arena Rpc_ModuleArenaRaceSettlement core.Rpc_Key = "Rpc_ModuleArenaRaceSettlement" //竞技场比赛结算信息 Rpc_ModuleArenaModifyIntegral core.Rpc_Key = "Rpc_ModuleArenaModifyIntegral" //竞技场修改积分 @@ -260,9 +260,9 @@ const ( EventCreateUser core.Event_Key = "Event_CreateUser" //创建角色事件 EventUserOffline core.Event_Key = "Event_UserOffline" //用户离线事件 - EventUserChanged core.Event_Key = "event_user_changed" //用户数据变化 - EventTaskChanged core.Event_Key = "event_task_changed" //任务数据变化 - + EventUserChanged core.Event_Key = "event_user_changed" //用户数据变化 + EventTaskChanged core.Event_Key = "event_task_changed" //任务数据变化 + EventUserVipChanged core.Event_Key = "event_uservip_changed" //用户数据变化 EventSociatyRankChanged core.Event_Key = "event_sociatyRank_changed" //公会数据变化 ) @@ -645,3 +645,17 @@ const ( Arena = "arena" Sign = "sign" ) + +// 特权类型 +const ( + PrivilegeType1 = iota + 1 //每日获得 + PrivilegeType2 //金币商店每日免费刷新次数 + PrivilegeType3 //维京远征每日可购买挑战次数 + PrivilegeType4 //狩猎每日可购买挑战次数 + PrivilegeType5 //竞技场每日可购买挑战次数 + PrivilegeType6 //梦境每日可购买挑战次数 + PrivilegeType7 //巨怪商队背包容量 + PrivilegeType8 //美食馆每日最大制作时间 + PrivilegeType9 //武馆每日最大练功时间 + PrivilegeType10 //铁匠铺每日最大锻造时间 +) diff --git a/comm/imodule.go b/comm/imodule.go index 9c401d3c2..bb5b5fc4a 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -104,6 +104,7 @@ type ( AddAttributeValues(session IUserSession, attrs map[string]int32, bPush bool) (code pb.ErrorCode) //用户改变事件 EventUserChanged(session IUserSession) + EventUserVipChanged(session IUserSession) //获取用户expand GetUserExpand(uid string) (result *pb.DBUserExpand, err error) //更新用户expand @@ -118,6 +119,8 @@ type ( CrossSearchUser(nickname string) ([]*pb.DBUser, error) // 搜索远程用户 SearchRmoteUser(nickname string) ([]*pb.DBUser, error) + // 检查是不是新获得的英雄 + CheckTujianHero(session IUserSession, heros []string) []bool } //武器模块 IEquipment interface { @@ -279,10 +282,14 @@ type ( CreatePrivilegeCard(session IUserSession, cId string) (code pb.ErrorCode) // 续费特权卡 RenewPrivilegeCard(session IUserSession, cId string) (code pb.ErrorCode) - // 检查特权 - CheckPrivilege(session IUserSession, cId string) (privilege *pb.DBPrivilege) - // 查询玩家当前所有特权 返回特权id - QueryPrivilege(session IUserSession) (privilegeID []int32) + // 检查特权 参数 计费点 返回值 是否有特权 + CheckPrivilege(session IUserSession, cId string) bool + // 检查每日特权邮件 + CheckDailyPrivilegeMail(session IUserSession) + // 获得vip + AddVipData(session IUserSession, oldVip, newVip int32) + // 查询所有特权 key 对应comm.PrivilegeType1类型 + CheckAllPrivilege(session IUserSession) map[int32]*pb.PrivilegeList } //武馆 IMartialhall interface { diff --git a/modules/friend/api_cross_agree.go b/modules/friend/api_cross_agree.go index 8f7346271..180336ee2 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -69,6 +69,9 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c //将目标加入到自己的好友列表中 for _, userId := range agreeIds { + //将目标从申请列表中删除 + self.ApplyIds = utils.DeleteString(self.ApplyIds, userId) + if _, ok := utils.Find(self.FriendIds, userId); !ok { if self.FriendIds == nil { self.FriendIds = []string{} @@ -82,6 +85,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c code = pb.ErrorCode_FriendTargetNoData return } + target.ApplyIds = utils.DeleteString(target.ApplyIds, self.Uid) if _, ok := utils.Find(target.FriendIds, self.Uid); !ok { if target.FriendIds == nil { target.FriendIds = []string{} @@ -106,19 +110,19 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c pushAssistHero(self.Uid, target.Uid, self.AssistHeroId) } - //将目标从申请列表中删除 - self.ApplyIds = utils.DeleteString(self.ApplyIds, userId) optNum++ } - //更新 - err = this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{ - "applyIds": self.ApplyIds, - "friendIds": self.FriendIds, - }) - if err != nil { - code = pb.ErrorCode_DBError - return + if optNum > 0 { + //更新 + err = this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{ + "applyIds": self.ApplyIds, + "friendIds": self.FriendIds, + }) + if err != nil { + code = pb.ErrorCode_DBError + return + } } // 拥有xx个好友 diff --git a/modules/friend/api_cross_apply.go b/modules/friend/api_cross_apply.go index f78905e19..94bb267d0 100644 --- a/modules/friend/api_cross_apply.go +++ b/modules/friend/api_cross_apply.go @@ -31,6 +31,13 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c ) uid := session.GetUserId() + + //判断是否是自己 + if req.FriendId == uid { + code = pb.ErrorCode_FriendNotSelf + return + } + //获取玩家自己好友数据 self = this.moduleFriend.modelFriend.GetFriend(uid) if self == nil { @@ -38,6 +45,19 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c return } + globalConf := this.moduleFriend.globalConf + //判断是否超过最大好友数量 + if len(self.FriendIds) >= int(globalConf.FriendMaxnum) { + code = pb.ErrorCode_FriendSelfMax + return + } + + //判断是否是好友 + if _, ok := utils.Find(self.FriendIds, req.FriendId); ok { + code = pb.ErrorCode_FriendYet + return + } + //获取好友数据 target = this.moduleFriend.modelFriend.GetFriend(req.FriendId) if target == nil { @@ -45,15 +65,9 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c return } - //判断是否是自己 - if req.FriendId == uid { - code = pb.ErrorCode_FriendNotSelf - return - } - globalConf := this.moduleFriend.globalConf - //判断是否超过最大好友数量 - if len(self.FriendIds) >= int(globalConf.FriendMaxnum) { - code = pb.ErrorCode_FriendSelfMax + //判断自己是否在目标用户的申请列表中 + if _, ok := utils.Find(target.ApplyIds, self.Uid); ok { + code = pb.ErrorCode_FriendApplyYet return } @@ -63,18 +77,6 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c return } - //判断是否是好友 - if _, ok := utils.Find(self.FriendIds, req.FriendId); ok { - code = pb.ErrorCode_FriendYet - return - } - - //判断自己是否在目标用户的申请列表中 - if _, ok := utils.Find(target.ApplyIds, self.Uid); ok { - code = pb.ErrorCode_FriendApplyYet - return - } - //判断目标用户是否在黑名单中 if _, ok := utils.Find(self.BlackIds, req.FriendId); ok { code = pb.ErrorCode_FriendSelfBlackYet diff --git a/modules/friend/model_friend.go b/modules/friend/model_friend.go index 157e5b3b1..df80b30a2 100644 --- a/modules/friend/model_friend.go +++ b/modules/friend/model_friend.go @@ -1,6 +1,7 @@ package friend import ( + "context" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" @@ -14,12 +15,13 @@ import ( type ModelFriend struct { modules.MCompModel + moduleFriend *Friend } func (this *ModelFriend) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.TableName = comm.TableFriend err = this.MCompModel.Init(service, module, comp, options) - + this.moduleFriend = module.(*Friend) return } @@ -38,14 +40,28 @@ func (this *ModelFriend) Frined_FindCond(nickName string) *pb.DBUser { //查询好友 func (this *ModelFriend) GetFriend(uid string) *pb.DBFriend { friend := &pb.DBFriend{Uid: uid} - err := this.Get(uid, friend) - if err != nil { - if err == redis.RedisNil || err == mongo.ErrNoDocuments { - if err := this.Add(uid, friend); err != nil { - return nil + if this.moduleFriend.IsCross() { + err := this.Get(uid, friend) + if err != nil { + if err == redis.RedisNil || err == mongo.ErrNoDocuments { + if err := this.Add(uid, friend); err != nil { + return nil + } } + log.Error("未获得好友数据", log.Fields{"uid": uid}) + } + } else { + friend := &pb.DBFriend{} + if err := this.moduleFriend.service.AcrossClusterRpcCall( + context.Background(), + this.moduleFriend.GetCrossTag(), + comm.Service_Worker, + string(comm.Rpc_ModuleFriendDB), + pb.RPCGeneralReqA1{Param1: uid}, + friend); err != nil { + this.moduleFriend.Errorln(err) } - log.Error("未获得好友数据", log.Fields{"uid": uid}) } + return friend } diff --git a/modules/friend/module.go b/modules/friend/module.go index 204dc0009..c5323cdc2 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -15,10 +15,12 @@ import ( "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" + "go_dreamfactory/lego/sys/redis" cfg "go_dreamfactory/sys/configure/structs" "github.com/spf13/cast" + "go.mongodb.org/mongo-driver/mongo" ) var _ comm.IFriend = (*Friend)(nil) @@ -56,6 +58,7 @@ func (this *Friend) OnInstallComp() { func (this *Friend) Start() (err error) { err = this.ModuleBase.Start() this.service.RegisterFunctionName(string(comm.Rpc_ModuleFriendUseAssitHero), this.RpcUseAssisHero) + this.service.RegisterFunctionName(string(comm.Rpc_ModuleFriendDB), this.RpcFriendDB) this.globalConf = this.configure.GetGlobalConf() if this.globalConf == nil { err = errors.New("global config not found") @@ -109,6 +112,23 @@ func (this *Friend) RpcUseAssisHero(ctx context.Context, req *pb.RPCGeneralReqA2 return nil } +func (this *Friend) RpcFriendDB(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.DBFriend) error { + this.Debug("Rpc_ModuleFriendDB", log.Fields{"req": req}) + friend := &pb.DBFriend{Uid: req.Param1} + err := this.modelFriend.Get(req.Param1, friend) + if err != nil { + if err == redis.RedisNil || err == mongo.ErrNoDocuments { + if err := this.modelFriend.Add(req.Param1, friend); err != nil { + return nil + } + } else { + log.Error("未获得好友数据", log.Fields{"uid": req.Param1, "err": err}) + } + } + *reply = *friend + return nil +} + // 使用好友助战英雄 // friendId 好友Id func (this *Friend) UseAssistHero(uid, friendId string) (*pb.DBHero, error) { diff --git a/modules/gm/api_cmd.go b/modules/gm/api_cmd.go index 3113b0bae..cec27457d 100644 --- a/modules/gm/api_cmd.go +++ b/modules/gm/api_cmd.go @@ -30,6 +30,7 @@ import ( 15、bingo:sociatyexp,100 // 设置工会经验 15、bingo:sociatyactivity,100 // 设置工会活跃 16、bingo:alltask // bingo所有任务 +16、bingo:allhero // bingo所有英雄 */ //参数校验 func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) { diff --git a/modules/gm/module.go b/modules/gm/module.go index bf562f433..ccfd6c859 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -266,6 +266,25 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC } } + } else if len(datas) == 1 && (datas[0] == "allhero") { // 完成所有世界任务 + var ( + res []*cfg.Gameatn + ) + data := this.configure.GetHeroConfigData() + for _, v := range data { + res = append(res, &cfg.Gameatn{ + A: "hero", + T: v.Hid, + N: 1, + }) + + } + code = this.DispenseRes(session, res, true) + if code != pb.ErrorCode_Success { + this.Errorf("资源发放失败,%v", code) + } + + this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "param": datas[0], "res": res}) } } diff --git a/modules/hero/hero_test.go b/modules/hero/hero_test.go index 2ee415446..2ace8e4d8 100644 --- a/modules/hero/hero_test.go +++ b/modules/hero/hero_test.go @@ -70,7 +70,19 @@ func GetMonthStartEnd() (int64, int64) { return _d1, _d2 } func Test_Main(t *testing.T) { - + var list []int32 + var list2 []int32 + list = []int32{1, 2, 3, 4, 5, 6, 7, 8, 9} + list2 = []int32{4, 8, 9} + for _, v := range list2 { + for i, v1 := range list { + if v == v1 { // 找到了 就删除 + //conf.PrivilegeId = append(conf.PrivilegeId, v1) + list = append(list[:i], list[i+1:]...) + break + } + } + } ids := utils.RandomNumbers(0, 10, 5) for _, v := range ids { fmt.Printf("%d", v) diff --git a/modules/pagoda/api_warorder.go b/modules/pagoda/api_warorder.go index ade434c61..bf7662f92 100644 --- a/modules/pagoda/api_warorder.go +++ b/modules/pagoda/api_warorder.go @@ -38,9 +38,7 @@ func (this *apiComp) WarOrder(session comm.IUserSession, req *pb.PagodaWarOrderR payPoint := this.module.configure.GetPassCheckPointByTtype(1) if payPoint != "" { // 获取特权信息 - if privilege := this.module.ModulePrivilege.CheckPrivilege(session, payPoint); privilege != nil { - vip = true - } + vip = this.module.ModulePrivilege.CheckPrivilege(session, payPoint) } if list.PagodaId < list.PassCheckID { // 层数校验 diff --git a/modules/privilege/api.go b/modules/privilege/api.go index 3ab3224cf..91059909c 100644 --- a/modules/privilege/api.go +++ b/modules/privilege/api.go @@ -10,6 +10,7 @@ const ( PrivilegeGetListResp = "getlist" PrivilegeBuyYuekaResp = "buyyueka" PrivilegeBuyGiftResp = "buygift" + PrivilegeVipListResp = "viplist" ) type apiComp struct { diff --git a/modules/privilege/api_buygift.go b/modules/privilege/api_buygift.go index 69657e27f..fde416306 100644 --- a/modules/privilege/api_buygift.go +++ b/modules/privilege/api_buygift.go @@ -24,7 +24,7 @@ func (this *apiComp) BuyGift(session comm.IUserSession, req *pb.PrivilegeBuyGift } userinfo := this.module.ModuleUser.GetUser(session.GetUserId()) - if userinfo.Viplv == 0 || userinfo.Viplv < req.VipLv { + if userinfo.Vip == 0 || userinfo.Vip < req.VipLv { code = pb.ErrorCode_VipLvError // vip 等级不足 return } diff --git a/modules/privilege/api_viplist.go b/modules/privilege/api_viplist.go new file mode 100644 index 000000000..0fed30caf --- /dev/null +++ b/modules/privilege/api_viplist.go @@ -0,0 +1,24 @@ +package privilege + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) VipListCheck(session comm.IUserSession, req *pb.PrivilegeVipListReq) (code pb.ErrorCode) { + + return +} + +///获取特权列表 +func (this *apiComp) VipList(session comm.IUserSession, req *pb.PrivilegeVipListReq) (code pb.ErrorCode, data proto.Message) { + list, err := this.module.modelVip.getVipList(session.GetUserId()) + if err != nil { + this.module.Errorf("can't get privilege list :%v", err) + } + session.SendMsg(string(this.module.GetType()), PrivilegeVipListResp, &pb.PrivilegeVipListResp{Data: list}) + return +} diff --git a/modules/privilege/configure.go b/modules/privilege/configure.go index e7f8b29ea..1c3925791 100644 --- a/modules/privilege/configure.go +++ b/modules/privilege/configure.go @@ -47,20 +47,15 @@ func (this *configureComp) GetPrivilegeCard(id string) (configure *cfg.GamePrivi } // 获取指定特权配置 -func (this *configureComp) GetPrivilegeData(id int32) (result *cfg.GamePrivilegeData, err error) { - var ( - v interface{} - ok bool - ) - if v, err = this.GetConfigure(game_privilege); err != nil { - this.module.Errorf("err:%v", err) - return - } else { - if result, ok = v.(*cfg.GamePrivilege).GetDataMap()[id]; !ok { - err = fmt.Errorf("GamePrivilegeData not found:%d ", id) - this.module.Errorf("err:%v", err) +func (this *configureComp) GetPrivilegeData(id int32) (result *cfg.GamePrivilegeData) { + + if v, err := this.GetConfigure(game_privilege); err == nil { + + if c, ok := v.(*cfg.GamePrivilege); ok { + result = c.Get(id) return } } - return + this.module.Errorf("GetPrivilegeData err, id:%d", id) + return nil } diff --git a/modules/privilege/model_vip.go b/modules/privilege/model_vip.go index c3a2fcff1..7d237c5ca 100644 --- a/modules/privilege/model_vip.go +++ b/modules/privilege/model_vip.go @@ -3,7 +3,6 @@ package privilege import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -31,11 +30,10 @@ func (this *ModelVip) Init(service core.IService, module core.IModule, comp core // 获取vip信息 func (this *ModelVip) getVipList(uid string) (vip *pb.DBVip, err error) { vip = &pb.DBVip{} - if err = this.Get(uid, vip); err != nil && err != mgo.MongodbNil { + if err = this.Get(uid, vip); err != nil { return } - err = nil - return vip, err + return } // 修改Vip信息 @@ -48,7 +46,8 @@ func (this *ModelVip) addVipData(uId string, vip *pb.DBVip) (err error) { if err = this.Add(uId, vip); err != nil { this.module.Errorf("err:%v", err) - return err + return } - return nil + + return } diff --git a/modules/privilege/module.go b/modules/privilege/module.go index 519ec0e79..0681b167e 100644 --- a/modules/privilege/module.go +++ b/modules/privilege/module.go @@ -4,10 +4,10 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/event" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" - "go_dreamfactory/sys/db" "go_dreamfactory/utils" "go.mongodb.org/mongo-driver/bson/primitive" @@ -46,6 +46,7 @@ func (this *Privilege) OnInstallComp() { this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) this.modelPrivilege = this.RegisterComp(new(ModelPrivilege)).(*ModelPrivilege) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) + this.modelVip = this.RegisterComp(new(ModelVip)).(*ModelVip) } func (this *Privilege) Start() (err error) { @@ -61,7 +62,7 @@ func (this *Privilege) Start() (err error) { //Event------------------------------------------------------------------------------------------------------------ func (this *Privilege) EventUserOffline(session comm.IUserSession) { - this.modelPrivilege.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) + //this.modelPrivilege.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) } // 购买了一个新的特权 @@ -82,20 +83,23 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string } for _, v := range list { if v.CId == cId { + update := map[string]interface{}{} if v.ETime > configure.Now().Unix() { // 加时间 - v.ETime += int64(conf.AssertDay) * 24 * 3600 - } else { // 检测能否续费 - if configure.Now().Unix()-v.ETime <= int64(conf.RenewDay)*24*3600 { - v.ETime = configure.Now().Unix() + int64(conf.AssertDay)*24*3600 - } else { + if v.ETime-configure.Now().Unix() > int64(conf.RenewDay)*24*3600 { + code = pb.ErrorCode_PayRenewTimeErr return } + v.ETime += int64(conf.AssertDay) * 24 * 3600 + update["eTime"] = v.ETime + } else { // 过期了 + v.CTime = configure.Now().Unix() + v.ETime = v.CTime + int64(conf.AssertDay)*24*3600 + update["cTime"] = v.CTime + update["eTime"] = v.ETime } - if err = this.modelPrivilege.Change(session.GetUserId(), map[string]interface{}{ - "eTime": v.ETime, - }); err != nil { + if err = this.modelPrivilege.Change(session.GetUserId(), update); err != nil { this.Errorf("err:%v", err) return } @@ -103,31 +107,69 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string break } } - if !bFind { + if !bFind { // 创建一条新的信息 data := &pb.DBPrivilege{ - Id: primitive.NewObjectID().Hex(), - Uid: session.GetUserId(), - CId: cId, - PrivilegeID: []int32{}, - CTime: configure.Now().Unix(), - ETime: 0, - RewardTime: configure.Now().Unix(), + Id: primitive.NewObjectID().Hex(), + Uid: session.GetUserId(), + CId: cId, + CTime: configure.Now().Unix(), + ETime: configure.Now().Unix() + int64(conf.AssertDay*24*3600), // 设置过期时间 + RewardTime: configure.Now().Unix(), } - data.ETime = configure.Now().Unix() + int64(conf.AssertDay*24*3600) // 设置过期时间 - for _, v := range conf.PrivilegeId { - data.PrivilegeID = append(data.PrivilegeID, v) + // 特权插入 + vip, err := this.modelVip.getVipList(session.GetUserId()) + if err != nil && err == mgo.MongodbNil { // 没有数据 直接创建一条 + vip = &pb.DBVip{ + Id: primitive.NewObjectID().Hex(), + Uid: session.GetUserId(), + Reward: map[int32]bool{}, + Privilege: map[int32]*pb.PrivilegeList{}, + CTime: configure.Now().Unix(), + RewardTime: 0, + } + if err = this.modelVip.addVipData(session.GetUserId(), vip); err != nil { + this.Errorf("err:%v", err) + return + } + } + if vip.Id != "" { + update := map[string]interface{}{} + for _, v := range conf.PrivilegeId { + conf := this.configure.GetPrivilegeData(v) + if conf != nil { + if _, ok := vip.Privilege[conf.PrivilegeType]; ok { + // 过滤重复的特权 + bRepeat := false + for _, v1 := range vip.Privilege[conf.PrivilegeType].PrivilegeID { + if v1 == v { + bRepeat = true + break + } + } + if !bRepeat { + vip.Privilege[conf.PrivilegeType].PrivilegeID = append(vip.Privilege[conf.PrivilegeType].PrivilegeID, v) + } + } else { + sz := &pb.PrivilegeList{} + sz.PrivilegeID = append(sz.PrivilegeID, v) + vip.Privilege[conf.PrivilegeType] = sz + } + } + } + update["privilege"] = vip.Privilege + this.modelVip.modifyVipData(session.GetUserId(), update) } list = append(list, data) this.modelPrivilege.addNewPrivilegeData(session.GetUserId(), data) this.SendDailyMail(session, cId, 1, conf.PType) } - + // 即使奖励 马上发送 if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success { return } // 推送 - session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list}) + session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeBuyYuekaResp{Data: list}) return } @@ -166,44 +208,58 @@ func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string) } // 查询特权特权 -func (this *Privilege) CheckPrivilege(session comm.IUserSession, cId string) (privilege *pb.DBPrivilege) { +func (this *Privilege) CheckPrivilege(session comm.IUserSession, cId string) bool { list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId()) if err != nil { - return + return false } for _, v := range list { if v.CId == cId { if v.ETime < configure.Now().Unix() { // 判断当前特权是否过期 - if err := this.modelPrivilege.DelListlds(session.GetUserId(), v.Id); err != nil { - this.Errorf("delete privilege failed:%v", err) - } - privilege = nil - return + return false } - privilege = v - return + return true } } - return + return false } -// 查询特权信息,把过期的特权清除掉 -func (this *Privilege) QueryPrivilege(session comm.IUserSession) (privilegeID []int32) { +// 检查特权 并发送每日邮件 +func (this *Privilege) CheckDailyPrivilegeMail(session comm.IUserSession) { + privilgeList, err := this.modelVip.getVipList(session.GetUserId()) + if err != nil { + return + } list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId()) if err != nil { return } for _, v := range list { + conf, err := this.configure.GetPrivilegeCard(v.CId) + if err != nil { + return + } if v.ETime < configure.Now().Unix() { // 判断当前特权是否过期 - if err := this.modelPrivilege.DelListlds(session.GetUserId(), v.Id); err != nil { - this.Errorf("delete privilege failed:%v", err) + + update := map[string]interface{}{} + for _, id := range conf.PrivilegeId { // 找到过期的特权 并删除 + data := this.configure.GetPrivilegeData(id) + if data != nil { + + if v, ok := privilgeList.Privilege[data.PrivilegeType]; ok { + + for i, v1 := range v.PrivilegeID { + if v1 == id { // 找到了 就删除 + v.PrivilegeID = append(v.PrivilegeID[:i], v.PrivilegeID[i+1:]...) + break + } + } + } + } } + update["privilege"] = privilgeList.Privilege + this.modelVip.modifyVipData(session.GetUserId(), update) // 更新数据 } else { - conf, err := this.configure.GetPrivilegeCard(v.CId) - if err != nil { - return nil - } - privilegeID = append(privilegeID, v.PrivilegeID...) // 检查 每日奖励是否发放 if !utils.IsToday(v.RewardTime) { v.RewardTime = configure.Now().Unix() @@ -259,5 +315,55 @@ func (this *Privilege) SendDailyMail(session comm.IUserSession, cId string, coun mail.ObjId = primitive.NewObjectID().Hex() this.mail.CreateNewMail(session, mail) } - +} + +func (this *Privilege) CheckAllPrivilege(session comm.IUserSession) map[int32]*pb.PrivilegeList { + vip, err := this.modelVip.getVipList(session.GetUserId()) + if err != nil { + return make(map[int32]*pb.PrivilegeList) + } + return vip.Privilege +} + +func (this *Privilege) AddVipData(session comm.IUserSession, oldVip, newVip int32) { + if newVip <= oldVip { + return + } + vip, err := this.modelVip.getVipList(session.GetUserId()) + if err != nil && err == mgo.MongodbNil { // 没有数据 直接创建一条 + vip = &pb.DBVip{ + Id: primitive.NewObjectID().Hex(), + Uid: session.GetUserId(), + Reward: map[int32]bool{}, + Privilege: map[int32]*pb.PrivilegeList{}, + CTime: configure.Now().Unix(), + RewardTime: 0, + } + if err = this.modelVip.addVipData(session.GetUserId(), vip); err != nil { + this.Errorf("err:%v", err) + return + } + } + update := map[string]interface{}{} + for i := oldVip + 1; i <= newVip; i++ { + conf := this.configure.GetVipConfigureData(i) + if conf != nil { + for _, v := range conf.VipPrivilege { + data := this.configure.GetPrivilegeData(v) + if data != nil { + if _, ok := vip.Privilege[data.PrivilegeType]; ok { + vip.Privilege[data.PrivilegeType].PrivilegeID = append(vip.Privilege[data.PrivilegeType].PrivilegeID, v) + } else { + sz := &pb.PrivilegeList{} + sz.PrivilegeID = append(sz.PrivilegeID, v) + vip.Privilege[data.PrivilegeType] = sz + } + } + } + } + } + update["privilege"] = vip.Privilege + this.modelVip.modifyVipData(session.GetUserId(), update) + + session.SendMsg(string(this.GetType()), PrivilegeGetListResp, &pb.PrivilegeVipListResp{Data: vip}) } diff --git a/modules/task/api_receive.go b/modules/task/api_receive.go index ce3c6fdd9..196e27132 100644 --- a/modules/task/api_receive.go +++ b/modules/task/api_receive.go @@ -103,9 +103,5 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq) return } - // 监听玩家经验 - - //this.moduleTask.ModuleUser.EventUserChanged(session) - return } diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 38083e3b6..2ad67e0fd 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -148,8 +148,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod // 日常登录任务 this.module.ModuleRtask.SendToRtask(session, comm.Rtype7, 1) - // 检查特权 并发送每日邮件 - this.module.ModulePrivilege.QueryPrivilege(session) + this.module.ModulePrivilege.CheckDailyPrivilegeMail(session) //推送登录公告 if this.module.modelUser.isLoginFirst(lastLoginTime) { this.chat.SendSysChatToUser(session, comm.ChatSystem2, 0, 0) diff --git a/modules/user/model_user.go b/modules/user/model_user.go index 7de2c02ab..b3adda323 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -31,7 +31,7 @@ func (this *ModelUser) Init(service core.IService, module core.IModule, comp cor err = this.MCompModel.Init(service, module, comp, options) this.module = module.(*User) this.EventApp = event_v2.NewApp() - this.EventApp.Listen(comm.EventUserChanged, this.ChangeVipExp) + this.EventApp.Listen(comm.EventUserVipChanged, this.ChangeVipExp) this.EventApp.Listen(comm.EventUserChanged, this.ChangeLevel) // 通过uid创建索引 this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ @@ -61,7 +61,6 @@ func (this *ModelUser) NickNameIsExist(name string) bool { if err == mongo.ErrNoDocuments { //无记录 return true } - } return false } @@ -76,7 +75,13 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) { user.Lv = 1 //初始等级 user.Ctime = now user.Logintime = now - return this.Add(user.Uid, user) + _, err = this.DB.InsertOne(comm.TableUser, user) + key := fmt.Sprintf("%s:%s", this.TableName, user.Uid) + if err = this.Redis.HMSet(key, user); err != nil { + this.module.Error("创建用户", log.Fields{"sid": user.Sid, "account": user.Binduid}) + return + } + return } //获取用户 @@ -174,45 +179,51 @@ func (this *ModelUser) updateOfflineTime(uid string) { func (this *ModelUser) ChangeVipExp(event interface{}, next func(event interface{})) { ul := event.(*UserListen) var ( - curExp int32 + curExp int64 bChange bool ) vipExp := ul.vipexp vipLv := ul.viplv - conf := this.module.configure.GetVipConfigureData(vipLv) - curExp = conf.UpExp + conf := this.module.configure.GetVipConfigureData(vipLv + 1) + if conf == nil { + return + } + curExp = int64(conf.UpExp) for vipExp >= curExp { vipLv++ vipExp -= curExp - tmpConf := this.module.configure.GetVipConfigureData(vipLv) + tmpConf := this.module.configure.GetVipConfigureData(vipLv + 1) if tmpConf == nil { vipLv-- vipExp += curExp break } - curExp = tmpConf.UpExp + curExp = int64(tmpConf.UpExp) bChange = true } if bChange { update := map[string]interface{}{ - "viplv": vipLv, - "vip": vipExp, + "vip": vipLv, + "vipexp": vipExp, } if err := this.module.modelUser.Change(ul.session.GetUserId(), update); err != nil { this.module.Error("玩家Vip等级经验更新", log.Fields{"uid": ul.session.GetUserId(), "vipLv": vipLv, "vipExp": vipExp}) return } + if ul.viplv != vipLv { // 新获得了vip + this.module.ModulePrivilege.AddVipData(ul.session, ul.viplv, vipLv) + } + // 推送玩家vip 经验变化 + ul.session.SendMsg(string(this.module.GetType()), UserSubTypeVipChangedPush, + &pb.UserVipChangedPush{ + Uid: ul.session.GetUserId(), + VipExp: int64(vipExp), + VipLv: vipLv, + }) } - // 推送玩家vip 经验变化 - ul.session.SendMsg(string(this.module.GetType()), UserSubTypeVipChangedPush, - &pb.UserVipChangedPush{ - Uid: ul.session.GetUserId(), - VipExp: int64(vipExp), - VipLv: vipLv, - }) - next(ul) + return } //change level @@ -293,6 +304,6 @@ type UserListen struct { exp int64 lv int32 name string - vipexp int32 + vipexp int64 viplv int32 } diff --git a/modules/user/module.go b/modules/user/module.go index 25b94478b..e910a920a 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -404,14 +404,29 @@ func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string if bPush { //推送玩家账号信息变化消息 session.SendMsg(string(this.GetType()), "reschanged", _change) } - if key == comm.ResExp || key == comm.VipExp { + if key == comm.ResExp { this.ModuleUser.EventUserChanged(session) + } else if key == comm.VipExp { + this.ModuleUser.EventUserVipChanged(session) } } return } +// 用户事件变化 +func (this *User) EventUserVipChanged(session comm.IUserSession) { + ul := new(UserListen) + user := this.GetUser(session.GetUserId()) + if user != nil { + ul.session = session + ul.name = user.Name + ul.vipexp = user.Vipexp + ul.viplv = user.Vip + } + this.modelUser.EventApp.Dispatch(comm.EventUserVipChanged, ul) +} + // 用户事件变化 func (this *User) EventUserChanged(session comm.IUserSession) { ul := new(UserListen) @@ -421,8 +436,6 @@ func (this *User) EventUserChanged(session comm.IUserSession) { ul.exp = user.Exp ul.lv = user.Lv ul.name = user.Name - ul.vipexp = user.Vip - ul.viplv = user.Viplv } this.modelUser.EventApp.Dispatch(comm.EventUserChanged, ul) } @@ -549,3 +562,17 @@ func (this *User) RpcGetCrossUserSession(ctx context.Context, req *pb.UIdReq, re func (this *User) RpcQueryUser(ctx context.Context, req *pb.NameReq, reply *pb.UserDataListResp) error { return this.queryUserFromRemoteDb(req.Name, reply) } +func (this *User) CheckTujianHero(session comm.IUserSession, heros []string) []bool { + sz := make([]bool, len(heros)) + + userEx, err := this.GetUserExpand(session.GetUserId()) + if err != nil { + return sz + } + for i, heroid := range heros { + if _, ok := userEx.Tujian[heroid]; ok { + sz[i] = true + } + } + return sz +} diff --git a/pb/privilege_db.pb.go b/pb/privilege_db.pb.go index 782ce1374..4f7392184 100644 --- a/pb/privilege_db.pb.go +++ b/pb/privilege_db.pb.go @@ -26,13 +26,12 @@ type DBPrivilege struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - CId string `protobuf:"bytes,3,opt,name=cId,proto3" json:"cId" bson:"cId"` //计费点数ID - PrivilegeID []int32 `protobuf:"varint,4,rep,packed,name=privilegeID,proto3" json:"privilegeID" bson:"privilegeID"` //特权ID - CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` ////购买时间 - ETime int64 `protobuf:"varint,6,opt,name=eTime,proto3" json:"eTime" bson:"eTime"` ////到期时间 - RewardTime int64 `protobuf:"varint,7,opt,name=rewardTime,proto3" json:"rewardTime" bson:"rewardTime"` //每日奖励时间 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + CId string `protobuf:"bytes,3,opt,name=cId,proto3" json:"cId" bson:"cId"` //计费点数ID + CTime int64 `protobuf:"varint,4,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` ////购买时间 + ETime int64 `protobuf:"varint,5,opt,name=eTime,proto3" json:"eTime" bson:"eTime"` ////到期时间 + RewardTime int64 `protobuf:"varint,6,opt,name=rewardTime,proto3" json:"rewardTime" bson:"rewardTime"` //每日奖励时间 } func (x *DBPrivilege) Reset() { @@ -88,13 +87,6 @@ func (x *DBPrivilege) GetCId() string { return "" } -func (x *DBPrivilege) GetPrivilegeID() []int32 { - if x != nil { - return x.PrivilegeID - } - return nil -} - func (x *DBPrivilege) GetCTime() int64 { if x != nil { return x.CTime @@ -116,23 +108,70 @@ func (x *DBPrivilege) GetRewardTime() int64 { return 0 } +type PrivilegeList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrivilegeID []int32 `protobuf:"varint,1,rep,packed,name=privilegeID,proto3" json:"privilegeID" bson:"privilegeID"` //特权ID +} + +func (x *PrivilegeList) Reset() { + *x = PrivilegeList{} + if protoimpl.UnsafeEnabled { + mi := &file_privilege_privilege_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivilegeList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivilegeList) ProtoMessage() {} + +func (x *PrivilegeList) ProtoReflect() protoreflect.Message { + mi := &file_privilege_privilege_db_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 PrivilegeList.ProtoReflect.Descriptor instead. +func (*PrivilegeList) Descriptor() ([]byte, []int) { + return file_privilege_privilege_db_proto_rawDescGZIP(), []int{1} +} + +func (x *PrivilegeList) GetPrivilegeID() []int32 { + if x != nil { + return x.PrivilegeID + } + return nil +} + type DBVip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - Reward map[int32]bool `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - PrivilegeID []int32 `protobuf:"varint,4,rep,packed,name=privilegeID,proto3" json:"privilegeID" bson:"privilegeID"` //特权ID - CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` ////购买时间 - RewardTime int64 `protobuf:"varint,6,opt,name=rewardTime,proto3" json:"rewardTime" bson:"rewardTime"` //每日奖励时间 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + Reward map[int32]bool `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key vip 等级 + Privilege map[int32]*PrivilegeList `protobuf:"bytes,4,rep,name=privilege,proto3" json:"privilege" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"privilege"` //特权ID + CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` ////购买时间 + RewardTime int64 `protobuf:"varint,6,opt,name=rewardTime,proto3" json:"rewardTime" bson:"rewardTime"` //每日奖励时间 } func (x *DBVip) Reset() { *x = DBVip{} if protoimpl.UnsafeEnabled { - mi := &file_privilege_privilege_db_proto_msgTypes[1] + mi := &file_privilege_privilege_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -145,7 +184,7 @@ func (x *DBVip) String() string { func (*DBVip) ProtoMessage() {} func (x *DBVip) ProtoReflect() protoreflect.Message { - mi := &file_privilege_privilege_db_proto_msgTypes[1] + mi := &file_privilege_privilege_db_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -158,7 +197,7 @@ func (x *DBVip) ProtoReflect() protoreflect.Message { // Deprecated: Use DBVip.ProtoReflect.Descriptor instead. func (*DBVip) Descriptor() ([]byte, []int) { - return file_privilege_privilege_db_proto_rawDescGZIP(), []int{1} + return file_privilege_privilege_db_proto_rawDescGZIP(), []int{2} } func (x *DBVip) GetId() string { @@ -182,9 +221,9 @@ func (x *DBVip) GetReward() map[int32]bool { return nil } -func (x *DBVip) GetPrivilegeID() []int32 { +func (x *DBVip) GetPrivilege() map[int32]*PrivilegeList { if x != nil { - return x.PrivilegeID + return x.Privilege } return nil } @@ -207,34 +246,41 @@ var File_privilege_privilege_db_proto protoreflect.FileDescriptor var file_privilege_privilege_db_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x2f, 0x70, 0x72, 0x69, 0x76, - 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, + 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, - 0x44, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, - 0x67, 0x65, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0xe8, 0x01, 0x0a, 0x05, 0x44, 0x42, 0x56, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, - 0x42, 0x56, 0x69, 0x70, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, - 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, 0x44, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70, - 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x31, + 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, + 0x44, 0x22, 0xc9, 0x02, 0x0a, 0x05, 0x44, 0x42, 0x56, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x44, 0x42, 0x56, 0x69, 0x70, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x70, 0x72, 0x69, + 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, + 0x42, 0x56, 0x69, 0x70, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x4c, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -249,19 +295,23 @@ func file_privilege_privilege_db_proto_rawDescGZIP() []byte { return file_privilege_privilege_db_proto_rawDescData } -var file_privilege_privilege_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_privilege_privilege_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_privilege_privilege_db_proto_goTypes = []interface{}{ - (*DBPrivilege)(nil), // 0: DBPrivilege - (*DBVip)(nil), // 1: DBVip - nil, // 2: DBVip.RewardEntry + (*DBPrivilege)(nil), // 0: DBPrivilege + (*PrivilegeList)(nil), // 1: PrivilegeList + (*DBVip)(nil), // 2: DBVip + nil, // 3: DBVip.RewardEntry + nil, // 4: DBVip.PrivilegeEntry } var file_privilege_privilege_db_proto_depIdxs = []int32{ - 2, // 0: DBVip.reward:type_name -> DBVip.RewardEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 3, // 0: DBVip.reward:type_name -> DBVip.RewardEntry + 4, // 1: DBVip.privilege:type_name -> DBVip.PrivilegeEntry + 1, // 2: DBVip.PrivilegeEntry.value:type_name -> PrivilegeList + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_privilege_privilege_db_proto_init() } @@ -283,6 +333,18 @@ func file_privilege_privilege_db_proto_init() { } } file_privilege_privilege_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivilegeList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_privilege_privilege_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBVip); i { case 0: return &v.state @@ -301,7 +363,7 @@ func file_privilege_privilege_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_privilege_privilege_db_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/privilege_msg.pb.go b/pb/privilege_msg.pb.go index 5be9c600c..59f8d93ec 100644 --- a/pb/privilege_msg.pb.go +++ b/pb/privilege_msg.pb.go @@ -296,6 +296,91 @@ func (x *PrivilegeBuyGiftResp) GetData() *DBVip { return nil } +type PrivilegeVipListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PrivilegeVipListReq) Reset() { + *x = PrivilegeVipListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_privilege_privilege_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivilegeVipListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivilegeVipListReq) ProtoMessage() {} + +func (x *PrivilegeVipListReq) ProtoReflect() protoreflect.Message { + mi := &file_privilege_privilege_msg_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 PrivilegeVipListReq.ProtoReflect.Descriptor instead. +func (*PrivilegeVipListReq) Descriptor() ([]byte, []int) { + return file_privilege_privilege_msg_proto_rawDescGZIP(), []int{6} +} + +type PrivilegeVipListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBVip `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *PrivilegeVipListResp) Reset() { + *x = PrivilegeVipListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_privilege_privilege_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivilegeVipListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivilegeVipListResp) ProtoMessage() {} + +func (x *PrivilegeVipListResp) ProtoReflect() protoreflect.Message { + mi := &file_privilege_privilege_msg_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 PrivilegeVipListResp.ProtoReflect.Descriptor instead. +func (*PrivilegeVipListResp) Descriptor() ([]byte, []int) { + return file_privilege_privilege_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *PrivilegeVipListResp) GetData() *DBVip { + if x != nil { + return x.Data + } + return nil +} + var File_privilege_privilege_msg_proto protoreflect.FileDescriptor var file_privilege_privilege_msg_proto_rawDesc = []byte{ @@ -320,8 +405,12 @@ var file_privilege_privilege_msg_proto_rawDesc = []byte{ 0x22, 0x32, 0x0a, 0x14, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x42, 0x75, 0x79, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x70, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, + 0x65, 0x56, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x14, 0x50, + 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x56, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x06, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x70, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -336,7 +425,7 @@ func file_privilege_privilege_msg_proto_rawDescGZIP() []byte { return file_privilege_privilege_msg_proto_rawDescData } -var file_privilege_privilege_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_privilege_privilege_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_privilege_privilege_msg_proto_goTypes = []interface{}{ (*PrivilegeGetListReq)(nil), // 0: PrivilegeGetListReq (*PrivilegeGetListResp)(nil), // 1: PrivilegeGetListResp @@ -344,18 +433,21 @@ var file_privilege_privilege_msg_proto_goTypes = []interface{}{ (*PrivilegeBuyYuekaResp)(nil), // 3: PrivilegeBuyYuekaResp (*PrivilegeBuyGiftReq)(nil), // 4: PrivilegeBuyGiftReq (*PrivilegeBuyGiftResp)(nil), // 5: PrivilegeBuyGiftResp - (*DBPrivilege)(nil), // 6: DBPrivilege - (*DBVip)(nil), // 7: DBVip + (*PrivilegeVipListReq)(nil), // 6: PrivilegeVipListReq + (*PrivilegeVipListResp)(nil), // 7: PrivilegeVipListResp + (*DBPrivilege)(nil), // 8: DBPrivilege + (*DBVip)(nil), // 9: DBVip } var file_privilege_privilege_msg_proto_depIdxs = []int32{ - 6, // 0: PrivilegeGetListResp.data:type_name -> DBPrivilege - 6, // 1: PrivilegeBuyYuekaResp.data:type_name -> DBPrivilege - 7, // 2: PrivilegeBuyGiftResp.data:type_name -> DBVip - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 8, // 0: PrivilegeGetListResp.data:type_name -> DBPrivilege + 8, // 1: PrivilegeBuyYuekaResp.data:type_name -> DBPrivilege + 9, // 2: PrivilegeBuyGiftResp.data:type_name -> DBVip + 9, // 3: PrivilegeVipListResp.data:type_name -> DBVip + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_privilege_privilege_msg_proto_init() } @@ -437,6 +529,30 @@ func file_privilege_privilege_msg_proto_init() { return nil } } + file_privilege_privilege_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivilegeVipListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_privilege_privilege_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivilegeVipListResp); 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{ @@ -444,7 +560,7 @@ func file_privilege_privilege_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_privilege_privilege_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 0fb58589d..ec2207d43 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -122,13 +122,12 @@ type DBUser struct { Starcoin int64 `protobuf:"varint,16,opt,name=starcoin,proto3" json:"starcoin" bson:"starcoin"` //星座图币 Created bool `protobuf:"varint,17,opt,name=created,proto3" json:"created" bson:"created"` //创角 Lv int32 `protobuf:"varint,18,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 - Vip int32 `protobuf:"varint,19,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip + Vip int32 `protobuf:"varint,19,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip等级 Diamond int64 `protobuf:"varint,20,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 Title int32 `protobuf:"varint,21,opt,name=title,proto3" json:"title" bson:"title"` //头衔 Offlinetime int64 `protobuf:"varint,22,opt,name=offlinetime,proto3" json:"offlinetime" bson:"offlinetime"` //离线时间 Figure int32 `protobuf:"varint,23,opt,name=figure,proto3" json:"figure" bson:"figure"` //主角形象 Bgp string `protobuf:"bytes,24,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 - Viplv int32 `protobuf:"varint,25,opt,name=viplv,proto3" json:"viplv" bson:"viplv"` // vip等级 } func (x *DBUser) Reset() { @@ -331,13 +330,6 @@ func (x *DBUser) GetBgp() string { return "" } -func (x *DBUser) GetViplv() int32 { - if x != nil { - return x.Viplv - } - return 0 -} - type DBUserSetting struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -590,7 +582,7 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xc8, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xb2, 0x04, 0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, @@ -626,40 +618,39 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x62, 0x67, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x69, 0x70, 0x6c, 0x76, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x76, 0x69, 0x70, 0x6c, 0x76, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, - 0x75, 0x61, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, - 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, - 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, - 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, - 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, - 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, - 0x69, 0x6a, 0x69, 0x22, 0xa2, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x67, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, + 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x12, + 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, + 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, + 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, + 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, + 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, + 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, + 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, + 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, + 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, + 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x22, 0xa2, 0x01, + 0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, + 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, + 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x54, 0x69, + 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/stress/server/dispose.go b/stress/server/dispose.go index db12e7ea1..4f122bddf 100644 --- a/stress/server/dispose.go +++ b/stress/server/dispose.go @@ -63,7 +63,7 @@ func Dispose(ctx context.Context, concurrency, totalNumber uint64, request *mode // 并发建立长链接 go func(i uint64) { r := robot.NewRobot(request.URL) - r.SetAccount("c71112" + strconv.Itoa(int(i))) + r.SetAccount("d71112" + strconv.Itoa(int(i))) //head := &pb.UserMessage{MainType: "user", SubType: "login"} // 先登录 diff --git a/sys/configure/structs/Game.PrivilegeData.go b/sys/configure/structs/Game.PrivilegeData.go index 94bc9a1ef..d4db307a4 100644 --- a/sys/configure/structs/Game.PrivilegeData.go +++ b/sys/configure/structs/Game.PrivilegeData.go @@ -12,8 +12,10 @@ import "errors" type GamePrivilegeData struct { PrivilegeId int32 + PrivilegeType int32 PrivilegeDescribeFront string PrivilegeDescribeAfter string + PrivilegeParameter int32 } const TypeId_GamePrivilegeData = 40320255 @@ -24,8 +26,10 @@ func (*GamePrivilegeData) GetTypeId() int32 { func (_v *GamePrivilegeData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["privilege_id"].(float64); !_ok_ { err = errors.New("privilege_id error"); return }; _v.PrivilegeId = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["privilege_type"].(float64); !_ok_ { err = errors.New("privilege_type error"); return }; _v.PrivilegeType = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["privilege_DescribeFront"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PrivilegeDescribeFront error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PrivilegeDescribeFront, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["privilege_DescribeAfter"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PrivilegeDescribeAfter error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PrivilegeDescribeAfter, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["privilege_parameter"].(float64); !_ok_ { err = errors.New("privilege_parameter error"); return }; _v.PrivilegeParameter = int32(_tempNum_) } return }