//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
import ByteBuf from '../bright/serialization/ByteBuf'
export namespace test {
export enum ETestQuality {
/**
* 最高品质
*/
A = 1,
/**
* 黑色的
*/
B = 2,
/**
* 蓝色的
*/
C = 3,
/**
* 最差品质
*/
D = 4,
}
}
export namespace test {
export enum AccessFlag {
WRITE = 1,
READ = 2,
TRUNCATE = 4,
NEW = 8,
READ_WRITE = WRITE|READ,
}
}
export enum Quality {
/**
* 普通
*/
Normal = 1,
/**
* 高级
*/
Senior = 2,
/**
* 稀有
*/
Rare = 3,
/**
* 传说
*/
Legend = 4,
/**
* 神话
*/
Myth = 5,
}
export enum AttackType {
/**
* 近战
*/
CloseCombat = 1,
/**
* 远程
*/
Remote = 2,
}
export namespace test {
/**
* 这是个测试excel结构
*/
export class TestExcelBean1 {
constructor(_buf_: ByteBuf) {
this.x1 = _buf_.ReadInt()
this.x2 = _buf_.ReadString()
this.x3 = _buf_.ReadInt()
this.x4 = _buf_.ReadFloat()
}
/**
* 最高品质
*/
readonly x1: number
/**
* 黑色的
*/
readonly x2: string
/**
* 蓝色的
*/
readonly x3: number
/**
* 最差品质
*/
readonly x4: number
resolve(tables:Tables) {
}
}
}
export namespace test {
/**
* 这是个测试excel结构
*/
export class TestExcelBean2 {
constructor(_buf_: ByteBuf) {
this.y1 = _buf_.ReadInt()
this.y2 = _buf_.ReadString()
this.y3 = _buf_.ReadFloat()
}
/**
* 最高品质
*/
readonly y1: number
/**
* 黑色的
*/
readonly y2: string
/**
* 蓝色的
*/
readonly y3: number
resolve(tables:Tables) {
}
}
}
export namespace test {
export abstract class Shape {
static constructorFrom(_buf_: ByteBuf): Shape{
switch (_buf_.ReadInt()) {
case 2131829196: return new test.Circle(_buf_)
case 694982337: return new test2.Rectangle(_buf_)
default: throw new Error()
}
}
constructor(_buf_: ByteBuf) {
}
resolve(tables:Tables) {
}
}
}
export namespace test {
/**
* 圆
*/
export class Circle extends test.Shape {
constructor(_buf_: ByteBuf) {
super(_buf_)
this.radius = _buf_.ReadFloat()
}
/**
* 半径
*/
readonly radius: number
resolve(tables:Tables) {
super.resolve(tables)
}
}
}
export namespace test2 {
/**
* 矩形
*/
export class Rectangle extends test.Shape {
constructor(_buf_: ByteBuf) {
super(_buf_)
this.width = _buf_.ReadFloat()
this.height = _buf_.ReadFloat()
}
/**
* 宽度
*/
readonly width: number
/**
* 高度
*/
readonly height: number
resolve(tables:Tables) {
super.resolve(tables)
}
}
}
export namespace Common {
export class Reward {
constructor(_buf_: ByteBuf) {
this.itemid = _buf_.ReadInt()
this.num = _buf_.ReadInt()
}
/**
* 道具id
*/
readonly itemid: number
/**
* 数量
*/
readonly num: number
resolve(tables:Tables) {
}
}
}
export namespace Common {
export class Cost {
constructor(_buf_: ByteBuf) {
this.itemid = _buf_.ReadInt()
this.num = _buf_.ReadInt()
}
/**
* 道具id
*/
readonly itemid: number
/**
* 数量
*/
readonly num: number
resolve(tables:Tables) {
}
}
}
export class Hero {
constructor(_buf_: ByteBuf) {
this.id = _buf_.ReadInt()
this.quality = _buf_.ReadInt()
this.attacktype = _buf_.ReadInt()
this.name = _buf_.ReadString()
{ let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.skills = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = _buf_.ReadInt(); this.skills.push(_e0);}}
this.isShow = _buf_.ReadInt()
}
/**
* 英雄ID
*/
readonly id: number
/**
* 品质
*/
readonly quality: Quality
/**
* 攻击类型
*/
readonly attacktype: AttackType
/**
* 名字
*/
readonly name: string
/**
* 技能列表
*/
readonly skills: number[]
/**
* 是否测试
*/
readonly isShow: number
resolve(tables:Tables) {
}
}
export class Skill {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.remark = _buf_.ReadString()
this.skillId = _buf_.ReadInt()
this.skillType = _buf_.ReadInt()
this.cd = _buf_.ReadInt()
this.range = _buf_.ReadInt()
this.triggerCondition = _buf_.ReadString()
this.effects = _buf_.ReadString()
this.buffId = _buf_.ReadString()
this.skillName = _buf_.ReadString()
this.desc = _buf_.ReadString()
this.conflictSkillId = _buf_.ReadInt()
}
/**
* 主键id
*/
readonly idx: number
/**
* 备注
*/
readonly remark: string
/**
* 技能ID
*/
readonly skillId: number
/**
* 类型
*/
readonly skillType: number
/**
* 冷却时间
*/
readonly cd: number
/**
* 攻击距离
*/
readonly range: number
/**
* 技能触发条件
*/
readonly triggerCondition: string
/**
* 效果列表
*/
readonly effects: string
/**
* buff
*/
readonly buffId: string
/**
* 技能名字
*/
readonly skillName: string
/**
* 技能描述
*/
readonly desc: string
/**
* 冲突的技能id
*/
readonly conflictSkillId: number
resolve(tables:Tables) {
}
}
export class Wave {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.waveIndex = _buf_.ReadInt()
this.level = _buf_.ReadInt()
this.model = _buf_.ReadInt()
this.counter = _buf_.ReadInt()
this.hp = _buf_.ReadInt()
this.speed = _buf_.ReadInt()
this.gap = _buf_.ReadInt()
this.isboss = _buf_.ReadInt()
this.perAddCoid = _buf_.ReadInt()
this.perAddGem = _buf_.ReadInt()
}
/**
* 唯一id
*/
readonly idx: number
/**
* 波数
*/
readonly waveIndex: number
/**
* 难度
*/
readonly level: number
/**
* 怪物模型
*/
readonly model: number
/**
* 数量
*/
readonly counter: number
/**
* 血量
*/
readonly hp: number
/**
* 速度
*/
readonly speed: number
/**
* 间距
*/
readonly gap: number
/**
* 是否是boss
*/
readonly isboss: number
/**
* 每只怪增加局内金币
*/
readonly perAddCoid: number
/**
* 每只怪增加局内宝石
*/
readonly perAddGem: number
resolve(tables:Tables) {
}
}
export class WaveRewards {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.waveMin = _buf_.ReadInt()
this.waveMax = _buf_.ReadInt()
this.level = _buf_.ReadInt()
{ let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.rewards = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Reward(_buf_); this.rewards.push(_e0);}}
}
/**
* idx
*/
readonly idx: number
/**
* 波数下限
*/
readonly waveMin: number
/**
* 波数上限
*/
readonly waveMax: number
/**
* 难度
*/
readonly level: number
/**
* 奖励列表
*/
readonly rewards: Common.Reward[]
resolve(tables:Tables) {
for (let _e of this.rewards) { _e?.resolve(tables); }
}
}
export class Item {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.type = _buf_.ReadInt()
this.name = _buf_.ReadString()
}
/**
* 道具ID
*/
readonly idx: number
/**
* 类型
*/
readonly type: number
/**
* 道具名
*/
readonly name: string
resolve(tables:Tables) {
}
}
export class System {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.mainKey = _buf_.ReadString()
this.value = _buf_.ReadString()
}
/**
* IDX
*/
readonly idx: number
/**
* 常量主键
*/
readonly mainKey: string
/**
* 常量值
*/
readonly value: string
resolve(tables:Tables) {
}
}
export class HeroLevel {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.id = _buf_.ReadInt()
this.level = _buf_.ReadInt()
{ let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.unlockSkill = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = _buf_.ReadInt(); this.unlockSkill.push(_e0);}}
this.unlockSkillDesc = _buf_.ReadString()
{ let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.upgradeconsume = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Cost(_buf_); this.upgradeconsume.push(_e0);}}
this.atk = _buf_.ReadInt()
this.atkSpeed = _buf_.ReadInt()
}
/**
* 序號
*/
readonly idx: number
/**
* 英雄ID
*/
readonly id: number
/**
* 等级
*/
readonly level: number
/**
* 英雄解锁技能
*/
readonly unlockSkill: number[]
/**
* 解锁技能描述
*/
readonly unlockSkillDesc: string
/**
* 升级消耗
*/
readonly upgradeconsume: Common.Cost[]
/**
* 攻击力
*/
readonly atk: number
/**
* 攻击间隔
*/
readonly atkSpeed: number
resolve(tables:Tables) {
for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
}
}
export class SkillBuff {
constructor(_buf_: ByteBuf) {
this.idx = _buf_.ReadInt()
this.remark = _buf_.ReadString()
this.type = _buf_.ReadInt()
this.parameters = _buf_.ReadString()
this.probability = _buf_.ReadInt()
this.triggerCondition = _buf_.ReadString()
this.effectType = _buf_.ReadInt()
this.duration = _buf_.ReadInt()
this.overlapTimes = _buf_.ReadInt()
this.uniqueGain = _buf_.ReadBool()
this.halo = _buf_.ReadBool()
this.attributes = _buf_.ReadString()
this.mixBufficon = _buf_.ReadInt()
this.skillShowId = _buf_.ReadInt()
this.floatingTextId = _buf_.ReadInt()
}
/**
* buffid
*/
readonly idx: number
/**
* 备注
*/
readonly remark: string
/**
* buff类型
*/
readonly type: number
/**
* buff参数
*/
readonly parameters: string
/**
* 触发概率
*/
readonly probability: number
/**
* 触发条件
*/
readonly triggerCondition: string
/**
* 效果类型
*/
readonly effectType: number
/**
* 持续时间
*/
readonly duration: number
/**
* 叠加次数
*/
readonly overlapTimes: number
/**
* 唯一增益
*/
readonly uniqueGain: boolean
/**
* 是否是光环
*/
readonly halo: boolean
/**
* buff增加的属性
*/
readonly attributes: string
/**
* 是否合并
*/
readonly mixBufficon: number
/**
* 效果id
*/
readonly skillShowId: number
/**
* 飘字id
*/
readonly floatingTextId: number
resolve(tables:Tables) {
}
}
/**
* 英雄表.xlsx
*/
export class TbHero {
private _dataMap: Map
private _dataList: Hero[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: Hero
_v = new Hero(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Hero[] { return this._dataList; }
get(key: number): Hero | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* 英雄等级表.xlsx
*/
export class TbHeroLevel {
private _dataMap: Map
private _dataList: HeroLevel[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: HeroLevel
_v = new HeroLevel(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.idx, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): HeroLevel[] { return this._dataList; }
get(key: number): HeroLevel | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* ZD技能Buff.xlsx
*/
export class TbSkillBuff {
private _dataMap: Map
private _dataList: SkillBuff[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: SkillBuff
_v = new SkillBuff(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.idx, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): SkillBuff[] { return this._dataList; }
get(key: number): SkillBuff | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* ZD技能表.xlsx
*/
export class TbSkill {
private _dataMap: Map
private _dataList: Skill[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: Skill
_v = new Skill(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.skillId, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Skill[] { return this._dataList; }
get(key: number): Skill | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* 波数表.xlsx
*/
export class TbWave {
private _dataMap: Map
private _dataList: Wave[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: Wave
_v = new Wave(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.idx, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Wave[] { return this._dataList; }
get(key: number): Wave | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* 波数奖励表.xlsx
*/
export class TbWaveRewards {
private _dataMap: Map
private _dataList: WaveRewards[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: WaveRewards
_v = new WaveRewards(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.idx, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): WaveRewards[] { return this._dataList; }
get(key: number): WaveRewards | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* 道具表.xlsx
*/
export class TbItem {
private _dataMap: Map
private _dataList: Item[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: Item
_v = new Item(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.idx, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Item[] { return this._dataList; }
get(key: number): Item | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
/**
* 系统常量表.xlsx
*/
export class TbSystem {
private _dataMap: Map
private _dataList: System[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.ReadInt(); n > 0; n--) {
let _v: System
_v = new System(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.mainKey, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): System[] { return this._dataList; }
get(key: string): System | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
type ByteBufLoader = (file: string) => ByteBuf
export class Tables {
private _TbHero: TbHero
/**
* 英雄表.xlsx
*/
get TbHero(): TbHero { return this._TbHero;}
private _TbHeroLevel: TbHeroLevel
/**
* 英雄等级表.xlsx
*/
get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
private _TbSkillBuff: TbSkillBuff
/**
* ZD技能Buff.xlsx
*/
get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
private _TbSkill: TbSkill
/**
* ZD技能表.xlsx
*/
get TbSkill(): TbSkill { return this._TbSkill;}
private _TbWave: TbWave
/**
* 波数表.xlsx
*/
get TbWave(): TbWave { return this._TbWave;}
private _TbWaveRewards: TbWaveRewards
/**
* 波数奖励表.xlsx
*/
get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
private _TbItem: TbItem
/**
* 道具表.xlsx
*/
get TbItem(): TbItem { return this._TbItem;}
private _TbSystem: TbSystem
/**
* 系统常量表.xlsx
*/
get TbSystem(): TbSystem { return this._TbSystem;}
static getTableNames(): string[] {
let names: string[] = [];
names.push('tbhero');
names.push('tbherolevel');
names.push('tbskillbuff');
names.push('tbskill');
names.push('tbwave');
names.push('tbwaverewards');
names.push('tbitem');
names.push('tbsystem');
return names;
}
constructor(loader: ByteBufLoader) {
this._TbHero = new TbHero(loader('tbhero'))
this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
this._TbSkill = new TbSkill(loader('tbskill'))
this._TbWave = new TbWave(loader('tbwave'))
this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
this._TbItem = new TbItem(loader('tbitem'))
this._TbSystem = new TbSystem(loader('tbsystem'))
this._TbHero.resolve(this)
this._TbHeroLevel.resolve(this)
this._TbSkillBuff.resolve(this)
this._TbSkill.resolve(this)
this._TbWave.resolve(this)
this._TbWaveRewards.resolve(this)
this._TbItem.resolve(this)
this._TbSystem.resolve(this)
}
}