From aeb266b090342252f420c8bcc2afcc4287eb9317 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 17 Dec 2021 19:38:23 -0500 Subject: [PATCH] Core/Misc: Change some logs from INFO to ERROR when loading invalid creature template resistances and spells Port From (https://github.com/TrinityCore/TrinityCore/commit/0c1f707ca580fe60134092dba4e690def55762a7) --- Source/Game/Globals/ObjectManager.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index 79f7d6e48..0790ac973 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -1879,16 +1879,15 @@ namespace Game { uint creatureID = result.Read(0); SpellSchools school = (SpellSchools)result.Read(1); - if (school == SpellSchools.Normal || school >= SpellSchools.Max) { - Log.outInfo(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this school {school} doesn't exist"); + Log.outError(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this school {school} doesn't exist"); continue; } if (!creatureTemplateStorage.TryGetValue(creatureID, out CreatureTemplate creatureTemplate)) { - Log.outInfo(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this creature doesn't exist"); + Log.outError(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this creature doesn't exist"); continue; } @@ -1922,7 +1921,7 @@ namespace Game if (index >= SharedConst.MaxCreatureSpells) { - Log.outInfo(LogFilter.Sql, $"creature_template_spell has spell definitions for creature {creatureID} with a incorrect index {index}"); + Log.outError(LogFilter.Sql, $"creature_template_spell has spell definitions for creature {creatureID} with a incorrect index {index}"); continue; }