Core/Conditions: Allow CONDITION_NONE to be used without a script if NegativeCondition is 1
This commit is contained in:
@@ -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');
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user