Core/Conditions: Allow CONDITION_NONE to be used without a script if NegativeCondition is 1

This commit is contained in:
Shauren
2026-03-09 14:23:14 +01:00
parent 9a3e41b179
commit e88ca89aaa
2 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=34 AND `SourceEntry`=139903;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`NegativeCondition`,`Comment`) VALUES
(34,139903,1,'PlayerCondition 139903 - BLOCK MISSING');

View File

@@ -2151,9 +2151,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
{
case CONDITION_NONE:
{
if (!cond->ScriptId)
if (!cond->NegativeCondition && !cond->ScriptId)
{
TC_LOG_ERROR("sql.sql", "{} must have a `ScriptName` in `condition` table, ignoring.", *cond);
TC_LOG_ERROR("sql.sql", "{} must have `NegativeCondition` or `ScriptName` in `condition` table, ignoring.", *cond);
return false;
}
break;