mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
无头模式测试
This commit is contained in:
@@ -426,6 +426,39 @@ export class TbGRoleCStar {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbSServerInfo {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.args === undefined) { throw new Error() }
|
||||
this.args = _json_.args
|
||||
if (_json_.tig === undefined) { throw new Error() }
|
||||
this.tig = _json_.tig
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 全局表参数
|
||||
*/
|
||||
readonly args: string
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
readonly tig: string
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGGlobal{
|
||||
@@ -748,6 +781,38 @@ export class TbGRoleCStar{
|
||||
|
||||
|
||||
|
||||
export class TbSServerInfo{
|
||||
private _dataMap: Map<number, TB.TbSServerInfo>
|
||||
private _dataList: TB.TbSServerInfo[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbSServerInfo>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbSServerInfo
|
||||
_v = new TB.TbSServerInfo(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbSServerInfo> { return this._dataMap; }
|
||||
getDataList(): TB.TbSServerInfo[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbSServerInfo | 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 {
|
||||
@@ -771,6 +836,8 @@ export class Tables {
|
||||
get TbGRoleCUp(): TbGRoleCUp { return this._TbGRoleCUp;}
|
||||
private _TbGRoleCStar: TbGRoleCStar
|
||||
get TbGRoleCStar(): TbGRoleCStar { return this._TbGRoleCStar;}
|
||||
private _TbSServerInfo: TbSServerInfo
|
||||
get TbSServerInfo(): TbSServerInfo { return this._TbSServerInfo;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
|
||||
@@ -783,6 +850,7 @@ export class Tables {
|
||||
this._TbGResource = new TbGResource(loader('tbgresource'))
|
||||
this._TbGRoleCUp = new TbGRoleCUp(loader('tbgrolecup'))
|
||||
this._TbGRoleCStar = new TbGRoleCStar(loader('tbgrolecstar'))
|
||||
this._TbSServerInfo = new TbSServerInfo(loader('tbsserverinfo'))
|
||||
|
||||
this._TbGGlobal.resolve(this)
|
||||
this._TbGRole.resolve(this)
|
||||
@@ -794,5 +862,6 @@ export class Tables {
|
||||
this._TbGResource.resolve(this)
|
||||
this._TbGRoleCUp.resolve(this)
|
||||
this._TbGRoleCStar.resolve(this)
|
||||
this._TbSServerInfo.resolve(this)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user