获取可聊天的技师数据

This commit is contained in:
chen wei bo
2025-09-22 17:54:45 +08:00
parent 26019a0080
commit d56c2518f5
10 changed files with 1507 additions and 53 deletions
+18 -1
View File
@@ -9,7 +9,9 @@ export class GirlUnlockData extends BaseData {
// id
private id: number;
// 付费技师是否已经解锁
private isRelease: boolean;
private isRelease: boolean;
// 角色解锁时间,时间戳,秒
private unlockTime: number;
// 解锁图片 id
private unlockedImageIds: number[];
// 解锁视频 id
@@ -19,6 +21,7 @@ export class GirlUnlockData extends BaseData {
super();
this.id = 0;
this.isRelease = false;
this.unlockTime = 0;
this.unlockedImageIds = [];
this.unlockedVideoIds = [];
}
@@ -26,6 +29,7 @@ export class GirlUnlockData extends BaseData {
public reset(): void {
this.id = 0;
this.isRelease = false;
this.unlockTime = 0;
this.unlockedImageIds = [];
this.unlockedVideoIds = [];
}
@@ -33,6 +37,7 @@ export class GirlUnlockData extends BaseData {
public clear(): void {
this.id = 0;
this.isRelease = false;
this.unlockTime = 0;
this.unlockedImageIds = [];
this.unlockedVideoIds = [];
}
@@ -41,6 +46,7 @@ export class GirlUnlockData extends BaseData {
super.destroy();
this.id = null;
this.isRelease = null;
this.unlockTime = null;
this.unlockedImageIds = null;
this.unlockedVideoIds = null;
}
@@ -65,6 +71,17 @@ export class GirlUnlockData extends BaseData {
this.isRelease = value;
}
/** 获取 角色解锁时间,时间戳,秒 */
public getUnlockTime(): number {
return this.unlockTime;
}
/** 保存 角色解锁时间,时间戳,秒 */
public setUnlockTime(value: number): void {
this.unlockTime = value;
// logger.log("设置角色 ", this.id, " 的解锁时间:", this.unlockTime);
}
/** 判断图片是否解锁,根据 id */
public isImageUnlock(id: number): boolean {
for (let i = 0; i < this.unlockedImageIds.length; i++) {