Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a70204f3b1
@ -52,7 +52,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
}
|
||||
for _, k1 := range cityInfo.Like {
|
||||
if k == k1 {
|
||||
if v < caravan.Items[k].Count {
|
||||
if v <= caravan.Items[k].Count {
|
||||
caravan.Items[k].Count -= v
|
||||
} else {
|
||||
code = pb.ErrorCode_TrollSellMax // 卖出数量不足
|
||||
@ -73,6 +73,13 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
}
|
||||
addScore += price * v // 卖出收益
|
||||
}
|
||||
if this.module.ArrayBag(caravan, upperLimit) { // 背包满了
|
||||
code = pb.ErrorCode_TrollMaxItemCount
|
||||
return
|
||||
}
|
||||
// 统计 收益
|
||||
caravan.Profit += int64(addScore)
|
||||
update["profit"] = caravan.Profit
|
||||
} else { // 买入
|
||||
for k, v := range req.Items {
|
||||
items, ok := caravan.Items[k]
|
||||
@ -99,10 +106,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
}
|
||||
}
|
||||
caravan.Items[k].Count += v
|
||||
if this.module.ArrayBag(caravan, upperLimit) { // 背包满了
|
||||
code = pb.ErrorCode_TrollMaxItemCount
|
||||
return
|
||||
}
|
||||
|
||||
totla += price * v
|
||||
caravan.Items[k].Price = totla / caravan.Items[k].Count
|
||||
// 同步更新该城市的 出售货物信息
|
||||
@ -116,6 +120,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
}
|
||||
addScore -= price * v
|
||||
}
|
||||
if this.module.ArrayBag(caravan, upperLimit) { // 背包满了
|
||||
code = pb.ErrorCode_TrollMaxItemCount
|
||||
return
|
||||
}
|
||||
}
|
||||
if code = this.module.DispenseRes(session, []*cfg.Gameatn{{
|
||||
A: "attr",
|
||||
@ -126,6 +134,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
}
|
||||
update["item"] = caravan.Items
|
||||
update["baglimit"] = caravan.Baglimit
|
||||
update["useCount"] = caravan.UseCount // 更新背包使用数量
|
||||
this.module.modelCaravan.modifyCaravanDataByObjId(session.GetUserId(), update)
|
||||
session.SendMsg(string(this.module.GetType()), "buyorsell", &pb.CaravanBuyOrSellResp{
|
||||
Data: caravan,
|
||||
|
@ -9,11 +9,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
game_caravan = "game_itinerant_city.json"
|
||||
game_caravan_lv = "game_itinerant_lv.json"
|
||||
game_caravan_reward = "game_itinerant_reward.json"
|
||||
game_caravan_thing = "game_itinerant_thing.json"
|
||||
game_itinerant_event = "game_itinerant_event.json"
|
||||
game_caravan = "game_caravan_city.json"
|
||||
game_caravan_lv = "game_caravan_lv.json"
|
||||
game_caravan_reward = "game_caravan_reward.json"
|
||||
game_caravan_thing = "game_caravan_thing.json"
|
||||
game_caravan_event = "game_caravan_event.json"
|
||||
)
|
||||
|
||||
///配置管理基础组件
|
||||
@ -26,11 +26,11 @@ type configureComp struct {
|
||||
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.module = module.(*Caravan)
|
||||
this.LoadConfigure(game_caravan, cfg.NewGameitinerant_city)
|
||||
this.LoadConfigure(game_caravan_lv, cfg.NewGameitinerant_lv)
|
||||
this.LoadConfigure(game_caravan_reward, cfg.NewGameitinerant_reward)
|
||||
this.LoadConfigure(game_caravan_thing, cfg.NewGameitinerant_thing)
|
||||
this.LoadConfigure(game_itinerant_event, cfg.NewGameitinerant_event)
|
||||
this.LoadConfigure(game_caravan, cfg.NewGameCaravanCity)
|
||||
this.LoadConfigure(game_caravan_lv, cfg.NewGameCaravanLv)
|
||||
this.LoadConfigure(game_caravan_reward, cfg.NewGameCaravanReward)
|
||||
this.LoadConfigure(game_caravan_thing, cfg.NewGameCaravanThing)
|
||||
this.LoadConfigure(game_caravan_event, cfg.NewGameCaravanRvent)
|
||||
return
|
||||
}
|
||||
|
||||
@ -52,9 +52,9 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
|
||||
}
|
||||
|
||||
// 获取列车货物信息
|
||||
func (this *configureComp) GetCaravanCity(cityId int32) (data *cfg.Gameitinerant_cityData) {
|
||||
func (this *configureComp) GetCaravanCity(cityId int32) (data *cfg.GameCaravanCityData) {
|
||||
if v, err := this.GetConfigure(game_caravan); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_city); ok {
|
||||
if configure, ok := v.(*cfg.GameCaravanCity); ok {
|
||||
data = configure.Get(cityId)
|
||||
return
|
||||
}
|
||||
@ -65,9 +65,9 @@ func (this *configureComp) GetCaravanCity(cityId int32) (data *cfg.Gameitinerant
|
||||
}
|
||||
|
||||
// 获取货物基本信息
|
||||
func (this *configureComp) GetCaravanLv(lv int32) (data *cfg.Gameitinerant_lvData) {
|
||||
func (this *configureComp) GetCaravanLv(lv int32) (data *cfg.GameCaravanLvData) {
|
||||
if v, err := this.GetConfigure(game_caravan_lv); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_lv); ok {
|
||||
if configure, ok := v.(*cfg.GameCaravanLv); ok {
|
||||
data = configure.Get(lv)
|
||||
return
|
||||
}
|
||||
@ -77,9 +77,9 @@ func (this *configureComp) GetCaravanLv(lv int32) (data *cfg.Gameitinerant_lvDat
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetCaravanGoods(itemId int32) (data *cfg.Gameitinerant_thingData) {
|
||||
func (this *configureComp) GetCaravanGoods(itemId int32) (data *cfg.GameCaravanThingData) {
|
||||
if v, err := this.GetConfigure(game_caravan_thing); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_thing); ok {
|
||||
if configure, ok := v.(*cfg.GameCaravanThing); ok {
|
||||
data = configure.Get(itemId)
|
||||
return
|
||||
}
|
||||
@ -89,9 +89,9 @@ func (this *configureComp) GetCaravanGoods(itemId int32) (data *cfg.Gameitineran
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetAllCaravanCity() (data []*cfg.Gameitinerant_cityData) {
|
||||
func (this *configureComp) GetAllCaravanCity() (data []*cfg.GameCaravanCityData) {
|
||||
if v, err := this.GetConfigure(game_caravan); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_city); ok {
|
||||
if configure, ok := v.(*cfg.GameCaravanCity); ok {
|
||||
for _, v := range configure.GetDataList() {
|
||||
data = append(data, v)
|
||||
}
|
||||
@ -102,9 +102,9 @@ func (this *configureComp) GetAllCaravanCity() (data []*cfg.Gameitinerant_cityDa
|
||||
}
|
||||
return
|
||||
}
|
||||
func (this *configureComp) GetAllCaravanItem() (data []*cfg.Gameitinerant_thingData) {
|
||||
func (this *configureComp) GetAllCaravanItem() (data []*cfg.GameCaravanThingData) {
|
||||
if v, err := this.GetConfigure(game_caravan_thing); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_thing); ok {
|
||||
if configure, ok := v.(*cfg.GameCaravanThing); ok {
|
||||
for _, v := range configure.GetDataList() {
|
||||
data = append(data, v)
|
||||
}
|
||||
@ -117,9 +117,9 @@ func (this *configureComp) GetAllCaravanItem() (data []*cfg.Gameitinerant_thingD
|
||||
}
|
||||
|
||||
// 获取随机事件
|
||||
func (this *configureComp) GetCaravanEventById(id int32) (data *cfg.Gameitinerant_eventData) {
|
||||
if v, err := this.GetConfigure(game_itinerant_event); err == nil {
|
||||
if configure, ok := v.(*cfg.Gameitinerant_event); ok {
|
||||
func (this *configureComp) GetCaravanEventById(id int32) (data *cfg.GameCaravanRventData) {
|
||||
if v, err := this.GetConfigure(game_caravan_event); err == nil {
|
||||
if configure, ok := v.(*cfg.GameCaravanRvent); ok {
|
||||
data = configure.Get(id)
|
||||
return
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ func (this *modelCaravan) getCaravanList(uid string) (result *pb.DBCaravan, err
|
||||
result.Id = primitive.NewObjectID().Hex()
|
||||
result.Resettime = configure.Now().Unix() // 设置起始刷新时间
|
||||
result.Lv = 1
|
||||
|
||||
if conf := this.module.configure.GetCaravanLv(1); conf != nil {
|
||||
result.Baglimit = conf.Bagtop
|
||||
}
|
||||
|
@ -320,5 +320,23 @@ func (this *Caravan) ArrayBag(data *pb.DBCaravan, limit int32) (bFull bool) {
|
||||
if count > data.Baglimit {
|
||||
return false
|
||||
}
|
||||
data.UseCount = count
|
||||
return true
|
||||
}
|
||||
|
||||
// 校验商队等级
|
||||
func (this *Caravan) CheckCaravavLvUp(data *pb.DBCaravan) (curLv int32) {
|
||||
curLv = data.Lv
|
||||
for {
|
||||
curLv++
|
||||
if conf := this.configure.GetCaravanLv(curLv); conf != nil {
|
||||
if conf.Newmoneyexp > int32(data.Profit) {
|
||||
curLv -= 1
|
||||
break
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return curLv
|
||||
}
|
||||
|
@ -126,10 +126,6 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
||||
if v.HeroID == talent.HeroId { // 找到对应的英雄ID
|
||||
this.module.modelHero.setTalentProperty(v, talentConf)
|
||||
chanegCard = append(chanegCard, v) // 添加推送属性变化信息
|
||||
// 天赋学技能
|
||||
if talentConf.Skill != 0 {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
42
sys/configure/structs/Game.CaravanBattle.go
Normal file
42
sys/configure/structs/Game.CaravanBattle.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 GameCaravanBattle struct {
|
||||
_dataMap map[int32]*GameCaravanBattleData
|
||||
_dataList []*GameCaravanBattleData
|
||||
}
|
||||
|
||||
func NewGameCaravanBattle(_buf []map[string]interface{}) (*GameCaravanBattle, error) {
|
||||
_dataList := make([]*GameCaravanBattleData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanBattleData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanBattleData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanBattle{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanBattle) GetDataMap() map[int32]*GameCaravanBattleData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanBattle) GetDataList() []*GameCaravanBattleData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanBattle) Get(key int32) *GameCaravanBattleData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_battleData struct {
|
||||
type GameCaravanBattleData struct {
|
||||
Id int32
|
||||
FormatList []int32
|
||||
BattleReadyID int32
|
||||
@ -18,13 +18,13 @@ type Gameitinerant_battleData struct {
|
||||
Playexp *Gameatn
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_battleData = -635912269
|
||||
const TypeId_GameCaravanBattleData = 520687388
|
||||
|
||||
func (*Gameitinerant_battleData) GetTypeId() int32 {
|
||||
return -635912269
|
||||
func (*GameCaravanBattleData) GetTypeId() int32 {
|
||||
return 520687388
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_battleData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanBattleData)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 _arr_ []interface{}
|
||||
@ -59,8 +59,8 @@ func (_v *Gameitinerant_battleData)Deserialize(_buf map[string]interface{}) (err
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_battleData(_buf map[string]interface{}) (*Gameitinerant_battleData, error) {
|
||||
v := &Gameitinerant_battleData{}
|
||||
func DeserializeGameCaravanBattleData(_buf map[string]interface{}) (*GameCaravanBattleData, error) {
|
||||
v := &GameCaravanBattleData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanCity.go
Normal file
42
sys/configure/structs/Game.CaravanCity.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 GameCaravanCity struct {
|
||||
_dataMap map[int32]*GameCaravanCityData
|
||||
_dataList []*GameCaravanCityData
|
||||
}
|
||||
|
||||
func NewGameCaravanCity(_buf []map[string]interface{}) (*GameCaravanCity, error) {
|
||||
_dataList := make([]*GameCaravanCityData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanCityData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanCityData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanCity{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanCity) GetDataMap() map[int32]*GameCaravanCityData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanCity) GetDataList() []*GameCaravanCityData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanCity) Get(key int32) *GameCaravanCityData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_cityData struct {
|
||||
type GameCaravanCityData struct {
|
||||
Id int32
|
||||
Citylink []int32
|
||||
Cityticket []*Gameatn
|
||||
@ -33,13 +33,13 @@ type Gameitinerant_cityData struct {
|
||||
Cityevent []int32
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_cityData = 675778342
|
||||
const TypeId_GameCaravanCityData = 145138895
|
||||
|
||||
func (*Gameitinerant_cityData) GetTypeId() int32 {
|
||||
return 675778342
|
||||
func (*GameCaravanCityData) GetTypeId() int32 {
|
||||
return 145138895
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_cityData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanCityData)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 _arr_ []interface{}
|
||||
@ -141,8 +141,8 @@ func (_v *Gameitinerant_cityData)Deserialize(_buf map[string]interface{}) (err e
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_cityData(_buf map[string]interface{}) (*Gameitinerant_cityData, error) {
|
||||
v := &Gameitinerant_cityData{}
|
||||
func DeserializeGameCaravanCityData(_buf map[string]interface{}) (*GameCaravanCityData, error) {
|
||||
v := &GameCaravanCityData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanLv.go
Normal file
42
sys/configure/structs/Game.CaravanLv.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 GameCaravanLv struct {
|
||||
_dataMap map[int32]*GameCaravanLvData
|
||||
_dataList []*GameCaravanLvData
|
||||
}
|
||||
|
||||
func NewGameCaravanLv(_buf []map[string]interface{}) (*GameCaravanLv, error) {
|
||||
_dataList := make([]*GameCaravanLvData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanLvData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanLvData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Lv] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanLv{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanLv) GetDataMap() map[int32]*GameCaravanLvData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanLv) GetDataList() []*GameCaravanLvData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanLv) Get(key int32) *GameCaravanLvData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_lvData struct {
|
||||
type GameCaravanLvData struct {
|
||||
Lv int32
|
||||
Newmoneyexp int32
|
||||
Bagtop int32
|
||||
@ -22,13 +22,13 @@ type Gameitinerant_lvData struct {
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_lvData = 1265566725
|
||||
const TypeId_GameCaravanLvData = 1421438958
|
||||
|
||||
func (*Gameitinerant_lvData) GetTypeId() int32 {
|
||||
return 1265566725
|
||||
func (*GameCaravanLvData) GetTypeId() int32 {
|
||||
return 1421438958
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_lvData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanLvData)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["newmoneyexp"].(float64); !_ok_ { err = errors.New("newmoneyexp error"); return }; _v.Newmoneyexp = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bagtop"].(float64); !_ok_ { err = errors.New("bagtop error"); return }; _v.Bagtop = int32(_tempNum_) }
|
||||
@ -54,8 +54,8 @@ func (_v *Gameitinerant_lvData)Deserialize(_buf map[string]interface{}) (err err
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_lvData(_buf map[string]interface{}) (*Gameitinerant_lvData, error) {
|
||||
v := &Gameitinerant_lvData{}
|
||||
func DeserializeGameCaravanLvData(_buf map[string]interface{}) (*GameCaravanLvData, error) {
|
||||
v := &GameCaravanLvData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanRank.go
Normal file
42
sys/configure/structs/Game.CaravanRank.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 GameCaravanRank struct {
|
||||
_dataMap map[int32]*GameCaravanRankData
|
||||
_dataList []*GameCaravanRankData
|
||||
}
|
||||
|
||||
func NewGameCaravanRank(_buf []map[string]interface{}) (*GameCaravanRank, error) {
|
||||
_dataList := make([]*GameCaravanRankData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanRankData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanRankData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanRank{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanRank) GetDataMap() map[int32]*GameCaravanRankData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanRank) GetDataList() []*GameCaravanRankData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanRank) Get(key int32) *GameCaravanRankData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,19 +10,19 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_rankData struct {
|
||||
type GameCaravanRankData struct {
|
||||
Id int32
|
||||
Group int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_rankData = -1941636761
|
||||
const TypeId_GameCaravanRankData = 1822691088
|
||||
|
||||
func (*Gameitinerant_rankData) GetTypeId() int32 {
|
||||
return -1941636761
|
||||
func (*GameCaravanRankData) GetTypeId() int32 {
|
||||
return 1822691088
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_rankData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanRankData)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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
|
||||
{
|
||||
@ -42,8 +42,8 @@ func (_v *Gameitinerant_rankData)Deserialize(_buf map[string]interface{}) (err e
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_rankData(_buf map[string]interface{}) (*Gameitinerant_rankData, error) {
|
||||
v := &Gameitinerant_rankData{}
|
||||
func DeserializeGameCaravanRankData(_buf map[string]interface{}) (*GameCaravanRankData, error) {
|
||||
v := &GameCaravanRankData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanReward.go
Normal file
42
sys/configure/structs/Game.CaravanReward.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 GameCaravanReward struct {
|
||||
_dataMap map[int32]*GameCaravanRewardData
|
||||
_dataList []*GameCaravanRewardData
|
||||
}
|
||||
|
||||
func NewGameCaravanReward(_buf []map[string]interface{}) (*GameCaravanReward, error) {
|
||||
_dataList := make([]*GameCaravanRewardData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanRewardData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanRewardData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Key] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanReward{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanReward) GetDataMap() map[int32]*GameCaravanRewardData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanReward) GetDataList() []*GameCaravanRewardData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanReward) Get(key int32) *GameCaravanRewardData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,20 +10,20 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_rewardData struct {
|
||||
type GameCaravanRewardData struct {
|
||||
Key int32
|
||||
Moneystart int32
|
||||
Moneyend int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_rewardData = -998397270
|
||||
const TypeId_GameCaravanRewardData = 158202387
|
||||
|
||||
func (*Gameitinerant_rewardData) GetTypeId() int32 {
|
||||
return -998397270
|
||||
func (*GameCaravanRewardData) GetTypeId() int32 {
|
||||
return 158202387
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_rewardData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanRewardData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["moneystart"].(float64); !_ok_ { err = errors.New("moneystart error"); return }; _v.Moneystart = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["moneyend"].(float64); !_ok_ { err = errors.New("moneyend error"); return }; _v.Moneyend = int32(_tempNum_) }
|
||||
@ -44,8 +44,8 @@ func (_v *Gameitinerant_rewardData)Deserialize(_buf map[string]interface{}) (err
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_rewardData(_buf map[string]interface{}) (*Gameitinerant_rewardData, error) {
|
||||
v := &Gameitinerant_rewardData{}
|
||||
func DeserializeGameCaravanRewardData(_buf map[string]interface{}) (*GameCaravanRewardData, error) {
|
||||
v := &GameCaravanRewardData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanRvent.go
Normal file
42
sys/configure/structs/Game.CaravanRvent.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 GameCaravanRvent struct {
|
||||
_dataMap map[int32]*GameCaravanRventData
|
||||
_dataList []*GameCaravanRventData
|
||||
}
|
||||
|
||||
func NewGameCaravanRvent(_buf []map[string]interface{}) (*GameCaravanRvent, error) {
|
||||
_dataList := make([]*GameCaravanRventData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanRventData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanRventData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanRvent{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanRvent) GetDataMap() map[int32]*GameCaravanRventData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanRvent) GetDataList() []*GameCaravanRventData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanRvent) Get(key int32) *GameCaravanRventData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_eventData struct {
|
||||
type GameCaravanRventData struct {
|
||||
Id int32
|
||||
Eventtype int32
|
||||
Mustdo int32
|
||||
@ -28,13 +28,13 @@ type Gameitinerant_eventData struct {
|
||||
Eventtime int32
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_eventData = 636921875
|
||||
const TypeId_GameCaravanRventData = -655103337
|
||||
|
||||
func (*Gameitinerant_eventData) GetTypeId() int32 {
|
||||
return 636921875
|
||||
func (*GameCaravanRventData) GetTypeId() int32 {
|
||||
return -655103337
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_eventData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanRventData)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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["eventtype"].(float64); !_ok_ { err = errors.New("eventtype error"); return }; _v.Eventtype = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["mustdo"].(float64); !_ok_ { err = errors.New("mustdo error"); return }; _v.Mustdo = int32(_tempNum_) }
|
||||
@ -92,8 +92,8 @@ func (_v *Gameitinerant_eventData)Deserialize(_buf map[string]interface{}) (err
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_eventData(_buf map[string]interface{}) (*Gameitinerant_eventData, error) {
|
||||
v := &Gameitinerant_eventData{}
|
||||
func DeserializeGameCaravanRventData(_buf map[string]interface{}) (*GameCaravanRventData, error) {
|
||||
v := &GameCaravanRventData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.CaravanThing.go
Normal file
42
sys/configure/structs/Game.CaravanThing.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 GameCaravanThing struct {
|
||||
_dataMap map[int32]*GameCaravanThingData
|
||||
_dataList []*GameCaravanThingData
|
||||
}
|
||||
|
||||
func NewGameCaravanThing(_buf []map[string]interface{}) (*GameCaravanThing, error) {
|
||||
_dataList := make([]*GameCaravanThingData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameCaravanThingData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameCaravanThingData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameCaravanThing{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameCaravanThing) GetDataMap() map[int32]*GameCaravanThingData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameCaravanThing) GetDataList() []*GameCaravanThingData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameCaravanThing) Get(key int32) *GameCaravanThingData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Gameitinerant_thingData struct {
|
||||
type GameCaravanThingData struct {
|
||||
Id int32
|
||||
Goodsname string
|
||||
Goodsinfor string
|
||||
@ -28,13 +28,13 @@ type Gameitinerant_thingData struct {
|
||||
Goodsnum int32
|
||||
}
|
||||
|
||||
const TypeId_Gameitinerant_thingData = -91590553
|
||||
const TypeId_GameCaravanThingData = 638455774
|
||||
|
||||
func (*Gameitinerant_thingData) GetTypeId() int32 {
|
||||
return -91590553
|
||||
func (*GameCaravanThingData) GetTypeId() int32 {
|
||||
return 638455774
|
||||
}
|
||||
|
||||
func (_v *Gameitinerant_thingData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameCaravanThingData)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; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["goodsname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Goodsname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Goodsname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["goodsinfor"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Goodsinfor error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Goodsinfor, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
@ -118,8 +118,8 @@ func (_v *Gameitinerant_thingData)Deserialize(_buf map[string]interface{}) (err
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameitinerant_thingData(_buf map[string]interface{}) (*Gameitinerant_thingData, error) {
|
||||
v := &Gameitinerant_thingData{}
|
||||
func DeserializeGameCaravanThingData(_buf map[string]interface{}) (*GameCaravanThingData, error) {
|
||||
v := &GameCaravanThingData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_battle struct {
|
||||
_dataMap map[int32]*Gameitinerant_battleData
|
||||
_dataList []*Gameitinerant_battleData
|
||||
}
|
||||
|
||||
func NewGameitinerant_battle(_buf []map[string]interface{}) (*Gameitinerant_battle, error) {
|
||||
_dataList := make([]*Gameitinerant_battleData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_battleData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_battleData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_battle{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_battle) GetDataMap() map[int32]*Gameitinerant_battleData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_battle) GetDataList() []*Gameitinerant_battleData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_battle) Get(key int32) *Gameitinerant_battleData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_city struct {
|
||||
_dataMap map[int32]*Gameitinerant_cityData
|
||||
_dataList []*Gameitinerant_cityData
|
||||
}
|
||||
|
||||
func NewGameitinerant_city(_buf []map[string]interface{}) (*Gameitinerant_city, error) {
|
||||
_dataList := make([]*Gameitinerant_cityData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_cityData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_cityData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_city{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_city) GetDataMap() map[int32]*Gameitinerant_cityData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_city) GetDataList() []*Gameitinerant_cityData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_city) Get(key int32) *Gameitinerant_cityData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_event struct {
|
||||
_dataMap map[int32]*Gameitinerant_eventData
|
||||
_dataList []*Gameitinerant_eventData
|
||||
}
|
||||
|
||||
func NewGameitinerant_event(_buf []map[string]interface{}) (*Gameitinerant_event, error) {
|
||||
_dataList := make([]*Gameitinerant_eventData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_eventData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_eventData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_event{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_event) GetDataMap() map[int32]*Gameitinerant_eventData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_event) GetDataList() []*Gameitinerant_eventData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_event) Get(key int32) *Gameitinerant_eventData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_lv struct {
|
||||
_dataMap map[int32]*Gameitinerant_lvData
|
||||
_dataList []*Gameitinerant_lvData
|
||||
}
|
||||
|
||||
func NewGameitinerant_lv(_buf []map[string]interface{}) (*Gameitinerant_lv, error) {
|
||||
_dataList := make([]*Gameitinerant_lvData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_lvData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_lvData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Lv] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_lv{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_lv) GetDataMap() map[int32]*Gameitinerant_lvData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_lv) GetDataList() []*Gameitinerant_lvData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_lv) Get(key int32) *Gameitinerant_lvData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_rank struct {
|
||||
_dataMap map[int32]*Gameitinerant_rankData
|
||||
_dataList []*Gameitinerant_rankData
|
||||
}
|
||||
|
||||
func NewGameitinerant_rank(_buf []map[string]interface{}) (*Gameitinerant_rank, error) {
|
||||
_dataList := make([]*Gameitinerant_rankData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_rankData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_rankData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_rank{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_rank) GetDataMap() map[int32]*Gameitinerant_rankData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_rank) GetDataList() []*Gameitinerant_rankData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_rank) Get(key int32) *Gameitinerant_rankData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_reward struct {
|
||||
_dataMap map[int32]*Gameitinerant_rewardData
|
||||
_dataList []*Gameitinerant_rewardData
|
||||
}
|
||||
|
||||
func NewGameitinerant_reward(_buf []map[string]interface{}) (*Gameitinerant_reward, error) {
|
||||
_dataList := make([]*Gameitinerant_rewardData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_rewardData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_rewardData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Key] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_reward{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_reward) GetDataMap() map[int32]*Gameitinerant_rewardData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_reward) GetDataList() []*Gameitinerant_rewardData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_reward) Get(key int32) *Gameitinerant_rewardData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Gameitinerant_thing struct {
|
||||
_dataMap map[int32]*Gameitinerant_thingData
|
||||
_dataList []*Gameitinerant_thingData
|
||||
}
|
||||
|
||||
func NewGameitinerant_thing(_buf []map[string]interface{}) (*Gameitinerant_thing, error) {
|
||||
_dataList := make([]*Gameitinerant_thingData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Gameitinerant_thingData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameitinerant_thingData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Gameitinerant_thing{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_thing) GetDataMap() map[int32]*Gameitinerant_thingData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_thing) GetDataList() []*Gameitinerant_thingData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Gameitinerant_thing) Get(key int32) *Gameitinerant_thingData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -171,13 +171,13 @@ type Tables struct {
|
||||
Potions *GamePotions
|
||||
SellCoefficient *GameSellCoefficient
|
||||
Lottery *GameLottery
|
||||
itinerant_city *Gameitinerant_city
|
||||
itinerant_thing *Gameitinerant_thing
|
||||
itinerant_lv *Gameitinerant_lv
|
||||
itinerant_reward *Gameitinerant_reward
|
||||
itinerant_rank *Gameitinerant_rank
|
||||
itinerant_battle *Gameitinerant_battle
|
||||
itinerant_event *Gameitinerant_event
|
||||
CaravanCity *GameCaravanCity
|
||||
CaravanThing *GameCaravanThing
|
||||
CaravanLv *GameCaravanLv
|
||||
CaravanReward *GameCaravanReward
|
||||
CaravanRank *GameCaravanRank
|
||||
CaravanBattle *GameCaravanBattle
|
||||
CaravanRvent *GameCaravanRvent
|
||||
NewRedDot *GameNewRedDot
|
||||
Talent *GameTalent
|
||||
Favorability *GameFavorability
|
||||
@ -1163,46 +1163,46 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.Lottery, err = NewGameLottery(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_city") ; err != nil {
|
||||
if buf, err = loader("game_caravancity") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_city, err = NewGameitinerant_city(buf) ; err != nil {
|
||||
if tables.CaravanCity, err = NewGameCaravanCity(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_thing") ; err != nil {
|
||||
if buf, err = loader("game_caravanthing") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_thing, err = NewGameitinerant_thing(buf) ; err != nil {
|
||||
if tables.CaravanThing, err = NewGameCaravanThing(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_lv") ; err != nil {
|
||||
if buf, err = loader("game_caravanlv") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_lv, err = NewGameitinerant_lv(buf) ; err != nil {
|
||||
if tables.CaravanLv, err = NewGameCaravanLv(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_reward") ; err != nil {
|
||||
if buf, err = loader("game_caravanreward") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_reward, err = NewGameitinerant_reward(buf) ; err != nil {
|
||||
if tables.CaravanReward, err = NewGameCaravanReward(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_rank") ; err != nil {
|
||||
if buf, err = loader("game_caravanrank") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_rank, err = NewGameitinerant_rank(buf) ; err != nil {
|
||||
if tables.CaravanRank, err = NewGameCaravanRank(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_battle") ; err != nil {
|
||||
if buf, err = loader("game_caravanbattle") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_battle, err = NewGameitinerant_battle(buf) ; err != nil {
|
||||
if tables.CaravanBattle, err = NewGameCaravanBattle(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_itinerant_event") ; err != nil {
|
||||
if buf, err = loader("game_caravanrvent") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.itinerant_event, err = NewGameitinerant_event(buf) ; err != nil {
|
||||
if tables.CaravanRvent, err = NewGameCaravanRvent(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_newreddot") ; err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user