You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.2 KiB
52 lines
2.2 KiB
using CoreGame;
|
|
using ProtoCSClass;
|
|
using xFrame;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
public class Handle_BossContinueBattleFinishLayer : BaseHandle
|
|
{
|
|
public override void DoHandle(int eid, object msg)
|
|
{
|
|
if (msg is CSCBFinishLayerRes cscbFinishLayerRes)
|
|
{
|
|
if (cscbFinishLayerRes.Ret != 0)
|
|
{
|
|
XLog.LogWarning($"CSCBFinishLayerRes ret is {cscbFinishLayerRes.Ret}, eid is {eid}");
|
|
return;
|
|
}
|
|
CoreUIBridge.s_BossBattleParams.bossBattleLayer = cscbFinishLayerRes.Data.NowLayer;
|
|
CoreUIBridge.CoreGamePushCSCBFinishLayerRes(cscbFinishLayerRes);
|
|
if (ContinueBattleDescMgr.Instance.GetConfig(CoreUIBridge.s_BossBattleParams.bossBattleLayer) == null) //没有下一层直接发退出战斗协议
|
|
{
|
|
RPCCaller.Call_OnBossBattleLeave();
|
|
return;
|
|
}
|
|
var stageId = cscbFinishLayerRes.Data.NowStageId;
|
|
var redNameStageId = cscbFinishLayerRes.Data.RednamestageId;
|
|
CoreUIBridge.s_BossBattleParams.bossBattleNowRewardList = cscbFinishLayerRes.Data.NowReward;
|
|
var levelWaveEnt = Contexts.Combat.LevelWave;
|
|
if (redNameStageId > 0)
|
|
{
|
|
CoreUIBridge.s_BossBattleParams.redNameStageId = redNameStageId;
|
|
CoreUIBridge.s_BossBattleParams.waveIsRedName = true;
|
|
}
|
|
else
|
|
{
|
|
CoreUIBridge.s_BossBattleParams.waveIsRedName = false;
|
|
// if (levelWaveEnt.IsValid() && levelWaveEnt.hasLevelWaveAppend)
|
|
// {
|
|
// var append = levelWaveEnt.levelWaveAppend;
|
|
// append.stageId = stageId;
|
|
// }
|
|
}
|
|
|
|
var localPlayer = Contexts.Combat.LocalPlayer;
|
|
if (localPlayer.IsValid() && localPlayer.isDead && levelWaveEnt.levelWave.curStageId != stageId)
|
|
{
|
|
localPlayer.DispatchEvent(ClientEvent.OnReviveEntity, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|