From 8f983d0dab26becb6b85dbbb616fde21c3ad8f02 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 20 八月 2025 18:40:23 +0800
Subject: [PATCH] 125 【战斗】战斗系统
---
Main/System/Battle/BattleEffectMgr.cs | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Main/System/Battle/BattleEffectMgr.cs b/Main/System/Battle/BattleEffectMgr.cs
index 3d2899a..2c5e120 100644
--- a/Main/System/Battle/BattleEffectMgr.cs
+++ b/Main/System/Battle/BattleEffectMgr.cs
@@ -43,6 +43,17 @@
public BattleEffectPlayer PlayEffect(int ObjID, int effectId, Transform parent)
{
+ if (effectId <= 0)
+ {
+ return null;
+ }
+
+ var effectCfg = EffectConfig.Get(effectId);
+ if (null == effectCfg)
+ {
+ return null;
+ }
+
if (!effectDict.ContainsKey(effectId))
{
effectDict[effectId] = new List<BattleEffectPlayer>();
--
Gitblit v1.8.0