From 4066c831081ca156670d6233d1f535ff0cc587bc Mon Sep 17 00:00:00 2001 From: luis Date: Wed, 11 Mar 2026 08:50:23 -0300 Subject: [PATCH] Core/Conditions: Allow CONDITION_NONE to be used without a script if NegativeCondition is 1 --- sql/updates/world/master/2026_03_11_00_world.sql | 8 ++++++++ src/server/game/Conditions/ConditionMgr.cpp | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/master/2026_03_11_00_world.sql diff --git a/sql/updates/world/master/2026_03_11_00_world.sql b/sql/updates/world/master/2026_03_11_00_world.sql new file mode 100644 index 000000000..5b385b6fa --- /dev/null +++ b/sql/updates/world/master/2026_03_11_00_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `player_racestats` WHERE `race` IN (86,91); +INSERT INTO `player_racestats` (`race`,`str`,`agi`,`sta`,`inte`,`spi`) VALUES +(86,0,0,0,0,0), +(91,0,0,0,0,0); + +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 3f4899b16..94d1b1af4 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -2167,9 +2167,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;