获取所有已经解锁技师的 id
This commit is contained in:
@@ -9,6 +9,7 @@ import { GirlChatData } from "./GirlChatData";
|
|||||||
import { GirlFavorabilityData } from "./GirlFavorabilityData";
|
import { GirlFavorabilityData } from "./GirlFavorabilityData";
|
||||||
import { DataId } from "./DataManager";
|
import { DataId } from "./DataManager";
|
||||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||||
|
import { PriceType } from "../../schema/schema";
|
||||||
|
|
||||||
// 分类的数据结构
|
// 分类的数据结构
|
||||||
interface CategoryBucket {
|
interface CategoryBucket {
|
||||||
@@ -218,6 +219,18 @@ export class GirlData extends BaseData {
|
|||||||
return oneData.getGrilPriceType();
|
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 */
|
/** 获取原来的价格,除100 */
|
||||||
public getGrilOriginalPrice(categoryId: string, girlId: number): number {
|
public getGrilOriginalPrice(categoryId: string, girlId: number): number {
|
||||||
let oneData = this.getGrilBrief(categoryId, girlId);
|
let oneData = this.getGrilBrief(categoryId, girlId);
|
||||||
@@ -755,6 +768,22 @@ export class GirlData extends BaseData {
|
|||||||
return oneData.getUnlockedVideoIds();
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/** --------------------------------------------------------- 技师的聊天数据 --------------------------------------------------------- */
|
/** --------------------------------------------------------- 技师的聊天数据 --------------------------------------------------------- */
|
||||||
|
|
||||||
// 解析技师聊天数据,一个
|
// 解析技师聊天数据,一个
|
||||||
|
|||||||
Reference in New Issue
Block a user