Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
7a1878e8e6
@ -35,6 +35,9 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
return
|
||||
}
|
||||
for k, v := range req.Items {
|
||||
if v == 0 { // 过滤数量为0 的消息
|
||||
continue
|
||||
}
|
||||
if v < 0 {
|
||||
if !bSell {
|
||||
bSell = true
|
||||
@ -54,7 +57,9 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
if _, ok := trolltrain.Shop[k]; !ok {
|
||||
trolltrain.Shop[k] = v
|
||||
} else {
|
||||
trolltrain.Shop[k] += v
|
||||
if v > 0 {
|
||||
trolltrain.Shop[k] += v // 限购
|
||||
}
|
||||
}
|
||||
// 校验 是否大于买入最大限制
|
||||
goods := this.configure.GetTrollGoods(k)
|
||||
@ -84,24 +89,21 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
var sellPrice int32 // 交易价格
|
||||
if trolltrain.TarinPos == 0 {
|
||||
sellPrice = goods.Goodsprice * goods.StarMoney / 1000
|
||||
} else {
|
||||
sellPrice = int32(p.Coefficient) * goods.Goodsprice / 1000
|
||||
}
|
||||
if v < 0 { // 卖出
|
||||
// 卖出价格
|
||||
var sellPrice int32
|
||||
if trolltrain.TarinPos == 0 {
|
||||
sellPrice = goods.Goodsprice * goods.StarMoney / 1000
|
||||
} else {
|
||||
|
||||
sellPrice = int32(p.Coefficient) * goods.Goodsprice / 1000
|
||||
}
|
||||
if sellPrice > trolltrain.Price[k] { // 赚了
|
||||
earn += (sellPrice - trolltrain.Price[k]) * trolltrain.Items[k]
|
||||
earn += (sellPrice - trolltrain.Price[k]) * v
|
||||
}
|
||||
gold += (sellPrice - trolltrain.Price[k]) * trolltrain.Items[k]
|
||||
gold += sellPrice * v
|
||||
} else { // 买入 计算平均价格
|
||||
totalGold := trolltrain.Items[k] * trolltrain.Price[k]
|
||||
sellPrice := int32(p.Coefficient) * goods.Goodsprice / 1000
|
||||
totalGold := (trolltrain.Items[k] - v) * trolltrain.Price[k]
|
||||
totalGold += v * sellPrice
|
||||
trolltrain.Price[k] = totalGold / (trolltrain.Items[k] + v)
|
||||
trolltrain.Price[k] = totalGold / (trolltrain.Items[k])
|
||||
gold -= v * sellPrice
|
||||
}
|
||||
}
|
||||
@ -110,10 +112,9 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
grid := this.configure.GetTrollRule(comm.TrollItemCount)
|
||||
for _, v := range trolltrain.Items {
|
||||
if v > 0 {
|
||||
gridNum += int32(math.Ceil(float64(v / grid)))
|
||||
gridNum += int32(math.Ceil(float64(v) / float64(grid)))
|
||||
}
|
||||
}
|
||||
// 获取背包格子上限配置
|
||||
|
||||
trolltrain.GridNum = gridNum
|
||||
if gridNum > this.configure.GetTrollRule(comm.TrollGridCount) { // 背包格子上限
|
||||
@ -132,8 +133,13 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
update["npcLv"] = trolltrain.NpcLv
|
||||
}
|
||||
}
|
||||
|
||||
trolltrain.TotalEarn += int64(earn) // 累计获得的金币
|
||||
// 清除数量为0 的
|
||||
for k, v := range trolltrain.Items {
|
||||
if v == 0 {
|
||||
delete(trolltrain.Items, k)
|
||||
}
|
||||
}
|
||||
trolltrain.TotalEarn += -int64(earn) // 累计获得的金币
|
||||
update["items"] = trolltrain.Items
|
||||
update["price"] = trolltrain.Price
|
||||
update["totalEarn"] = trolltrain.TotalEarn
|
||||
|
@ -15,13 +15,32 @@ func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.TrollNpcR
|
||||
|
||||
///美食城领取奖励
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.TrollNpcRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
update map[string]interface{}
|
||||
)
|
||||
code = this.GetRewardCheck(session, req)
|
||||
_troll, err := this.module.modelTroll.getTrollList(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
conf := this.configure.GetTrollLv(req.RewardId)
|
||||
if conf == nil {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
if _, ok := _troll.NpcReward[req.RewardId]; !ok {
|
||||
this.module.ModifyTrollData(session.GetUserId(), update)
|
||||
if code = this.module.DispenseRes(session, conf.Reword, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
_troll.NpcReward[req.RewardId] = 1
|
||||
update = make(map[string]interface{}, 0)
|
||||
update["npcReward"] = _troll.NpcReward
|
||||
|
||||
} else {
|
||||
code = pb.ErrorCode_TrollRepeatedReward
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), TrollNpcRewardResp, &pb.TrollNpcRewardResp{Data: _troll})
|
||||
return
|
||||
}
|
||||
|
@ -488,7 +488,6 @@ type DBArenaUser struct {
|
||||
Loc []float64 `protobuf:"fixed64,21,rep,packed,name=loc,proto3" json:"loc"` //地图索引 匹配系统使用
|
||||
Isdef bool `protobuf:"varint,22,opt,name=isdef,proto3" json:"isdef"` //是否设置防守
|
||||
Npc map[int32]*DBNpc `protobuf:"bytes,23,rep,name=npc,proto3" json:"npc" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // npc Cd
|
||||
Prededuction int32 `protobuf:"varint,24,opt,name=prededuction,proto3" json:"prededuction"` //预扣字段
|
||||
}
|
||||
|
||||
func (x *DBArenaUser) Reset() {
|
||||
@ -684,13 +683,6 @@ func (x *DBArenaUser) GetNpc() map[int32]*DBNpc {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBArenaUser) GetPrededuction() int32 {
|
||||
if x != nil {
|
||||
return x.Prededuction
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// npc数据
|
||||
type DBNpc struct {
|
||||
state protoimpl.MessageState
|
||||
@ -808,7 +800,7 @@ var file_arena_arena_db_proto_rawDesc = []byte{
|
||||
0x28, 0x05, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12,
|
||||
0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
|
||||
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa6, 0x06, 0x0a, 0x0b, 0x44, 0x42,
|
||||
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x82, 0x06, 0x0a, 0x0b, 0x44, 0x42,
|
||||
0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
@ -852,29 +844,26 @@ var file_arena_arena_db_proto_rawDesc = []byte{
|
||||
0x14, 0x0a, 0x05, 0x69, 0x73, 0x64, 0x65, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
||||
0x69, 0x73, 0x64, 0x65, 0x66, 0x12, 0x27, 0x0a, 0x03, 0x6e, 0x70, 0x63, 0x18, 0x17, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72,
|
||||
0x2e, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x70, 0x63, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x70, 0x72, 0x65, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x18,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x08, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x06, 0x2e, 0x44, 0x42, 0x4e, 0x70, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||
0x38, 0x01, 0x22, 0x3d, 0x0a, 0x05, 0x44, 0x42, 0x4e, 0x70, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x63,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x63, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x2a, 0x9f, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f,
|
||||
0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x57, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b,
|
||||
0x4c, 0x6f, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64,
|
||||
0x6b, 0x57, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64,
|
||||
0x4c, 0x6f, 0x73, 0x74, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x65,
|
||||
0x76, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x05, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65,
|
||||
0x64, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e,
|
||||
0x64, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x2e, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x70, 0x63, 0x1a, 0x3e,
|
||||
0x0a, 0x08, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x44, 0x42,
|
||||
0x4e, 0x70, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d,
|
||||
0x0a, 0x05, 0x44, 0x42, 0x4e, 0x70, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x63, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x9f, 0x01,
|
||||
0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e,
|
||||
0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x73, 0x74,
|
||||
0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x6b, 0x57, 0x69, 0x6e,
|
||||
0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x73, 0x74,
|
||||
0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67,
|
||||
0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x07, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -896,9 +896,7 @@ type EquipmentEnchReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Eid string `protobuf:"bytes,1,opt,name=eid,proto3" json:"eid"`
|
||||
Itemid string `protobuf:"bytes,2,opt,name=itemid,proto3" json:"itemid"`
|
||||
Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index"`
|
||||
Eid string `protobuf:"bytes,1,opt,name=eid,proto3" json:"eid"`
|
||||
}
|
||||
|
||||
func (x *EquipmentEnchReq) Reset() {
|
||||
@ -940,28 +938,13 @@ func (x *EquipmentEnchReq) GetEid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EquipmentEnchReq) GetItemid() string {
|
||||
if x != nil {
|
||||
return x.Itemid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EquipmentEnchReq) GetIndex() int32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//装备附魔 回应
|
||||
type EquipmentEnchResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"`
|
||||
Equipment *DB_Equipment `protobuf:"bytes,2,opt,name=Equipment,proto3" json:"Equipment"`
|
||||
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"`
|
||||
}
|
||||
|
||||
func (x *EquipmentEnchResp) Reset() {
|
||||
@ -1003,13 +986,6 @@ func (x *EquipmentEnchResp) GetIssucc() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *EquipmentEnchResp) GetEquipment() *DB_Equipment {
|
||||
if x != nil {
|
||||
return x.Equipment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_equipment_equipment_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_equipment_equipment_msg_proto_rawDesc = []byte{
|
||||
@ -1085,19 +1061,14 @@ var file_equipment_equipment_msg_proto_rawDesc = []byte{
|
||||
0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x70, 0x69, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x18, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x52,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x24,
|
||||
0x0a, 0x10, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x68, 0x52,
|
||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x65, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x22, 0x58, 0x0a, 0x11, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x45,
|
||||
0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63,
|
||||
0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12,
|
||||
0x2b, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x03, 0x65, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x45, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73,
|
||||
0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63,
|
||||
0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1142,12 +1113,11 @@ var file_equipment_equipment_msg_proto_depIdxs = []int32{
|
||||
19, // 2: EquipmentEquipResp.Equipments:type_name -> DB_Equipment
|
||||
19, // 3: EquipmentUpgradeResp.Equipment:type_name -> DB_Equipment
|
||||
20, // 4: EquipmentWashResp.adverbEntry:type_name -> EquipmentAttributeEntry
|
||||
19, // 5: EquipmentEnchResp.Equipment:type_name -> DB_Equipment
|
||||
6, // [6:6] is the sub-list for method output_type
|
||||
6, // [6:6] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_equipment_equipment_msg_proto_init() }
|
||||
|
@ -237,10 +237,11 @@ const (
|
||||
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 //背包格子达到上限
|
||||
ErrorCode_TrollBuyMax ErrorCode = 3301 //买入上限
|
||||
ErrorCode_TrollSellMax ErrorCode = 3302 // 卖出上限
|
||||
ErrorCode_TrollMaxSellCount ErrorCode = 3303 // 单日最大交易次数
|
||||
ErrorCode_TrollMaxItemCount ErrorCode = 3304 //背包格子达到上限
|
||||
ErrorCode_TrollRepeatedReward ErrorCode = 3305 //奖励重复领取
|
||||
// horoscope
|
||||
ErrorCode_HoroscopeNotTurnedOn ErrorCode = 3401 //未开启
|
||||
)
|
||||
@ -444,6 +445,7 @@ var (
|
||||
3302: "TrollSellMax",
|
||||
3303: "TrollMaxSellCount",
|
||||
3304: "TrollMaxItemCount",
|
||||
3305: "TrollRepeatedReward",
|
||||
3401: "HoroscopeNotTurnedOn",
|
||||
}
|
||||
ErrorCode_value = map[string]int32{
|
||||
@ -643,6 +645,7 @@ var (
|
||||
"TrollSellMax": 3302,
|
||||
"TrollMaxSellCount": 3303,
|
||||
"TrollMaxItemCount": 3304,
|
||||
"TrollRepeatedReward": 3305,
|
||||
"HoroscopeNotTurnedOn": 3401,
|
||||
}
|
||||
)
|
||||
@ -678,7 +681,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, 0xce, 0x22, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x6f, 0x2a, 0xe8, 0x22, 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,
|
||||
@ -953,10 +956,11 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
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, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73,
|
||||
0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10,
|
||||
0xc9, 0x1a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9,
|
||||
0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f,
|
||||
0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -43,6 +43,8 @@ type DBTrollTrain struct {
|
||||
AiCount int32 `protobuf:"varint,15,opt,name=aiCount,proto3" json:"aiCount"` //@go_tags(`bson:"aiCount"` AI 交易次数
|
||||
Shop map[int32]int32 `protobuf:"bytes,16,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商人的限购数量
|
||||
Ctime int64 `protobuf:"varint,17,opt,name=ctime,proto3" json:"ctime"`
|
||||
Surprise map[int32]int32 `protobuf:"bytes,18,rep,name=surprise,proto3" json:"surprise" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 惊喜
|
||||
SurpriseID int32 `protobuf:"varint,19,opt,name=surpriseID,proto3" json:"surpriseID"` // 惊喜ID
|
||||
}
|
||||
|
||||
func (x *DBTrollTrain) Reset() {
|
||||
@ -196,11 +198,25 @@ func (x *DBTrollTrain) GetCtime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTrollTrain) GetSurprise() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Surprise
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBTrollTrain) GetSurpriseID() int32 {
|
||||
if x != nil {
|
||||
return x.SurpriseID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_troll_troll_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_troll_troll_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x62,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x05, 0x0a, 0x0c, 0x44, 0x42, 0x54, 0x72, 0x6f,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x07, 0x0a, 0x0c, 0x44, 0x42, 0x54, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 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, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65,
|
||||
@ -233,23 +249,32 @@ var file_troll_troll_db_proto_rawDesc = []byte{
|
||||
0x70, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x45,
|
||||
0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08,
|
||||
0x73, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x75,
|
||||
0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x75, 0x72,
|
||||
0x70, 0x72, 0x69, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73,
|
||||
0x65, 0x49, 0x44, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x72, 0x70, 0x72,
|
||||
0x69, 0x73, 0x65, 0x49, 0x44, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
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, 0x1a,
|
||||
0x38, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x3c, 0x0a, 0x0e, 0x4e, 0x70, 0x63,
|
||||
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 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,
|
||||
0x1a, 0x3c, 0x0a, 0x0e, 0x4e, 0x70, 0x63, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x37,
|
||||
0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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,
|
||||
0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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 (
|
||||
@ -264,24 +289,26 @@ func file_troll_troll_db_proto_rawDescGZIP() []byte {
|
||||
return file_troll_troll_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_troll_troll_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_troll_troll_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_troll_troll_db_proto_goTypes = []interface{}{
|
||||
(*DBTrollTrain)(nil), // 0: DBTrollTrain
|
||||
nil, // 1: DBTrollTrain.ItemsEntry
|
||||
nil, // 2: DBTrollTrain.PriceEntry
|
||||
nil, // 3: DBTrollTrain.NpcRewardEntry
|
||||
nil, // 4: DBTrollTrain.ShopEntry
|
||||
nil, // 5: DBTrollTrain.SurpriseEntry
|
||||
}
|
||||
var file_troll_troll_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBTrollTrain.items:type_name -> DBTrollTrain.ItemsEntry
|
||||
2, // 1: DBTrollTrain.price:type_name -> DBTrollTrain.PriceEntry
|
||||
3, // 2: DBTrollTrain.npcReward:type_name -> DBTrollTrain.NpcRewardEntry
|
||||
4, // 3: DBTrollTrain.shop:type_name -> DBTrollTrain.ShopEntry
|
||||
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
|
||||
5, // 4: DBTrollTrain.surprise:type_name -> DBTrollTrain.SurpriseEntry
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_troll_troll_db_proto_init() }
|
||||
@ -309,7 +336,7 @@ func file_troll_troll_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_troll_troll_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user