This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-19 19:03:44 +08:00
parent ed4e094536
commit 79c5ef00f7
59 changed files with 4221 additions and 335 deletions

View File

@@ -8,6 +8,38 @@
//------------------------------------------------------------------------------
export namespace TbGEnum {
/**
* 奖励类型
*/
export enum TReward {
/**
* 资源类型
*/
Resource = 1,
}
}
export namespace TbGEnum {
/**
* 礼包限购类型
*/
export enum TGiftLimit {
/**
* 无限购
*/
Unlimited = 1,
/**
* 限制次数
*/
Limit = 2,
/**
* 每天限制
*/
DayLimit = 3,
}
}
@@ -1028,7 +1060,7 @@ export class TDungeon {
if (_json_.attributes === undefined) { throw new Error() }
{ this.attributes = []; for(let _ele of _json_.attributes) { let _e; _e = new TbGEntity.TAttributeValue(_ele); this.attributes.push(_e);}}
if (_json_.rewards === undefined) { throw new Error() }
{ this.rewards = []; for(let _ele of _json_.rewards) { let _e; _e = new TbGEntity.TResource(_ele); this.rewards.push(_e);}}
{ this.rewards = []; for(let _ele of _json_.rewards) { let _e; _e = new TbGEntity.TReward(_ele); this.rewards.push(_e);}}
}
/**
@@ -1046,7 +1078,43 @@ export class TDungeon {
/**
* 关卡奖励
*/
readonly rewards: TbGEntity.TResource[]
readonly rewards: TbGEntity.TReward[]
resolve(tables:Tables)
{
}
}
}
export namespace TbGEntity {
/**
* 奖励信息
*/
export class TReward {
constructor(_json_: any) {
if (_json_.type === undefined) { throw new Error() }
this.type = _json_.type
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.value === undefined) { throw new Error() }
this.value = _json_.value
}
/**
* 奖励类型
*/
readonly type: TbGEnum.TReward
/**
* 奖励Id
*/
readonly id: number
/**
* 奖励数量
*/
readonly value: number
resolve(tables:Tables)
{
@@ -1083,6 +1151,96 @@ export class TbGSysDungeon160002 {
}
export namespace TB {
export class TbGGift {
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_.tig === undefined) { throw new Error() }
this.tig = _json_.tig
if (_json_.limit === undefined) { throw new Error() }
this.limit = _json_.limit
if (_json_.limitValue === undefined) { throw new Error() }
this.limitValue = _json_.limitValue
if (_json_.price === undefined) { throw new Error() }
this.price = _json_.price
if (_json_.rewards === undefined) { throw new Error() }
{ this.rewards = []; for(let _ele of _json_.rewards) { let _e; _e = new TbGEntity.TReward(_ele); this.rewards.push(_e);}}
}
/**
* 礼包唯一Id
*/
readonly id: number
/**
* 礼包名称
*/
readonly name: string
/**
* 描述
*/
readonly tig: string
/**
* 礼包购买限制
*/
readonly limit: TbGEnum.TGiftLimit
/**
* 限购数量
*/
readonly limitValue: number
/**
* 价格
*/
readonly price: number
/**
* 奖励
*/
readonly rewards: TbGEntity.TReward[]
resolve(tables:Tables)
{
}
}
}
export namespace TB {
export class TbGShop {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.tig === undefined) { throw new Error() }
this.tig = _json_.tig
if (_json_.giftId === undefined) { throw new Error() }
this.giftId = _json_.giftId
}
/**
* id
*/
readonly id: number
/**
* 备注
*/
readonly tig: string
/**
* 礼包Id
*/
readonly giftId: number
resolve(tables:Tables)
{
}
}
}
export class TbGGlobal{
@@ -1821,6 +1979,70 @@ export class TbGSysDungeon160002{
export class TbGGift{
private _dataMap: Map<number, TB.TbGGift>
private _dataList: TB.TbGGift[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGGift>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGGift
_v = new TB.TbGGift(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGGift> { return this._dataMap; }
getDataList(): TB.TbGGift[] { return this._dataList; }
get(key: number): TB.TbGGift | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGShop{
private _dataMap: Map<number, TB.TbGShop>
private _dataList: TB.TbGShop[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGShop>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGShop
_v = new TB.TbGShop(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGShop> { return this._dataMap; }
getDataList(): TB.TbGShop[] { return this._dataList; }
get(key: number): TB.TbGShop | 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 {
@@ -1870,6 +2092,10 @@ export class Tables {
get TbGSysDungeon160001(): TbGSysDungeon160001 { return this._TbGSysDungeon160001;}
private _TbGSysDungeon160002: TbGSysDungeon160002
get TbGSysDungeon160002(): TbGSysDungeon160002 { return this._TbGSysDungeon160002;}
private _TbGGift: TbGGift
get TbGGift(): TbGGift { return this._TbGGift;}
private _TbGShop: TbGShop
get TbGShop(): TbGShop { return this._TbGShop;}
constructor(loader: JsonLoader) {
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
@@ -1895,6 +2121,8 @@ export class Tables {
this._TbGSysDungeon = new TbGSysDungeon(loader('tbgsysdungeon'))
this._TbGSysDungeon160001 = new TbGSysDungeon160001(loader('tbgsysdungeon160001'))
this._TbGSysDungeon160002 = new TbGSysDungeon160002(loader('tbgsysdungeon160002'))
this._TbGGift = new TbGGift(loader('tbggift'))
this._TbGShop = new TbGShop(loader('tbgshop'))
this._TbGGlobal.resolve(this)
this._TbGRole.resolve(this)
@@ -1919,5 +2147,7 @@ export class Tables {
this._TbGSysDungeon.resolve(this)
this._TbGSysDungeon160001.resolve(this)
this._TbGSysDungeon160002.resolve(this)
this._TbGGift.resolve(this)
this._TbGShop.resolve(this)
}
}