egametang/ET · error

create buff fail: {buffId} {buffConfigId} {casterId}

Error message

create buff fail: {buffId} {buffConfigId} {casterId}

What it means

Error "create buff fail: {buffId} {buffConfigId} {casterId}" thrown in egametang/ET.

Source

Thrown at Packages/cn.etetet.spell/Scripts/Hotfix/Share/BuffComponentSystem.cs:69

                self.configIdBuffs.Add(buffConfigId, buff);
            
                if (buffConfig.TickTime > 0)
                {
                    buff.TickTime = buffConfig.TickTime;
                }
                if (buffConfig.Duration >= 0)
                {
                    buff.ExpireTime = self.GetSingleton<TimeInfo>().ServerNow() + buffConfig.Duration;
                }
                else
                {
                    buff.ExpireTime = long.MaxValue;
                }
                return buff;
            }
            catch (Exception e)
            {
                throw new Exception($"create buff fail: {buffId} {buffConfigId} {casterId}", e);
            }
        }

        public static void RemoveBuffByConfigId(this BuffComponent self, int configId)
        {
            self.configIdBuffs.Remove(configId, out var buffs);

            if (buffs == null)
            {
                return;
            }
            
            foreach (Buff buff in buffs)
            {
                if (buff == null)
                {
                    continue;
                }

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. 确认 buffConfigId 在 BuffConfig 配置表中存在且已正确加载
  2. 检查 buffId 对应的 Buff 类型是否已注册
  3. 确认 casterId 对应实体未 Dispose

Example fix

在创建前校验 BuffConfigCategory.Instance.Contain(buffConfigId),配置缺失时先排查 Luban 导表。

When it happens

Trigger: BuffComponentSystem.CreateBuff 创建 Buff 实体失败,通常是 buffConfigId 对应配置不存在或 buff 工厂返回空

Common situations: See trigger scenarios.


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/9961be031f71bd0e. Report an issue: GitHub.