Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-10-31 14:51:15 +08:00
commit 005dc658a2
9 changed files with 330 additions and 74 deletions

View File

@ -9,30 +9,22 @@
},
{
"id": 3,
"quantity": 40
},
{
"id": 4,
"quantity": 20
},
{
"id": 5,
"quantity": 300
},
{
"id": 6,
"id": 4,
"quantity": 1020
},
{
"id": 7,
"id": 5,
"quantity": 980
},
{
"id": 8,
"id": 6,
"quantity": 5
},
{
"id": 9,
"id": 7,
"quantity": 1500
}
]

View File

@ -1,6 +1,8 @@
package comm
import "go_dreamfactory/lego/core"
import (
"go_dreamfactory/lego/core"
)
type LogHandleType string
@ -385,3 +387,20 @@ const (
///爬塔通关公告
PagodaPassNotice ChatSystemType = 4
)
// 巨兽列车
const (
TrollBuyCount int32 = iota + 1 // 单日最大交易次数
TrollItemCount //货物最大存储上限
TrollGridCount //背包格子
TrollBuy //挂机卖出标准/千分比
TrollSell //挂机进货标准/千分比
TrollCantSell //不让交易的前后时间/S
TrollSurprise //惊喜货物售价系数
)

View File

@ -0,0 +1,35 @@
package troll
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) AfkSetCheck(session comm.IUserSession, req *pb.TrollAfkSetReq) (code pb.ErrorCode) {
return
}
// 设置挂机规则
func (this *apiComp) AfkSet(session comm.IUserSession, req *pb.TrollAfkSetReq) (code pb.ErrorCode, data proto.Message) {
var (
update map[string]interface{}
)
update = make(map[string]interface{})
code = this.AfkSetCheck(session, req)
troll, err := this.module.modelTroll.getTrollList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
troll.Buy = req.Buy
troll.Sell = req.Sell
update["buy"] = troll.Buy
update["sell"] = troll.Sell
this.module.ModifyTrollData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), TrollNpcRewardResp, &pb.TrollNpcRewardResp{Data: troll})
return
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"math"
"time"
"google.golang.org/protobuf/proto"
@ -17,14 +18,14 @@ func (this *apiComp) BuyOrSellCheck(session comm.IUserSession, req *pb.TrollBuyO
return
}
///获取美食城基本信息
func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSellReq) (code pb.ErrorCode, data proto.Message) {
var (
//bSell bool // 是否有出售
gold int32 // 当次交易 获得的金币
earn int32 // 只统计赚的金币
update map[string]interface{}
bSell bool // 是否有出售
gold int32 // 当次交易 获得的金币
earn int32 // 只统计赚的金币
update map[string]interface{}
gridNum int32 // 格子数量
)
update = make(map[string]interface{})
if code = this.BuyOrSellCheck(session, req); code != pb.ErrorCode_Success {
@ -38,8 +39,16 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
for k, v := range req.Items {
if v < 0 {
//bSell = true
trolltrain.SellCount += 1 // 交易次数+1
bSell = true
if bSell {
bSell = false
trolltrain.SellCount += 1 // 交易次数+1
if trolltrain.SellCount > 5 {
code = pb.ErrorCode_TrollMaxSellCount // 达到最大交易次数 直接返回
return
}
update["sellCount"] = trolltrain.SellCount
}
}
trolltrain.Items[k] += v
// 校验 是否大于买入最大限制
@ -48,11 +57,11 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
return
}
if goods.Max < trolltrain.Items[k] { // 判断是否有效交易
// TODO 买入上限 直接返回
//code = pb.ErrorCode_
// 买入上限 直接返回
code = pb.ErrorCode_TrollBuyMax
return
} else if trolltrain.Items[k] < 0 {
// TODO 卖出数量不足 直接返回
} else if trolltrain.Items[k] < 0 { //卖出数量不足
code = pb.ErrorCode_TrollSellMax
return
}
@ -87,14 +96,44 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
trolltrain.Price[k] = totalGold / (trolltrain.Items[k] + v)
}
}
if gold < 0 {
if code = this.module.CheckRes(session, []*cfg.Gameatn{&cfg.Gameatn{
A: "attr",
T: "gold",
N: earn,
}}); code != pb.ErrorCode_Success {
return
}
}
// 重新计算格子数量
grid := this.configure.GetTrollRule(comm.TrollItemCount)
for _, v := range trolltrain.Items {
if v > 0 {
gridNum += int32(math.Floor(float64(v / grid)))
}
}
// 获取背包格子上限配置
trolltrain.GridNum = gridNum
if gridNum > this.configure.GetTrollRule(comm.TrollGridCount) { // 背包格子上限
code = pb.ErrorCode_TrollMaxItemCount
return
}
if gold < 0 { // 买入的金币
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{&cfg.Gameatn{
A: "attr",
T: "gold",
N: earn,
}}, true); code != pb.ErrorCode_Success {
return
}
} else {
if code = this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{
A: "attr",
T: "gold",
N: earn,
}}, true); code != pb.ErrorCode_Success {
return
}
}
// check npc level
if confLv := this.configure.GetTrollLv(trolltrain.GetNpcLv() + 1); confLv != nil {
if earn >= confLv.Money {
trolltrain.NpcLv += 1 // npc levelUp
update["npcLv"] = trolltrain.NpcLv
}
}
@ -102,6 +141,8 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
update["items"] = trolltrain.Items
update["price"] = trolltrain.Price
update["totalEarn"] = trolltrain.TotalEarn
update["gridNum"] = trolltrain.GridNum
this.module.ModifyTrollData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), TrollBuyOrSellResp, &pb.TrollBuyOrSellResp{Data: trolltrain})
return

View File

@ -3,6 +3,8 @@ package troll
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
"time"
"google.golang.org/protobuf/proto"
)
@ -15,7 +17,12 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.TrollGetLis
///获取美食城基本信息
func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq) (code pb.ErrorCode, data proto.Message) {
var (
update map[string]interface{}
maxCoefficient int32
)
update = make(map[string]interface{})
if code = this.GetListCheck(session, req); code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
@ -24,7 +31,45 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq)
code = pb.ErrorCode_DBError
return
}
maxCoefficient = this.configure.GetTrollMaxCoefficientNux() // 增长幅度的最大值
if maxCoefficient == 0 {
code = pb.ErrorCode_ConfigNoFound
return
}
// 跨天 则清除 每日交易次数
if !utils.IsToday(trolltrain.RefreshTime) {
trolltrain.SellCount = 0
update["sellCount"] = trolltrain.SellCount
this.module.ModifyTrollData(session.GetUserId(), update)
}
// 重新计算刷新时间
t := time.Now().Unix() - trolltrain.RefreshTime
/// 计算经过了多少个周期
sz := this.configure.GetTrollAllTrain()
var (
circle int32 // 循环一个周期的时间
curTime int32
)
for _, v := range sz {
circle += v
}
curTime = (int32(t) % circle)
// 循环次数
index := int32((int32(t) / circle)) * 3
trolltrain.TarinPos += index
for pos, v := range sz {
trolltrain.TarinPos++
if curTime < v {
trolltrain.RefreshTime = time.Now().Unix() - int64(curTime)
trolltrain.TarinPos = int32(pos) // 设置火车位置
trolltrain.RangeId = (trolltrain.TarinPos % maxCoefficient)
update["refreshTime"] = trolltrain.RefreshTime
update["tarinPos"] = trolltrain.TarinPos
update["rangeId"] = trolltrain.RangeId
break
}
}
this.module.ModifyTrollData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: trolltrain})
return
}

View File

@ -14,6 +14,7 @@ const (
game_trollcoefficient = "game_trollcoefficient.json"
game_trolltrain = "game_trolltrain.json"
game_trollrule = "game_trollrule.json"
game_trolllv = "game_trolllv.json"
)
///配置管理基础组件
@ -29,6 +30,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
this.LoadConfigure(game_trollcoefficient, cfg.NewGameTrollCoefficient)
this.LoadConfigure(game_trolltrain, cfg.NewGameTrollTrain)
this.LoadConfigure(game_trollrule, cfg.NewGameTrollRule)
this.LoadConfigure(game_trolllv, cfg.NewGameTrollLv)
return
}
@ -77,16 +79,15 @@ func (this *configureComp) GetTrollTrain(id int32) (data *cfg.GameTrollTrainData
}
// 获取基本规则
func (this *configureComp) GetTrollRule(id int32) (data *cfg.GameTrollRuleData) {
func (this *configureComp) GetTrollRule(id int32) int32 {
if v, err := this.GetConfigure(game_trollrule); err == nil {
if configure, ok := v.(*cfg.GameTrollRule); ok {
data = configure.Get(id)
return
return configure.Get(id).Quantity
}
} else {
log.Errorf("get GameTrollRuleData conf err:%v", err)
}
return
return 1
}
func (this *configureComp) GetTrollCoefficient(id int32) (data *cfg.GameTrollCoefficientData) {
@ -100,3 +101,41 @@ func (this *configureComp) GetTrollCoefficient(id int32) (data *cfg.GameTrollCoe
}
return
}
func (this *configureComp) GetTrollLv(id int32) (data *cfg.GameTrollLvData) {
if v, err := this.GetConfigure(game_trolllv); err == nil {
if configure, ok := v.(*cfg.GameTrollLv); ok {
data = configure.Get(id)
return
}
} else {
log.Errorf("get GameTrollCoefficientData conf err:%v", err)
}
return
}
func (this *configureComp) GetTrollAllTrain() (data []int32) {
if v, err := this.GetConfigure(game_trolltrain); err == nil {
if configure, ok := v.(*cfg.GameTrollTrain); ok {
for _, v := range configure.GetDataList() {
data = append(data, v.Time)
}
return
}
} else {
log.Errorf("get GameTrollTrainData conf err:%v", err)
}
return
}
func (this *configureComp) GetTrollMaxCoefficientNux() int32 {
if v, err := this.GetConfigure(game_trollcoefficient); err == nil {
if configure, ok := v.(*cfg.GameTrollCoefficient); ok {
return int32(len(configure.GetDataList()))
}
} else {
log.Errorf("get GameTrollTrainData conf err:%v", err)
}
return 0
}

View File

@ -178,6 +178,7 @@ type DB_Equipment struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
<<<<<<< HEAD
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id" bson:"_id"` // 装备id
CId string `protobuf:"bytes,2,opt,name=cId,proto3" json:"cId" bson:"cId"` // 配置Id
UId string `protobuf:"bytes,3,opt,name=uId,proto3" json:"uId" bson:"uid"` // 所属玩家Id
@ -192,6 +193,21 @@ type DB_Equipment struct {
Islock bool `protobuf:"varint,12,opt,name=islock,proto3" json:"islock" bson:"islock"` //是否锁
Mainskill *EquipmentSkillEntry `protobuf:"bytes,13,opt,name=mainskill,proto3" json:"mainskill" bson:"mainskill"` //主技能
Adverbskill []*EquipmentSkillEntry `protobuf:"bytes,14,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能
=======
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id" bson:"_id"` //装备id
CId string `protobuf:"bytes,2,opt,name=cId,proto3" json:"cId" bson:"cId"` // 配置Id
UId string `protobuf:"bytes,3,opt,name=uId,proto3" json:"uId" bson:"uid"` // 所属玩家Id
HeroId string `protobuf:"bytes,4,opt,name=heroId,proto3" json:"heroId" bson:"heroId"` // 挂在的英雄卡片id 未装备 填 ''
Lv int32 `protobuf:"varint,5,opt,name=lv,proto3" json:"lv" bson:"lv"` //装备强化等级
KeepFailNum int32 `protobuf:"varint,6,opt,name=keepFailNum,proto3" json:"keepFailNum" bson:"keepFailNum"` // 连续强化失败次数
MainEntry *EquipmentAttributeEntry `protobuf:"bytes,7,opt,name=mainEntry,proto3" json:"mainEntry" bson:"mainEntry"` // 装备主词条
AdverbEntry []*EquipmentAttributeEntry `protobuf:"bytes,8,rep,name=adverbEntry,proto3" json:"adverbEntry" bson:"adverbEntry"` //装备副词条
OverlayNum uint32 `protobuf:"varint,9,opt,name=overlayNum,proto3" json:"overlayNum" bson:"overlayNum"` //叠加数量
IsInitialState bool `protobuf:"varint,10,opt,name=isInitialState,proto3" json:"isInitialState" bson:"isInitialState"` //是否初始状态
Islock bool `protobuf:"varint,11,opt,name=islock,proto3" json:"islock" bson:"islock"` //是否锁
Mainskill *EquipmentSkillEntry `protobuf:"bytes,12,opt,name=mainskill,proto3" json:"mainskill" bson:"mainskill"` //主技能
Adverbskill []*EquipmentSkillEntry `protobuf:"bytes,13,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
}
func (x *DB_Equipment) Reset() {
@ -344,7 +360,11 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18,
<<<<<<< HEAD
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x22, 0xc6, 0x04, 0x0a, 0x0c, 0x44, 0x42,
=======
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x22, 0xcc, 0x03, 0x0a, 0x0c, 0x44, 0x42,
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
@ -360,6 +380,7 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x12, 0x3a, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e,
0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
<<<<<<< HEAD
0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x09,
0x65, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45,
@ -383,6 +404,23 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
=======
0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a,
0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e,
0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53,
0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x09,
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c,
0x12, 0x36, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18,
0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e,
0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x76,
0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
}
var (
@ -397,16 +435,24 @@ func file_equipment_equipment_db_proto_rawDescGZIP() []byte {
return file_equipment_equipment_db_proto_rawDescData
}
<<<<<<< HEAD
var file_equipment_equipment_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
=======
var file_equipment_equipment_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
var file_equipment_equipment_db_proto_goTypes = []interface{}{
(*EquipmentAttributeEntry)(nil), // 0: EquipmentAttributeEntry
(*EquipmentSkillEntry)(nil), // 1: EquipmentSkillEntry
(*DB_Equipment)(nil), // 2: DB_Equipment
<<<<<<< HEAD
nil, // 3: DB_Equipment.EnchEntryEntry
=======
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
}
var file_equipment_equipment_db_proto_depIdxs = []int32{
0, // 0: DB_Equipment.mainEntry:type_name -> EquipmentAttributeEntry
0, // 1: DB_Equipment.adverbEntry:type_name -> EquipmentAttributeEntry
<<<<<<< HEAD
3, // 2: DB_Equipment.enchEntry:type_name -> DB_Equipment.EnchEntryEntry
1, // 3: DB_Equipment.mainskill:type_name -> EquipmentSkillEntry
1, // 4: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry
@ -415,6 +461,15 @@ var file_equipment_equipment_db_proto_depIdxs = []int32{
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
=======
1, // 2: DB_Equipment.mainskill:type_name -> EquipmentSkillEntry
1, // 3: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
}
func init() { file_equipment_equipment_db_proto_init() }
@ -466,7 +521,11 @@ func file_equipment_equipment_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_equipment_equipment_db_proto_rawDesc,
NumEnums: 0,
<<<<<<< HEAD
NumMessages: 4,
=======
NumMessages: 3,
>>>>>>> 26a2baf9ef5b9b3b1e0533c1622ed24ac9855382
NumExtensions: 0,
NumServices: 0,
},

View File

@ -219,6 +219,10 @@ const (
ErrorCode_SociatyApplyMax ErrorCode = 30018 //最大申请该公会人数
ErrorCode_SociatySelfSetting ErrorCode = 30019 // 不能设置自己
ErrorCode_SociatyMemberCountLimit ErrorCode = 30020 //超出人数限制
ErrorCode_SociatyRewardReceived ErrorCode = 30021 //奖励已领取
ErrorCode_SociatyRewardReceive ErrorCode = 30022 //奖励领取失败
ErrorCode_SociatyResource ErrorCode = 30023 //更新公会资源失败
ErrorCode_SociatyApplyCanel ErrorCode = 30024 //申请撤销失败
// arena
ErrorCode_ArenaTicketBuyUp ErrorCode = 3101 //票据上限
ErrorCode_ArenaTicketNotEnough ErrorCode = 3102 //票据不足
@ -228,6 +232,11 @@ const (
ErrorCode_TalentErrData ErrorCode = 3202 /// 天赋不存在
ErrorCode_TalentUnLockerBefore ErrorCode = 3203 //先解锁前置天赋
ErrorCode_TalentResetState ErrorCode = 3204 //当前天赋已经是重置状态
// trolltrain
ErrorCode_TrollBuyMax ErrorCode = 3301 //买入上限
ErrorCode_TrollSellMax ErrorCode = 3302 // 卖出上限
ErrorCode_TrollMaxSellCount ErrorCode = 3303 // 单日最大交易次数
ErrorCode_TrollMaxItemCount ErrorCode = 3304 //背包格子达到上限
)
// Enum value maps for ErrorCode.
@ -410,6 +419,10 @@ var (
30018: "SociatyApplyMax",
30019: "SociatySelfSetting",
30020: "SociatyMemberCountLimit",
30021: "SociatyRewardReceived",
30022: "SociatyRewardReceive",
30023: "SociatyResource",
30024: "SociatyApplyCanel",
3101: "ArenaTicketBuyUp",
3102: "ArenaTicketNotEnough",
3103: "ArenaTicketNpcInCd",
@ -417,6 +430,10 @@ var (
3202: "TalentErrData",
3203: "TalentUnLockerBefore",
3204: "TalentResetState",
3301: "TrollBuyMax",
3302: "TrollSellMax",
3303: "TrollMaxSellCount",
3304: "TrollMaxItemCount",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -596,6 +613,10 @@ var (
"SociatyApplyMax": 30018,
"SociatySelfSetting": 30019,
"SociatyMemberCountLimit": 30020,
"SociatyRewardReceived": 30021,
"SociatyRewardReceive": 30022,
"SociatyResource": 30023,
"SociatyApplyCanel": 30024,
"ArenaTicketBuyUp": 3101,
"ArenaTicketNotEnough": 3102,
"ArenaTicketNpcInCd": 3103,
@ -603,6 +624,10 @@ var (
"TalentErrData": 3202,
"TalentUnLockerBefore": 3203,
"TalentResetState": 3204,
"TrollBuyMax": 3301,
"TrollSellMax": 3302,
"TrollMaxSellCount": 3303,
"TrollMaxItemCount": 3304,
}
)
@ -637,7 +662,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0x8e, 0x20, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xcc, 0x21, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -883,19 +908,30 @@ var file_errorcode_proto_rawDesc = []byte{
0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x66, 0x53,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xc3, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65,
0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18,
0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e,
0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41,
0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43,
0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d,
0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19,
0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b,
0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54,
0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10,
0x84, 0x19, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x64, 0x10, 0xc5, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xc6,
0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0xc7, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e, 0x65, 0x6c, 0x10, 0xc8,
0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65,
0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65,
0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67,
0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a,
0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61,
0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45,
0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c,
0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72,
0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54,
0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a,
0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19,
0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c,
0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -46,9 +46,8 @@ type DBUserExpand struct {
RtaskId int32 `protobuf:"varint,22,opt,name=rtaskId,proto3" json:"rtaskId" bson:"rtaskId"` // 当前完成的随机任务ID
TeamHeroIds []string `protobuf:"bytes,23,rep,name=teamHeroIds,proto3" json:"teamHeroIds" bson:"teamHeroIds"` //阵容英雄IDs
SociatyId string `protobuf:"bytes,24,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
SociatyContri int32 `protobuf:"varint,25,opt,name=sociatyContri,proto3" json:"sociatyContri" bson:"sociatyContri"` //个人贡献
SociatyCd int64 `protobuf:"varint,26,opt,name=sociatyCd,proto3" json:"sociatyCd" bson:"sociatyCd"` //主动退出CD
SociatyCoin int32 `protobuf:"varint,27,opt,name=sociatyCoin,proto3" json:"sociatyCoin" bson:"sociatyCoin"` //公会币
SociatyCd int64 `protobuf:"varint,25,opt,name=sociatyCd,proto3" json:"sociatyCd" bson:"sociatyCd"` //主动退出CD
SociatyCoin int32 `protobuf:"varint,26,opt,name=sociatyCoin,proto3" json:"sociatyCoin" bson:"sociatyCoin"` //公会币
}
func (x *DBUserExpand) Reset() {
@ -223,13 +222,6 @@ func (x *DBUserExpand) GetSociatyId() string {
return ""
}
func (x *DBUserExpand) GetSociatyContri() int32 {
if x != nil {
return x.SociatyContri
}
return 0
}
func (x *DBUserExpand) GetSociatyCd() int64 {
if x != nil {
return x.SociatyCd
@ -248,7 +240,7 @@ var File_userexpand_proto protoreflect.FileDescriptor
var file_userexpand_proto_rawDesc = []byte{
0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xe8, 0x06, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70,
0x74, 0x6f, 0x22, 0xc2, 0x06, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70,
0x61, 0x6e, 0x64, 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, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61,
@ -292,18 +284,16 @@ var file_userexpand_proto_rawDesc = []byte{
0x74, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28,
0x09, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x1c,
0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x18, 0x19, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74,
0x72, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64, 0x18,
0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64,
0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18,
0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f,
0x69, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x1a, 0x39, 0x0a, 0x0b,
0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (