Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
90b733390f
50
bin/json/game_trollcoefficient.json
Normal file
50
bin/json/game_trollcoefficient.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"coefficient": "1012"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"coefficient": "1024"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"coefficient": "1036"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"coefficient": "1048"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"coefficient": "1060"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"coefficient": "1072"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"coefficient": "900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"coefficient": "888"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"coefficient": "876"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"coefficient": "864"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"coefficient": "852"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"coefficient": "840"
|
||||||
|
}
|
||||||
|
]
|
110
bin/json/game_trollgoods.json
Normal file
110
bin/json/game_trollgoods.json
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"goodsname": "物品1",
|
||||||
|
"goodsfor": 1,
|
||||||
|
"goodsinfor": "物品1货品信息",
|
||||||
|
"goodsicon": "clmsg_ll_01",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 12000,
|
||||||
|
"uptext": "物品1up",
|
||||||
|
"suptext": "物品1sup",
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"goodsname": "物品2",
|
||||||
|
"goodsfor": 1,
|
||||||
|
"goodsinfor": "物品2货品信息",
|
||||||
|
"goodsicon": "clmsg_ll_02",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 13000,
|
||||||
|
"uptext": "物品2up",
|
||||||
|
"suptext": "物品2sup",
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"goodsname": "物品3",
|
||||||
|
"goodsfor": 1,
|
||||||
|
"goodsinfor": "物品3货品信息",
|
||||||
|
"goodsicon": "clmsg_ll_03",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 14000,
|
||||||
|
"uptext": "物品3up",
|
||||||
|
"suptext": "物品3sup",
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"goodsname": "物品4",
|
||||||
|
"goodsfor": 2,
|
||||||
|
"goodsinfor": "物品4货品信息",
|
||||||
|
"goodsicon": "clmsg_ll_04",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 11000,
|
||||||
|
"uptext": "物品4up",
|
||||||
|
"suptext": "物品4sup",
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"goodsname": "物品5",
|
||||||
|
"goodsfor": 2,
|
||||||
|
"goodsinfor": "物品5货品信息",
|
||||||
|
"goodsicon": "clmsg_ll_05",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 1000,
|
||||||
|
"uptext": "物品5up",
|
||||||
|
"suptext": "物品5sup",
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"goodsname": "物品6",
|
||||||
|
"goodsfor": 2,
|
||||||
|
"goodsinfor": "物品6货品信息",
|
||||||
|
"goodsicon": "wp_icon_0003",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 2000,
|
||||||
|
"uptext": "物品6up",
|
||||||
|
"suptext": "物品6sup",
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"goodsname": "物品7",
|
||||||
|
"goodsfor": 3,
|
||||||
|
"goodsinfor": "物品7货品信息",
|
||||||
|
"goodsicon": "wp_icon_10002",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 1000,
|
||||||
|
"uptext": "物品7up",
|
||||||
|
"suptext": "物品7sup",
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"goodsname": "物品8",
|
||||||
|
"goodsfor": 3,
|
||||||
|
"goodsinfor": "物品8货品信息",
|
||||||
|
"goodsicon": "wp_icon_10012",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 3000,
|
||||||
|
"uptext": "物品8up",
|
||||||
|
"suptext": "物品8sup",
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"goodsname": "物品9",
|
||||||
|
"goodsfor": 3,
|
||||||
|
"goodsinfor": "物品9货品信息",
|
||||||
|
"goodsicon": "wp_icon_10014",
|
||||||
|
"goodsprice": 2000,
|
||||||
|
"star_money": 4000,
|
||||||
|
"uptext": "物品9up",
|
||||||
|
"suptext": "物品9sup",
|
||||||
|
"max": 30
|
||||||
|
}
|
||||||
|
]
|
128
bin/json/game_trolllv.json
Normal file
128
bin/json/game_trolllv.json
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"lv": 1,
|
||||||
|
"money": 10000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lv": 2,
|
||||||
|
"money": 20000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lv": 3,
|
||||||
|
"money": 30000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lv": 4,
|
||||||
|
"money": 40000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lv": 5,
|
||||||
|
"money": 50000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lv": 6,
|
||||||
|
"money": 60000,
|
||||||
|
"reword": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "diamond",
|
||||||
|
"n": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "30001",
|
||||||
|
"n": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"14007",
|
||||||
|
"25001",
|
||||||
|
"45001"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
38
bin/json/game_trollrule.json
Normal file
38
bin/json/game_trollrule.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"quantity": "5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"quantity": "20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"quantity": "40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"quantity": "20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"quantity": "300"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"quantity": "1020"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"quantity": "980"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"quantity": "5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"quantity": "1500"
|
||||||
|
}
|
||||||
|
]
|
23
bin/json/game_trolltrain.json
Normal file
23
bin/json/game_trolltrain.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "右屏商人",
|
||||||
|
"information": "这是一位熊猫商人",
|
||||||
|
"ico": "action_11001",
|
||||||
|
"time": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "上屏商人",
|
||||||
|
"information": "这是一位波比商人再此",
|
||||||
|
"ico": "action_11003",
|
||||||
|
"time": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"name": "左屏商人",
|
||||||
|
"information": "这是一位滑板鞋王子",
|
||||||
|
"ico": "ytx_js_14007",
|
||||||
|
"time": 300
|
||||||
|
}
|
||||||
|
]
|
@ -63,6 +63,7 @@ const (
|
|||||||
ModuleBattle core.M_Modules = "battle" //战斗
|
ModuleBattle core.M_Modules = "battle" //战斗
|
||||||
ModuleLibrary core.M_Modules = "library" //藏书馆
|
ModuleLibrary core.M_Modules = "library" //藏书馆
|
||||||
ModuleArena core.M_Modules = "arena" //竞技场
|
ModuleArena core.M_Modules = "arena" //竞技场
|
||||||
|
ModuleTroll core.M_Modules = "troll" //巨怪商队
|
||||||
//ModuleFetter core.M_Modules = "herofetter" //好友模块
|
//ModuleFetter core.M_Modules = "herofetter" //好友模块
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -158,6 +159,7 @@ const (
|
|||||||
TableArenaRank = "arenarank" //排名
|
TableArenaRank = "arenarank" //排名
|
||||||
// 天赋
|
// 天赋
|
||||||
TableTalent = "herotalent"
|
TableTalent = "herotalent"
|
||||||
|
TableTroll = "trolltrain"
|
||||||
)
|
)
|
||||||
|
|
||||||
//RPC服务接口定义处
|
//RPC服务接口定义处
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/db"
|
"go_dreamfactory/sys/db"
|
||||||
|
"time"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
@ -186,6 +187,21 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
|||||||
conn.Mgo.InsertOne(comm.TableSeasonRecord, newData)
|
conn.Mgo.InsertOne(comm.TableSeasonRecord, newData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var dbModel *db.DBModel
|
||||||
|
if !this.module.IsCross() {
|
||||||
|
if dbModel, err = this.module.GetDBNoduleByUid(session.GetUserId(), comm.TableSeasonRecord, time.Hour); err == nil {
|
||||||
|
if err = dbModel.Add(session.GetUserId(), newData); err != nil {
|
||||||
|
this.module.Errorf("err:%v", err)
|
||||||
|
}
|
||||||
|
// 同步zset
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if err = this.module.modelPagoda.Add(session.GetUserId(), newData); err != nil {
|
||||||
|
this.module.Errorf("err:%v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
//this.module.modulerank.addPagodaRankList(session, seasonPagoda, req.Report.Info.Redflist[0].Leadpos, sz, req.Report.Costtime)
|
//this.module.modulerank.addPagodaRankList(session, seasonPagoda, req.Report.Info.Redflist[0].Leadpos, sz, req.Report.Costtime)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package pagoda
|
package pagoda
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/sys/redis/pipe"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/db"
|
"go_dreamfactory/sys/db"
|
||||||
|
|
||||||
|
"github.com/go-redis/redis/v8"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
@ -12,7 +15,50 @@ import (
|
|||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode) {
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode) {
|
||||||
|
uid := session.GetUserId()
|
||||||
|
if !this.module.IsCross() {
|
||||||
|
if conn, err := db.Cross(); err == nil {
|
||||||
|
//userinfo := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
// newData := &pb.DBPagodaRecord{
|
||||||
|
// Id: primitive.NewObjectID().Hex(),
|
||||||
|
// Uid: session.GetUserId(),
|
||||||
|
// PagodaId: 111,
|
||||||
|
// Type: 201,
|
||||||
|
// Nickname: userinfo.Name,
|
||||||
|
// Icon: "", // icon 暂无
|
||||||
|
// Lv: userinfo.Lv,
|
||||||
|
// CostTime: 1002,
|
||||||
|
// }
|
||||||
|
|
||||||
|
//conn.Mgo.InsertOne(comm.TablePagodaRecord, newData)
|
||||||
|
var (
|
||||||
|
pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO())
|
||||||
|
menbers *redis.Z
|
||||||
|
)
|
||||||
|
|
||||||
|
menbers = &redis.Z{Score: float64(500), Member: uid}
|
||||||
|
|
||||||
|
if cmd := pipe.ZAdd("pagodaList", menbers); cmd != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
|
||||||
|
dock, err1 := cmd.Result()
|
||||||
|
this.module.Errorln(dock, err1)
|
||||||
|
}
|
||||||
|
if _, err = pipe.Exec(); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//rd := pipe.ZRevRank("pagodaList", "dfmxf_6358f3f1375f6a340a12e2ab01234567")
|
||||||
|
rd := pipe.ZRange("pagodaList", 1, 5)
|
||||||
|
if _, err = pipe.Exec(); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_data3 := rd.Val()
|
||||||
|
_data, err2 := rd.Result()
|
||||||
|
this.module.Errorln(_data, err2, _data3)
|
||||||
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
package pagoda
|
package pagoda
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
"go_dreamfactory/lego/sys/redis/pipe"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
"go_dreamfactory/sys/db"
|
||||||
|
|
||||||
|
"github.com/go-redis/redis/v8"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Pagoda struct {
|
type Pagoda struct {
|
||||||
@ -108,3 +113,39 @@ func (this *Pagoda) CleanSeasonPagodaData() (code pb.ErrorCode) {
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *Pagoda) SetPagodaRank(tableName string, time int32, uid string) (err error) {
|
||||||
|
|
||||||
|
if !this.IsCross() {
|
||||||
|
if conn, err1 := db.Cross(); err1 == nil {
|
||||||
|
var (
|
||||||
|
pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO())
|
||||||
|
menbers *redis.Z
|
||||||
|
)
|
||||||
|
|
||||||
|
menbers = &redis.Z{Score: float64(time), Member: uid}
|
||||||
|
|
||||||
|
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
|
||||||
|
dock, err := cmd.Result()
|
||||||
|
this.Errorln(dock, err)
|
||||||
|
}
|
||||||
|
if _, err = pipe.Exec(); err != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//rd := pipe.ZRevRank("pagodaList", "dfmxf_6358f3f1375f6a340a12e2ab01234567")
|
||||||
|
rd := pipe.ZRange("pagodaList", 1, 5)
|
||||||
|
if _, err = pipe.Exec(); err != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_data3 := rd.Val()
|
||||||
|
_data, err2 := rd.Result()
|
||||||
|
this.Errorln(_data, err2, _data3)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
35
modules/troll/api.go
Normal file
35
modules/troll/api.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
TrollGetListResp = "getlist"
|
||||||
|
GourmetCreateOrderResp = "createorder"
|
||||||
|
GourmetSkillLvResp = "skilllv"
|
||||||
|
TrollNpcRewardResp = "npcreward"
|
||||||
|
GourmetGetRandUserResp = "getranduser"
|
||||||
|
)
|
||||||
|
|
||||||
|
type apiComp struct {
|
||||||
|
modules.MCompGate
|
||||||
|
service core.IService
|
||||||
|
configure *configureComp
|
||||||
|
module *Troll
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.MCompGate.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*Troll)
|
||||||
|
this.service = service
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) Start() (err error) {
|
||||||
|
err = this.MCompGate.Start()
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
27
modules/troll/api_getReward.go
Normal file
27
modules/troll/api_getReward.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.TrollNpcRewardReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///美食城领取奖励
|
||||||
|
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.TrollNpcRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
code = this.GetRewardCheck(session, req)
|
||||||
|
_troll, err := this.module.modelTroll.getTrollList(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), TrollNpcRewardResp, &pb.TrollNpcRewardResp{Data: _troll})
|
||||||
|
return
|
||||||
|
}
|
35
modules/troll/api_getlist.go
Normal file
35
modules/troll/api_getlist.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.TrollGetListReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取美食城基本信息
|
||||||
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
code = this.GetListCheck(session, req)
|
||||||
|
if code != pb.ErrorCode_Success {
|
||||||
|
return // 参数校验失败直接返回
|
||||||
|
}
|
||||||
|
_gourmet, err := this.module.modelTroll.getTrollList(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if _gourmet.Ctime == 0 {
|
||||||
|
_gourmet.Ctime = time.Now().Unix()
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: _gourmet})
|
||||||
|
return
|
||||||
|
}
|
84
modules/troll/comp_configure.go
Normal file
84
modules/troll/comp_configure.go
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/sys/configure"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
"sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
game_gourmet = "game_gourmet.json"
|
||||||
|
game_gourmetskill = "game_gourmetskill.json"
|
||||||
|
)
|
||||||
|
|
||||||
|
///配置管理基础组件
|
||||||
|
type configureComp struct {
|
||||||
|
hlock sync.RWMutex
|
||||||
|
modules.MCompConfigure
|
||||||
|
_gourmetMap map[int64]*cfg.GameGourmetData
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||||
|
|
||||||
|
this._gourmetMap = make(map[int64]*cfg.GameGourmetData, 0)
|
||||||
|
configure.RegisterConfigure(game_gourmet, cfg.NewGameGourmet, func() {
|
||||||
|
if v, err := this.GetConfigure(game_gourmet); err == nil {
|
||||||
|
if configure, ok := v.(*cfg.GameGourmet); ok {
|
||||||
|
this.hlock.Lock()
|
||||||
|
defer this.hlock.Unlock()
|
||||||
|
for _, value := range configure.GetDataList() {
|
||||||
|
this._gourmetMap[int64(value.Type<<16)+int64(value.Level)] = value
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.Errorf("get game_pagoda conf err:%v", err)
|
||||||
|
return
|
||||||
|
})
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取美食馆配置数据
|
||||||
|
func (this *configureComp) GetGourmetConfigData(gourmetType int32, level int32) (data *cfg.GameGourmetData) {
|
||||||
|
|
||||||
|
return this._gourmetMap[int64(gourmetType<<16)+int64(level)]
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载多个配置文件
|
||||||
|
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) {
|
||||||
|
for k, v := range confs {
|
||||||
|
err = configure.RegisterConfigure(k, v, nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("配置文件:%s解析失败!", k)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//读取配置数据
|
||||||
|
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||||
|
return configure.GetConfigure(name)
|
||||||
|
}
|
||||||
|
func (this *configureComp) GetGourmetSkillConfigBySkillType(skillType int32) (data []int32) {
|
||||||
|
data = make([]int32, 0)
|
||||||
|
if v, err := this.GetConfigure(game_gourmet); err == nil {
|
||||||
|
if configure, ok := v.(*cfg.GameGourmet); ok {
|
||||||
|
this.hlock.Lock()
|
||||||
|
defer this.hlock.Unlock()
|
||||||
|
for _, value := range configure.GetDataList() {
|
||||||
|
if value.SkillType == skillType && value.Initial == 1 {
|
||||||
|
data = append(data, value.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
40
modules/troll/model_gourmet.go
Normal file
40
modules/troll/model_gourmet.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type modelTroll struct {
|
||||||
|
modules.MCompModel
|
||||||
|
module *Troll
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *modelTroll) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
this.TableName = string(comm.TableTroll)
|
||||||
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*Troll)
|
||||||
|
// uid 创建索引
|
||||||
|
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||||
|
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *modelTroll) getTrollList(uid string) (result *pb.DBTrollTrain, err error) {
|
||||||
|
result = &pb.DBTrollTrain{}
|
||||||
|
if err = this.Get(uid, result); err != nil {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = nil
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
func (this *modelTroll) modifyTrollDataByObjId(uid string, data map[string]interface{}) error {
|
||||||
|
return this.Change(uid, data)
|
||||||
|
}
|
50
modules/troll/module.go
Normal file
50
modules/troll/module.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
模块名:Troll
|
||||||
|
描述:巨怪商队
|
||||||
|
开发:梅雄风
|
||||||
|
*/
|
||||||
|
package troll
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Troll struct {
|
||||||
|
modules.ModuleBase
|
||||||
|
modelTroll *modelTroll
|
||||||
|
api *apiComp
|
||||||
|
configure *configureComp
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewModule() core.IModule {
|
||||||
|
return &Troll{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Troll) GetType() core.M_Modules {
|
||||||
|
return comm.ModuleTroll
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Troll) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.ModuleBase.Init(service, module, options)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Troll) OnInstallComp() {
|
||||||
|
this.ModuleBase.OnInstallComp()
|
||||||
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||||
|
this.modelTroll = this.RegisterComp(new(modelTroll)).(*modelTroll)
|
||||||
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 接口信息
|
||||||
|
func (this *Troll) ModifyTrollData(uid string, data map[string]interface{}) (code pb.ErrorCode) {
|
||||||
|
err := this.modelTroll.modifyTrollDataByObjId(uid, data)
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
@ -465,6 +465,7 @@ type DBArenaUser struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
|
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称
|
||||||
Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像
|
Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像
|
||||||
@ -488,6 +489,31 @@ type DBArenaUser struct {
|
|||||||
Loc []float64 `protobuf:"fixed64,21,rep,packed,name=loc,proto3" json:"loc"` //地图索引 匹配系统使用
|
Loc []float64 `protobuf:"fixed64,21,rep,packed,name=loc,proto3" json:"loc"` //地图索引 匹配系统使用
|
||||||
Isdef bool `protobuf:"varint,22,opt,name=isdef,proto3" json:"isdef"` //是否设置防守
|
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
|
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
|
||||||
|
=======
|
||||||
|
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
|
||||||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称
|
||||||
|
Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像
|
||||||
|
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
|
||||||
|
Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` //积分
|
||||||
|
Ticket int32 `protobuf:"varint,6,opt,name=ticket,proto3" json:"ticket"` //挑战券
|
||||||
|
Dan int32 `protobuf:"varint,7,opt,name=dan,proto3" json:"dan"` //段位
|
||||||
|
Attack *DBPlayerBattleFormt `protobuf:"bytes,8,opt,name=attack,proto3" json:"attack"` //进攻阵型
|
||||||
|
Defend *DBPlayerBattleFormt `protobuf:"bytes,9,opt,name=defend,proto3" json:"defend"` //防守阵型
|
||||||
|
Streak int32 `protobuf:"varint,10,opt,name=streak,proto3" json:"streak"` //连胜
|
||||||
|
Attackrate int32 `protobuf:"varint,11,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率
|
||||||
|
Defendrate int32 `protobuf:"varint,12,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率
|
||||||
|
Rank int32 `protobuf:"varint,13,opt,name=rank,proto3" json:"rank"` //排名
|
||||||
|
Buynum int32 `protobuf:"varint,14,opt,name=buynum,proto3" json:"buynum"` //购买次数
|
||||||
|
Record []*DBArenaBattleRecord `protobuf:"bytes,15,rep,name=record,proto3" json:"record"` //战斗记录
|
||||||
|
Lastrtickettime int64 `protobuf:"varint,16,opt,name=lastrtickettime,proto3" json:"lastrtickettime"` //最后领劵时间
|
||||||
|
Attackwinuum int32 `protobuf:"varint,17,opt,name=attackwinuum,proto3" json:"attackwinuum"` //进攻胜利次数
|
||||||
|
Attacktotaluum int32 `protobuf:"varint,18,opt,name=attacktotaluum,proto3" json:"attacktotaluum"` //进攻总次数
|
||||||
|
Defendwinuum int32 `protobuf:"varint,19,opt,name=defendwinuum,proto3" json:"defendwinuum"` //防守胜利
|
||||||
|
Defendtotaluum int32 `protobuf:"varint,20,opt,name=defendtotaluum,proto3" json:"defendtotaluum"` //防守总
|
||||||
|
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]int64 `protobuf:"bytes,23,rep,name=npc,proto3" json:"npc" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // npc Cd
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBArenaUser) Reset() {
|
func (x *DBArenaUser) Reset() {
|
||||||
@ -676,13 +702,18 @@ func (x *DBArenaUser) GetIsdef() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
func (x *DBArenaUser) GetNpc() map[int32]*DBNpc {
|
func (x *DBArenaUser) GetNpc() map[int32]*DBNpc {
|
||||||
|
=======
|
||||||
|
func (x *DBArenaUser) GetNpc() map[int32]int64 {
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Npc
|
return x.Npc
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
// npc数据
|
// npc数据
|
||||||
type DBNpc struct {
|
type DBNpc struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -747,6 +778,8 @@ func (x *DBNpc) GetIndex() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
var File_arena_arena_db_proto protoreflect.FileDescriptor
|
var File_arena_arena_db_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_arena_arena_db_proto_rawDesc = []byte{
|
var file_arena_arena_db_proto_rawDesc = []byte{
|
||||||
@ -800,7 +833,11 @@ 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, 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,
|
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,
|
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61,
|
||||||
|
<<<<<<< HEAD
|
||||||
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x82, 0x06, 0x0a, 0x0b, 0x44, 0x42,
|
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x82, 0x06, 0x0a, 0x0b, 0x44, 0x42,
|
||||||
|
=======
|
||||||
|
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0b, 0x44, 0x42,
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
|
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,
|
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,
|
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||||
@ -844,6 +881,7 @@ var file_arena_arena_db_proto_rawDesc = []byte{
|
|||||||
0x14, 0x0a, 0x05, 0x69, 0x73, 0x64, 0x65, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
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,
|
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,
|
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72,
|
||||||
|
<<<<<<< HEAD
|
||||||
0x2e, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x70, 0x63, 0x1a, 0x3e,
|
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,
|
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,
|
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05,
|
||||||
@ -864,6 +902,24 @@ var file_arena_arena_db_proto_rawDesc = []byte{
|
|||||||
0x65, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12,
|
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,
|
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,
|
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, 0x36,
|
||||||
|
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, 0x14, 0x0a, 0x05,
|
||||||
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||||
|
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 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,
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -879,7 +935,11 @@ func file_arena_arena_db_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_arena_arena_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_arena_arena_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
|
<<<<<<< HEAD
|
||||||
var file_arena_arena_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_arena_arena_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||||
|
=======
|
||||||
|
var file_arena_arena_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
var file_arena_arena_db_proto_goTypes = []interface{}{
|
var file_arena_arena_db_proto_goTypes = []interface{}{
|
||||||
(BattleRecordState)(0), // 0: BattleRecordState
|
(BattleRecordState)(0), // 0: BattleRecordState
|
||||||
(*DBPlayerBattleFormt)(nil), // 1: DBPlayerBattleFormt
|
(*DBPlayerBattleFormt)(nil), // 1: DBPlayerBattleFormt
|
||||||
@ -887,18 +947,27 @@ var file_arena_arena_db_proto_goTypes = []interface{}{
|
|||||||
(*DBHeroBase)(nil), // 3: DBHeroBase
|
(*DBHeroBase)(nil), // 3: DBHeroBase
|
||||||
(*DBArenaBattleRecord)(nil), // 4: DBArenaBattleRecord
|
(*DBArenaBattleRecord)(nil), // 4: DBArenaBattleRecord
|
||||||
(*DBArenaUser)(nil), // 5: DBArenaUser
|
(*DBArenaUser)(nil), // 5: DBArenaUser
|
||||||
|
<<<<<<< HEAD
|
||||||
(*DBNpc)(nil), // 6: DBNpc
|
(*DBNpc)(nil), // 6: DBNpc
|
||||||
nil, // 7: DBArenaUser.NpcEntry
|
nil, // 7: DBArenaUser.NpcEntry
|
||||||
(*DBHero)(nil), // 8: DBHero
|
(*DBHero)(nil), // 8: DBHero
|
||||||
}
|
}
|
||||||
var file_arena_arena_db_proto_depIdxs = []int32{
|
var file_arena_arena_db_proto_depIdxs = []int32{
|
||||||
8, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero
|
8, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero
|
||||||
|
=======
|
||||||
|
nil, // 6: DBArenaUser.NpcEntry
|
||||||
|
(*DBHero)(nil), // 7: DBHero
|
||||||
|
}
|
||||||
|
var file_arena_arena_db_proto_depIdxs = []int32{
|
||||||
|
7, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
1, // 1: ArenaPlayer.defend:type_name -> DBPlayerBattleFormt
|
1, // 1: ArenaPlayer.defend:type_name -> DBPlayerBattleFormt
|
||||||
3, // 2: DBArenaBattleRecord.formt:type_name -> DBHeroBase
|
3, // 2: DBArenaBattleRecord.formt:type_name -> DBHeroBase
|
||||||
0, // 3: DBArenaBattleRecord.State:type_name -> BattleRecordState
|
0, // 3: DBArenaBattleRecord.State:type_name -> BattleRecordState
|
||||||
1, // 4: DBArenaUser.attack:type_name -> DBPlayerBattleFormt
|
1, // 4: DBArenaUser.attack:type_name -> DBPlayerBattleFormt
|
||||||
1, // 5: DBArenaUser.defend:type_name -> DBPlayerBattleFormt
|
1, // 5: DBArenaUser.defend:type_name -> DBPlayerBattleFormt
|
||||||
4, // 6: DBArenaUser.record:type_name -> DBArenaBattleRecord
|
4, // 6: DBArenaUser.record:type_name -> DBArenaBattleRecord
|
||||||
|
<<<<<<< HEAD
|
||||||
7, // 7: DBArenaUser.npc:type_name -> DBArenaUser.NpcEntry
|
7, // 7: DBArenaUser.npc:type_name -> DBArenaUser.NpcEntry
|
||||||
6, // 8: DBArenaUser.NpcEntry.value:type_name -> DBNpc
|
6, // 8: DBArenaUser.NpcEntry.value:type_name -> DBNpc
|
||||||
9, // [9:9] is the sub-list for method output_type
|
9, // [9:9] is the sub-list for method output_type
|
||||||
@ -906,6 +975,14 @@ var file_arena_arena_db_proto_depIdxs = []int32{
|
|||||||
9, // [9:9] is the sub-list for extension type_name
|
9, // [9:9] is the sub-list for extension type_name
|
||||||
9, // [9:9] is the sub-list for extension extendee
|
9, // [9:9] is the sub-list for extension extendee
|
||||||
0, // [0:9] is the sub-list for field type_name
|
0, // [0:9] is the sub-list for field type_name
|
||||||
|
=======
|
||||||
|
6, // 7: DBArenaUser.npc:type_name -> DBArenaUser.NpcEntry
|
||||||
|
8, // [8:8] is the sub-list for method output_type
|
||||||
|
8, // [8:8] is the sub-list for method input_type
|
||||||
|
8, // [8:8] is the sub-list for extension type_name
|
||||||
|
8, // [8:8] is the sub-list for extension extendee
|
||||||
|
0, // [0:8] is the sub-list for field type_name
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_arena_arena_db_proto_init() }
|
func init() { file_arena_arena_db_proto_init() }
|
||||||
@ -994,7 +1071,11 @@ func file_arena_arena_db_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_arena_arena_db_proto_rawDesc,
|
RawDescriptor: file_arena_arena_db_proto_rawDesc,
|
||||||
NumEnums: 1,
|
NumEnums: 1,
|
||||||
|
<<<<<<< HEAD
|
||||||
NumMessages: 7,
|
NumMessages: 7,
|
||||||
|
=======
|
||||||
|
NumMessages: 6,
|
||||||
|
>>>>>>> f0f849c1f3a6380ace601d5616a83a616ad30b7f
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
261
pb/troll_db.pb.go
Normal file
261
pb/troll_db.pb.go
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.28.0
|
||||||
|
// protoc v3.20.0
|
||||||
|
// source: troll/troll_db.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 巨怪列车
|
||||||
|
type DBTrollTrain struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||||
|
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||||
|
Items map[int32]int32 `protobuf:"bytes,3,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 货物
|
||||||
|
GridNum int32 `protobuf:"varint,4,opt,name=gridNum,proto3" json:"gridNum" bson:"gridNum"` //当前使用格子数量
|
||||||
|
TarinPos int32 `protobuf:"varint,5,opt,name=tarinPos,proto3" json:"tarinPos" bson:"tarinPos"` //火车位置
|
||||||
|
RangeId int32 `protobuf:"varint,6,opt,name=rangeId,proto3" json:"rangeId" bson:"rangeId"` //增长幅度
|
||||||
|
Buy int32 `protobuf:"varint,7,opt,name=buy,proto3" json:"buy"` // 挂机进货标准/千分比
|
||||||
|
Sell int32 `protobuf:"varint,8,opt,name=sell,proto3" json:"sell"` //挂机卖出标准/千分比
|
||||||
|
NpcLv int32 `protobuf:"varint,9,opt,name=npcLv,proto3" json:"npcLv" bson:"npcLv"` //npc 等级
|
||||||
|
NpcReward map[int32]int32 `protobuf:"bytes,10,rep,name=npcReward,proto3" json:"npcReward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"npcReward"` //npc奖励
|
||||||
|
TotalEarn int64 `protobuf:"varint,11,opt,name=totalEarn,proto3" json:"totalEarn" bson:"totalEarn"` //累计赚的钱
|
||||||
|
Ctime int64 `protobuf:"varint,12,opt,name=ctime,proto3" json:"ctime"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) Reset() {
|
||||||
|
*x = DBTrollTrain{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_db_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DBTrollTrain) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_db_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DBTrollTrain.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DBTrollTrain) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_db_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetUid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetItems() map[int32]int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Items
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetGridNum() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.GridNum
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetTarinPos() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TarinPos
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetRangeId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RangeId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetBuy() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Buy
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetSell() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Sell
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetNpcLv() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NpcLv
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetNpcReward() map[int32]int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NpcReward
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetTotalEarn() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TotalEarn
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBTrollTrain) GetCtime() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ctime
|
||||||
|
}
|
||||||
|
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, 0xd4, 0x03, 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,
|
||||||
|
0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f,
|
||||||
|
0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74,
|
||||||
|
0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x69,
|
||||||
|
0x64, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x69, 0x64,
|
||||||
|
0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x18,
|
||||||
|
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x72, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x12,
|
||||||
|
0x18, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05,
|
||||||
|
0x52, 0x07, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79,
|
||||||
|
0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73,
|
||||||
|
0x65, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x6e, 0x70, 0x63, 0x4c, 0x76, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
|
0x6e, 0x70, 0x63, 0x4c, 0x76, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x70, 0x63, 0x52, 0x65, 0x77, 0x61,
|
||||||
|
0x72, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f,
|
||||||
|
0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x70, 0x63, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||||
|
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6e, 0x70, 0x63, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||||
|
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x18, 0x0b,
|
||||||
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 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,
|
||||||
|
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, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_troll_troll_db_proto_rawDescOnce sync.Once
|
||||||
|
file_troll_troll_db_proto_rawDescData = file_troll_troll_db_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_troll_troll_db_proto_rawDescGZIP() []byte {
|
||||||
|
file_troll_troll_db_proto_rawDescOnce.Do(func() {
|
||||||
|
file_troll_troll_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_troll_troll_db_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_troll_troll_db_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_troll_troll_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
|
var file_troll_troll_db_proto_goTypes = []interface{}{
|
||||||
|
(*DBTrollTrain)(nil), // 0: DBTrollTrain
|
||||||
|
nil, // 1: DBTrollTrain.ItemsEntry
|
||||||
|
nil, // 2: DBTrollTrain.NpcRewardEntry
|
||||||
|
}
|
||||||
|
var file_troll_troll_db_proto_depIdxs = []int32{
|
||||||
|
1, // 0: DBTrollTrain.items:type_name -> DBTrollTrain.ItemsEntry
|
||||||
|
2, // 1: DBTrollTrain.npcReward:type_name -> DBTrollTrain.NpcRewardEntry
|
||||||
|
2, // [2:2] is the sub-list for method output_type
|
||||||
|
2, // [2:2] is the sub-list for method input_type
|
||||||
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
|
0, // [0:2] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_troll_troll_db_proto_init() }
|
||||||
|
func file_troll_troll_db_proto_init() {
|
||||||
|
if File_troll_troll_db_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_troll_troll_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DBTrollTrain); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_troll_troll_db_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 3,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_troll_troll_db_proto_goTypes,
|
||||||
|
DependencyIndexes: file_troll_troll_db_proto_depIdxs,
|
||||||
|
MessageInfos: file_troll_troll_db_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_troll_troll_db_proto = out.File
|
||||||
|
file_troll_troll_db_proto_rawDesc = nil
|
||||||
|
file_troll_troll_db_proto_goTypes = nil
|
||||||
|
file_troll_troll_db_proto_depIdxs = nil
|
||||||
|
}
|
602
pb/troll_msg.pb.go
Normal file
602
pb/troll_msg.pb.go
Normal file
@ -0,0 +1,602 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.28.0
|
||||||
|
// protoc v3.20.0
|
||||||
|
// source: troll/troll_msg.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 查询进度
|
||||||
|
type TrollGetListReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollGetListReq) Reset() {
|
||||||
|
*x = TrollGetListReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollGetListReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollGetListReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollGetListReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollGetListReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollGetListReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回进度信息
|
||||||
|
type TrollGetListResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBTrollTrain `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollGetListResp) Reset() {
|
||||||
|
*x = TrollGetListResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollGetListResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollGetListResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollGetListResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollGetListResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollGetListResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollGetListResp) GetData() *DBTrollTrain {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 买卖货物
|
||||||
|
type TrollBuyOrSellReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Items map[int32]int32 `protobuf:"bytes,1,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //买入货物的数量(负数为卖)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellReq) Reset() {
|
||||||
|
*x = TrollBuyOrSellReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollBuyOrSellReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollBuyOrSellReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollBuyOrSellReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellReq) GetItems() map[int32]int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Items
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrollBuyOrSellResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBTrollTrain `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellResp) Reset() {
|
||||||
|
*x = TrollBuyOrSellResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollBuyOrSellResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollBuyOrSellResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollBuyOrSellResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollBuyOrSellResp) GetData() *DBTrollTrain {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// afk 设置
|
||||||
|
type TrollAfkSetReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Buy int32 `protobuf:"varint,1,opt,name=buy,proto3" json:"buy"`
|
||||||
|
Sell int32 `protobuf:"varint,2,opt,name=sell,proto3" json:"sell"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetReq) Reset() {
|
||||||
|
*x = TrollAfkSetReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollAfkSetReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[4]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollAfkSetReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollAfkSetReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetReq) GetBuy() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Buy
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetReq) GetSell() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Sell
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrollAfkSetResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBTrollTrain `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetResp) Reset() {
|
||||||
|
*x = TrollAfkSetResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollAfkSetResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[5]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollAfkSetResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollAfkSetResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollAfkSetResp) GetData() *DBTrollTrain {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// npv等级奖励
|
||||||
|
type TrollNpcRewardReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
RewardId int32 `protobuf:"varint,1,opt,name=rewardId,proto3" json:"rewardId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardReq) Reset() {
|
||||||
|
*x = TrollNpcRewardReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollNpcRewardReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[6]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollNpcRewardReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollNpcRewardReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardReq) GetRewardId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RewardId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrollNpcRewardResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBTrollTrain `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardResp) Reset() {
|
||||||
|
*x = TrollNpcRewardResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[7]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TrollNpcRewardResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_troll_troll_msg_proto_msgTypes[7]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TrollNpcRewardResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TrollNpcRewardResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_troll_troll_msg_proto_rawDescGZIP(), []int{7}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TrollNpcRewardResp) GetData() *DBTrollTrain {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_troll_troll_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_troll_troll_msg_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x15, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5f, 0x6d, 0x73,
|
||||||
|
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x74,
|
||||||
|
0x72, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a,
|
||||||
|
0x0f, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
|
||||||
|
0x22, 0x35, 0x0a, 0x10, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69,
|
||||||
|
0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c,
|
||||||
|
0x6c, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a,
|
||||||
|
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x54,
|
||||||
|
0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71,
|
||||||
|
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65,
|
||||||
|
0x6d, 0x73, 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, 0x22, 0x37, 0x0a, 0x12,
|
||||||
|
0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x0d, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52,
|
||||||
|
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, 0x0e, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x41, 0x66,
|
||||||
|
0x6b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c,
|
||||||
|
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x22, 0x34, 0x0a,
|
||||||
|
0x0f, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x41, 0x66, 0x6b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
|
||||||
|
0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x64,
|
||||||
|
0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4e, 0x70, 0x63, 0x52,
|
||||||
|
0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x77, 0x61,
|
||||||
|
0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x77, 0x61,
|
||||||
|
0x72, 0x64, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x12, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4e, 0x70, 0x63,
|
||||||
|
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61,
|
||||||
|
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f,
|
||||||
|
0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_troll_troll_msg_proto_rawDescOnce sync.Once
|
||||||
|
file_troll_troll_msg_proto_rawDescData = file_troll_troll_msg_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_troll_troll_msg_proto_rawDescGZIP() []byte {
|
||||||
|
file_troll_troll_msg_proto_rawDescOnce.Do(func() {
|
||||||
|
file_troll_troll_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_troll_troll_msg_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_troll_troll_msg_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_troll_troll_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||||
|
var file_troll_troll_msg_proto_goTypes = []interface{}{
|
||||||
|
(*TrollGetListReq)(nil), // 0: TrollGetListReq
|
||||||
|
(*TrollGetListResp)(nil), // 1: TrollGetListResp
|
||||||
|
(*TrollBuyOrSellReq)(nil), // 2: TrollBuyOrSellReq
|
||||||
|
(*TrollBuyOrSellResp)(nil), // 3: TrollBuyOrSellResp
|
||||||
|
(*TrollAfkSetReq)(nil), // 4: TrollAfkSetReq
|
||||||
|
(*TrollAfkSetResp)(nil), // 5: TrollAfkSetResp
|
||||||
|
(*TrollNpcRewardReq)(nil), // 6: TrollNpcRewardReq
|
||||||
|
(*TrollNpcRewardResp)(nil), // 7: TrollNpcRewardResp
|
||||||
|
nil, // 8: TrollBuyOrSellReq.ItemsEntry
|
||||||
|
(*DBTrollTrain)(nil), // 9: DBTrollTrain
|
||||||
|
}
|
||||||
|
var file_troll_troll_msg_proto_depIdxs = []int32{
|
||||||
|
9, // 0: TrollGetListResp.data:type_name -> DBTrollTrain
|
||||||
|
8, // 1: TrollBuyOrSellReq.items:type_name -> TrollBuyOrSellReq.ItemsEntry
|
||||||
|
9, // 2: TrollBuyOrSellResp.data:type_name -> DBTrollTrain
|
||||||
|
9, // 3: TrollAfkSetResp.data:type_name -> DBTrollTrain
|
||||||
|
9, // 4: TrollNpcRewardResp.data:type_name -> DBTrollTrain
|
||||||
|
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_msg_proto_init() }
|
||||||
|
func file_troll_troll_msg_proto_init() {
|
||||||
|
if File_troll_troll_msg_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_troll_troll_db_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_troll_troll_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollGetListReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollGetListResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollBuyOrSellReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollBuyOrSellResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollAfkSetReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollAfkSetResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollNpcRewardReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_troll_troll_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TrollNpcRewardResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_troll_troll_msg_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 9,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_troll_troll_msg_proto_goTypes,
|
||||||
|
DependencyIndexes: file_troll_troll_msg_proto_depIdxs,
|
||||||
|
MessageInfos: file_troll_troll_msg_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_troll_troll_msg_proto = out.File
|
||||||
|
file_troll_troll_msg_proto_rawDesc = nil
|
||||||
|
file_troll_troll_msg_proto_goTypes = nil
|
||||||
|
file_troll_troll_msg_proto_depIdxs = nil
|
||||||
|
}
|
42
sys/configure/structs/Game.TrollCoefficient.go
Normal file
42
sys/configure/structs/Game.TrollCoefficient.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameTrollCoefficient struct {
|
||||||
|
_dataMap map[int32]*GameTrollCoefficientData
|
||||||
|
_dataList []*GameTrollCoefficientData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameTrollCoefficient(_buf []map[string]interface{}) (*GameTrollCoefficient, error) {
|
||||||
|
_dataList := make([]*GameTrollCoefficientData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameTrollCoefficientData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameTrollCoefficientData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Id] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameTrollCoefficient{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollCoefficient) GetDataMap() map[int32]*GameTrollCoefficientData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollCoefficient) GetDataList() []*GameTrollCoefficientData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollCoefficient) Get(key int32) *GameTrollCoefficientData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
sys/configure/structs/Game.TrollCoefficientData.go
Normal file
37
sys/configure/structs/Game.TrollCoefficientData.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameTrollCoefficientData struct {
|
||||||
|
Id int32
|
||||||
|
Coefficient string
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameTrollCoefficientData = -856241206
|
||||||
|
|
||||||
|
func (*GameTrollCoefficientData) GetTypeId() int32 {
|
||||||
|
return -856241206
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameTrollCoefficientData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Coefficient, _ok_ = _buf["coefficient"].(string); !_ok_ { err = errors.New("coefficient error"); return } }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameTrollCoefficientData(_buf map[string]interface{}) (*GameTrollCoefficientData, error) {
|
||||||
|
v := &GameTrollCoefficientData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
42
sys/configure/structs/Game.TrollGoods.go
Normal file
42
sys/configure/structs/Game.TrollGoods.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameTrollGoods struct {
|
||||||
|
_dataMap map[int32]*GameTrollGoodsData
|
||||||
|
_dataList []*GameTrollGoodsData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameTrollGoods(_buf []map[string]interface{}) (*GameTrollGoods, error) {
|
||||||
|
_dataList := make([]*GameTrollGoodsData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameTrollGoodsData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameTrollGoodsData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Id] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameTrollGoods{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollGoods) GetDataMap() map[int32]*GameTrollGoodsData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollGoods) GetDataList() []*GameTrollGoodsData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollGoods) Get(key int32) *GameTrollGoodsData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
53
sys/configure/structs/Game.TrollGoodsData.go
Normal file
53
sys/configure/structs/Game.TrollGoodsData.go
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameTrollGoodsData struct {
|
||||||
|
Id int32
|
||||||
|
Goodsname string
|
||||||
|
Goodsfor int32
|
||||||
|
Goodsinfor string
|
||||||
|
Goodsicon string
|
||||||
|
Goodsprice int32
|
||||||
|
StarMoney int32
|
||||||
|
Uptext string
|
||||||
|
Suptext string
|
||||||
|
Max int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameTrollGoodsData = 1425823147
|
||||||
|
|
||||||
|
func (*GameTrollGoodsData) GetTypeId() int32 {
|
||||||
|
return 1425823147
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameTrollGoodsData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Goodsname, _ok_ = _buf["goodsname"].(string); !_ok_ { err = errors.New("goodsname error"); return } }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["goodsfor"].(float64); !_ok_ { err = errors.New("goodsfor error"); return }; _v.Goodsfor = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Goodsinfor, _ok_ = _buf["goodsinfor"].(string); !_ok_ { err = errors.New("goodsinfor error"); return } }
|
||||||
|
{ var _ok_ bool; if _v.Goodsicon, _ok_ = _buf["goodsicon"].(string); !_ok_ { err = errors.New("goodsicon error"); return } }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["goodsprice"].(float64); !_ok_ { err = errors.New("goodsprice error"); return }; _v.Goodsprice = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star_money"].(float64); !_ok_ { err = errors.New("star_money error"); return }; _v.StarMoney = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Uptext, _ok_ = _buf["uptext"].(string); !_ok_ { err = errors.New("uptext error"); return } }
|
||||||
|
{ var _ok_ bool; if _v.Suptext, _ok_ = _buf["suptext"].(string); !_ok_ { err = errors.New("suptext error"); return } }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max"].(float64); !_ok_ { err = errors.New("max error"); return }; _v.Max = int32(_tempNum_) }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameTrollGoodsData(_buf map[string]interface{}) (*GameTrollGoodsData, error) {
|
||||||
|
v := &GameTrollGoodsData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
42
sys/configure/structs/Game.TrollLv.go
Normal file
42
sys/configure/structs/Game.TrollLv.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameTrollLv struct {
|
||||||
|
_dataMap map[int32]*GameTrollLvData
|
||||||
|
_dataList []*GameTrollLvData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameTrollLv(_buf []map[string]interface{}) (*GameTrollLv, error) {
|
||||||
|
_dataList := make([]*GameTrollLvData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameTrollLvData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameTrollLvData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Lv] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameTrollLv{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollLv) GetDataMap() map[int32]*GameTrollLvData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollLv) GetDataList() []*GameTrollLvData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollLv) Get(key int32) *GameTrollLvData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
67
sys/configure/structs/Game.TrollLvData.go
Normal file
67
sys/configure/structs/Game.TrollLvData.go
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameTrollLvData struct {
|
||||||
|
Lv int32
|
||||||
|
Money int32
|
||||||
|
Reword []*Gameatn
|
||||||
|
Model []string
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameTrollLvData = -595686743
|
||||||
|
|
||||||
|
func (*GameTrollLvData) GetTypeId() int32 {
|
||||||
|
return -595686743
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameTrollLvData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lv"].(float64); !_ok_ { err = errors.New("lv error"); return }; _v.Lv = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["money"].(float64); !_ok_ { err = errors.New("money error"); return }; _v.Money = int32(_tempNum_) }
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["reword"].([]interface{}); !_ok_ { err = errors.New("reword error"); return }
|
||||||
|
|
||||||
|
_v.Reword = make([]*Gameatn, 0, len(_arr_))
|
||||||
|
|
||||||
|
for _, _e_ := range _arr_ {
|
||||||
|
var _list_v_ *Gameatn
|
||||||
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||||
|
_v.Reword = append(_v.Reword, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["model"].([]interface{}); !_ok_ { err = errors.New("model error"); return }
|
||||||
|
|
||||||
|
_v.Model = make([]string, 0, len(_arr_))
|
||||||
|
|
||||||
|
for _, _e_ := range _arr_ {
|
||||||
|
var _list_v_ string
|
||||||
|
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
||||||
|
_v.Model = append(_v.Model, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameTrollLvData(_buf map[string]interface{}) (*GameTrollLvData, error) {
|
||||||
|
v := &GameTrollLvData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
42
sys/configure/structs/Game.TrollRule.go
Normal file
42
sys/configure/structs/Game.TrollRule.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameTrollRule struct {
|
||||||
|
_dataMap map[int32]*GameTrollRuleData
|
||||||
|
_dataList []*GameTrollRuleData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameTrollRule(_buf []map[string]interface{}) (*GameTrollRule, error) {
|
||||||
|
_dataList := make([]*GameTrollRuleData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameTrollRuleData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameTrollRuleData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Id] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameTrollRule{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollRule) GetDataMap() map[int32]*GameTrollRuleData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollRule) GetDataList() []*GameTrollRuleData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollRule) Get(key int32) *GameTrollRuleData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
sys/configure/structs/Game.TrollRuleData.go
Normal file
37
sys/configure/structs/Game.TrollRuleData.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameTrollRuleData struct {
|
||||||
|
Id int32
|
||||||
|
Quantity string
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameTrollRuleData = 902547931
|
||||||
|
|
||||||
|
func (*GameTrollRuleData) GetTypeId() int32 {
|
||||||
|
return 902547931
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameTrollRuleData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Quantity, _ok_ = _buf["quantity"].(string); !_ok_ { err = errors.New("quantity error"); return } }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameTrollRuleData(_buf map[string]interface{}) (*GameTrollRuleData, error) {
|
||||||
|
v := &GameTrollRuleData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
42
sys/configure/structs/Game.TrollTrain.go
Normal file
42
sys/configure/structs/Game.TrollTrain.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameTrollTrain struct {
|
||||||
|
_dataMap map[int32]*GameTrollTrainData
|
||||||
|
_dataList []*GameTrollTrainData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameTrollTrain(_buf []map[string]interface{}) (*GameTrollTrain, error) {
|
||||||
|
_dataList := make([]*GameTrollTrainData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameTrollTrainData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameTrollTrainData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Id] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameTrollTrain{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollTrain) GetDataMap() map[int32]*GameTrollTrainData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollTrain) GetDataList() []*GameTrollTrainData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameTrollTrain) Get(key int32) *GameTrollTrainData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
43
sys/configure/structs/Game.TrollTrainData.go
Normal file
43
sys/configure/structs/Game.TrollTrainData.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameTrollTrainData struct {
|
||||||
|
Id int32
|
||||||
|
Name string
|
||||||
|
Information string
|
||||||
|
Ico string
|
||||||
|
Time int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameTrollTrainData = 935593821
|
||||||
|
|
||||||
|
func (*GameTrollTrainData) GetTypeId() int32 {
|
||||||
|
return 935593821
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameTrollTrainData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } }
|
||||||
|
{ var _ok_ bool; if _v.Information, _ok_ = _buf["information"].(string); !_ok_ { err = errors.New("information error"); return } }
|
||||||
|
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameTrollTrainData(_buf map[string]interface{}) (*GameTrollTrainData, error) {
|
||||||
|
v := &GameTrollTrainData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
@ -115,6 +115,11 @@ type Tables struct {
|
|||||||
HeroTalent *GameHeroTalent
|
HeroTalent *GameHeroTalent
|
||||||
TalentSkill *GameTalentSkill
|
TalentSkill *GameTalentSkill
|
||||||
ItemBox *GameItemBox
|
ItemBox *GameItemBox
|
||||||
|
TrollRule *GameTrollRule
|
||||||
|
TrollGoods *GameTrollGoods
|
||||||
|
TrollTrain *GameTrollTrain
|
||||||
|
TrollLv *GameTrollLv
|
||||||
|
TrollCoefficient *GameTrollCoefficient
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||||
@ -746,6 +751,35 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.ItemBox, err = NewGameItemBox(buf); err != nil {
|
if tables.ItemBox, err = NewGameItemBox(buf); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if buf, err = loader("game_trollrule"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.TrollRule, err = NewGameTrollRule(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if buf, err = loader("game_trollgoods"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.TrollGoods, err = NewGameTrollGoods(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if buf, err = loader("game_trolltrain"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.TrollTrain, err = NewGameTrollTrain(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if buf, err = loader("game_trolllv"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.TrollLv, err = NewGameTrollLv(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if buf, err = loader("game_trollcoefficient"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.TrollCoefficient, err = NewGameTrollCoefficient(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return tables, nil
|
return tables, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user