This commit is contained in:
2025-09-10 21:49:39 +08:00
parent 6a9e1ebe57
commit eb2e1857dc
6 changed files with 509 additions and 392 deletions
+21 -4
View File
@@ -148,7 +148,14 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
this,
this.onEmotionInitialized
);
Utils.addInnerEL(
InnerMsgCode.ChatTotalCountChange,
this,
this.onChatCountChange
);
}
onDestroy(): void {
Utils.removeInnerEL(
InnerMsgCode.Chat_DialogRefresh,
@@ -160,7 +167,11 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
this,
this.onLanguageChangeCallback
);
Utils.removeInnerEL(
InnerMsgCode.ChatTotalCountChange,
this,
this.onChatCountChange
);
Utils.removeInnerEL(
InnerMsgCode.Chat_EmotionInitialized,
this,
@@ -193,8 +204,6 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
//const dataDetail = roleData.detail;
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
this.nameKey = girlData.getGrilName(this.categoryId, this.id);
this.girlName.string = LanguageUtils.getText(this.nameKey);
// ResManager.I.changeBundleSpriteFrame(
@@ -279,6 +288,14 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
}, 0.1);
}
}
onChatCountChange() {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
let triggerId = girlData.getTriggerGrilPhotoId(this.categoryId, this.id);
if (triggerId == 0) triggerId = 100040103;
this.popUpImage.refresh(this.categoryId, this.id, triggerId);
}
setVideoEnable(enable: boolean) {
if (!this.girlVideo) return;
@@ -433,7 +450,7 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
}
onChatLimitReached(): void {
this.payToTalkPanel.show(this.categoryId,this.id);
this.payToTalkPanel.show(this.categoryId, this.id);
}
/**
* 情绪状态更新回调 (实现IChatPanelCallback接口)