From 991364da57c1d0593d115c5122292ce5c5bbec78 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 22 Nov 2022 13:57:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_item.json | 112 +++++++++++++++++++++++++ sys/configure/structs/game.itemData.go | 15 ++++ 2 files changed, 127 insertions(+) diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 923d42f20..ab9ccf01f 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -37,6 +37,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10001", "text": "初级经验精灵不足" @@ -80,6 +81,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10002", "text": "石头不足" @@ -123,6 +125,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10003", "text": "5星阿宝碎片不足" @@ -166,6 +169,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10004", "text": "金币自选箱不足" @@ -209,6 +213,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10005", "text": "随机金币箱子不足" @@ -252,6 +257,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10006", "text": "金币箱子不足" @@ -295,6 +301,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10007", "text": "2小时金币不足" @@ -338,6 +345,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10008", "text": "特殊2小时金币不足" @@ -381,6 +389,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10009", "text": "被封印的魔法书不足" @@ -424,6 +433,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10010", "text": "古代硬币不足" @@ -467,6 +477,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10011", "text": "坏掉的钟表不足" @@ -510,6 +521,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10012", "text": "木材不足" @@ -553,6 +565,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10013", "text": "四叶草不足" @@ -596,6 +609,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10014", "text": "冒险家勋章不足" @@ -639,6 +653,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10015", "text": "猫猫护身符不足" @@ -682,6 +697,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_10016", "text": "人造钻石不足" @@ -725,6 +741,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_20001", "text": "随机英雄碎片不足" @@ -768,6 +785,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_20002", "text": "25001号碎片不足" @@ -805,6 +823,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_30001", "text": "时空石不足" @@ -842,6 +861,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_30002", "text": "奥术石不足" @@ -879,6 +899,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_30003", "text": "科技石不足" @@ -916,6 +937,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_30004", "text": "自然石不足" @@ -953,6 +975,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_30005", "text": "光耀石不足" @@ -1002,6 +1025,7 @@ "n": 1000 } ], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_50001", "text": "奥术美食-低级不足" @@ -1051,6 +1075,7 @@ "n": 1000 } ], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_50002", "text": "科技美食-低级不足" @@ -1100,6 +1125,7 @@ "n": 1000 } ], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_50003", "text": "自然美食-低级不足" @@ -1149,6 +1175,7 @@ "n": 1000 } ], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_50004", "text": "光耀美食-低级不足" @@ -1198,6 +1225,13 @@ "n": 1000 } ], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50005", "text": "奥术美食-中级不足" @@ -1247,6 +1281,13 @@ "n": 1000 } ], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50006", "text": "科技美食-中级不足" @@ -1296,6 +1337,13 @@ "n": 1000 } ], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50007", "text": "自然美食-中级不足" @@ -1345,6 +1393,13 @@ "n": 1000 } ], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50008", "text": "光耀美食-中级不足" @@ -1388,6 +1443,13 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50009", "text": "奥术美食-高级不足" @@ -1431,6 +1493,13 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50010", "text": "科技美食-高级不足" @@ -1474,6 +1543,13 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50011", "text": "自然美食-高级不足" @@ -1517,6 +1593,13 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "tipstxt": { "key": "itemtipstxt_50012", "text": "光耀美食-高级不足" @@ -1554,6 +1637,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_60001", "text": "5星装备自选箱不足" @@ -1591,6 +1675,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_60002", "text": "5星装备随机箱不足" @@ -1628,6 +1713,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_60003", "text": "5星套装宝箱不足" @@ -1671,6 +1757,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_90001", "text": "阿宝的天赋点不足" @@ -1714,6 +1801,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_90002", "text": "波比的天赋点不足" @@ -1757,6 +1845,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_90003", "text": "小伊的天赋点不足" @@ -1800,6 +1889,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40001", "text": "攻势附魔石不足" @@ -1843,6 +1933,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40002", "text": "逐风附魔石不足" @@ -1886,6 +1977,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40003", "text": "寒霜附魔石不足" @@ -1929,6 +2021,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40004", "text": "牧神附魔石不足" @@ -1972,6 +2065,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40005", "text": "玄武附魔石不足" @@ -2015,6 +2109,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40006", "text": "箭神附魔石不足" @@ -2058,6 +2153,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40007", "text": "渴血附魔石不足" @@ -2101,6 +2197,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40008", "text": "愈合附魔石不足" @@ -2144,6 +2241,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40009", "text": "祈愿附魔石不足" @@ -2187,6 +2285,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40010", "text": "预言附魔石不足" @@ -2230,6 +2329,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40011", "text": "月盾附魔石不足" @@ -2273,6 +2373,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40012", "text": "破妄附魔石不足" @@ -2316,6 +2417,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40013", "text": "脉冲附魔石不足" @@ -2359,6 +2461,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40014", "text": "裁决附魔石不足" @@ -2402,6 +2505,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40015", "text": "炼心附魔石不足" @@ -2445,6 +2549,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40016", "text": "诅咒附魔石不足" @@ -2488,6 +2593,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40017", "text": "守护附魔石不足" @@ -2531,6 +2637,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40018", "text": "御免附魔石不足" @@ -2574,6 +2681,7 @@ } ], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_40019", "text": "庇佑附魔石不足" @@ -2611,6 +2719,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_100001", "text": "维京远征挑战券不足" @@ -2648,6 +2757,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_100002", "text": "狩猎挑战券不足" @@ -2685,6 +2795,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_100003", "text": "秘境挑战券不足" @@ -2722,6 +2833,7 @@ }, "sale": [], "synthetize_deplete": [], + "decompose_deplete": [], "tipstxt": { "key": "itemtipstxt_100004", "text": "竞技场挑战券不足" diff --git a/sys/configure/structs/game.itemData.go b/sys/configure/structs/game.itemData.go index 5d004d9f2..da0e0b352 100644 --- a/sys/configure/structs/game.itemData.go +++ b/sys/configure/structs/game.itemData.go @@ -34,6 +34,7 @@ type GameItemData struct { Intr string Sale []*Gameatn SynthetizeDeplete []*Gameatn + DecomposeDeplete []*Gameatn Tipstxt string } @@ -106,6 +107,20 @@ func (_v *GameItemData)Deserialize(_buf map[string]interface{}) (err error) { } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["decompose_deplete"].([]interface{}); !_ok_ { err = errors.New("decompose_deplete error"); return } + + _v.DecomposeDeplete = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.DecomposeDeplete = append(_v.DecomposeDeplete, _list_v_) + } + } + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["tipstxt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Tipstxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Tipstxt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } return } From a1a15aaef8c1e55eefe66a58ae4938f683d4ffe4 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 22 Nov 2022 14:02:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=81=93=E5=85=B7?= =?UTF-8?q?=E5=88=86=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/friend_msg.pb.go | 149 ++-------------------------------- pb/items_msg.pb.go | 194 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 186 insertions(+), 157 deletions(-) diff --git a/pb/friend_msg.pb.go b/pb/friend_msg.pb.go index ff1a9722a..d242e8104 100644 --- a/pb/friend_msg.pb.go +++ b/pb/friend_msg.pb.go @@ -2008,109 +2008,6 @@ func (x *FriendAssistHeroListResp) GetFriends() []*FriendBase { return nil } -// 查询是否已申请目标玩家为好友或目标玩家是否已是好友 -type FriendGetRelationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TargetUid string `protobuf:"bytes,1,opt,name=targetUid,proto3" json:"targetUid"` //目标玩家ID -} - -func (x *FriendGetRelationReq) Reset() { - *x = FriendGetRelationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_msg_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendGetRelationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendGetRelationReq) ProtoMessage() {} - -func (x *FriendGetRelationReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_msg_proto_msgTypes[40] - 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 FriendGetRelationReq.ProtoReflect.Descriptor instead. -func (*FriendGetRelationReq) Descriptor() ([]byte, []int) { - return file_friend_friend_msg_proto_rawDescGZIP(), []int{40} -} - -func (x *FriendGetRelationReq) GetTargetUid() string { - if x != nil { - return x.TargetUid - } - return "" -} - -type FriendGetRelationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TargetUid string `protobuf:"bytes,1,opt,name=targetUid,proto3" json:"targetUid"` - Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status"` //已是好友或已申请返回true -} - -func (x *FriendGetRelationResp) Reset() { - *x = FriendGetRelationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_msg_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendGetRelationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendGetRelationResp) ProtoMessage() {} - -func (x *FriendGetRelationResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_msg_proto_msgTypes[41] - 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 FriendGetRelationResp.ProtoReflect.Descriptor instead. -func (*FriendGetRelationResp) Descriptor() ([]byte, []int) { - return file_friend_friend_msg_proto_rawDescGZIP(), []int{41} -} - -func (x *FriendGetRelationResp) GetTargetUid() string { - if x != nil { - return x.TargetUid - } - return "" -} - -func (x *FriendGetRelationResp) GetStatus() bool { - if x != nil { - return x.Status - } - return false -} - var File_friend_friend_msg_proto protoreflect.FileDescriptor var file_friend_friend_msg_proto_rawDesc = []byte{ @@ -2262,16 +2159,8 @@ var file_friend_friend_msg_proto_rawDesc = []byte{ 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x73, 0x22, 0x34, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x15, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -2286,7 +2175,7 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte { return file_friend_friend_msg_proto_rawDescData } -var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_friend_friend_msg_proto_goTypes = []interface{}{ (*FriendBase)(nil), // 0: FriendBase (*FriendListReq)(nil), // 1: FriendListReq @@ -2328,9 +2217,7 @@ var file_friend_friend_msg_proto_goTypes = []interface{}{ (*FriendAssistHeroUpdatePush)(nil), // 37: FriendAssistHeroUpdatePush (*FriendAssistHeroListReq)(nil), // 38: FriendAssistHeroListReq (*FriendAssistHeroListResp)(nil), // 39: FriendAssistHeroListResp - (*FriendGetRelationReq)(nil), // 40: FriendGetRelationReq - (*FriendGetRelationResp)(nil), // 41: FriendGetRelationResp - (*AssistRecord)(nil), // 42: AssistRecord + (*AssistRecord)(nil), // 40: AssistRecord } var file_friend_friend_msg_proto_depIdxs = []int32{ 0, // 0: FriendListResp.list:type_name -> FriendBase @@ -2340,7 +2227,7 @@ var file_friend_friend_msg_proto_depIdxs = []int32{ 0, // 4: FriendBlackListResp.friends:type_name -> FriendBase 0, // 5: FriendZanlistResp.list:type_name -> FriendBase 0, // 6: FriendAssistlistResp.list:type_name -> FriendBase - 42, // 7: FriendAssistlistResp.record:type_name -> AssistRecord + 40, // 7: FriendAssistlistResp.record:type_name -> AssistRecord 0, // 8: FriendAssistHeroUpdatePush.friend:type_name -> FriendBase 0, // 9: FriendAssistHeroListResp.friends:type_name -> FriendBase 10, // [10:10] is the sub-list for method output_type @@ -2837,30 +2724,6 @@ func file_friend_friend_msg_proto_init() { return nil } } - file_friend_friend_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendGetRelationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_msg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendGetRelationResp); 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{ @@ -2868,7 +2731,7 @@ func file_friend_friend_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_friend_friend_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 42, + NumMessages: 40, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/items_msg.pb.go b/pb/items_msg.pb.go index ab78580b5..380e7cf37 100644 --- a/pb/items_msg.pb.go +++ b/pb/items_msg.pb.go @@ -420,6 +420,134 @@ func (x *ItemsSellItemResp) GetIssucc() bool { return false } +//分解道具 请求 +type ItemsDecomposeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GridId string `protobuf:"bytes,1,opt,name=GridId,proto3" json:"GridId"` //格子Id + ItemId string `protobuf:"bytes,2,opt,name=ItemId,proto3" json:"ItemId"` //物品Id + Amount uint32 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount"` //使用数量 +} + +func (x *ItemsDecomposeReq) Reset() { + *x = ItemsDecomposeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_items_items_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ItemsDecomposeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ItemsDecomposeReq) ProtoMessage() {} + +func (x *ItemsDecomposeReq) ProtoReflect() protoreflect.Message { + mi := &file_items_items_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 ItemsDecomposeReq.ProtoReflect.Descriptor instead. +func (*ItemsDecomposeReq) Descriptor() ([]byte, []int) { + return file_items_items_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *ItemsDecomposeReq) GetGridId() string { + if x != nil { + return x.GridId + } + return "" +} + +func (x *ItemsDecomposeReq) GetItemId() string { + if x != nil { + return x.ItemId + } + return "" +} + +func (x *ItemsDecomposeReq) GetAmount() uint32 { + if x != nil { + return x.Amount + } + return 0 +} + +//分解道具 请求回应 +type ItemsDecomposeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GridId string `protobuf:"bytes,1,opt,name=GridId,proto3" json:"GridId"` //格子Id + Amount uint32 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount"` //使用数量 + Issucc bool `protobuf:"varint,3,opt,name=issucc,proto3" json:"issucc"` //是否成功 +} + +func (x *ItemsDecomposeResp) Reset() { + *x = ItemsDecomposeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_items_items_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ItemsDecomposeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ItemsDecomposeResp) ProtoMessage() {} + +func (x *ItemsDecomposeResp) ProtoReflect() protoreflect.Message { + mi := &file_items_items_msg_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ItemsDecomposeResp.ProtoReflect.Descriptor instead. +func (*ItemsDecomposeResp) Descriptor() ([]byte, []int) { + return file_items_items_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *ItemsDecomposeResp) GetGridId() string { + if x != nil { + return x.GridId + } + return "" +} + +func (x *ItemsDecomposeResp) GetAmount() uint32 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *ItemsDecomposeResp) GetIssucc() bool { + if x != nil { + return x.Issucc + } + return false +} + var File_items_items_msg_proto protoreflect.FileDescriptor var file_items_items_msg_proto_rawDesc = []byte{ @@ -458,8 +586,20 @@ var file_items_items_msg_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x5b, 0x0a, + 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, + 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5c, 0x0a, 0x12, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -474,20 +614,22 @@ func file_items_items_msg_proto_rawDescGZIP() []byte { return file_items_items_msg_proto_rawDescData } -var file_items_items_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_items_items_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_items_items_msg_proto_goTypes = []interface{}{ - (*ItemsGetlistReq)(nil), // 0: ItemsGetlistReq - (*ItemsGetlistResp)(nil), // 1: ItemsGetlistResp - (*ItemsChangePush)(nil), // 2: ItemsChangePush - (*ItemsUseItemReq)(nil), // 3: ItemsUseItemReq - (*ItemsUseItemResp)(nil), // 4: ItemsUseItemResp - (*ItemsSellItemReq)(nil), // 5: ItemsSellItemReq - (*ItemsSellItemResp)(nil), // 6: ItemsSellItemResp - (*DB_UserItemData)(nil), // 7: DB_UserItemData + (*ItemsGetlistReq)(nil), // 0: ItemsGetlistReq + (*ItemsGetlistResp)(nil), // 1: ItemsGetlistResp + (*ItemsChangePush)(nil), // 2: ItemsChangePush + (*ItemsUseItemReq)(nil), // 3: ItemsUseItemReq + (*ItemsUseItemResp)(nil), // 4: ItemsUseItemResp + (*ItemsSellItemReq)(nil), // 5: ItemsSellItemReq + (*ItemsSellItemResp)(nil), // 6: ItemsSellItemResp + (*ItemsDecomposeReq)(nil), // 7: ItemsDecomposeReq + (*ItemsDecomposeResp)(nil), // 8: ItemsDecomposeResp + (*DB_UserItemData)(nil), // 9: DB_UserItemData } var file_items_items_msg_proto_depIdxs = []int32{ - 7, // 0: ItemsGetlistResp.Grids:type_name -> DB_UserItemData - 7, // 1: ItemsChangePush.Grids:type_name -> DB_UserItemData + 9, // 0: ItemsGetlistResp.Grids:type_name -> DB_UserItemData + 9, // 1: ItemsChangePush.Grids:type_name -> DB_UserItemData 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -586,6 +728,30 @@ func file_items_items_msg_proto_init() { return nil } } + file_items_items_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemsDecomposeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_items_items_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemsDecomposeResp); 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{ @@ -593,7 +759,7 @@ func file_items_items_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_items_items_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, From d95ece74642e1fd2b82d41054c3a5dfddfda7361 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 22 Nov 2022 14:06:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=81=93=E5=85=B7=E5=88=86=E8=A7=A3api?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/items/api_decompose.go | 78 ++++++++++++++++++++++++++++++++++ modules/items/api_sellItem.go | 17 ++------ 2 files changed, 81 insertions(+), 14 deletions(-) create mode 100644 modules/items/api_decompose.go diff --git a/modules/items/api_decompose.go b/modules/items/api_decompose.go new file mode 100644 index 000000000..37d71d452 --- /dev/null +++ b/modules/items/api_decompose.go @@ -0,0 +1,78 @@ +package items + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.ItemsSellItemReq) (code pb.ErrorCode) { + if req.GridId == "" || req.Amount <= 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +//出售道具 +func (this *apiComp) SellItem(session comm.IUserSession, req *pb.ItemsSellItemReq) (code pb.ErrorCode, data proto.Message) { + var ( + err error + item *pb.DB_UserItemData + itemcf *cfg.GameItemData + sale []*cfg.Gameatn + ) + if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { + return + } + if item, err = this.module.modelItems.QueryUserPackByGridId(session.GetUserId(), req.GridId); err != nil { + code = pb.ErrorCode_ReqParameterError + return + } + if itemcf, err = this.module.configure.GetItemConfigure(item.ItemId); err != nil { + code = pb.ErrorCode_ConfigurationException + return + } + if itemcf.Sale == nil || len(itemcf.Sale) == 0 { + code = pb.ErrorCode_ItemsUseNoCanSell + return + } + if itemcf.DecomposeDeplete == nil || len(itemcf.DecomposeDeplete) == 0 { + code = pb.ErrorCode_ItemsUseNoCanSell + return + } + sale = make([]*cfg.Gameatn, 0, len(itemcf.DecomposeDeplete)) + for _, v := range itemcf.DecomposeDeplete { + sale = append(sale, &cfg.Gameatn{ + A: v.A, + T: v.T, + N: v.N * int32(req.Amount), + }) + } + if code = this.module.ConsumeRes(session, sale, true); code != pb.ErrorCode_Success { + return + } + + if req.Amount > item.Amount { + code = pb.ErrorCode_ReqParameterError + this.module.Errorf("SellItemCheck over all amount:[%d:%d]", req.Amount, item.Amount) + return + } + sale = make([]*cfg.Gameatn, len(itemcf.Sale)) + for i, v := range itemcf.Sale { + temp := *v + sale[i] = &temp + sale[i].N = v.N * int32(req.Amount) + } + if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { + return + } + item.Amount = item.Amount - req.Amount + if code = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { + return + } + session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellItemResp{GridId: req.GridId, Amount: req.Amount, Issucc: true}) + return +} diff --git a/modules/items/api_sellItem.go b/modules/items/api_sellItem.go index 9e0705b67..57ce30d2c 100644 --- a/modules/items/api_sellItem.go +++ b/modules/items/api_sellItem.go @@ -9,7 +9,7 @@ import ( ) //参数校验 -func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.ItemsSellItemReq) (code pb.ErrorCode) { +func (this *apiComp) DecomposeCheck(session comm.IUserSession, req *pb.ItemsDecomposeReq) (code pb.ErrorCode) { if req.GridId == "" || req.Amount <= 0 { code = pb.ErrorCode_ReqParameterError } @@ -17,14 +17,14 @@ func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.ItemsSellI } //出售道具 -func (this *apiComp) SellItem(session comm.IUserSession, req *pb.ItemsSellItemReq) (code pb.ErrorCode, data proto.Message) { +func (this *apiComp) Decompose(session comm.IUserSession, req *pb.ItemsDecomposeReq) (code pb.ErrorCode, data proto.Message) { var ( err error item *pb.DB_UserItemData itemcf *cfg.GameItemData sale []*cfg.Gameatn ) - if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { + if code = this.DecomposeCheck(session, req); code != pb.ErrorCode_Success { return } if item, err = this.module.modelItems.QueryUserPackByGridId(session.GetUserId(), req.GridId); err != nil { @@ -57,17 +57,6 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.ItemsSellItemRe if code = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { return } - // if item.Amount == 0 { - // if err = this.module.modelItems.DelUserPack(session.GetUserId(), item.GridId); err != nil { - // code = pb.ErrorCode_DBError - // return - // } - // } else { - // if err = this.module.modelItems.UpdateUserPack(session.GetUserId(), item); err != nil { - // code = pb.ErrorCode_DBError - // return - // } - // } session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellItemResp{GridId: req.GridId, Amount: req.Amount, Issucc: true}) return } From f2f5dad8ddd300dbce1e8a7f605343cf7df3e893 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 22 Nov 2022 14:32:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 182 +++++++++++++++---------------- modules/equipment/api_ench.go | 2 +- modules/equipment/api_forg.go | 1 - modules/equipment/api_upgrade.go | 2 + modules/equipment/api_wash.go | 2 +- 5 files changed, 95 insertions(+), 94 deletions(-) diff --git a/comm/const.go b/comm/const.go index 9973782a2..967767776 100644 --- a/comm/const.go +++ b/comm/const.go @@ -359,97 +359,97 @@ const ( // 随机任务类型 const ( - Rtype1 TaskType = 1 //英雄指定 - Rtype2 TaskType = 2 //主线之内触发了剧情Id - Rtype3 TaskType = 3 //每日任务 - Rtype4 TaskType = 4 //指定英雄的等级限制 - Rtype5 TaskType = 5 //指定英雄的装备数量 - Rtype6 TaskType = 6 //指定英雄的星级 - Rtype7 TaskType = 7 //日常登录一次 - Rtype8 TaskType = 8 //累计登陆xx天 - Rtype9 TaskType = 9 //连续登陆xx天 - Rtype10 TaskType = 10 //拥有xx个好友 - Rtype11 TaskType = 11 //赠送X次友情点 - Rtype12 TaskType = 12 //使用好友助战英雄xx次 - Rtype13 TaskType = 13 //更换X次助战英雄 - Rtype14 TaskType = 14 //累计xx次普通招募 - Rtype15 TaskType = 15 //累计xx次阵营招募 - Rtype16 TaskType = 16 //招募获得xx品质英雄xx个 - Rtype17 TaskType = 17 //普通招募十连,获得xx个以上xx星英雄 - Rtype18 TaskType = 18 //xx次普通招募 - Rtype19 TaskType = 19 //xx次阵营招募 - Rtype20 TaskType = 20 //用户等级达到xx级 - Rtype21 TaskType = 21 //英雄合成xx次 - Rtype22 TaskType = 22 //合成xx英雄 - Rtype23 TaskType = 23 //拥有xx个xx星级的xx等级英雄 - Rtype24 TaskType = 24 //为任意英雄提升xx次等级 - Rtype25 TaskType = 25 //xx名xx英雄升至xx星 - Rtype26 TaskType = 26 //xx名英雄从三星升四星 - Rtype27 TaskType = 27 //xx名英雄从四星升五星 - Rtype28 TaskType = 28 //xx名英雄从五星升六星 - Rtype29 TaskType = 29 //拥有xx个xx级及以上的【xx】英雄 - Rtype30 TaskType = 30 //获得xx个品质为xx的英雄 - Rtype31 TaskType = 31 //获得xx个品质为xx以上的英雄 - Rtype32 TaskType = 32 //xx个品质为xx的英雄升到xx级 - Rtype33 TaskType = 33 //xx个品质为xx以及以上英雄升到xx级 - Rtype34 TaskType = 34 //xx个英雄觉醒达到xx阶段 - Rtype35 TaskType = 35 //xx英雄觉醒达到xx阶段 - Rtype36 TaskType = 36 //xx位xx品质xx职业英雄(xx阵营)觉醒达到xx阶段 - Rtype37 TaskType = 37 //xx名xx品质英雄满共鸣、等级、觉醒 - Rtype38 TaskType = 38 //xx英雄满级、共鸣、觉醒至最高状态 - Rtype39 TaskType = 39 //累计英雄共鸣xx次 - Rtype40 TaskType = 40 //xx个英雄共鸣满xx次 - Rtype41 TaskType = 41 //xx名英雄穿戴xx件xx星级的装备 - Rtype42 TaskType = 42 //xx名英雄穿戴xx件xx等级的装备 - Rtype43 TaskType = 43 //将xx件装备强化至xx级 - Rtype44 TaskType = 44 //任意装备强化到xx级 - Rtype45 TaskType = 45 //将xx件xx星【xx】套装装备强化至xx级 - Rtype46 TaskType = 46 //为xx名英雄穿戴完整xx星【xx】套装装备 - Rtype47 TaskType = 47 //累计强化装备成功xx次 - Rtype48 TaskType = 48 //xx次xx星的二件套装备强化至xx并穿戴 - Rtype49 TaskType = 49 //xx次xx星的四件套装备强化至xx并穿戴 - Rtype50 TaskType = 50 //获得xx星以上装备xx件 - Rtype51 TaskType = 51 //在铁匠铺中获得xx件xx星装备 - Rtype52 TaskType = 52 //xx英雄提升xx次技能等级 - Rtype53 TaskType = 53 //技能升级累计xx次 - Rtype54 TaskType = 54 //x名卡牌角色技能全满级 - Rtype55 TaskType = 55 //xx品质英雄提升xx次技能等级 - Rtype56 TaskType = 56 //拥有xx名技能升级xx次的xx职业英雄 - Rtype57 TaskType = 57 //xx名英雄技能满级 - Rtype58 TaskType = 58 //通关任意普通爬塔层数 - Rtype59 TaskType = 59 //通关普通爬塔xx层 - Rtype60 TaskType = 60 //任意主线副本通关1次 - Rtype61 TaskType = 61 //通关主线关卡xx - Rtype62 TaskType = 62 //世界聊天发言xx次 - Rtype63 TaskType = 63 //日常任务活跃度达到xx - Rtype64 TaskType = 64 //任意商品购买xx次 - Rtype65 TaskType = 65 //在商店购买xx商品xx件 - Rtype66 TaskType = 66 //xx商店购买任意商品xx次 - Rtype67 TaskType = 67 //商店购物消耗xx货币xx个 - Rtype68 TaskType = 68 //任意渠道消耗xx金币 - Rtype69 TaskType = 69 //与其他玩家切磋xx次 - Rtype70 TaskType = 70 //通关世界任务XX关卡 - Rtype72 TaskType = 72 //完成一次捏人 - Rtype73 TaskType = 73 //通关难度A维京远征指定BOSSN次(从接到任务开始,只有通关A难度进度才+1) - Rtype74 TaskType = 74 //通关难度A维京远征指定BOSS(检查最高难度记录是否超过了此难度,超过则完成) - Rtype75 TaskType = 75 //自动战斗通关难度A的维京远征指定BOSS(从接到任务开始,若全程无手动操作(不包含变速)且挑战难度大于等于A则判断任务完成) - Rtype76 TaskType = 76 //通关维京远征指定BOSSN次(从创号开始记录,通关任意难度进度都+1) - Rtype77 TaskType = 77 //通关难度A及以上维京远征指定BOSSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) - Rtype78 TaskType = 78 //通关难度A维京远征指定BOSS时间达到XX秒以内(检查最高记录是否超过了此难度,超过则完成) - Rtype79 TaskType = 79 //使用好友助战英雄通关A难度的指定维京远征BOSS(从接到任务开始,通关阵营中包含好友助战英雄,难度大于等于A的指定维京远征BOSS时任务完成。) - Rtype80 TaskType = 80 //通关难度A指定狩猎BOOS难度N次(从接到任务开始,只有通关A难度进度才+1) - Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成) - Rtype82 TaskType = 82 //通关狩猎指定BOOSN次(历史)(从创号开始记录登陆天数,通关任意难度进度都+1) - Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) - Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) - Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) - Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) - Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) - Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) + Rtype1 TaskType = 1 //英雄指定 + Rtype2 TaskType = 2 //主线之内触发了剧情Id + Rtype3 TaskType = 3 //每日任务 + Rtype4 TaskType = 4 //指定英雄的等级限制 + Rtype5 TaskType = 5 //指定英雄的装备数量 + Rtype6 TaskType = 6 //指定英雄的星级 + Rtype7 TaskType = 7 //日常登录一次 + Rtype8 TaskType = 8 //累计登陆xx天 + Rtype9 TaskType = 9 //连续登陆xx天 + Rtype10 TaskType = 10 //拥有xx个好友 + Rtype11 TaskType = 11 //赠送X次友情点 + Rtype12 TaskType = 12 //使用好友助战英雄xx次 + Rtype13 TaskType = 13 //更换X次助战英雄 + Rtype14 TaskType = 14 //累计xx次普通招募 + Rtype15 TaskType = 15 //累计xx次阵营招募 + Rtype16 TaskType = 16 //招募获得xx品质英雄xx个 + Rtype17 TaskType = 17 //普通招募十连,获得xx个以上xx星英雄 + Rtype18 TaskType = 18 //xx次普通招募 + Rtype19 TaskType = 19 //xx次阵营招募 + Rtype20 TaskType = 20 //用户等级达到xx级 + Rtype21 TaskType = 21 //英雄合成xx次 + Rtype22 TaskType = 22 //合成xx英雄 + Rtype23 TaskType = 23 //拥有xx个xx星级的xx等级英雄 + Rtype24 TaskType = 24 //为任意英雄提升xx次等级 + Rtype25 TaskType = 25 //xx名xx英雄升至xx星 + Rtype26 TaskType = 26 //xx名英雄从三星升四星 + Rtype27 TaskType = 27 //xx名英雄从四星升五星 + Rtype28 TaskType = 28 //xx名英雄从五星升六星 + Rtype29 TaskType = 29 //拥有xx个xx级及以上的【xx】英雄 + Rtype30 TaskType = 30 //获得xx个品质为xx的英雄 + Rtype31 TaskType = 31 //获得xx个品质为xx以上的英雄 + Rtype32 TaskType = 32 //xx个品质为xx的英雄升到xx级 + Rtype33 TaskType = 33 //xx个品质为xx以及以上英雄升到xx级 + Rtype34 TaskType = 34 //xx个英雄觉醒达到xx阶段 + Rtype35 TaskType = 35 //xx英雄觉醒达到xx阶段 + Rtype36 TaskType = 36 //xx位xx品质xx职业英雄(xx阵营)觉醒达到xx阶段 + Rtype37 TaskType = 37 //xx名xx品质英雄满共鸣、等级、觉醒 + Rtype38 TaskType = 38 //xx英雄满级、共鸣、觉醒至最高状态 + Rtype39 TaskType = 39 //累计英雄共鸣xx次 + Rtype40 TaskType = 40 //xx个英雄共鸣满xx次 + Rtype41 TaskType = 41 //xx名英雄穿戴xx件xx星级的装备 + Rtype42 TaskType = 42 //xx名英雄穿戴xx件xx等级的装备 + Rtype43 TaskType = 43 //将xx件装备强化至xx级 + Rtype44 TaskType = 44 //任意装备强化到xx级 + Rtype45 TaskType = 45 //将xx件xx星【xx】套装装备强化至xx级 + Rtype46 TaskType = 46 //为xx名英雄穿戴完整xx星【xx】套装装备 + Rtype47 TaskType = 47 //累计强化装备成功xx次 + Rtype48 TaskType = 48 //xx次xx星的二件套装备强化至xx并穿戴 + Rtype49 TaskType = 49 //xx次xx星的四件套装备强化至xx并穿戴 + Rtype50 TaskType = 50 //获得xx星以上装备xx件 + Rtype51 TaskType = 51 //在铁匠铺中获得xx件xx星装备 + Rtype52 TaskType = 52 //xx英雄提升xx次技能等级 + Rtype53 TaskType = 53 //技能升级累计xx次 + Rtype54 TaskType = 54 //x名卡牌角色技能全满级 + Rtype55 TaskType = 55 //xx品质英雄提升xx次技能等级 + Rtype56 TaskType = 56 //拥有xx名技能升级xx次的xx职业英雄 + Rtype57 TaskType = 57 //xx名英雄技能满级 + Rtype58 TaskType = 58 //通关任意普通爬塔层数 + Rtype59 TaskType = 59 //通关普通爬塔xx层 + Rtype60 TaskType = 60 //任意主线副本通关1次 + Rtype61 TaskType = 61 //通关主线关卡xx + Rtype62 TaskType = 62 //世界聊天发言xx次 + Rtype63 TaskType = 63 //日常任务活跃度达到xx + Rtype64 TaskType = 64 //任意商品购买xx次 + Rtype65 TaskType = 65 //在商店购买xx商品xx件 + Rtype66 TaskType = 66 //xx商店购买任意商品xx次 + Rtype67 TaskType = 67 //商店购物消耗xx货币xx个 + Rtype68 TaskType = 68 //任意渠道消耗xx金币 + Rtype69 TaskType = 69 //与其他玩家切磋xx次 + Rtype70 TaskType = 70 //通关世界任务XX关卡 + Rtype72 TaskType = 72 //完成一次捏人 + Rtype73 TaskType = 73 //通关难度A维京远征指定BOSSN次(从接到任务开始,只有通关A难度进度才+1) + Rtype74 TaskType = 74 //通关难度A维京远征指定BOSS(检查最高难度记录是否超过了此难度,超过则完成) + Rtype75 TaskType = 75 //自动战斗通关难度A的维京远征指定BOSS(从接到任务开始,若全程无手动操作(不包含变速)且挑战难度大于等于A则判断任务完成) + Rtype76 TaskType = 76 //通关维京远征指定BOSSN次(从创号开始记录,通关任意难度进度都+1) + Rtype77 TaskType = 77 //通关难度A及以上维京远征指定BOSSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) + Rtype78 TaskType = 78 //通关难度A维京远征指定BOSS时间达到XX秒以内(检查最高记录是否超过了此难度,超过则完成) + Rtype79 TaskType = 79 //使用好友助战英雄通关A难度的指定维京远征BOSS(从接到任务开始,通关阵营中包含好友助战英雄,难度大于等于A的指定维京远征BOSS时任务完成。) + Rtype80 TaskType = 80 //通关难度A指定狩猎BOOS难度N次(从接到任务开始,只有通关A难度进度才+1) + Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成) + Rtype82 TaskType = 82 //通关狩猎指定BOOSN次(历史)(从创号开始记录登陆天数,通关任意难度进度都+1) + Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) + Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) + Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) + Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) + Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) + Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + // Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。) Rtype94 TaskType = 94 //装备附魔N次(历史)(从创号开始记录,附魔成功进度+1) Rtype95 TaskType = 95 //装备洗练N次(历史)(从创号开始记录,洗练成功进度+1) diff --git a/modules/equipment/api_ench.go b/modules/equipment/api_ench.go index 806d37be5..8dc08e463 100644 --- a/modules/equipment/api_ench.go +++ b/modules/equipment/api_ench.go @@ -91,7 +91,7 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) ( return } } - + this.module.ModuleRtask.SendToRtask(session, comm.Rtype94, 1) session.SendMsg(string(this.module.GetType()), "ench", &pb.EquipmentEnchResp{Issucc: true, Equipment: equip}) return } diff --git a/modules/equipment/api_forg.go b/modules/equipment/api_forg.go index 39581fb17..629cbe13a 100644 --- a/modules/equipment/api_forg.go +++ b/modules/equipment/api_forg.go @@ -65,7 +65,6 @@ func (this *apiComp) Forg(session comm.IUserSession, req *pb.EquipmentForgReq) ( N: int32(v), }) } - session.SendMsg(string(this.module.GetType()), "forg", &pb.EquipmentForgResp{Issucc: true, Reward: reward}) return } diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index d3f7bc00d..3c8014dbe 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -192,6 +192,8 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade } else { this.module.Errorf("no found userdata uid:%s", session.GetUserId()) } + } else { + this.module.ModuleRtask.SendToRtask(session, comm.Rtype96, 1) } session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments}) return diff --git a/modules/equipment/api_wash.go b/modules/equipment/api_wash.go index daa1f0dac..a5e82dbef 100644 --- a/modules/equipment/api_wash.go +++ b/modules/equipment/api_wash.go @@ -66,7 +66,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( Value: attrlibrarys[v].Attrvar + int32(float64(attrlibrarys[v].Addition[equip.AdverbEntry[i].Lv-1])/1000.0*float64(attrlibrarys[v].Attrvar)), } } - + this.module.ModuleRtask.SendToRtask(session, comm.Rtype95, 1) session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashResp{Eid: req.Eid, AdverbEntry: adverbEntry}) return }