aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-12-20 00:50:53 +0100
committerShauren <shauren.trinity@gmail.com>2025-12-20 00:50:53 +0100
commita26ace1cd52820b7fc0fadb75bcee7a45a0d9edf (patch)
tree2af12f1d49f2a0b8dfa7a9073b9a49be15248ec5
parenta58afc7951503526bd96bf667c9fca1d54ce34ac (diff)
Core/Conditions: Log errors at startup when using condition types reserved for master branch
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 3469be09357..78750edc50c 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -743,6 +743,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const
case CONDITION_GAMEMASTER:
mask |= GRID_MAP_TYPE_MASK_PLAYER;
break;
+ case CONDITION_PRIVATE_OBJECT:
+ mask |= GRID_MAP_TYPE_MASK_ALL & ~GRID_MAP_TYPE_MASK_PLAYER;
+ break;
case CONDITION_STRING_ID:
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_GAMEOBJECT;
break;
@@ -2401,8 +2404,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
case CONDITION_CHARMED:
case CONDITION_TAXI:
case CONDITION_GAMEMASTER:
+ case CONDITION_STRING_ID:
default:
break;
+ case CONDITION_BATTLE_PET_COUNT:
+ case CONDITION_SCENARIO_STEP:
+ case CONDITION_SCENE_IN_PROGRESS:
+ case CONDITION_PLAYER_CONDITION:
+ case CONDITION_PRIVATE_OBJECT:
+ case CONDITION_LABEL:
+ TC_LOG_ERROR("sql.sql", "{} uses condition type not supported in this game version, skipped.", cond->ToString(true));
+ return false;
}
if (cond->ConditionValue1 && !StaticConditionTypeData[cond->ConditionType].HasConditionValue1)