mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交配置表
This commit is contained in:
@@ -342,6 +342,90 @@ export class TbGResource {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRoleCUp {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.grade === undefined) { throw new Error() }
|
||||
this.grade = _json_.grade
|
||||
if (_json_.materials === undefined) { throw new Error() }
|
||||
{ this.materials = []; for(let _ele of _json_.materials) { let _e; _e = new TbGEntity.Resource(_ele); this.materials.push(_e);}}
|
||||
}
|
||||
|
||||
/**
|
||||
* 宠物等级
|
||||
*/
|
||||
readonly grade: number
|
||||
/**
|
||||
* 消耗的材料
|
||||
*/
|
||||
readonly materials: TbGEntity.Resource[]
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TbGEntity {
|
||||
/**
|
||||
* 资源信息
|
||||
*/
|
||||
export class Resource {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.value === undefined) { throw new Error() }
|
||||
this.value = _json_.value
|
||||
}
|
||||
|
||||
/**
|
||||
* 资源Id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 资源数量
|
||||
*/
|
||||
readonly value: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRoleCStar {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.grade === undefined) { throw new Error() }
|
||||
this.grade = _json_.grade
|
||||
if (_json_.merge === undefined) { throw new Error() }
|
||||
this.merge = _json_.merge
|
||||
}
|
||||
|
||||
/**
|
||||
* 宠物星级
|
||||
*/
|
||||
readonly grade: number
|
||||
/**
|
||||
* 合成数量
|
||||
*/
|
||||
readonly merge: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGGlobal{
|
||||
@@ -600,6 +684,70 @@ export class TbGResource{
|
||||
|
||||
|
||||
|
||||
export class TbGRoleCUp{
|
||||
private _dataMap: Map<number, TB.TbGRoleCUp>
|
||||
private _dataList: TB.TbGRoleCUp[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGRoleCUp>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGRoleCUp
|
||||
_v = new TB.TbGRoleCUp(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.grade, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGRoleCUp> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRoleCUp[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGRoleCUp | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRoleCStar{
|
||||
private _dataMap: Map<number, TB.TbGRoleCStar>
|
||||
private _dataList: TB.TbGRoleCStar[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGRoleCStar>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGRoleCStar
|
||||
_v = new TB.TbGRoleCStar(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.grade, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGRoleCStar> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRoleCStar[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGRoleCStar | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
type JsonLoader = (file: string) => any
|
||||
|
||||
export class Tables {
|
||||
@@ -619,6 +767,10 @@ export class Tables {
|
||||
get TbGOnHookGlobal(): TbGOnHookGlobal { return this._TbGOnHookGlobal;}
|
||||
private _TbGResource: TbGResource
|
||||
get TbGResource(): TbGResource { return this._TbGResource;}
|
||||
private _TbGRoleCUp: TbGRoleCUp
|
||||
get TbGRoleCUp(): TbGRoleCUp { return this._TbGRoleCUp;}
|
||||
private _TbGRoleCStar: TbGRoleCStar
|
||||
get TbGRoleCStar(): TbGRoleCStar { return this._TbGRoleCStar;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
|
||||
@@ -629,6 +781,8 @@ export class Tables {
|
||||
this._TbGMap = new TbGMap(loader('tbgmap'))
|
||||
this._TbGOnHookGlobal = new TbGOnHookGlobal(loader('tbgonhookglobal'))
|
||||
this._TbGResource = new TbGResource(loader('tbgresource'))
|
||||
this._TbGRoleCUp = new TbGRoleCUp(loader('tbgrolecup'))
|
||||
this._TbGRoleCStar = new TbGRoleCStar(loader('tbgrolecstar'))
|
||||
|
||||
this._TbGGlobal.resolve(this)
|
||||
this._TbGRole.resolve(this)
|
||||
@@ -638,5 +792,7 @@ export class Tables {
|
||||
this._TbGMap.resolve(this)
|
||||
this._TbGOnHookGlobal.resolve(this)
|
||||
this._TbGResource.resolve(this)
|
||||
this._TbGRoleCUp.resolve(this)
|
||||
this._TbGRoleCStar.resolve(this)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user