From d5a99441720020c87fd910c4170e3be606958e8d Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 27 Dec 2022 18:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=88=98=E6=96=97=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B8=85=E7=90=86=20=E8=8E=B7=E5=8F=96vip=E7=BB=8F?= =?UTF-8?q?=E9=AA=8Cbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/auto/api_autoover.go | 3 ++- modules/auto/api_buy.go | 22 ---------------------- modules/auto/api_getlist.go | 19 ------------------- modules/auto/model_auto.go | 4 ++-- modules/gm/api_cmd.go | 1 + modules/user/module.go | 2 +- pb/auto_msg.pb.go | 32 ++++++++++++++++---------------- 7 files changed, 22 insertions(+), 61 deletions(-) delete mode 100644 modules/auto/api_buy.go delete mode 100644 modules/auto/api_getlist.go diff --git a/modules/auto/api_autoover.go b/modules/auto/api_autoover.go index 16102ca40..d40c793d1 100644 --- a/modules/auto/api_autoover.go +++ b/modules/auto/api_autoover.go @@ -45,7 +45,8 @@ func (this *apiComp) AutoOver(session comm.IUserSession, req *pb.BattleAutoOverR // 分析战报 数据 if req.Ptype == pb.PlayType_viking { if code, atno = this.viking.AutoBattleOver(session, autoBattle.BossId, autoBattle.Difficulty, req.Report, autoBattle); code != pb.ErrorCode_Success { - session.SendMsg(string(this.module.GetType()), "autoover", &pb.BattleAutoOverPush{ + this.module.modelAutoBattle.DelListByObjId(session.GetUserId(), autoBattle.Id) // 自动战斗结束 删除数据 + session.SendMsg(string(this.module.GetType()), "autooverenv", &pb.BattleAutoOverEnvPush{ Success: false, }) return diff --git a/modules/auto/api_buy.go b/modules/auto/api_buy.go deleted file mode 100644 index 854f579d0..000000000 --- a/modules/auto/api_buy.go +++ /dev/null @@ -1,22 +0,0 @@ -package autoBattle - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode) { - if req.Count <= 0 { - code = pb.ErrorCode_ReqParameterError - return - } - return -} - -func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode, data proto.Message) { - - return -} diff --git a/modules/auto/api_getlist.go b/modules/auto/api_getlist.go deleted file mode 100644 index 3a7f1e53f..000000000 --- a/modules/auto/api_getlist.go +++ /dev/null @@ -1,19 +0,0 @@ -package autoBattle - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.HuntingGetListReq) (code pb.ErrorCode) { - - return -} - -func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListReq) (code pb.ErrorCode, data proto.Message) { - - return -} diff --git a/modules/auto/model_auto.go b/modules/auto/model_auto.go index 4af9ffb66..cd52ea16b 100644 --- a/modules/auto/model_auto.go +++ b/modules/auto/model_auto.go @@ -34,8 +34,8 @@ func (this *modelAutoBattle) ChangeListByObjId(uid string, id string, data map[s } // 删除自动战斗信息 -func (this *modelAutoBattle) DelListByObjId(uid string, id string, data map[string]interface{}) error { - err := this.DelListByObjId(uid, id, data) +func (this *modelAutoBattle) DelListByObjId(uid string, id string) error { + err := this.DelListlds(uid, id) return err } diff --git a/modules/gm/api_cmd.go b/modules/gm/api_cmd.go index cec27457d..495d2838e 100644 --- a/modules/gm/api_cmd.go +++ b/modules/gm/api_cmd.go @@ -31,6 +31,7 @@ import ( 15、bingo:sociatyactivity,100 // 设置工会活跃 16、bingo:alltask // bingo所有任务 16、bingo:allhero // bingo所有英雄 +17、bingo:allgrowtask // 完成所有成长任务 */ //参数校验 func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) { diff --git a/modules/user/module.go b/modules/user/module.go index 2f6e74134..59018caa2 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -224,7 +224,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { case comm.ResExp: return user.Exp case comm.VipExp: - return user.Exp + return user.Vipexp case comm.StarCoin: return user.Starcoin case comm.ResDiamond: diff --git a/pb/auto_msg.pb.go b/pb/auto_msg.pb.go index d33c36956..83aa35f7a 100644 --- a/pb/auto_msg.pb.go +++ b/pb/auto_msg.pb.go @@ -282,7 +282,7 @@ func (x *BattleAutoOverResp) GetAsset() []*UserAtno { } // 自动战斗结束 -type BattleAutoOverPush struct { +type BattleAutoOverEnvPush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -290,8 +290,8 @@ type BattleAutoOverPush struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success"` } -func (x *BattleAutoOverPush) Reset() { - *x = BattleAutoOverPush{} +func (x *BattleAutoOverEnvPush) Reset() { + *x = BattleAutoOverEnvPush{} if protoimpl.UnsafeEnabled { mi := &file_auto_auto_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -299,13 +299,13 @@ func (x *BattleAutoOverPush) Reset() { } } -func (x *BattleAutoOverPush) String() string { +func (x *BattleAutoOverEnvPush) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BattleAutoOverPush) ProtoMessage() {} +func (*BattleAutoOverEnvPush) ProtoMessage() {} -func (x *BattleAutoOverPush) ProtoReflect() protoreflect.Message { +func (x *BattleAutoOverEnvPush) ProtoReflect() protoreflect.Message { mi := &file_auto_auto_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -317,12 +317,12 @@ func (x *BattleAutoOverPush) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BattleAutoOverPush.ProtoReflect.Descriptor instead. -func (*BattleAutoOverPush) Descriptor() ([]byte, []int) { +// Deprecated: Use BattleAutoOverEnvPush.ProtoReflect.Descriptor instead. +func (*BattleAutoOverEnvPush) Descriptor() ([]byte, []int) { return file_auto_auto_msg_proto_rawDescGZIP(), []int{4} } -func (x *BattleAutoOverPush) GetSuccess() bool { +func (x *BattleAutoOverEnvPush) GetSuccess() bool { if x != nil { return x.Success } @@ -367,11 +367,11 @@ var file_auto_auto_msg_proto_rawDesc = []byte{ 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, - 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x74, 0x22, 0x31, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, + 0x4f, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x76, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -392,7 +392,7 @@ var file_auto_auto_msg_proto_goTypes = []interface{}{ (*BattleAutoChallengeResp)(nil), // 1: BattleAutoChallengeResp (*BattleAutoOverReq)(nil), // 2: BattleAutoOverReq (*BattleAutoOverResp)(nil), // 3: BattleAutoOverResp - (*BattleAutoOverPush)(nil), // 4: BattleAutoOverPush + (*BattleAutoOverEnvPush)(nil), // 4: BattleAutoOverEnvPush (PlayType)(0), // 5: PlayType (*BattleInfo)(nil), // 6: BattleInfo (*BattleReport)(nil), // 7: BattleReport @@ -469,7 +469,7 @@ func file_auto_auto_msg_proto_init() { } } file_auto_auto_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleAutoOverPush); i { + switch v := v.(*BattleAutoOverEnvPush); i { case 0: return &v.state case 1: