Core/Conditions: Allow ConditionTypeOrReference to be 0 for conditions that have ScriptName set

Port From (https://github.com/TrinityCore/TrinityCore/commit/b60e5b2a7d6871653f7b93ef90553c6d650bece0)
This commit is contained in:
Hondacrx
2025-10-13 16:20:27 -04:00
parent aa2b2599b2
commit 9734e9ab8c
@@ -1179,6 +1179,15 @@ namespace Game
{ {
switch (cond.ConditionType) switch (cond.ConditionType)
{ {
case ConditionTypes.None:
{
if (cond.ScriptId == 0)
{
Log.outError(LogFilter.Sql, $"{cond.ToString(true)} must have a `ScriptName` in `condition` table, ignoring.");
return false;
}
break;
}
case ConditionTypes.Aura: case ConditionTypes.Aura:
{ {
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(cond.ConditionValue1, Difficulty.None); SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(cond.ConditionValue1, Difficulty.None);