修复:商店购买单次特效卡并指定给别人时,购买者自己也必须能看到特效播放
This commit is contained in:
@@ -900,14 +900,9 @@
|
||||
if (data.jjb !== undefined)
|
||||
document.getElementById('shop-jjb').textContent = Number(data.jjb)
|
||||
.toLocaleString();
|
||||
// 播放本地特效(购买者自己可见)
|
||||
// 播放本地特效(购买者自己必须也能看到)
|
||||
if (data.play_effect && window.EffectManager) {
|
||||
const myTarget = data.target_username;
|
||||
const myName = window.chatContext?.username;
|
||||
// null = 全员,或者 target 是自己
|
||||
if (!myTarget || myTarget === myName) {
|
||||
window.EffectManager.play(data.play_effect);
|
||||
}
|
||||
window.EffectManager.play(data.play_effect);
|
||||
}
|
||||
// 关闭商店弹窗,让用户欣赏特效
|
||||
closeShopModal();
|
||||
|
||||
Reference in New Issue
Block a user