From cc4640574bda3b0f0d4123c36b398564268549f0 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 17:55:23 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lego/utils/crypto/md5/md5.go | 6 ++++++ modules/web/api_paydelivery.go | 24 ++++++++++++------------ pb/battle_db.pb.go | 20 ++++++++------------ pb/errorcode.pb.go | 34 +++++++++++++++++++--------------- pb/pay_msg.pb.go | 16 ++++++++-------- 5 files changed, 53 insertions(+), 47 deletions(-) diff --git a/lego/utils/crypto/md5/md5.go b/lego/utils/crypto/md5/md5.go index 5d9650ced..f6ca58484 100644 --- a/lego/utils/crypto/md5/md5.go +++ b/lego/utils/crypto/md5/md5.go @@ -11,6 +11,12 @@ import ( /* MD5加密 */ +//MD5加密 大写 +func MD5(str string) string { + h := md5.New() + h.Write([]byte(str)) + return hex.EncodeToString(h.Sum(nil)) +} //MD5加密 大写 func MD5EncToUpper(str string) string { diff --git a/modules/web/api_paydelivery.go b/modules/web/api_paydelivery.go index f6df77eeb..9ca741142 100644 --- a/modules/web/api_paydelivery.go +++ b/modules/web/api_paydelivery.go @@ -10,14 +10,8 @@ import ( "net/http" ) -type PayDelivery struct { - pb.DBSystemNotify - Order string `json:"orderid"` - ProductID string `json:"productid"` - Price float32 `json:"price"` - Amount int32 `json:"amount"` - Uid string `json:"uid"` - Sign string `json:"sign"` +type PayDeliveryResults struct { + Code int32 `json:"s"` } //充值发货 @@ -30,7 +24,7 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) { Uid: req[0].(string), Productid: req[1].(string), Orderid: req[2].(string), - Price: req[3].(float32), + Price: int32(req[3].(float64)), Amount: 1, } payresp *pb.PayDeliveryResp = &pb.PayDeliveryResp{ @@ -40,10 +34,16 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) { } ) defer func() { - c.JSON(http.StatusOK, &Respond{Code: payresp.Code, Message: payresp.Msg, Data: ""}) + if payresp.Code != 0 { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: -2}) + } else { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1}) + } + }() - sign := md5.MD5EncToLower(fmt.Sprintf("%s%s%s%d%s%s", req[0], req[1], req[2], req[3], req[4], this.options.Key)) - if sign != req[4] { + sginStr := fmt.Sprintf("%s%s%s%d%s", req[0], req[1], req[2], req[3], this.options.Key) + sign := md5.MD5(sginStr) + if sign != req[4].(string) { payresp.Code = pb.ErrorCode_SignError payresp.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_SignError) } diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index 2b7a6f648..71ae306ca 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -90,7 +90,6 @@ const ( PlayType_academy PlayType = 8 //联盟学院 PlayType_heroteaching PlayType = 9 //英雄教学 PlayType_combat PlayType = 10 //新关卡 - PlayType_enchant PlayType = 11 // 附魔副本 ) // Enum value maps for PlayType. @@ -107,7 +106,6 @@ var ( 8: "academy", 9: "heroteaching", 10: "combat", - 11: "enchant", } PlayType_value = map[string]int32{ "null": 0, @@ -121,7 +119,6 @@ var ( "academy": 8, "heroteaching": 9, "combat": 10, - "enchant": 11, } ) @@ -675,7 +672,7 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, - 0xa6, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x99, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, @@ -684,14 +681,13 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, - 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, - 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, - 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, + 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, + 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, + 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 261f9fb7f..e9e4a3a61 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -276,6 +276,7 @@ const ( // pay ErrorCode_PayBuyNumNotEnough ErrorCode = 3701 //支付次数不足 ErrorCode_PayRenewTimeErr ErrorCode = 3702 // 续费时间没达到要求 + ErrorCode_PayOrderCompleted ErrorCode = 3703 // 订单已完成 // worldtask ErrorCode_WorldtaskFinish ErrorCode = 3801 //任务完成失败 ErrorCode_WorldtaskLvNotEnough ErrorCode = 3802 //等级不满足 @@ -515,6 +516,7 @@ var ( 3602: "GrowtaskAdvReceive", 3701: "PayBuyNumNotEnough", 3702: "PayRenewTimeErr", + 3703: "PayOrderCompleted", 3801: "WorldtaskFinish", 3802: "WorldtaskLvNotEnough", 3803: "WorldtaskNoAccept", @@ -749,6 +751,7 @@ var ( "GrowtaskAdvReceive": 3602, "PayBuyNumNotEnough": 3701, "PayRenewTimeErr": 3702, + "PayOrderCompleted": 3703, "WorldtaskFinish": 3801, "WorldtaskLvNotEnough": 3802, "WorldtaskNoAccept": 3803, @@ -790,7 +793,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xb2, 0x29, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xca, 0x29, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, @@ -1109,20 +1112,21 @@ var file_errorcode_proto_rawDesc = []byte{ 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x52, - 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x14, - 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, - 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, - 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, - 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, - 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, - 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, - 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, - 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x16, + 0x0a, 0x11, 0x50, 0x61, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x10, 0xf7, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, + 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, + 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, + 0x6f, 0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, + 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, + 0x18, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, + 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, + 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, + 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, + 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/pay_msg.pb.go b/pb/pay_msg.pb.go index a0c9d5b97..1bf942aeb 100644 --- a/pb/pay_msg.pb.go +++ b/pb/pay_msg.pb.go @@ -374,11 +374,11 @@ type PayDeliveryReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` - Orderid string `protobuf:"bytes,2,opt,name=orderid,proto3" json:"orderid"` - Productid string `protobuf:"bytes,3,opt,name=productid,proto3" json:"productid"` - Price float32 `protobuf:"fixed32,4,opt,name=price,proto3" json:"price"` - Amount int32 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` + Orderid string `protobuf:"bytes,2,opt,name=orderid,proto3" json:"orderid"` + Productid string `protobuf:"bytes,3,opt,name=productid,proto3" json:"productid"` + Price int32 `protobuf:"varint,4,opt,name=price,proto3" json:"price"` + Amount int32 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount"` } func (x *PayDeliveryReq) Reset() { @@ -434,7 +434,7 @@ func (x *PayDeliveryReq) GetProductid() string { return "" } -func (x *PayDeliveryReq) GetPrice() float32 { +func (x *PayDeliveryReq) GetPrice() int32 { if x != nil { return x.Price } @@ -454,7 +454,7 @@ type PayDeliveryResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrorCode" json:"code"` + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrorCode" json:"s"` //头像 Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"` Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` } @@ -548,7 +548,7 @@ var file_pay_pay_msg_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, From fe15e3e2df43cb12ec2360424fbc21c715ca8de1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 18:01:41 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/web/api_paydelivery.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/web/api_paydelivery.go b/modules/web/api_paydelivery.go index 9ca741142..d8088f585 100644 --- a/modules/web/api_paydelivery.go +++ b/modules/web/api_paydelivery.go @@ -11,7 +11,8 @@ import ( ) type PayDeliveryResults struct { - Code int32 `json:"s"` + Code int32 `json:"s"` + State int32 `json:"state"` } //充值发货 @@ -35,7 +36,12 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) { ) defer func() { if payresp.Code != 0 { - c.JSON(http.StatusOK, &PayDeliveryResults{Code: -2}) + if payresp.Code == pb.ErrorCode_PayOrderCompleted { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: 2}) + } else { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: 3, State: 1}) + } + } else { c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1}) } From 8b6e0660b6192bb471d42575e733fd6161bb5de2 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 18:13:11 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/web/api_paydelivery.go | 2 +- sys/configure/structs/Game.LibraryHistoryData.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/web/api_paydelivery.go b/modules/web/api_paydelivery.go index d8088f585..a9fb56271 100644 --- a/modules/web/api_paydelivery.go +++ b/modules/web/api_paydelivery.go @@ -36,7 +36,7 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) { ) defer func() { if payresp.Code != 0 { - if payresp.Code == pb.ErrorCode_PayOrderCompleted { + if payresp.Code != pb.ErrorCode_PayOrderCompleted { c.JSON(http.StatusOK, &PayDeliveryResults{Code: 2}) } else { c.JSON(http.StatusOK, &PayDeliveryResults{Code: 3, State: 1}) diff --git a/sys/configure/structs/Game.LibraryHistoryData.go b/sys/configure/structs/Game.LibraryHistoryData.go index 9506a7387..9197e0940 100644 --- a/sys/configure/structs/Game.LibraryHistoryData.go +++ b/sys/configure/structs/Game.LibraryHistoryData.go @@ -25,8 +25,8 @@ func (*GameLibraryHistoryData) GetTypeId() int32 { func (_v *GameLibraryHistoryData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; if _v.Histroy, _ok_ = _buf["histroy"].(string); !_ok_ { err = errors.New("histroy error"); return } } - { var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } - { var _ok_ bool; if _v.Txt, _ok_ = _buf["txt"].(string); !_ok_ { err = errors.New("txt error"); return } } + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _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["txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Txt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Txt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _arr_ []interface{} var _ok_ bool From adcf597bacec7a4d3d7a91abdb652f78c5242dc5 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 20 Dec 2022 18:43:32 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=96=E7=95=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_worldtask.json | 387 ++--------------------------------- 1 file changed, 13 insertions(+), 374 deletions(-) diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 6d6be6806..0028c08e5 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -1,46 +1,12 @@ [ - { - "key": 10001, - "lock": 1, - "ontxe": 0, - "id_after": 10100, - "group": 1, - "des": 2, - "icon": "", - "task_Tname": "初来乍到", - "task_name": "新手引导1", - "task_display": "新手引导1-1", - "npc": [ - "scenes_ boundary_01", - "新手引导-杰克", - "150" - ], - "getafter_event": [ - 2, - 500 - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, - "reword": [ - { - "a": "hero", - "t": "25001", - "n": 1 - } - ] - }, { "key": 10100, "lock": 1, - "ontxe": 10001, + "ontxe": 0, "id_after": 10101, "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10100", - "task_display": "新剧情文本10100", "npc": [ "scenes_ boundary_01", "杰克", @@ -69,9 +35,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10101", - "task_display": "新剧情文本10101", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -94,9 +57,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10102", - "task_display": "新剧情文本10102", "npc": [ "dreamwork_restaurant_01", "美食馆-波比组件名", @@ -119,9 +79,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10103", - "task_display": "新剧情文本10103", "npc": [ "dreamwork_restaurant_01", "美食馆-波比组件名", @@ -144,9 +101,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10104", - "task_display": "新剧情文本10104", "npc": [ "dreamwork_restaurant_01", "美食馆-波比组件名", @@ -180,9 +134,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10105", - "task_display": "新剧情文本10105", "npc": [ "scenes_ boundary_01", "杰克", @@ -205,9 +156,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10106", - "task_display": "新剧情文本10106", "npc": [ "scenes_ boundary_01", "杰克", @@ -230,9 +178,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10107", - "task_display": "新剧情文本10107", "npc": [ "scenes_ boundary_01", "杰克", @@ -255,9 +200,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10108", - "task_display": "新剧情文本10108", "npc": [ "scenes_ boundary_01", "杰克", @@ -280,9 +222,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10109", - "task_display": "新剧情文本10109", "npc": [ "scenes_ boundary_01", "戈伯组件名", @@ -305,9 +244,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10110", - "task_display": "新剧情文本10110", "npc": [ "scenes_smithy_01", "戈伯铁匠铺组件名", @@ -330,9 +266,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101101", - "task_display": "新剧情文本101101", "npc": [ "scenes_ boundary_01", "黑雾门右屏1", @@ -355,9 +288,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101102", - "task_display": "新剧情文本101102", "npc": [ "scenes_ boundary_01", "黑雾门右屏1", @@ -380,9 +310,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10111", - "task_display": "新剧情文本10111", "npc": [ "scenes_ boundary_01", "男主角铁匠铺出来模型", @@ -405,9 +332,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101111", - "task_display": "新剧情文本101111", "npc": [ "scenes_ boundary_01", "黑雾门右屏2", @@ -430,9 +354,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10112", - "task_display": "新剧情文本10112", "npc": [ "scenes_ boundary_01", "瓜哥组件名", @@ -455,9 +376,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10113", - "task_display": "新剧情文本10113", "npc": [ "scenes_ boundary_02", "贫嘴驴组件名", @@ -480,9 +398,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101131", - "task_display": "新剧情文本101131", "npc": [ "scenes_ boundary_01", "瓜哥图书馆外", @@ -505,9 +420,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101132", - "task_display": "新剧情文本101132", "npc": [ "scenes_ boundary_01", "黑雾门右屏3", @@ -530,9 +442,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10114", - "task_display": "新剧情文本10114", "npc": [ "test_library", "贫嘴驴组件名", @@ -555,9 +464,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10115", - "task_display": "新剧情文本10115", "npc": [ "scenes_boundary_02night", "瓜哥夜晚组件名", @@ -580,9 +486,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10116", - "task_display": "新剧情文本10116", "npc": [ "scenes_boundary_02night", "杰克", @@ -605,9 +508,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10117", - "task_display": "新剧情文本10117", "npc": [ "scenes_ boundary_01", "杰克", @@ -630,9 +530,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10118", - "task_display": "新剧情文本10118", "npc": [ "scenes_ boundary_01", "杰克", @@ -655,9 +552,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10119", - "task_display": "新剧情文本10119", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -680,9 +574,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10120", - "task_display": "新剧情文本10120", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -705,9 +596,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10121", - "task_display": "新剧情文本10121", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -730,9 +618,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101211", - "task_display": "新剧情文本101211", "npc": [ "scenes_ boundary_01", "风车黑雾门", @@ -755,9 +640,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10122", - "task_display": "新剧情文本10122", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -780,9 +662,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10123", - "task_display": "新剧情文本10123", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -805,9 +684,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10124", - "task_display": "新剧情文本10124", "npc": [ "scenes_martialarts_01", "武馆瓜哥2", @@ -830,9 +706,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101241", - "task_display": "新剧情文本101241", "npc": [ "scenes_martialarts_01", "关卡羊1", @@ -855,9 +728,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10125", - "task_display": "新剧情文本10125", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -880,9 +750,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10126", - "task_display": "新剧情文本10126", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -905,9 +772,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101261", - "task_display": "新剧情文本101261", "npc": [ "scenes_martialarts_01", "艾雷特关卡1", @@ -930,9 +794,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10127", - "task_display": "新剧情文本10127", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -955,9 +816,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101271", - "task_display": "新剧情文本101271", "npc": [ "scenes_martialarts_01", "艾雷特关卡2", @@ -980,9 +838,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10128", - "task_display": "新剧情文本10136", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -1005,9 +860,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10129", - "task_display": "新剧情文本10137", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -1030,9 +882,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10130", - "task_display": "新剧情文本10138", "npc": [ "scenes_martialarts_01", "武馆瓜哥", @@ -1055,9 +904,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101301", - "task_display": "新剧情文本10139", "npc": [ "scenes_martialarts_01", "武馆黑门2", @@ -1080,9 +926,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10131", - "task_display": "新剧情文本10140", "npc": [ "scenes_ boundary_01", "瓜哥维京区", @@ -1105,9 +948,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10132", - "task_display": "新剧情文本10141", "npc": [ "scenes_ boundary_01", "杰克", @@ -1130,9 +970,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10133", - "task_display": "新剧情文本10142", "npc": [ "scenes_ boundary_01", "杰克", @@ -1155,9 +992,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10134", - "task_display": "新剧情文本10143", "npc": [ "scenes_ boundary_01", "杰克", @@ -1180,9 +1014,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10135", - "task_display": "新剧情文本10144", "npc": [ "scenes_ boundary_01", "杰克", @@ -1205,9 +1036,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10136", - "task_display": "新剧情文本10145", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1230,9 +1058,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10137", - "task_display": "新剧情文本10146", "npc": [ "scenes_martialarts_01", "武馆阿宝", @@ -1255,9 +1080,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10138", - "task_display": "新剧情文本10147", "npc": [ "scenes_martialarts_01", "武馆阿宝", @@ -1280,9 +1102,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10139", - "task_display": "新剧情文本10148", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1305,9 +1124,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10140", - "task_display": "新剧情文本10149", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1330,9 +1146,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10141", - "task_display": "新剧情文本10150", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1355,9 +1168,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情101141", - "task_display": "新剧情文本10151", "npc": [ "scenes_boundary_01", "现代区黑雾门", @@ -1380,9 +1190,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10142", - "task_display": "新剧情文本10152", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1405,9 +1212,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10143", - "task_display": "新剧情文本10153", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1430,9 +1234,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10144", - "task_display": "新剧情文本10154", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1455,9 +1256,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10145", - "task_display": "新剧情文本10155", "npc": [ "scenes_ boundary_01", "瓜哥现代区", @@ -1480,9 +1278,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10146", - "task_display": "新剧情文本10146", "npc": [ "scenes_ boundary_01", "杰克", @@ -1505,9 +1300,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10147", - "task_display": "新剧情文本10147", "npc": [ "scenes_ boundary_01", "波比组件名", @@ -1530,9 +1322,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10148", - "task_display": "新剧情文本10148", "npc": [ "scenes_ boundary_01", "波比组件名", @@ -1555,9 +1344,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10149", - "task_display": "新剧情文本10149", "npc": [ "scenes_ boundary_01", "波比组件名", @@ -1580,9 +1366,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10150", - "task_display": "新剧情文本10150", "npc": [ "scenes_ boundary_01", "波比组件名", @@ -1605,9 +1388,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10151", - "task_display": "新剧情文本10151", "npc": [ "scenes_ boundary_01", "杰克", @@ -1630,9 +1410,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10152", - "task_display": "新剧情文本10152", "npc": [ "scenes_ boundary_01", "杰克", @@ -1655,9 +1432,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10153", - "task_display": "新剧情文本10153", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1680,9 +1454,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10154", - "task_display": "新剧情文本10154", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1705,9 +1476,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10155", - "task_display": "新剧情文本10155", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1730,9 +1498,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10156", - "task_display": "新剧情文本10156", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1755,9 +1520,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10157", - "task_display": "新剧情文本10157", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1780,9 +1542,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10158", - "task_display": "新剧情文本10158", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1805,9 +1564,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10159", - "task_display": "新剧情文本10159", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1830,9 +1586,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10160", - "task_display": "新剧情文本10160", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1855,9 +1608,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10161", - "task_display": "新剧情文本10161", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1880,9 +1630,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10162", - "task_display": "新剧情文本10162", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1905,9 +1652,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10163", - "task_display": "新剧情文本10163", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1930,9 +1674,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10164", - "task_display": "新剧情文本10164", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1955,9 +1696,6 @@ "group": 1, "des": 2, "icon": "", - "task_Tname": "初来乍到", - "task_name": "新剧情10165", - "task_display": "新剧情文本10165", "npc": [ "scenes_martialarts_01", "原始人岛-武馆杰克", @@ -1975,14 +1713,11 @@ { "key": 20001, "lock": 1, - "ontxe": 9999, + "ontxe": 0, "id_after": 20002, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10100", - "task_display": "新剧情文本10100", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2014,11 +1749,8 @@ "ontxe": 10166, "id_after": 20003, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10101", - "task_display": "新剧情文本10101", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -2045,11 +1777,8 @@ "ontxe": 10167, "id_after": 20004, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10102", - "task_display": "新剧情文本10102", "npc": [ "dreamwork_restaurant_01", "波比组件名", @@ -2076,11 +1805,8 @@ "ontxe": 10168, "id_after": 20005, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10103", - "task_display": "新剧情文本10103", "npc": [ "dreamwork_restaurant_01", "阿宝组件名", @@ -2107,11 +1833,8 @@ "ontxe": 10169, "id_after": 20006, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10104", - "task_display": "新剧情文本10104", "npc": [ "dreamwork_restaurant_01", "波比组件名", @@ -2143,11 +1866,8 @@ "ontxe": 10170, "id_after": 20007, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10105", - "task_display": "新剧情文本10105", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2174,11 +1894,8 @@ "ontxe": 10171, "id_after": 20008, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10106", - "task_display": "新剧情文本10106", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2205,11 +1922,8 @@ "ontxe": 10172, "id_after": 20009, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10107", - "task_display": "新剧情文本10107", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2236,11 +1950,8 @@ "ontxe": 10173, "id_after": 20010, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10108", - "task_display": "新剧情文本10108", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2265,13 +1976,10 @@ "key": 20010, "lock": 1, "ontxe": 10174, - "id_after": 20011, + "id_after": 0, "group": 10001, - "des": 3, + "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情10109", - "task_display": "新剧情文本10109", "npc": [ "scenes_ boundary_01", "戈伯组件名", @@ -2300,9 +2008,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10100", - "task_display": "新剧情文本10100", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2336,9 +2041,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10101", - "task_display": "新剧情文本10101", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -2367,9 +2069,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10102", - "task_display": "新剧情文本10102", "npc": [ "dreamwork_restaurant_01", "波比组件名", @@ -2398,9 +2097,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10103", - "task_display": "新剧情文本10103", "npc": [ "dreamwork_restaurant_01", "阿宝组件名", @@ -2429,9 +2125,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10104", - "task_display": "新剧情文本10104", "npc": [ "dreamwork_restaurant_01", "波比组件名", @@ -2465,9 +2158,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10105", - "task_display": "新剧情文本10105", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2496,9 +2186,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10106", - "task_display": "新剧情文本10106", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2527,9 +2214,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10107", - "task_display": "新剧情文本10107", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2558,9 +2242,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10108", - "task_display": "新剧情文本10108", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2589,9 +2270,6 @@ "group": 10002, "des": 3, "icon": "", - "task_Tname": "", - "task_name": "新剧情10109", - "task_display": "新剧情文本10109", "npc": [ "scenes_ boundary_01", "戈伯组件名", @@ -2620,9 +2298,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20100", - "task_display": "新剧情文本20100", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2651,9 +2326,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20101", - "task_display": "新剧情文本20101", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -2682,9 +2354,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20102", - "task_display": "新剧情文本20102", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", @@ -2713,9 +2382,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20103", - "task_display": "新剧情文本20103", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", @@ -2744,9 +2410,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20104", - "task_display": "新剧情文本20104", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", @@ -2775,9 +2438,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20105", - "task_display": "新剧情文本20105", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", @@ -2806,9 +2466,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20106", - "task_display": "新剧情文本20106", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -2837,9 +2494,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20107", - "task_display": "新剧情文本20107", "npc": [ "scenes_ boundary_01", "阿宝维京区", @@ -2868,9 +2522,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20108", - "task_display": "新剧情文本20108", "npc": [ "scenes_ boundary_01", "阿宝维京区", @@ -2899,9 +2550,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20109", - "task_display": "新剧情文本20109", "npc": [ "scenes_ boundary_01", "邦尼兔组件名", @@ -2930,9 +2578,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20110", - "task_display": "新剧情文本20110", "npc": [ "scenes_ boundary_01", "阿宝组件名", @@ -2961,9 +2606,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20111", - "task_display": "新剧情文本20111", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", @@ -2992,9 +2634,6 @@ "group": 2, "des": 2, "icon": "", - "task_Tname": "", - "task_name": "新剧情20112", - "task_display": "新剧情文本20112", "npc": [ "scenes_ boundary_01", "阿宝右屏组件名", From 638d4871817ab85cd01dac9ae8f146a6c6a5cac5 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 19:59:24 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=90=8C=E6=AD=A5pb=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/battle_db.pb.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index 71ae306ca..2b7a6f648 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -90,6 +90,7 @@ const ( PlayType_academy PlayType = 8 //联盟学院 PlayType_heroteaching PlayType = 9 //英雄教学 PlayType_combat PlayType = 10 //新关卡 + PlayType_enchant PlayType = 11 // 附魔副本 ) // Enum value maps for PlayType. @@ -106,6 +107,7 @@ var ( 8: "academy", 9: "heroteaching", 10: "combat", + 11: "enchant", } PlayType_value = map[string]int32{ "null": 0, @@ -119,6 +121,7 @@ var ( "academy": 8, "heroteaching": 9, "combat": 10, + "enchant": 11, } ) @@ -672,7 +675,7 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, - 0x99, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0xa6, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, @@ -681,13 +684,14 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, - 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, - 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, - 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, - 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, - 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, + 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, + 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 4bcd7562faea4346578a99aca957d85acb0a3175 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 20 Dec 2022 20:01:47 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=99=84=E9=AD=94=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_item.json | 38 ++++++++++++++++++++++++++++++++ modules/enchant/api_getlist.go | 32 ++++++++++++++++++++++++++- modules/enchant/model_enchant.go | 14 ++---------- services/worker/main.go | 2 ++ 4 files changed, 73 insertions(+), 13 deletions(-) diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 35ffb9aa1..56dca458e 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -2839,6 +2839,44 @@ "text": "竞技场挑战券不足" } }, + { + "id": "100005", + "name": { + "key": "itemname_100005", + "text": "阵营挑战券" + }, + "usetype": 10, + "color": 3, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "effects": "", + "box_id": 0, + "synthetize_num": 0, + "access": [ + 107 + ], + "use_skip": 107, + "upper_limit": -1, + "uselv": 0, + "isani": 0, + "star": 0, + "race": 0, + "img": "wp_icon_jjcq", + "ico": "wp_icon_jjcq", + "intr": { + "key": "itemdesc_100005", + "text": "进入阵营BOSS的凭证" + }, + "sale": [], + "synthetize_deplete": [], + "decompose_deplete": [], + "tipstxt": { + "key": "itemtipstxt_100005", + "text": "阵营挑战券不足" + } + }, { "id": "110001", "name": { diff --git a/modules/enchant/api_getlist.go b/modules/enchant/api_getlist.go index 44dac3bdf..0aab71377 100644 --- a/modules/enchant/api_getlist.go +++ b/modules/enchant/api_getlist.go @@ -2,11 +2,13 @@ package enchant import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -28,7 +30,35 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListRe } list, err := this.module.modelEnchant.getEnchantList(session.GetUserId()) - if err != nil { + if mgo.MongodbNil == err { + + list.Id = primitive.NewObjectID().Hex() + list.Uid = session.GetUserId() + list.Boss = make(map[int32]int64) + list.BossTime = make(map[int32]int32) + + _cfg := this.module.configure.GetEnchantBossTypeConfigData() + for k := range _cfg { + list.BossTime[k] = 0 + } + + this.module.modelEnchant.Add(session.GetUserId(), list) + conf := this.module.configure.GetGlobalConf() + if conf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + iContt := conf.EnchantbossInitial + atn := conf.EnchantbossCos + if iContt > 0 { + + this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ + A: atn.A, + T: atn.T, + N: iContt, + }}, true) + } + } else if err != nil { code = pb.ErrorCode_DBError return } diff --git a/modules/enchant/model_enchant.go b/modules/enchant/model_enchant.go index fd90439a3..5530710ac 100644 --- a/modules/enchant/model_enchant.go +++ b/modules/enchant/model_enchant.go @@ -3,7 +3,6 @@ package enchant import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -40,19 +39,10 @@ func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err Boss: make(map[int32]int64), BossTime: make(map[int32]int32), } - if err = this.Get(uid, result); err != nil && mgo.MongodbNil != err { - + if err = this.Get(uid, result); err != nil { return } - if mgo.MongodbNil == err { - if len(result.Boss) == 0 { - _cfg := this.module.configure.GetEnchantBossTypeConfigData() - for k := range _cfg { - result.BossTime[k] = 0 - } - } - this.Add(uid, result) - } + err = nil return result, err } diff --git a/services/worker/main.go b/services/worker/main.go index 3da7874fd..9c4cd6aeb 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -8,6 +8,7 @@ import ( "go_dreamfactory/modules/battle" "go_dreamfactory/modules/chat" "go_dreamfactory/modules/combat" + "go_dreamfactory/modules/enchant" "go_dreamfactory/modules/equipment" "go_dreamfactory/modules/forum" "go_dreamfactory/modules/friend" @@ -106,6 +107,7 @@ func main() { academy.NewModule(), reddot.NewModule(), combat.NewModule(), + enchant.NewModule(), ) }