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

This commit is contained in:
luis
2026-03-11 08:50:23 -03:00
parent cb995fb8e9
commit 4066c83108
2 changed files with 10 additions and 2 deletions
@@ -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');
+2 -2
View File
@@ -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;