From 57be5b461d54e4fe48bf9a375e883131722539a7 Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Sat, 20 Sep 2025 15:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E8=A7=A3=E9=94=81=E6=8A=80=E5=B8=88=E7=9A=84=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scripts/chat18x/data/GirlData.ts | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/assets/Scripts/chat18x/data/GirlData.ts b/assets/Scripts/chat18x/data/GirlData.ts index a7a36cd9..28ff6fe7 100644 --- a/assets/Scripts/chat18x/data/GirlData.ts +++ b/assets/Scripts/chat18x/data/GirlData.ts @@ -9,6 +9,7 @@ import { GirlChatData } from "./GirlChatData"; import { GirlFavorabilityData } from "./GirlFavorabilityData"; import { DataId } from "./DataManager"; import proto from "db://assets/Scripts/proto/proto.pb.js"; +import { PriceType } from "../../schema/schema"; // 分类的数据结构 interface CategoryBucket { @@ -218,6 +219,18 @@ export class GirlData extends BaseData { return oneData.getGrilPriceType(); } + /** 技师是否免费类型 */ + public isGirlFreeType(categoryId: string, girlId: number): boolean { + let priceType = this.getGrilPriceType(categoryId, girlId); + return priceType == PriceType.free; + } + + /** 技师是否付费类型 */ + public isGirlPayType(categoryId: string, girlId: number): boolean { + let priceType = this.getGrilPriceType(categoryId, girlId); + return priceType == PriceType.pay; + } + /** 获取原来的价格,除100 */ public getGrilOriginalPrice(categoryId: string, girlId: number): number { let oneData = this.getGrilBrief(categoryId, girlId); @@ -755,6 +768,22 @@ export class GirlData extends BaseData { return oneData.getUnlockedVideoIds(); } + /** 获取所有已经解锁技师的 id,不区分技师的付费类型 */ + public getAllReleaseGirlIds(): number[] { + const result: number[] = []; + const cats = this.ensureCategories(); + + for (const [categoryId, bucket] of cats.entries()) { + for (const girlId of bucket.girlIds) { + if (this.getIsRelease(categoryId, girlId)) { + result.push(girlId); + } + } + } + // 返回结果 + return result; + } + /** --------------------------------------------------------- 技师的聊天数据 --------------------------------------------------------- */ // 解析技师聊天数据,一个