1840{
1842 {
1844 return false;
1845 }
1847 {
1850 return false;
1851 default:
1852 break;
1853 }
1854
1856 {
1857 LOG_ERROR(
"sql.sql",
"SourceType {}, SourceEntry {} in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->
SourceType, cond->
SourceEntry);
1858 return false;
1859 }
1860
1862 {
1864 {
1866 {
1868 return false;
1869 }
1870
1872 {
1873 LOG_ERROR(
"sql.sql",
"Aura condition has non existing effect index ({}) (must be 0..2), skipped", cond->
ConditionValue2);
1874 return false;
1875 }
1878 break;
1879 }
1881 {
1883 if (!proto)
1884 {
1886 return false;
1887 }
1888
1890 {
1892 return false;
1893 }
1894 break;
1895 }
1897 {
1899 if (!proto)
1900 {
1902 return false;
1903 }
1904
1909 break;
1910 }
1912 {
1914 if (!areaEntry)
1915 {
1917 return false;
1918 }
1919
1920 if (areaEntry->
zone != 0)
1921 {
1922 LOG_ERROR(
"sql.sql",
"ZoneID condition requires to be in area ({}) which is a subzone but zone expected, skipped", cond->
ConditionValue1);
1923 return false;
1924 }
1925
1930 break;
1931 }
1933 {
1935 if (!factionEntry)
1936 {
1938 return false;
1939 }
1942 break;
1943 }
1945 {
1947 {
1949 return false;
1950 }
1951
1956 break;
1957 }
1959 {
1961 if (!pSkill)
1962 {
1964 return false;
1965 }
1966
1968 {
1970 return false;
1971 }
1974 break;
1975 }
1982 {
1984 {
1986 return false;
1987 }
1988
1990 {
1992 }
1994 {
1996 }
1997 break;
1998 }
2001 {
2003 return false;
2004 }
2005 break;
2007 {
2010 {
2012 return false;
2013 }
2014
2019 break;
2020 }
2022 {
2024 if (!achievement)
2025 {
2027 return false;
2028 }
2029
2034 break;
2035 }
2037 {
2039 {
2041 return false;
2042 }
2043
2048 break;
2049 }
2051 {
2053 {
2055 return false;
2056 }
2057
2062 break;
2063 }
2065 {
2067 {
2069 return false;
2070 }
2071
2076 break;
2077 }
2079 {
2081 if (!mapId)
2082 {
2084 return false;
2085 }
2086
2091 break;
2092 }
2094 {
2096 {
2098 return false;
2099 }
2100
2105 break;
2106 }
2108 {
2110 {
2112 return false;
2113 }
2116 break;
2117 }
2119 {
2121 {
2123 return false;
2124 }
2126 {
2128 return false;
2129 }
2132 break;
2133 }
2135 {
2137 {
2138 LOG_ERROR(
"sql.sql",
"NearCreature condition has non existing creature template entry ({}), skipped", cond->
ConditionValue1);
2139 return false;
2140 }
2141 break;
2142 }
2144 {
2146 {
2147 LOG_ERROR(
"sql.sql",
"NearGameObject condition has non existing gameobject template entry ({}), skipped", cond->
ConditionValue1);
2148 return false;
2149 }
2152 break;
2153 }
2155 {
2157 {
2160 {
2161 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing creature template entry ({}), skipped", cond->
ConditionValue2);
2162 return false;
2163 }
2165 {
2167 {
2169 {
2171 return false;
2172 }
2173 }
2174 else
2175 {
2176 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing creature guid ({}), skipped", cond->
ConditionValue3);
2177 return false;
2178 }
2179 }
2180 break;
2183 {
2184 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing gameobject template entry ({}), skipped", cond->
ConditionValue2);
2185 return false;
2186 }
2188 {
2190 {
2192 {
2194 return false;
2195 }
2196 }
2197 else
2198 {
2199 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing gameobject guid ({}), skipped", cond->
ConditionValue3);
2200 return false;
2201 }
2202 }
2203 break;
2210 break;
2211 default:
2213 return false;
2214 }
2215 break;
2216 }
2218 {
2220 {
2222 return false;
2223 }
2228 break;
2229 }
2231 {
2233 {
2234 LOG_ERROR(
"sql.sql",
"RelationTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2235 return false;
2236 }
2238 {
2239 LOG_ERROR(
"sql.sql",
"RelationTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2240 return false;
2241 }
2243 {
2244 LOG_ERROR(
"sql.sql",
"RelationTo condition has invalid ConditionValue2(RelationType) ({}), skipped", cond->
ConditionValue2);
2245 return false;
2246 }
2249 break;
2250 }
2252 {
2254 {
2255 LOG_ERROR(
"sql.sql",
"ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2256 return false;
2257 }
2259 {
2260 LOG_ERROR(
"sql.sql",
"ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2261 return false;
2262 }
2264 {
2265 LOG_ERROR(
"sql.sql",
"mConditionValue2 condition has invalid ConditionValue2(rankMask) ({}), skipped", cond->
ConditionValue2);
2266 return false;
2267 }
2268 break;
2269 }
2271 {
2273 {
2274 LOG_ERROR(
"sql.sql",
"DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2275 return false;
2276 }
2278 {
2279 LOG_ERROR(
"sql.sql",
"DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2280 return false;
2281 }
2283 {
2285 return false;
2286 }
2287 break;
2288 }
2290 {
2297 break;
2298 }
2300 {
2302 {
2304 return false;
2305 }
2308 break;
2309 }
2311 {
2313 {
2315 return false;
2316 }
2318 {
2320 return false;
2321 }
2324 break;
2325 }
2328 break;
2330 {
2333 break;
2334 }
2336 {
2341 break;
2342 }
2344 {
2346 if (!titleEntry)
2347 {
2349 return false;
2350 }
2351 break;
2352 }
2354 {
2356 {
2357 LOG_ERROR(
"condition",
"SpawnMask condition has non existing SpawnMask in value1 ({}), skipped", cond->
ConditionValue1);
2358 return false;
2359 }
2360 break;
2361 }
2363 {
2365 {
2366 LOG_ERROR(
"condition",
"UnitState condition has non existing UnitState in value1 ({}), skipped", cond->
ConditionValue1);
2367 return false;
2368 }
2369 break;
2370 }
2372 {
2374 {
2375 LOG_ERROR(
"condition",
"CreatureType condition has non existing CreatureType in value1 ({}), skipped", cond->
ConditionValue1);
2376 return false;
2377 }
2378 break;
2379 }
2381 {
2383 if (!achievement)
2384 {
2385 LOG_ERROR(
"condition",
"CONDITION_REALM_ACHIEVEMENT has non existing realm first achivement id ({}), skipped.", cond->
ConditionValue1);
2386 return false;
2387 }
2388 break;
2389 }
2391 {
2393 if (!quest)
2394 {
2395 LOG_ERROR(
"sql.sql",
"CONDITION_QUEST_OBJECTIVE_PROGRESS points to non-existing quest ({}), skipped.", cond->
ConditionValue1);
2396 return false;
2397 }
2398
2400 {
2401 LOG_ERROR(
"sql.sql",
"CONDITION_QUEST_OBJECTIVE_PROGRESS has out-of-range quest objective index specified ({}), it must be a number between 0 and 3. skipped.", cond->
ConditionValue2);
2402 return false;
2403 }
2404
2406 {
2408 return false;
2409 }
2410
2412 {
2414 return false;
2415 }
2416 break;
2417 }
2419 {
2421 {
2423 return false;
2424 }
2425 break;
2426 }
2428 {
2429 bool valid = false;
2431 {
2432 case 0:
2434 break;
2435 case 1:
2437 break;
2438 default:
2439 valid = false;
2440 break;
2441 }
2442 if (!valid)
2443 {
2445 return false;
2446 }
2447 break;
2448 }
2451 {
2452 LOG_ERROR(
"sql.sql",
"CONDITION_DIFFICULTY_ID has non existing difficulty in value1 ({}), skipped.", cond->
ConditionValue1);
2453 return false;
2454 }
2455 break;
2458 {
2460 return false;
2461 }
2462 break;
2466 default:
2467 break;
2468 }
2469 return true;
2470}
@ COMP_TYPE_MAX
Definition: Util.h:593
events
Definition: boss_sartura.cpp:43
ObjectData const creatureData[]
Definition: instance_blackwing_lair.cpp:45
#define MAX_DIFFICULTY
Definition: DBCEnums.h:283
@ SPAWNMASK_RAID_ALL
Definition: DBCEnums.h:301
@ EFFECT_2
Definition: SharedDefines.h:33
@ CREATURE_TYPE_GAS_CLOUD
Definition: SharedDefines.h:2640
@ ALLIANCE
Definition: SharedDefines.h:768
@ HORDE
Definition: SharedDefines.h:767
#define CLASSMASK_ALL_PLAYABLE
Definition: SharedDefines.h:157
#define RACEMASK_ALL_PLAYABLE
Definition: SharedDefines.h:97
@ MAX_QUEST_STATUS
Definition: QuestDef.h:107
@ TOTAL_AURAS
Definition: SpellAuraDefines.h:380
@ SPELL_AURA_NONE
Definition: SpellAuraDefines.h:63
#define sGameEventMgr
Definition: GameEventMgr.h:186
@ DRUNKEN_SMASHED
Definition: Player.h:472
@ TYPEID_GAMEOBJECT
Definition: ObjectGuid.h:37
@ TYPEID_UNIT
Definition: ObjectGuid.h:35
@ TYPEID_CORPSE
Definition: ObjectGuid.h:39
@ TYPEID_PLAYER
Definition: ObjectGuid.h:36
@ TYPEMASK_UNIT
Definition: ObjectGuid.h:49
@ TYPEMASK_CORPSE
Definition: ObjectGuid.h:53
@ TYPEMASK_GAMEOBJECT
Definition: ObjectGuid.h:51
@ TYPEMASK_PLAYER
Definition: ObjectGuid.h:50
@ UNIT_STAND_STATE_SUBMERGED
Definition: UnitDefines.h:41
@ UNIT_STATE_ALL_STATE_SUPPORTED
Definition: UnitDefines.h:179
@ MAX_PET_TYPE
Definition: PetDefines.h:33
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< AchievementEntry > sAchievementStore(Achievementfmt)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
@ CONDITION_TAXI
Definition: ConditionMgr.h:80
@ CONDITION_MAPID
Definition: ConditionMgr.h:56
@ CONDITION_SKILL
Definition: ConditionMgr.h:41
@ CONDITION_RACE
Definition: ConditionMgr.h:50
@ CONDITION_REACTION_TO
Definition: ConditionMgr.h:68
@ CONDITION_NEAR_GAMEOBJECT
Definition: ConditionMgr.h:64
@ CONDITION_QUESTREWARDED
Definition: ConditionMgr.h:42
@ CONDITION_REALM_ACHIEVEMENT
Definition: ConditionMgr.h:73
@ CONDITION_PHASEMASK
Definition: ConditionMgr.h:60
@ CONDITION_QUEST_OBJECTIVE_PROGRESS
Definition: ConditionMgr.h:82
@ CONDITION_DAILY_QUEST_DONE
Definition: ConditionMgr.h:77
@ CONDITION_ACTIVE_EVENT
Definition: ConditionMgr.h:46
@ CONDITION_INSTANCE_INFO
Definition: ConditionMgr.h:47
@ CONDITION_RELATION_TO
Definition: ConditionMgr.h:67
@ CONDITION_STAND_STATE
Definition: ConditionMgr.h:76
@ CONDITION_DRUNKENSTATE
Definition: ConditionMgr.h:44
@ CONDITION_AURA
Definition: ConditionMgr.h:35
@ CONDITION_ACHIEVEMENT
Definition: ConditionMgr.h:51
@ CONDITION_TC_END
Definition: ConditionMgr.h:84
@ CONDITION_OBJECT_ENTRY_GUID
Definition: ConditionMgr.h:65
@ CONDITION_PET_TYPE
Definition: ConditionMgr.h:79
@ CONDITION_DIFFICULTY_ID
Definition: ConditionMgr.h:83
@ CONDITION_DISTANCE_TO
Definition: ConditionMgr.h:69
@ CONDITION_HP_VAL
Definition: ConditionMgr.h:71
@ CONDITION_GENDER
Definition: ConditionMgr.h:54
@ CONDITION_TERRAIN_SWAP
Definition: ConditionMgr.h:75
@ CONDITION_REPUTATION_RANK
Definition: ConditionMgr.h:39
@ CONDITION_HP_PCT
Definition: ConditionMgr.h:72
@ CONDITION_QUEST_COMPLETE
Definition: ConditionMgr.h:62
@ CONDITION_SPELL
Definition: ConditionMgr.h:59
@ CONDITION_ZONEID
Definition: ConditionMgr.h:38
@ CONDITION_CHARMED
Definition: ConditionMgr.h:78
@ CONDITION_AC_START
Definition: ConditionMgr.h:86
@ CONDITION_TYPE_MASK
Definition: ConditionMgr.h:66
@ CONDITION_AREAID
Definition: ConditionMgr.h:57
@ CONDITION_IN_WATER
Definition: ConditionMgr.h:74
@ CONDITION_ITEM
Definition: ConditionMgr.h:36
@ CONDITION_WORLD_STATE
Definition: ConditionMgr.h:45
@ CONDITION_SPAWNMASK
Definition: ConditionMgr.h:53
@ CONDITION_CLASS
Definition: ConditionMgr.h:49
@ CONDITION_TEAM
Definition: ConditionMgr.h:40
@ CONDITION_NONE
Definition: ConditionMgr.h:34
@ CONDITION_QUEST_NONE
Definition: ConditionMgr.h:48
@ CONDITION_QUESTSTATE
Definition: ConditionMgr.h:81
@ CONDITION_ITEM_EQUIPPED
Definition: ConditionMgr.h:37
@ CONDITION_QUEST_SATISFY_EXCLUSIVE
Definition: ConditionMgr.h:87
@ CONDITION_LEVEL
Definition: ConditionMgr.h:61
@ CONDITION_QUESTTAKEN
Definition: ConditionMgr.h:43
@ CONDITION_NEAR_CREATURE
Definition: ConditionMgr.h:63
@ CONDITION_TITLE
Definition: ConditionMgr.h:52
@ CONDITION_AC_END
Definition: ConditionMgr.h:91
@ CONDITION_ALIVE
Definition: ConditionMgr.h:70
@ CONDITION_CREATURE_TYPE
Definition: ConditionMgr.h:58
@ CONDITION_UNIT_STATE
Definition: ConditionMgr.h:55
@ CONDITION_HAS_AURA_TYPE
Definition: ConditionMgr.h:88
@ RELATION_MAX
Definition: ConditionMgr.h:165
#define sWorld
Definition: World.h:443
ConditionTypes ConditionType
Definition: ConditionMgr.h:201
ConditionSourceType SourceType
Definition: ConditionMgr.h:196
uint32 ConditionValue2
Definition: ConditionMgr.h:203
uint8 ConditionTarget
Definition: ConditionMgr.h:209
uint32 ConditionValue3
Definition: ConditionMgr.h:204
uint32 ConditionValue1
Definition: ConditionMgr.h:202
uint32 GetMaxAvailableConditionTargets()
Definition: ConditionMgr.cpp:789
Definition: CreatureData.h:370
Definition: GameObjectData.h:696
Definition: ItemTemplate.h:619
static bool IsValidGender(uint8 Gender)
Definition: Player.h:1581
std::vector< GameEventData > GameEventDataMap
Definition: GameEventMgr.h:107
Definition: QuestDef.h:210
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:304
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:305
Definition: DBCStructure.h:39
Definition: DBCStructure.h:518
uint32 zone
Definition: DBCStructure.h:521
Definition: DBCStructure.h:631
Definition: DBCStructure.h:906
Definition: DBCStructure.h:1324
Definition: DBCStructure.h:1582