diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index 7a3787a52..df3019fa1 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -2499,6 +2499,12 @@ namespace Game.Entities { uint spellId = spellsResult.Read(0); Difficulty difficulty = (Difficulty)spellsResult.Read(2); + if (CliDB.SpellNameStorage.HasRecord(spellId)) + { + Log.outError(LogFilter.Sql, $"Serverside spell {spellId} difficulty {difficulty} is already loaded from file. Overriding existing spells is not allowed."); + continue; + } + mServersideSpellNames.Add(new (spellId, spellsResult.Read(61))); SpellInfo spellInfo = new SpellInfo(mServersideSpellNames.Last().Name, difficulty, spellEffects[(spellId, difficulty)]); @@ -2573,7 +2579,7 @@ namespace Game.Entities spellInfo.SchoolMask = (SpellSchoolMask)spellsResult.Read(74); spellInfo.ChargeCategoryId = spellsResult.Read(75); - mSpellInfoMap.Add(spellInfo.Id, spellInfo); + mSpellInfoMap.Add(spellId, spellInfo); } while (spellsResult.NextRow()); }