123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- 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 namespace Hero {
- export enum Quality {
- /**
- * 普通
- */
- Normal = 1,
- /**
- * 高级
- */
- Senior = 2,
- /**
- * 稀有
- */
- Rare = 3,
- /**
- * 传说
- */
- Legend = 4,
- /**
- * 神话
- */
- Myth = 5,
- }
- }
- export namespace Hero {
- 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 class HeroLevel {
- constructor(_buf_: ByteBuf) {
- 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()
- this.atk = _buf_.ReadInt()
- this.atkSpeed = _buf_.ReadInt()
- }
- /**
- * 英雄ID
- */
- readonly id: number
- /**
- * 等级
- */
- readonly level: number
- /**
- * 英雄解锁技能
- */
- readonly unlockSkill: number[]
- /**
- * 解锁技能描述
- */
- readonly unlockSkillDesc: string
- /**
- * 攻击力
- */
- readonly atk: number
- /**
- * 攻击速度
- */
- readonly atkSpeed: 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);}}
- }
- /**
- * 英雄ID
- */
- readonly id: number
- /**
- * 品质
- */
- readonly quality: Hero.Quality
- /**
- * 攻击类型
- */
- readonly attacktype: Hero.AttackType
- /**
- * 名字
- */
- readonly name: string
- /**
- * 技能列表
- */
- readonly skills: number[]
- resolve(tables:Tables) {
-
-
-
-
-
- }
- }
- export class Skill {
- constructor(_buf_: ByteBuf) {
- this.idx = _buf_.ReadInt()
- this.remark = _buf_.ReadString()
- this.skillId = _buf_.ReadInt()
- this.level = _buf_.ReadInt()
- this.skillType = _buf_.ReadInt()
- this.cd = _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 level: number
- /**
- * 类型
- */
- readonly skillType: number
- /**
- * 冷却时间
- */
- readonly cd: 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 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<number, Hero>
- private _dataList: Hero[]
- constructor(_buf_: ByteBuf) {
- this._dataMap = new Map<number, Hero>()
- 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<number, Hero> { 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 _dataList: HeroLevel[]
-
- constructor(_buf_: ByteBuf) {
- this._dataList = []
- for(let n = _buf_.ReadInt(); n > 0; n--) {
- let _v: HeroLevel
- _v = new HeroLevel(_buf_)
- this._dataList.push(_v)
- }
- }
- getDataList(): HeroLevel[] { return this._dataList }
- get(index: number): HeroLevel | undefined { return this._dataList[index] }
-
- resolve(tables:Tables) {
- for(let data of this._dataList)
- {
- data.resolve(tables)
- }
- }
- }
- /**
- * ZD技能Buff.xlsx
- */
- export class TbSkillBuff {
- private _dataMap: Map<number, SkillBuff>
- private _dataList: SkillBuff[]
- constructor(_buf_: ByteBuf) {
- this._dataMap = new Map<number, SkillBuff>()
- 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<number, SkillBuff> { 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 _dataList: Skill[]
-
- constructor(_buf_: ByteBuf) {
- this._dataList = []
- for(let n = _buf_.ReadInt(); n > 0; n--) {
- let _v: Skill
- _v = new Skill(_buf_)
- this._dataList.push(_v)
- }
- }
- getDataList(): Skill[] { return this._dataList }
- get(index: number): Skill | undefined { return this._dataList[index] }
-
- 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;}
- static getTableNames(): string[] {
- let names: string[] = [];
- names.push('tbhero');
- names.push('tbherolevel');
- names.push('tbskillbuff');
- names.push('tbskill');
- 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._TbHero.resolve(this)
- this._TbHeroLevel.resolve(this)
- this._TbSkillBuff.resolve(this)
- this._TbSkill.resolve(this)
- }
- }
|