From 613488d6a0b38a6b0b47638d2c2961e230266f47 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 5 Jan 2024 15:22:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 4 ++-- modules/entertainment/api_receive.go | 2 +- modules/entertainment/xxlPlat.go | 19 ++++++++++++++++++- modules/shop/api_buy.go | 3 +-- modules/user/module.go | 18 +----------------- pb/user_db.pb.go | 12 +----------- 6 files changed, 24 insertions(+), 34 deletions(-) diff --git a/comm/const.go b/comm/const.go index aa9424281..cb9f684b4 100644 --- a/comm/const.go +++ b/comm/const.go @@ -614,8 +614,8 @@ const ( Integral = "integral" //充值积分 Profit = "profit" Deposit = "deposit" - Consumeexp = "consumeexp" //消消乐赛季进度积分 - Consumemoney = "consumemoney" //三消专属货币 + //Consumeexp = "consumeexp" //消消乐赛季进度积分 + Consumemoney = "consumemoney" //三消专属货币 ) const ( Gold int32 = 1 //金币 diff --git a/modules/entertainment/api_receive.go b/modules/entertainment/api_receive.go index f4e42ab48..af7553490 100644 --- a/modules/entertainment/api_receive.go +++ b/modules/entertainment/api_receive.go @@ -42,7 +42,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.EntertainReceive } return } - progress = int32(this.module.ModuleUser.QueryAttributeValue(session.GetUserId(), comm.Consumeexp)) + progress = info.Consumeexp //int32(this.module.ModuleUser.QueryAttributeValue(session.GetUserId(), comm.Consumeexp)) awards = make([]*cfg.Gameatn, 0) for _, v := range confs { if v.Parameter <= progress { diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index 26412d5ef..21690429d 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -465,7 +465,6 @@ func (this *MapData) Check3X() (bEliminate bool, xiaochu []int) { // xc 判断用来是否加体力 func (this *MapData) CheckMap(color int32, bSkill bool) (szMap []*pb.MapData, xc bool) { var ( - //tXiaochu []int tXiaochu map[int]struct{} curScore int32 energy int32 @@ -1309,6 +1308,8 @@ func (this *MapData) HitElem(color int32, curid int32) (szMap []*pb.MapData) { CurEnergy: energy, }) } + sz, _ := this.CheckMap(color, false) + szMap = append(szMap, sz...) } return } @@ -1382,3 +1383,19 @@ func (this *MapData) HitCrossElem(color int32, curid int32) (szMap []*pb.MapData } return } + +// 检测一个元素 +func (this *MapData) CheckElem(pos int32) { + var ( + color int32 + x int32 + y int32 + ) + color = this.Plat[pos].Color + x = pos / Width + y = pos % Height + this.module.Debugf("color:%d, x:%d, y:%d", color, x, y) + for i := 0; i < Height; i++ { + + } +} diff --git a/modules/shop/api_buy.go b/modules/shop/api_buy.go index 4d7e7a97c..69593da58 100644 --- a/modules/shop/api_buy.go +++ b/modules/shop/api_buy.go @@ -188,8 +188,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata case comm.Integral: // tasks = append(tasks, comm.GetBuriedParam(comm.Rtype67, v.N, 15)) break - case comm.Consumeexp: - break + case comm.Consumemoney: break } diff --git a/modules/user/module.go b/modules/user/module.go index 27bca10e7..ab666645d 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -396,8 +396,6 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { return int64(user.Integral) case comm.Profit: return int64(user.Profit) - case comm.Consumeexp: - return int64(user.Consumeexp) case comm.Consumemoney: return int64(user.Consumemoney) } @@ -460,8 +458,6 @@ func (this *User) QueryAttributeValues(uid string, attr map[string]int64) { attr[k] = int64(user.Integral) case comm.Profit: attr[k] = int64(user.Profit) - case comm.Consumeexp: - attr[k] = int64(user.Consumeexp) case comm.Consumemoney: attr[k] = int64(user.Consumemoney) } @@ -775,17 +771,7 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn } } change.Profit += int64(add) - case comm.Consumeexp: - if add < 0 { - if user.Consumeexp+add < 0 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_UserProfitNoEnough, - Title: pb.ErrorCode_UserProfitNoEnough.ToString(), - } - return - } - } - change.Consumeexp += add + case comm.Consumemoney: if add < 0 { if user.Consumemoney+add < 0 { @@ -835,7 +821,6 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn comm.Integral: change.Integral, comm.Profit: change.Profit, comm.Deposit: change.Deposit, - comm.Consumeexp: change.Consumeexp, comm.Consumemoney: change.Consumemoney, "lastRecoverPsSec": user.LastRecoverPsSec, } @@ -875,7 +860,6 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn user.Integral = change.Integral user.Profit = change.Profit user.Deposit = change.Deposit - user.Consumeexp = change.Consumeexp user.Consumemoney = change.Consumemoney if err := this.modelExpand.ChangeUserExpand(uid, updateEx); err != nil { diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 5bf8e545d..0b5d01dd8 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -160,7 +160,6 @@ type DBUser struct { Titles []string `protobuf:"bytes,47,rep,name=titles,proto3" json:"titles"` // 称号 Curtitle string `protobuf:"bytes,48,opt,name=curtitle,proto3" json:"curtitle"` // 默认称号 Curaframe string `protobuf:"bytes,49,opt,name=curaframe,proto3" json:"curaframe"` //默认头像框 - Consumeexp int32 `protobuf:"varint,50,opt,name=consumeexp,proto3" json:"consumeexp"` //消消乐赛季进度积分 Consumemoney int32 `protobuf:"varint,51,opt,name=consumemoney,proto3" json:"consumemoney"` //三消专属货币 Ban bool `protobuf:"varint,52,opt,name=ban,proto3" json:"ban"` // 封号标识 Prohibition int32 `protobuf:"varint,53,opt,name=prohibition,proto3" json:"prohibition"` // 禁言 @@ -529,13 +528,6 @@ func (x *DBUser) GetCuraframe() string { return "" } -func (x *DBUser) GetConsumeexp() int32 { - if x != nil { - return x.Consumeexp - } - return 0 -} - func (x *DBUser) GetConsumemoney() int32 { if x != nil { return x.Consumemoney @@ -904,7 +896,7 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa8, 0x0b, 0x0a, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x88, 0x0b, 0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, @@ -979,8 +971,6 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x65, 0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x61, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x31, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x75, 0x72, 0x61, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x32, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x33, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x6e, 0x18, 0x34, 0x20, 0x01, 0x28, 0x08,