自动战斗数据清理
获取vip经验bug
This commit is contained in:
parent
d0c65d3334
commit
d5a9944172
@ -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
|
||||
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user