商队修改

This commit is contained in:
meixiongfeng 2023-08-29 14:03:26 +08:00
parent 0d29fc9327
commit abdc8180ee
7 changed files with 131 additions and 110 deletions

View File

@ -54,7 +54,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
// special 城市卖给玩家的商品
// exspecial 城市想要玩家卖给他的商品库
if !req.IsBuy { // 卖给npc
var cb int32 // 成本价
for k, v := range req.Items {
// 校验背包数据够不够
caravan.Items[k].Count -= v
@ -67,7 +67,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
}
items := caravan.Items[k]
var price int32
cb = items.Price // 获取成本价
price = items.Price
bFound := false
for _, key := range cityInfo.Special {
@ -90,32 +90,31 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
if !bFound {
price = cityInfo.ExspecialPCT * price / 1000
}
if price > cb { // 赚了
addScore = (price - cb) * v // 卖出收益
if err := this.module.ModuleUser.AddUserProfit(session.GetUserId(), int64(addScore)); err != nil {
this.module.Error("玩家Profit更新",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "update", Value: update},
)
return
}
}
sellValue += price * v
if errdata = this.module.DispenseRes(session, []*cfg.Gameatn{{
A: "attr",
T: "merchantmoney",
N: price * v,
}}, true); errdata != nil {
this.module.Errorf("获得虚拟币失败:%v", errdata)
}
//addScore += price * v // 卖出收益
addScore = sellValue
}
if errdata = this.module.DispenseRes(session, []*cfg.Gameatn{{
A: "attr",
T: "merchantmoney",
N: sellValue,
}}, true); errdata != nil {
this.module.Errorf("获得虚拟币失败:%v", errdata)
}
this.module.ArrayBag(caravan)
if err := this.module.ModuleUser.AddUserProfit(session.GetUserId(), int64(sellValue)); err != nil {
this.module.Error("玩家Profit更新",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "update", Value: update},
)
return
}
// 统计 收益
var lvReward []*cfg.Gameatn
caravan.Profit += int64(addScore)
update["profit"] = caravan.Profit
caravan.Profit += int64(sellValue)
curLv := this.module.CheckCaravavLvUp(caravan)
update["profit"] = caravan.Profit
if curLv > caravan.Lv {
for i := caravan.Lv; i <= curLv-caravan.Lv; i++ {
if c, err := this.module.configure.GetCaravanLv(int32(i)); err == nil {

View File

@ -29,7 +29,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.CaravanRankList
Avatar: userinfo.Avatar,
Rank: rankid, // rankid为0 表示未上榜
Merchantmoney: userinfo.Merchantmoney,
CaravanLv: userinfo.CaravanLv,
CaravanLv: userinfo.Caravanlv,
}
session.SendMsg(string(this.module.GetType()), "ranklist", resp)
return

View File

@ -66,6 +66,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
}
}
})
return
}

View File

@ -85,7 +85,7 @@ func (this *modelCaravan) GetRankListData(rankNum int32, uid string) (list []*pb
Avatar: temp.Avatar,
Rank: ipos,
Merchantmoney: temp.Merchantmoney,
CaravanLv: temp.CaravanLv,
CaravanLv: temp.Caravanlv,
})
if temp.Uid == uid {
rankid = ipos

View File

@ -124,13 +124,20 @@ func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) {
}
data.Citystime = utils.GetZeroTime(configure.Now().Unix())
data.Rtime = configure.Now().Unix() // 修改时间
//data.Itemtime = configure.Now().Unix() +
}
// 初始化货物信息
func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) {
var changeTime int32
items := this.configure.GetAllCaravanItem()
data.Goods = make(map[string]*pb.Goods, 0)
for _, v := range items {
if changeTime == 0 {
changeTime = v.Changetime
}
goods := &pb.Goods{
Period: 0, // 变动周期
CurPeriod: 1, // 当前变动周期
@ -143,6 +150,7 @@ func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) {
}
data.Oldprice[v.Itemid] = v.Goodsprice
}
data.Itemtime = configure.Now().Unix() + int64(changeTime) // 设置货物变更时间
}
// 初始化门票和虚拟币
@ -165,7 +173,7 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
)
curTime = configure.Now().Unix()
update = make(map[string]interface{})
changeTime = this.configure.GetCityRefreshTime() // 3分钟
changeTime = this.configure.GetCityRefreshTime()
// 刷新城市货物信息
if !utils.IsNextToday(caravan.Citystime) {
@ -221,14 +229,13 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
update["citystime"] = caravan.Citystime
bChange = true
}
if caravan.Itemtime == 0 {
caravan.Itemtime = configure.Now().Unix()
}
subTime := int32(curTime - caravan.Itemtime)
if subTime >= changeTime {
if subTime >= 0 {
bChange = true
icount := int32(subTime / changeTime) // 循环周期
icount := int32(subTime/changeTime) + 1 // 循环周期
caravan.Itemtime += int64(changeTime * icount)
update["itemtime"] = caravan.Itemtime
for k, v := range caravan.Goods {
@ -238,6 +245,7 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
// 随机出新的变动周期
v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1])
v.CurPeriod = 0
caravan.Itemtime = curTime + int64(changeTime) // 修改变更时间
} else {
for i := 0; i < int(icount); i++ { // 计算当前的价格
// 价格涨跌权重 PriceChangeWeight
@ -284,12 +292,6 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
update["goods"] = caravan.Goods
update["oldprice"] = caravan.Oldprice
}
// endTime := utils.WeekIntervalTime(0)
// if caravan.Resettime != endTime {
// caravan.Resettime = endTime
// update["resettime"] = caravan.Resettime
// bChange = true
// }
if bChange {
this.modelCaravan.modifyCaravanDataByObjId(uid, update)
@ -424,6 +426,7 @@ func (this *Caravan) CheckCaravavLvUp(data *pb.DBCaravan) (curLv int32) {
for {
if conf, err := this.configure.GetCaravanLv(curLv + 1); err == nil {
if conf.Newmoneyexp <= int32(data.Profit) {
//data.Profit -= int64(conf.Newmoneyexp)
curLv++
} else {
break

View File

@ -1030,7 +1030,9 @@ type ComRebirth struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
To int32 `protobuf:"varint,1,opt,name=to,proto3" json:"to"`
To int32 `protobuf:"varint,1,opt,name=to,proto3" json:"to"`
Nhp int32 `protobuf:"varint,2,opt,name=nhp,proto3" json:"nhp"`
Mhp int32 `protobuf:"varint,3,opt,name=mhp,proto3" json:"mhp"`
}
func (x *ComRebirth) Reset() {
@ -1072,6 +1074,20 @@ func (x *ComRebirth) GetTo() int32 {
return 0
}
func (x *ComRebirth) GetNhp() int32 {
if x != nil {
return x.Nhp
}
return 0
}
func (x *ComRebirth) GetMhp() int32 {
if x != nil {
return x.Mhp
}
return 0
}
//血量变化
type ComModifyHealth struct {
state protoimpl.MessageState
@ -1808,75 +1824,77 @@ var file_battle_battle_struct_proto_rawDesc = []byte{
0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x02, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x65, 0x22, 0x1c, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x52, 0x65, 0x62, 0x69, 0x72, 0x74, 0x68,
0x74, 0x65, 0x22, 0x40, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x52, 0x65, 0x62, 0x69, 0x72, 0x74, 0x68,
0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x74, 0x6f,
0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x48, 0x65,
0x61, 0x6c, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, 0x6f, 0x6a,
0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x61, 0x6f, 0x6a, 0x69, 0x12, 0x18,
0x0a, 0x07, 0x68, 0x69, 0x64, 0x65, 0x44, 0x6d, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
0x07, 0x68, 0x69, 0x64, 0x65, 0x44, 0x6d, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69,
0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x6f,
0x64, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18,
0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x68,
0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x68, 0x70, 0x12, 0x10, 0x0a, 0x03,
0x6d, 0x68, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x68, 0x70, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x65, 0x61, 0x6c, 0x48, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x73, 0x65, 0x61, 0x6c, 0x48, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6d, 0x67, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x6d, 0x67, 0x22, 0x34, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x54,
0x65, 0x61, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x34,
0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x47, 0x75, 0x69, 0x64, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x67, 0x75, 0x69, 0x64, 0x65, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x0e, 0x43, 0x6f,
0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x70, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x0d, 0x43,
0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a,
0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65,
0x22, 0x2c, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x45, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x64, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x22, 0x44,
0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73, 0x12,
0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x43, 0x68, 0x61, 0x69, 0x6e,
0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x0d,
0x43, 0x6f, 0x6d, 0x53, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a,
0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x75, 0x72, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x2a, 0xcd, 0x01, 0x0a, 0x0e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73,
0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x66, 0x66, 0x5f, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6d, 0x6d, 0x75, 0x6e, 0x69,
0x74, 0x79, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x10, 0x03,
0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x5f, 0x47, 0x61, 0x69, 0x6e, 0x10, 0x04, 0x12, 0x0f,
0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x10, 0x05, 0x12,
0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12,
0x10, 0x0a, 0x0c, 0x50, 0x75, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10,
0x07, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x10, 0x08, 0x12,
0x0e, 0x0a, 0x0a, 0x47, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x09, 0x12,
0x0f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a,
0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10,
0x0b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x12, 0x10, 0x0a, 0x03, 0x6e, 0x68, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e,
0x68, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x68, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x6d, 0x68, 0x70, 0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x69,
0x66, 0x79, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05,
0x62, 0x61, 0x6f, 0x6a, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x61, 0x6f,
0x6a, 0x69, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69, 0x64, 0x65, 0x44, 0x6d, 0x67, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x69, 0x64, 0x65, 0x44, 0x6d, 0x67, 0x12, 0x1e, 0x0a, 0x0a,
0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x10,
0x0a, 0x03, 0x6e, 0x68, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x68, 0x70,
0x12, 0x10, 0x0a, 0x03, 0x6d, 0x68, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d,
0x68, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x6c, 0x48, 0x70, 0x18, 0x09, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x6c, 0x48, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6d,
0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x6d, 0x67, 0x22, 0x34, 0x0a, 0x0c,
0x43, 0x6f, 0x6d, 0x54, 0x65, 0x61, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x22, 0x34, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x47,
0x75, 0x69, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x64, 0x65, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x75, 0x69, 0x64, 0x65, 0x49, 0x64, 0x22, 0x7f,
0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73,
0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x73, 0x69, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x69, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x05,
0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22,
0x43, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74,
0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x73, 0x69, 0x64, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x45, 0x6d, 0x69, 0x74, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65,
0x72, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72,
0x76, 0x65, 0x22, 0x44, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54,
0x69, 0x70, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x0f, 0x2e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73, 0x54, 0x79,
0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x43,
0x68, 0x61, 0x69, 0x6e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f,
0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73,
0x22, 0x53, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x53, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x72, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x75, 0x72,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0xcd, 0x01, 0x0a, 0x0e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74,
0x54, 0x69, 0x70, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x66, 0x66, 0x5f,
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74,
0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6d,
0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69,
0x73, 0x74, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x5f, 0x47, 0x61, 0x69, 0x6e,
0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x75, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73,
0x65, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x6e,
0x64, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x65, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x5f, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x65, 0x10, 0x0b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -152,7 +152,7 @@ type DBUser struct {
Channel int32 `protobuf:"varint,38,opt,name=channel,proto3" json:"channel"` //@go_tags(`bson:"channel"`)渠道
Vcode int32 `protobuf:"varint,39,opt,name=vcode,proto3" json:"vcode"` //@go_tags(`bson:"vcode"`)版本号
Vname string `protobuf:"bytes,40,opt,name=vname,proto3" json:"vname"` //@go_tags(`bson:"vname"`)版本名
CaravanLv int32 `protobuf:"varint,41,opt,name=caravanLv,proto3" json:"caravanLv"` //@go_tags(`bson:"caravanlv"`)商队等级
Caravanlv int32 `protobuf:"varint,41,opt,name=caravanlv,proto3" json:"caravanlv"` //@go_tags(`bson:"caravanlv"`)商队等级
Deposit int64 `protobuf:"varint,42,opt,name=deposit,proto3" json:"deposit" bson:"deposit"` //储蓄
Profit int64 `protobuf:"varint,43,opt,name=profit,proto3" json:"profit" bson:"profit"` //商队盈利
Integral int64 `protobuf:"varint,44,opt,name=integral,proto3" json:"integral" bson:"integral"` //充值积分
@ -470,9 +470,9 @@ func (x *DBUser) GetVname() string {
return ""
}
func (x *DBUser) GetCaravanLv() int32 {
func (x *DBUser) GetCaravanlv() int32 {
if x != nil {
return x.CaravanLv
return x.Caravanlv
}
return 0
}
@ -886,8 +886,8 @@ var file_user_user_db_proto_rawDesc = []byte{
0x64, 0x65, 0x18, 0x27, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x63, 0x6f, 0x64, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e,
0x4c, 0x76, 0x18, 0x29, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
0x6e, 0x4c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x2a,
0x6c, 0x76, 0x18, 0x29, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
0x6e, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x2a,
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,