2025-08-12 15:01:59 +08:00
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
// <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 '../luban/ByteBuf'
|
|
|
|
|
|
2025-08-12 16:08:58 +08:00
|
|
|
|
|
|
|
|
export enum Category {
|
|
|
|
|
/**
|
|
|
|
|
* 熟女
|
|
|
|
|
*/
|
|
|
|
|
shunv = 0,
|
|
|
|
|
/**
|
|
|
|
|
* 18岁
|
|
|
|
|
*/
|
|
|
|
|
eighteen = 1,
|
|
|
|
|
/**
|
|
|
|
|
* 辣妈
|
|
|
|
|
*/
|
|
|
|
|
lama = 2,
|
|
|
|
|
/**
|
|
|
|
|
* 捆绑
|
|
|
|
|
*/
|
|
|
|
|
kunbang = 3,
|
|
|
|
|
/**
|
|
|
|
|
* 公众野战
|
|
|
|
|
*/
|
|
|
|
|
publicfight = 4,
|
|
|
|
|
/**
|
|
|
|
|
* 卡通
|
|
|
|
|
*/
|
|
|
|
|
cartoon = 5,
|
2025-08-13 15:37:15 +08:00
|
|
|
/**
|
|
|
|
|
* 未完成
|
|
|
|
|
*/
|
|
|
|
|
upcomming = 6,
|
2025-08-12 16:08:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export enum PriceType {
|
|
|
|
|
/**
|
|
|
|
|
* 免费
|
|
|
|
|
*/
|
|
|
|
|
free = 0,
|
|
|
|
|
/**
|
|
|
|
|
* 试用
|
|
|
|
|
*/
|
|
|
|
|
first_time_free = 1,
|
|
|
|
|
/**
|
|
|
|
|
* 收费
|
|
|
|
|
*/
|
|
|
|
|
pay = 2,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 15:01:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-13 11:31:21 +08:00
|
|
|
export class AiCharacter {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.id = _buf_.readInt()
|
|
|
|
|
this.systemInstruction = _buf_.readString()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 角色id
|
|
|
|
|
*/
|
|
|
|
|
readonly id: number
|
|
|
|
|
/**
|
|
|
|
|
* 系统指令
|
|
|
|
|
*/
|
|
|
|
|
readonly systemInstruction: string
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
export class Girl {
|
2025-08-12 16:08:58 +08:00
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.id = _buf_.readInt()
|
2025-08-12 19:49:50 +08:00
|
|
|
this.nameKey = _buf_.readString()
|
2025-08-12 16:08:58 +08:00
|
|
|
this.age = _buf_.readString()
|
|
|
|
|
this.category = _buf_.readInt()
|
2025-08-12 19:49:50 +08:00
|
|
|
this.tagKey = _buf_.readString()
|
2025-08-12 16:08:58 +08:00
|
|
|
this.priceType = _buf_.readInt()
|
2025-08-12 16:58:02 +08:00
|
|
|
this.avatarPath = _buf_.readString()
|
|
|
|
|
this.starCount = _buf_.readInt()
|
2025-08-12 16:08:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* id
|
|
|
|
|
*/
|
|
|
|
|
readonly id: number
|
|
|
|
|
/**
|
2025-08-12 19:49:50 +08:00
|
|
|
* 名字键
|
2025-08-12 16:08:58 +08:00
|
|
|
*/
|
2025-08-12 19:49:50 +08:00
|
|
|
readonly nameKey: string
|
2025-08-12 16:08:58 +08:00
|
|
|
/**
|
|
|
|
|
* 年龄
|
|
|
|
|
*/
|
|
|
|
|
readonly age: string
|
|
|
|
|
/**
|
|
|
|
|
* 分类
|
|
|
|
|
*/
|
|
|
|
|
readonly category: Category
|
|
|
|
|
/**
|
2025-08-12 19:49:50 +08:00
|
|
|
* 标签键
|
2025-08-12 16:08:58 +08:00
|
|
|
*/
|
2025-08-12 19:49:50 +08:00
|
|
|
readonly tagKey: string
|
2025-08-12 16:08:58 +08:00
|
|
|
/**
|
|
|
|
|
* 付费类型
|
|
|
|
|
*/
|
|
|
|
|
readonly priceType: PriceType
|
2025-08-12 16:58:02 +08:00
|
|
|
/**
|
|
|
|
|
* 头像路径
|
|
|
|
|
*/
|
|
|
|
|
readonly avatarPath: string
|
|
|
|
|
/**
|
|
|
|
|
* 评价星数
|
|
|
|
|
*/
|
|
|
|
|
readonly starCount: number
|
2025-08-12 16:08:58 +08:00
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class GirlDetail {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.id = _buf_.readInt()
|
|
|
|
|
this.detailDesc = _buf_.readString()
|
|
|
|
|
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.pics = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.pics.push(_e0);}}
|
2025-08-25 20:15:42 +08:00
|
|
|
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.vids = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.vids.push(_e0);}}
|
2025-08-12 16:58:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* id
|
|
|
|
|
*/
|
|
|
|
|
readonly id: number
|
|
|
|
|
/**
|
|
|
|
|
* 自我介绍
|
|
|
|
|
*/
|
|
|
|
|
readonly detailDesc: string
|
|
|
|
|
/**
|
2025-08-25 20:15:42 +08:00
|
|
|
* 图片资源列表
|
2025-08-12 16:58:02 +08:00
|
|
|
*/
|
|
|
|
|
readonly pics: string[]
|
2025-08-25 20:15:42 +08:00
|
|
|
/**
|
|
|
|
|
* 视频资源列表
|
|
|
|
|
*/
|
|
|
|
|
readonly vids: string[]
|
2025-08-12 16:58:02 +08:00
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-25 20:15:42 +08:00
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-13 11:31:21 +08:00
|
|
|
export class GlobalConfig {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.ApiKey = _buf_.readString()
|
|
|
|
|
this.Model = _buf_.readString()
|
|
|
|
|
this.Temperature = _buf_.readFloat()
|
|
|
|
|
this.MaxTokens = _buf_.readInt()
|
|
|
|
|
this.Timeout = _buf_.readInt()
|
2025-08-13 17:10:12 +08:00
|
|
|
this.FreeChatTimes = _buf_.readInt()
|
2025-08-15 15:24:31 +08:00
|
|
|
this.GameName = _buf_.readString()
|
2025-08-13 11:31:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* api键
|
|
|
|
|
*/
|
|
|
|
|
readonly ApiKey: string
|
|
|
|
|
/**
|
|
|
|
|
* ai模型
|
|
|
|
|
*/
|
|
|
|
|
readonly Model: string
|
|
|
|
|
readonly Temperature: number
|
|
|
|
|
/**
|
|
|
|
|
* 单次聊天最大token
|
|
|
|
|
*/
|
|
|
|
|
readonly MaxTokens: number
|
|
|
|
|
/**
|
|
|
|
|
* 超时时间(微秒)
|
|
|
|
|
*/
|
|
|
|
|
readonly Timeout: number
|
2025-08-13 17:10:12 +08:00
|
|
|
/**
|
|
|
|
|
* 单个角色免费聊天次数
|
|
|
|
|
*/
|
|
|
|
|
readonly FreeChatTimes: number
|
2025-08-15 15:24:31 +08:00
|
|
|
/**
|
|
|
|
|
* 游戏名
|
|
|
|
|
*/
|
|
|
|
|
readonly GameName: string
|
2025-08-13 11:31:21 +08:00
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-13 17:10:12 +08:00
|
|
|
|
2025-08-15 15:24:31 +08:00
|
|
|
|
2025-08-13 11:31:21 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
export class Language {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.key = _buf_.readString()
|
|
|
|
|
this.languageEn = _buf_.readString()
|
|
|
|
|
this.languageCn = _buf_.readString()
|
|
|
|
|
this.languageHi = _buf_.readString()
|
|
|
|
|
this.languageFr = _buf_.readString()
|
|
|
|
|
this.languageDe = _buf_.readString()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* key
|
|
|
|
|
*/
|
|
|
|
|
readonly key: string
|
|
|
|
|
readonly languageEn: string
|
|
|
|
|
readonly languageCn: string
|
|
|
|
|
/**
|
|
|
|
|
* 印地语翻译
|
|
|
|
|
*/
|
|
|
|
|
readonly languageHi: string
|
|
|
|
|
/**
|
|
|
|
|
* 法语翻译
|
|
|
|
|
*/
|
|
|
|
|
readonly languageFr: string
|
|
|
|
|
/**
|
|
|
|
|
* 德语翻译
|
|
|
|
|
*/
|
|
|
|
|
readonly languageDe: string
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-13 17:10:12 +08:00
|
|
|
export class PurchaseConfig {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.id = _buf_.readInt()
|
|
|
|
|
this.name = _buf_.readString()
|
|
|
|
|
this.desc = _buf_.readString()
|
|
|
|
|
this.count = _buf_.readInt()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 商品id
|
|
|
|
|
*/
|
|
|
|
|
readonly id: number
|
|
|
|
|
/**
|
|
|
|
|
* 名称
|
|
|
|
|
*/
|
|
|
|
|
readonly name: string
|
|
|
|
|
/**
|
|
|
|
|
* 数量
|
|
|
|
|
*/
|
|
|
|
|
readonly desc: string
|
|
|
|
|
/**
|
|
|
|
|
* 计费点ID
|
|
|
|
|
*/
|
|
|
|
|
readonly count: number
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
export class Theme {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.id = _buf_.readInt()
|
2025-08-12 19:49:50 +08:00
|
|
|
this.key = _buf_.readString()
|
2025-08-12 16:58:02 +08:00
|
|
|
this.name = _buf_.readString()
|
|
|
|
|
this.category = _buf_.readInt()
|
|
|
|
|
this.isRelease = _buf_.readBool()
|
|
|
|
|
this.path = _buf_.readString()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* id
|
|
|
|
|
*/
|
|
|
|
|
readonly id: number
|
2025-08-12 19:49:50 +08:00
|
|
|
/**
|
|
|
|
|
* 多语言键
|
|
|
|
|
*/
|
|
|
|
|
readonly key: string
|
2025-08-12 16:58:02 +08:00
|
|
|
/**
|
|
|
|
|
* 主题名称
|
|
|
|
|
*/
|
|
|
|
|
readonly name: string
|
|
|
|
|
/**
|
|
|
|
|
* 主题枚举
|
|
|
|
|
*/
|
|
|
|
|
readonly category: Category
|
|
|
|
|
/**
|
|
|
|
|
* 是否解锁
|
|
|
|
|
*/
|
|
|
|
|
readonly isRelease: boolean
|
|
|
|
|
/**
|
|
|
|
|
* 图片路径
|
|
|
|
|
*/
|
|
|
|
|
readonly path: string
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
|
2025-08-12 16:08:58 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 15:01:59 +08:00
|
|
|
export class vector2 {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.x = _buf_.readFloat()
|
|
|
|
|
this.y = _buf_.readFloat()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly x: number
|
|
|
|
|
readonly y: number
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class vector3 {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.x = _buf_.readFloat()
|
|
|
|
|
this.y = _buf_.readFloat()
|
|
|
|
|
this.z = _buf_.readFloat()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly x: number
|
|
|
|
|
readonly y: number
|
|
|
|
|
readonly z: number
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class vector4 {
|
|
|
|
|
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this.x = _buf_.readFloat()
|
|
|
|
|
this.y = _buf_.readFloat()
|
|
|
|
|
this.z = _buf_.readFloat()
|
|
|
|
|
this.w = _buf_.readFloat()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly x: number
|
|
|
|
|
readonly y: number
|
|
|
|
|
readonly z: number
|
|
|
|
|
readonly w: number
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
|
|
|
|
|
export class TbLanguage {
|
|
|
|
|
private _dataMap: Map<string, Language>
|
|
|
|
|
private _dataList: Language[]
|
2025-08-12 15:01:59 +08:00
|
|
|
constructor(_buf_: ByteBuf) {
|
2025-08-12 19:49:50 +08:00
|
|
|
this._dataMap = new Map<string, Language>()
|
2025-08-12 15:01:59 +08:00
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
2025-08-12 19:49:50 +08:00
|
|
|
let _v: Language
|
|
|
|
|
_v = new Language(_buf_)
|
2025-08-12 15:01:59 +08:00
|
|
|
this._dataList.push(_v)
|
2025-08-12 19:49:50 +08:00
|
|
|
this._dataMap.set(_v.key, _v)
|
2025-08-12 15:01:59 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
getDataMap(): Map<string, Language> { return this._dataMap; }
|
|
|
|
|
getDataList(): Language[] { return this._dataList; }
|
2025-08-12 15:01:59 +08:00
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
get(key: string): Language | undefined {
|
2025-08-12 15:01:59 +08:00
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2025-08-12 19:49:50 +08:00
|
|
|
|
2025-08-12 15:01:59 +08:00
|
|
|
|
|
|
|
|
|
2025-08-12 16:08:58 +08:00
|
|
|
|
|
|
|
|
export class TbGirls {
|
2025-08-12 16:58:02 +08:00
|
|
|
private _dataMap: Map<number, Girl>
|
|
|
|
|
private _dataList: Girl[]
|
2025-08-12 16:08:58 +08:00
|
|
|
constructor(_buf_: ByteBuf) {
|
2025-08-12 16:58:02 +08:00
|
|
|
this._dataMap = new Map<number, Girl>()
|
2025-08-12 16:08:58 +08:00
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
2025-08-12 16:58:02 +08:00
|
|
|
let _v: Girl
|
|
|
|
|
_v = new Girl(_buf_)
|
2025-08-12 16:08:58 +08:00
|
|
|
this._dataList.push(_v)
|
|
|
|
|
this._dataMap.set(_v.id, _v)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
getDataMap(): Map<number, Girl> { return this._dataMap; }
|
|
|
|
|
getDataList(): Girl[] { return this._dataList; }
|
2025-08-12 16:08:58 +08:00
|
|
|
|
2025-08-12 16:58:02 +08:00
|
|
|
get(key: number): Girl | undefined {
|
|
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class TbGirlsDetail {
|
|
|
|
|
private _dataMap: Map<number, GirlDetail>
|
|
|
|
|
private _dataList: GirlDetail[]
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this._dataMap = new Map<number, GirlDetail>()
|
|
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
|
|
|
|
let _v: GirlDetail
|
|
|
|
|
_v = new GirlDetail(_buf_)
|
|
|
|
|
this._dataList.push(_v)
|
|
|
|
|
this._dataMap.set(_v.id, _v)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDataMap(): Map<number, GirlDetail> { return this._dataMap; }
|
|
|
|
|
getDataList(): GirlDetail[] { return this._dataList; }
|
|
|
|
|
|
|
|
|
|
get(key: number): GirlDetail | undefined {
|
|
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class TbThemes {
|
|
|
|
|
private _dataMap: Map<number, Theme>
|
|
|
|
|
private _dataList: Theme[]
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this._dataMap = new Map<number, Theme>()
|
|
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
|
|
|
|
let _v: Theme
|
|
|
|
|
_v = new Theme(_buf_)
|
|
|
|
|
this._dataList.push(_v)
|
|
|
|
|
this._dataMap.set(_v.id, _v)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDataMap(): Map<number, Theme> { return this._dataMap; }
|
|
|
|
|
getDataList(): Theme[] { return this._dataList; }
|
|
|
|
|
|
|
|
|
|
get(key: number): Theme | undefined {
|
2025-08-12 16:08:58 +08:00
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 15:01:59 +08:00
|
|
|
|
2025-08-13 11:31:21 +08:00
|
|
|
export class TbAiCharacters {
|
|
|
|
|
private _dataMap: Map<number, AiCharacter>
|
|
|
|
|
private _dataList: AiCharacter[]
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this._dataMap = new Map<number, AiCharacter>()
|
|
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
|
|
|
|
let _v: AiCharacter
|
|
|
|
|
_v = new AiCharacter(_buf_)
|
|
|
|
|
this._dataList.push(_v)
|
|
|
|
|
this._dataMap.set(_v.id, _v)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDataMap(): Map<number, AiCharacter> { return this._dataMap; }
|
|
|
|
|
getDataList(): AiCharacter[] { return this._dataList; }
|
|
|
|
|
|
|
|
|
|
get(key: number): AiCharacter | undefined {
|
|
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class TbGlobalConfig {
|
|
|
|
|
|
|
|
|
|
private _data: GlobalConfig
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
if (_buf_.readInt() != 1) throw new Error('table mode=one, but size != 1')
|
|
|
|
|
this._data = new GlobalConfig(_buf_)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getData(): GlobalConfig { return this._data; }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* api键
|
|
|
|
|
*/
|
|
|
|
|
get ApiKey(): string { return this._data.ApiKey; }
|
|
|
|
|
/**
|
|
|
|
|
* ai模型
|
|
|
|
|
*/
|
|
|
|
|
get Model(): string { return this._data.Model; }
|
|
|
|
|
get Temperature(): number { return this._data.Temperature; }
|
|
|
|
|
/**
|
|
|
|
|
* 单次聊天最大token
|
|
|
|
|
*/
|
|
|
|
|
get MaxTokens(): number { return this._data.MaxTokens; }
|
|
|
|
|
/**
|
|
|
|
|
* 超时时间(微秒)
|
|
|
|
|
*/
|
|
|
|
|
get Timeout(): number { return this._data.Timeout; }
|
2025-08-13 17:10:12 +08:00
|
|
|
/**
|
|
|
|
|
* 单个角色免费聊天次数
|
|
|
|
|
*/
|
|
|
|
|
get FreeChatTimes(): number { return this._data.FreeChatTimes; }
|
2025-08-15 15:24:31 +08:00
|
|
|
/**
|
|
|
|
|
* 游戏名
|
|
|
|
|
*/
|
|
|
|
|
get GameName(): string { return this._data.GameName; }
|
2025-08-13 11:31:21 +08:00
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
this._data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-13 17:10:12 +08:00
|
|
|
export class TbPurchaseConfig {
|
|
|
|
|
private _dataMap: Map<number, PurchaseConfig>
|
|
|
|
|
private _dataList: PurchaseConfig[]
|
|
|
|
|
constructor(_buf_: ByteBuf) {
|
|
|
|
|
this._dataMap = new Map<number, PurchaseConfig>()
|
|
|
|
|
this._dataList = []
|
|
|
|
|
for(let n = _buf_.readInt(); n > 0; n--) {
|
|
|
|
|
let _v: PurchaseConfig
|
|
|
|
|
_v = new PurchaseConfig(_buf_)
|
|
|
|
|
this._dataList.push(_v)
|
|
|
|
|
this._dataMap.set(_v.id, _v)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDataMap(): Map<number, PurchaseConfig> { return this._dataMap; }
|
|
|
|
|
getDataList(): PurchaseConfig[] { return this._dataList; }
|
|
|
|
|
|
|
|
|
|
get(key: number): PurchaseConfig | undefined {
|
|
|
|
|
return this._dataMap.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resolve(tables:Tables) {
|
|
|
|
|
for(let data of this._dataList)
|
|
|
|
|
{
|
|
|
|
|
data.resolve(tables)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-12 15:01:59 +08:00
|
|
|
type ByteBufLoader = (file: string) => ByteBuf
|
|
|
|
|
|
|
|
|
|
export class Tables {
|
2025-08-12 19:49:50 +08:00
|
|
|
private _TbLanguage: TbLanguage
|
|
|
|
|
get TbLanguage(): TbLanguage { return this._TbLanguage;}
|
2025-08-12 16:08:58 +08:00
|
|
|
private _TbGirls: TbGirls
|
|
|
|
|
get TbGirls(): TbGirls { return this._TbGirls;}
|
2025-08-12 16:58:02 +08:00
|
|
|
private _TbGirlsDetail: TbGirlsDetail
|
|
|
|
|
get TbGirlsDetail(): TbGirlsDetail { return this._TbGirlsDetail;}
|
|
|
|
|
private _TbThemes: TbThemes
|
|
|
|
|
get TbThemes(): TbThemes { return this._TbThemes;}
|
2025-08-13 11:31:21 +08:00
|
|
|
private _TbAiCharacters: TbAiCharacters
|
|
|
|
|
get TbAiCharacters(): TbAiCharacters { return this._TbAiCharacters;}
|
|
|
|
|
private _TbGlobalConfig: TbGlobalConfig
|
|
|
|
|
get TbGlobalConfig(): TbGlobalConfig { return this._TbGlobalConfig;}
|
2025-08-13 17:10:12 +08:00
|
|
|
private _TbPurchaseConfig: TbPurchaseConfig
|
|
|
|
|
get TbPurchaseConfig(): TbPurchaseConfig { return this._TbPurchaseConfig;}
|
2025-08-12 15:01:59 +08:00
|
|
|
|
|
|
|
|
static getTableNames(): string[] {
|
|
|
|
|
let names: string[] = [];
|
2025-08-12 19:49:50 +08:00
|
|
|
names.push('tblanguage');
|
2025-08-12 16:08:58 +08:00
|
|
|
names.push('tbgirls');
|
2025-08-12 16:58:02 +08:00
|
|
|
names.push('tbgirlsdetail');
|
|
|
|
|
names.push('tbthemes');
|
2025-08-13 11:31:21 +08:00
|
|
|
names.push('tbaicharacters');
|
|
|
|
|
names.push('tbglobalconfig');
|
2025-08-13 17:10:12 +08:00
|
|
|
names.push('tbpurchaseconfig');
|
2025-08-12 15:01:59 +08:00
|
|
|
return names;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor(loader: ByteBufLoader) {
|
2025-08-12 19:49:50 +08:00
|
|
|
this._TbLanguage = new TbLanguage(loader('tblanguage'))
|
2025-08-12 16:08:58 +08:00
|
|
|
this._TbGirls = new TbGirls(loader('tbgirls'))
|
2025-08-12 16:58:02 +08:00
|
|
|
this._TbGirlsDetail = new TbGirlsDetail(loader('tbgirlsdetail'))
|
|
|
|
|
this._TbThemes = new TbThemes(loader('tbthemes'))
|
2025-08-13 11:31:21 +08:00
|
|
|
this._TbAiCharacters = new TbAiCharacters(loader('tbaicharacters'))
|
|
|
|
|
this._TbGlobalConfig = new TbGlobalConfig(loader('tbglobalconfig'))
|
2025-08-13 17:10:12 +08:00
|
|
|
this._TbPurchaseConfig = new TbPurchaseConfig(loader('tbpurchaseconfig'))
|
2025-08-12 15:01:59 +08:00
|
|
|
|
2025-08-12 19:49:50 +08:00
|
|
|
this._TbLanguage.resolve(this)
|
2025-08-12 16:08:58 +08:00
|
|
|
this._TbGirls.resolve(this)
|
2025-08-12 16:58:02 +08:00
|
|
|
this._TbGirlsDetail.resolve(this)
|
|
|
|
|
this._TbThemes.resolve(this)
|
2025-08-13 11:31:21 +08:00
|
|
|
this._TbAiCharacters.resolve(this)
|
|
|
|
|
this._TbGlobalConfig.resolve(this)
|
2025-08-13 17:10:12 +08:00
|
|
|
this._TbPurchaseConfig.resolve(this)
|
2025-08-12 15:01:59 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|