mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 10:16:14 +00:00
提交OnHook配置表
This commit is contained in:
@@ -531,6 +531,120 @@ export class TbGRoleBaseAttribute {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGOnHookMaps {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.name === undefined) { throw new Error() }
|
||||
this.name = _json_.name
|
||||
if (_json_.mapId === undefined) { throw new Error() }
|
||||
this.mapId = _json_.mapId
|
||||
if (_json_.petIds === undefined) { throw new Error() }
|
||||
{ this.petIds = []; for(let _ele of _json_.petIds) { let _e; _e = _ele; this.petIds.push(_e);}}
|
||||
if (_json_.sign === undefined) { throw new Error() }
|
||||
this.sign = _json_.sign
|
||||
if (_json_.introduce === undefined) { throw new Error() }
|
||||
this.introduce = _json_.introduce
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 地图名称
|
||||
*/
|
||||
readonly name: string
|
||||
/**
|
||||
* 地图场景Id
|
||||
*/
|
||||
readonly mapId: number
|
||||
/**
|
||||
* 地图上的宠物列表
|
||||
*/
|
||||
readonly petIds: number[]
|
||||
/**
|
||||
* 地图标识(一般是地图的类名)
|
||||
*/
|
||||
readonly sign: string
|
||||
/**
|
||||
* 地图介绍
|
||||
*/
|
||||
readonly introduce: string
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGOnHookMap1 {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.data === undefined) { throw new Error() }
|
||||
this.data = new TbGEntity.TOnHookLevel(_json_.data)
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 关卡等级
|
||||
*/
|
||||
readonly data: TbGEntity.TOnHookLevel
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TbGEntity {
|
||||
/**
|
||||
* 无限模式关卡信息
|
||||
*/
|
||||
export class TOnHookLevel {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.level === undefined) { throw new Error() }
|
||||
this.level = _json_.level
|
||||
if (_json_.petLevel === undefined) { throw new Error() }
|
||||
this.petLevel = _json_.petLevel
|
||||
if (_json_.oddsId === undefined) { throw new Error() }
|
||||
this.oddsId = _json_.oddsId
|
||||
}
|
||||
|
||||
/**
|
||||
* 关卡等级
|
||||
*/
|
||||
readonly level: number
|
||||
/**
|
||||
* 宠物等级
|
||||
*/
|
||||
readonly petLevel: number
|
||||
/**
|
||||
* 概率Id
|
||||
*/
|
||||
readonly oddsId: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGGlobal{
|
||||
@@ -949,6 +1063,70 @@ export class TbGRoleBaseAttribute{
|
||||
|
||||
|
||||
|
||||
export class TbGOnHookMaps{
|
||||
private _dataMap: Map<number, TB.TbGOnHookMaps>
|
||||
private _dataList: TB.TbGOnHookMaps[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGOnHookMaps>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGOnHookMaps
|
||||
_v = new TB.TbGOnHookMaps(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGOnHookMaps> { return this._dataMap; }
|
||||
getDataList(): TB.TbGOnHookMaps[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGOnHookMaps | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGOnHookMap1{
|
||||
private _dataMap: Map<number, TB.TbGOnHookMap1>
|
||||
private _dataList: TB.TbGOnHookMap1[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGOnHookMap1>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGOnHookMap1
|
||||
_v = new TB.TbGOnHookMap1(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGOnHookMap1> { return this._dataMap; }
|
||||
getDataList(): TB.TbGOnHookMap1[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGOnHookMap1 | 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 {
|
||||
@@ -978,6 +1156,10 @@ export class Tables {
|
||||
get TbGAttribute(): TbGAttribute { return this._TbGAttribute;}
|
||||
private _TbGRoleBaseAttribute: TbGRoleBaseAttribute
|
||||
get TbGRoleBaseAttribute(): TbGRoleBaseAttribute { return this._TbGRoleBaseAttribute;}
|
||||
private _TbGOnHookMaps: TbGOnHookMaps
|
||||
get TbGOnHookMaps(): TbGOnHookMaps { return this._TbGOnHookMaps;}
|
||||
private _TbGOnHookMap1: TbGOnHookMap1
|
||||
get TbGOnHookMap1(): TbGOnHookMap1 { return this._TbGOnHookMap1;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
|
||||
@@ -993,6 +1175,8 @@ export class Tables {
|
||||
this._TbSServerInfo = new TbSServerInfo(loader('tbsserverinfo'))
|
||||
this._TbGAttribute = new TbGAttribute(loader('tbgattribute'))
|
||||
this._TbGRoleBaseAttribute = new TbGRoleBaseAttribute(loader('tbgrolebaseattribute'))
|
||||
this._TbGOnHookMaps = new TbGOnHookMaps(loader('tbgonhookmaps'))
|
||||
this._TbGOnHookMap1 = new TbGOnHookMap1(loader('tbgonhookmap1'))
|
||||
|
||||
this._TbGGlobal.resolve(this)
|
||||
this._TbGRole.resolve(this)
|
||||
@@ -1007,5 +1191,7 @@ export class Tables {
|
||||
this._TbSServerInfo.resolve(this)
|
||||
this._TbGAttribute.resolve(this)
|
||||
this._TbGRoleBaseAttribute.resolve(this)
|
||||
this._TbGOnHookMaps.resolve(this)
|
||||
this._TbGOnHookMap1.resolve(this)
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"data": {
|
||||
"level": 1,
|
||||
"petLevel": 1,
|
||||
"oddsId": 1
|
||||
}
|
||||
}
|
||||
]
|
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"id": 120001,
|
||||
"name": "冒险岛",
|
||||
"mapId": 60001,
|
||||
"petIds": [
|
||||
10001,
|
||||
10002,
|
||||
10003
|
||||
],
|
||||
"sign": "",
|
||||
"introduce": "新手地图在这里可以遇到可爱的宠物哦~"
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user