Skip to content

Commit a26ace1

Browse files
committed
Core/Conditions: Log errors at startup when using condition types reserved for master branch
1 parent a58afc7 commit a26ace1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/server/game/Conditions/ConditionMgr.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const
743743
case CONDITION_GAMEMASTER:
744744
mask |= GRID_MAP_TYPE_MASK_PLAYER;
745745
break;
746+
case CONDITION_PRIVATE_OBJECT:
747+
mask |= GRID_MAP_TYPE_MASK_ALL & ~GRID_MAP_TYPE_MASK_PLAYER;
748+
break;
746749
case CONDITION_STRING_ID:
747750
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_GAMEOBJECT;
748751
break;
@@ -2401,8 +2404,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
24012404
case CONDITION_CHARMED:
24022405
case CONDITION_TAXI:
24032406
case CONDITION_GAMEMASTER:
2407+
case CONDITION_STRING_ID:
24042408
default:
24052409
break;
2410+
case CONDITION_BATTLE_PET_COUNT:
2411+
case CONDITION_SCENARIO_STEP:
2412+
case CONDITION_SCENE_IN_PROGRESS:
2413+
case CONDITION_PLAYER_CONDITION:
2414+
case CONDITION_PRIVATE_OBJECT:
2415+
case CONDITION_LABEL:
2416+
TC_LOG_ERROR("sql.sql", "{} uses condition type not supported in this game version, skipped.", cond->ToString(true));
2417+
return false;
24062418
}
24072419

24082420
if (cond->ConditionValue1 && !StaticConditionTypeData[cond->ConditionType].HasConditionValue1)

0 commit comments

Comments
 (0)