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.
51 lines
1.9 KiB
51 lines
1.9 KiB
using ProtoCSClass;
|
|
using xFrame;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
public class Handle_OnCreateEntity : BaseHandle
|
|
{
|
|
public override void DoHandle(int eid, object msg)
|
|
{
|
|
if (msg is OnTickBattleEntityRes ret)
|
|
{
|
|
if (ret.Ret == 0)
|
|
{
|
|
var combatEntity = Contexts.Combat.GetEntity(ret.Seq);
|
|
if (combatEntity == null)
|
|
{
|
|
XLog.LogWarning("wtf, combatEntity is null");
|
|
return;
|
|
}
|
|
|
|
if (BattleModule.Instance.worldType == WorldType.BossContinueBattle)
|
|
{
|
|
if (CoreUIBridge.s_BossBattleParams.waveIsRedName)
|
|
{
|
|
var heroInfo = CoreUIBridge.s_BossBattleParams.redNameShowInfo.HeroInfo;
|
|
if (heroInfo == null)
|
|
{
|
|
XLog.LogWarning("wtf, heroInfo is null");
|
|
combatEntity.isDestroyEnt = true;
|
|
combatEntity.isDead = true;
|
|
combatEntity.RemoveBorn();
|
|
RPCCaller.Call_OnBossBattleChangeLayer(combatEntity, false);
|
|
return;
|
|
}
|
|
// BossContinueBattleEntityCreator.CreateIntruderMonsterEntityByBorn(combatEntity, heroInfo);
|
|
}
|
|
else
|
|
{
|
|
EntityCreateSrv.CreateMonsterByBorn(combatEntity);
|
|
}
|
|
CoreUIBridge.s_BossBattleParams.currBossEid = ret.Seq;
|
|
}
|
|
else
|
|
{
|
|
EntityCreateSrv.CreateMonsterByBorn(combatEntity);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|