From e88ca89aaaf7997d436c47b3fa9f6fd771d35d65 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 9 Mar 2026 14:23:14 +0100 Subject: [PATCH] Core/Conditions: Allow CONDITION_NONE to be used without a script if NegativeCondition is 1 --- sql/updates/world/master/2026_03_09_00_world.sql | 3 +++ src/server/game/Conditions/ConditionMgr.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/master/2026_03_09_00_world.sql diff --git a/sql/updates/world/master/2026_03_09_00_world.sql b/sql/updates/world/master/2026_03_09_00_world.sql new file mode 100644 index 0000000000..09713b4099 --- /dev/null +++ b/sql/updates/world/master/2026_03_09_00_world.sql @@ -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'); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index c57f3e47d7..b53ac96e20 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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;