字段整理
This commit is contained in:
parent
b41ebec542
commit
613488d6a0
@ -614,7 +614,7 @@ const (
|
||||
Integral = "integral" //充值积分
|
||||
Profit = "profit"
|
||||
Deposit = "deposit"
|
||||
Consumeexp = "consumeexp" //消消乐赛季进度积分
|
||||
//Consumeexp = "consumeexp" //消消乐赛季进度积分
|
||||
Consumemoney = "consumemoney" //三消专属货币
|
||||
)
|
||||
const (
|
||||
|
@ -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 {
|
||||
|
@ -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++ {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user