diff --git a/assets/Scripts/chat18x/data/GirlData.ts b/assets/Scripts/chat18x/data/GirlData.ts index 7aac925c..4741b061 100644 --- a/assets/Scripts/chat18x/data/GirlData.ts +++ b/assets/Scripts/chat18x/data/GirlData.ts @@ -835,11 +835,13 @@ export class GirlData extends BaseData { /** 获取所有已经解锁技师的 id,不区分技师的付费类型 */ public getAllReleaseGirlIds(): number[] { const result: number[] = []; + const seen = new Set(); // 用来去重 const cats = this.ensureCategories(); - + // 遍历 for (const [categoryId, bucket] of cats.entries()) { for (const girlId of bucket.girlIds) { - if (this.getIsRelease(categoryId, girlId)) { + if (this.getIsRelease(categoryId, girlId) && !seen.has(girlId)) { + seen.add(girlId); // 标记已加入 result.push(girlId); } }