自动战斗数据清理

获取vip经验bug
This commit is contained in:
meixiongfeng 2022-12-27 18:52:39 +08:00
parent d0c65d3334
commit d5a9944172
7 changed files with 22 additions and 61 deletions

View File

@ -45,7 +45,8 @@ func (this *apiComp) AutoOver(session comm.IUserSession, req *pb.BattleAutoOverR
// 分析战报 数据 // 分析战报 数据
if req.Ptype == pb.PlayType_viking { if req.Ptype == pb.PlayType_viking {
if code, atno = this.viking.AutoBattleOver(session, autoBattle.BossId, autoBattle.Difficulty, req.Report, autoBattle); code != pb.ErrorCode_Success { 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, Success: false,
}) })
return return

View File

@ -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
}

View File

@ -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
}

View File

@ -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 { func (this *modelAutoBattle) DelListByObjId(uid string, id string) error {
err := this.DelListByObjId(uid, id, data) err := this.DelListlds(uid, id)
return err return err
} }

View File

@ -31,6 +31,7 @@ import (
15bingo:sociatyactivity,100 // 设置工会活跃 15bingo:sociatyactivity,100 // 设置工会活跃
16bingo:alltask // bingo所有任务 16bingo:alltask // bingo所有任务
16bingo:allhero // bingo所有英雄 16bingo:allhero // bingo所有英雄
17bingo:allgrowtask // 完成所有成长任务
*/ */
//参数校验 //参数校验
func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) { func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) {

View File

@ -224,7 +224,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
case comm.ResExp: case comm.ResExp:
return user.Exp return user.Exp
case comm.VipExp: case comm.VipExp:
return user.Exp return user.Vipexp
case comm.StarCoin: case comm.StarCoin:
return user.Starcoin return user.Starcoin
case comm.ResDiamond: case comm.ResDiamond:

View File

@ -282,7 +282,7 @@ func (x *BattleAutoOverResp) GetAsset() []*UserAtno {
} }
// 自动战斗结束 // 自动战斗结束
type BattleAutoOverPush struct { type BattleAutoOverEnvPush struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -290,8 +290,8 @@ type BattleAutoOverPush struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success"` Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success"`
} }
func (x *BattleAutoOverPush) Reset() { func (x *BattleAutoOverEnvPush) Reset() {
*x = BattleAutoOverPush{} *x = BattleAutoOverEnvPush{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_auto_auto_msg_proto_msgTypes[4] mi := &file_auto_auto_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 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) 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] mi := &file_auto_auto_msg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -317,12 +317,12 @@ func (x *BattleAutoOverPush) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use BattleAutoOverPush.ProtoReflect.Descriptor instead. // Deprecated: Use BattleAutoOverEnvPush.ProtoReflect.Descriptor instead.
func (*BattleAutoOverPush) Descriptor() ([]byte, []int) { func (*BattleAutoOverEnvPush) Descriptor() ([]byte, []int) {
return file_auto_auto_msg_proto_rawDescGZIP(), []int{4} return file_auto_auto_msg_proto_rawDescGZIP(), []int{4}
} }
func (x *BattleAutoOverPush) GetSuccess() bool { func (x *BattleAutoOverEnvPush) GetSuccess() bool {
if x != nil { if x != nil {
return x.Success 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, 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, 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, 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, 0x65, 0x74, 0x22, 0x31, 0x0a, 0x15, 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, 0x4f, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x76, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75,
0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x6f, 0x33, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -392,7 +392,7 @@ var file_auto_auto_msg_proto_goTypes = []interface{}{
(*BattleAutoChallengeResp)(nil), // 1: BattleAutoChallengeResp (*BattleAutoChallengeResp)(nil), // 1: BattleAutoChallengeResp
(*BattleAutoOverReq)(nil), // 2: BattleAutoOverReq (*BattleAutoOverReq)(nil), // 2: BattleAutoOverReq
(*BattleAutoOverResp)(nil), // 3: BattleAutoOverResp (*BattleAutoOverResp)(nil), // 3: BattleAutoOverResp
(*BattleAutoOverPush)(nil), // 4: BattleAutoOverPush (*BattleAutoOverEnvPush)(nil), // 4: BattleAutoOverEnvPush
(PlayType)(0), // 5: PlayType (PlayType)(0), // 5: PlayType
(*BattleInfo)(nil), // 6: BattleInfo (*BattleInfo)(nil), // 6: BattleInfo
(*BattleReport)(nil), // 7: BattleReport (*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{} { 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: case 0:
return &v.state return &v.state
case 1: case 1: