1
This commit is contained in:
@@ -1957,6 +1957,19 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
var killFish = JsonConvert.DeserializeObject<WebSocketResponseBase<RoomKillNotice>>(msg)
|
||||
.arguments[0];
|
||||
|
||||
// ⭐ 掉落道具推送去重:服务端把"击杀爆奖"和"掉落道具"拆成两条 RoomKillNotice 下发,
|
||||
// 第二条与击杀消息同 fishId/killtime/gold,但只有 drop、没有 param。
|
||||
// Boss 鱼 DieFish 是延迟回收(字典未即时移除),第二条若按击杀再处理一次:
|
||||
// ① not-self 模式下 _pending[key] 被覆盖 → 前一个"爆奖中"BJEndUI 失去引用、永久残留在座位上;
|
||||
// ② 重复克隆爆奖特效、重复走 DieFish → 特效/音效/爆奖双份。
|
||||
// 客户端目前没有掉落弹窗逻辑(见 RoomKillNotice.drop 注释),直接跳过;将来做掉落 UI 时在此处理。
|
||||
if (killFish.drop != null && killFish.param == null)
|
||||
{
|
||||
NetLog.Log($"[CreateFishManager] 掉落道具推送(跳过击杀处理):fishId={killFish.fishId} " +
|
||||
$"prop={killFish.drop.propNumber}×{killFish.drop.count}");
|
||||
return;
|
||||
}
|
||||
|
||||
NetLog.Log($"[CreateFishManager] 杀鱼延迟:{DateTimeOffset.Now.ToUnixTimeSeconds() - killFish.timespan}s");
|
||||
SitPosData sitData = null; //击杀玩家座位数据
|
||||
foreach (var item in currGameType.list_Sits)
|
||||
@@ -2079,7 +2092,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
// 不克隆 effect_DieAward,在 killer 座位显示 img_BaoJiangZhong,
|
||||
// 等待帧同步 baoJiangEnd(机器人由房主延迟 5~10 秒代发)后显示最终 BJEndUI + 加分
|
||||
bool isSelfKill_Boss = sitData.user == GameManager.Instance.user.id;
|
||||
if (GameManager.Instance.useNotSelfBaoJiangMode
|
||||
if (UseNotSelfBaoJiangFlow
|
||||
&& !isSelfKill_Boss
|
||||
&& monster.effect_DieAward != null
|
||||
&& BaoJiangNotSelfHandler.ShowInProgress(
|
||||
@@ -2167,7 +2180,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
// ⚠️ 排除重写了 SetCoinCount 的子类(如炸弹蟹 HHWK_ZDX_DieEvent):
|
||||
// 这些鱼有特殊爆炸/范围杀鱼玩法,必须走原流程,不能跳过 SetCoinCount
|
||||
bool isSelfKill_TSY = sitData.user == GameManager.Instance.user.id;
|
||||
if (GameManager.Instance.useNotSelfBaoJiangMode
|
||||
if (UseNotSelfBaoJiangFlow
|
||||
&& !isSelfKill_TSY
|
||||
&& monster.effect_DieAward != null)
|
||||
{
|
||||
@@ -2297,7 +2310,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
|
||||
// ⭐ not-self 分流:非自己击杀(含机器人)且开启新模式 → 走 not-self 流程
|
||||
bool isSelfKill_TBoss = sitData.user == GameManager.Instance.user.id;
|
||||
if (GameManager.Instance.useNotSelfBaoJiangMode
|
||||
if (UseNotSelfBaoJiangFlow
|
||||
&& !isSelfKill_TBoss
|
||||
&& monster.effect_DieAward != null
|
||||
&& BaoJiangNotSelfHandler.ShowInProgress(
|
||||
@@ -2379,6 +2392,27 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
|
||||
|
||||
|
||||
// ================================================================
|
||||
// not-self 爆奖分流开关(按房间区分)
|
||||
// ================================================================
|
||||
|
||||
/// <summary>
|
||||
/// 当前房间是否启用 not-self 爆奖分流(其他玩家击杀只在座位显示"爆奖中"面板,
|
||||
/// 等 baoJiangEnd 帧同步再显示最终 BJEndUI + 加分)。
|
||||
/// ⭐ XJMH 例外:星际迷航各 Boss 爆奖(幸运轮/扑克/飞碟/星舰巡航等)已实现完整的
|
||||
/// isSelf=false 分支(他人视角银币结算、PW_Effect_Settle_*_Other_* 结算特效),
|
||||
/// 所有玩家都要走完整爆奖流程,不参与 not-self 简化分流,也不发送/等待 baoJiangEnd。
|
||||
/// </summary>
|
||||
private bool UseNotSelfBaoJiangFlow
|
||||
{
|
||||
get
|
||||
{
|
||||
var gm = GameManager.Instance;
|
||||
if (gm == null || !gm.useNotSelfBaoJiangMode) return false;
|
||||
return gm.gameData == null || gm.gameData.currGameType != GameType.XJMH;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// 工具:包装 JiaFen 回调,self 流程加分完成后发送 baoJiangEnd 帧同步
|
||||
// ================================================================
|
||||
@@ -2395,11 +2429,9 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
// 1. 执行原加分逻辑
|
||||
onScoreAdd?.Invoke(p);
|
||||
|
||||
// 2. self 流程:本地玩家击杀且开启 not-self 模式时,发送 baoJiangEnd 帧同步
|
||||
// 2. self 流程:本地玩家击杀且当前房间启用 not-self 模式时,发送 baoJiangEnd 帧同步
|
||||
// (机器人击杀由房主延迟代发,不在这里发)
|
||||
if (isSelfKill
|
||||
&& GameManager.Instance != null
|
||||
&& GameManager.Instance.useNotSelfBaoJiangMode)
|
||||
if (isSelfKill && UseNotSelfBaoJiangFlow)
|
||||
{
|
||||
BaoJiangNotSelfHandler.SendBaoJiangEnd(
|
||||
killFish.userId,
|
||||
|
||||
Reference in New Issue
Block a user