1831{
1833 {
1835 return false;
1836 }
1838 {
1841 return false;
1842 default:
1843 break;
1844 }
1845
1847 {
1848 LOG_ERROR(
"sql.sql",
"SourceType {}, SourceEntry {} in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->
SourceType, cond->
SourceEntry);
1849 return false;
1850 }
1851
1853 {
1855 {
1857 {
1859 return false;
1860 }
1861
1863 {
1864 LOG_ERROR(
"sql.sql",
"Aura condition has non existing effect index ({}) (must be 0..2), skipped", cond->
ConditionValue2);
1865 return false;
1866 }
1869 break;
1870 }
1872 {
1874 if (!proto)
1875 {
1877 return false;
1878 }
1879
1881 {
1883 return false;
1884 }
1885 break;
1886 }
1888 {
1890 if (!proto)
1891 {
1893 return false;
1894 }
1895
1900 break;
1901 }
1903 {
1905 if (!areaEntry)
1906 {
1908 return false;
1909 }
1910
1911 if (areaEntry->
zone != 0)
1912 {
1913 LOG_ERROR(
"sql.sql",
"ZoneID condition requires to be in area ({}) which is a subzone but zone expected, skipped", cond->
ConditionValue1);
1914 return false;
1915 }
1916
1921 break;
1922 }
1924 {
1926 if (!factionEntry)
1927 {
1929 return false;
1930 }
1933 break;
1934 }
1936 {
1938 {
1940 return false;
1941 }
1942
1947 break;
1948 }
1950 {
1952 if (!pSkill)
1953 {
1955 return false;
1956 }
1957
1959 {
1961 return false;
1962 }
1965 break;
1966 }
1973 {
1975 {
1977 return false;
1978 }
1979
1981 {
1983 }
1985 {
1987 }
1988 break;
1989 }
1992 {
1994 return false;
1995 }
1996 break;
1998 {
2001 {
2003 return false;
2004 }
2005
2010 break;
2011 }
2013 {
2015 if (!achievement)
2016 {
2018 return false;
2019 }
2020
2025 break;
2026 }
2028 {
2030 {
2032 return false;
2033 }
2034
2039 break;
2040 }
2042 {
2044 {
2046 return false;
2047 }
2048
2053 break;
2054 }
2056 {
2058 {
2060 return false;
2061 }
2062
2067 break;
2068 }
2070 {
2072 if (!mapId)
2073 {
2075 return false;
2076 }
2077
2082 break;
2083 }
2085 {
2087 {
2089 return false;
2090 }
2091
2096 break;
2097 }
2099 {
2101 {
2103 return false;
2104 }
2107 break;
2108 }
2110 {
2112 {
2114 return false;
2115 }
2117 {
2119 return false;
2120 }
2123 break;
2124 }
2126 {
2128 {
2129 LOG_ERROR(
"sql.sql",
"NearCreature condition has non existing creature template entry ({}), skipped", cond->
ConditionValue1);
2130 return false;
2131 }
2132 break;
2133 }
2135 {
2137 {
2138 LOG_ERROR(
"sql.sql",
"NearGameObject condition has non existing gameobject template entry ({}), skipped", cond->
ConditionValue1);
2139 return false;
2140 }
2143 break;
2144 }
2146 {
2148 {
2151 {
2152 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing creature template entry ({}), skipped", cond->
ConditionValue2);
2153 return false;
2154 }
2156 {
2158 {
2160 {
2162 return false;
2163 }
2164 }
2165 else
2166 {
2167 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing creature guid ({}), skipped", cond->
ConditionValue3);
2168 return false;
2169 }
2170 }
2171 break;
2174 {
2175 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing gameobject template entry ({}), skipped", cond->
ConditionValue2);
2176 return false;
2177 }
2179 {
2181 {
2183 {
2185 return false;
2186 }
2187 }
2188 else
2189 {
2190 LOG_ERROR(
"sql.sql",
"ObjectEntryGuid condition has non existing gameobject guid ({}), skipped", cond->
ConditionValue3);
2191 return false;
2192 }
2193 }
2194 break;
2201 break;
2202 default:
2204 return false;
2205 }
2206 break;
2207 }
2209 {
2211 {
2213 return false;
2214 }
2219 break;
2220 }
2222 {
2224 {
2225 LOG_ERROR(
"sql.sql",
"RelationTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2226 return false;
2227 }
2229 {
2230 LOG_ERROR(
"sql.sql",
"RelationTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2231 return false;
2232 }
2234 {
2235 LOG_ERROR(
"sql.sql",
"RelationTo condition has invalid ConditionValue2(RelationType) ({}), skipped", cond->
ConditionValue2);
2236 return false;
2237 }
2240 break;
2241 }
2243 {
2245 {
2246 LOG_ERROR(
"sql.sql",
"ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2247 return false;
2248 }
2250 {
2251 LOG_ERROR(
"sql.sql",
"ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2252 return false;
2253 }
2255 {
2256 LOG_ERROR(
"sql.sql",
"mConditionValue2 condition has invalid ConditionValue2(rankMask) ({}), skipped", cond->
ConditionValue2);
2257 return false;
2258 }
2259 break;
2260 }
2262 {
2264 {
2265 LOG_ERROR(
"sql.sql",
"DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) ({}), skipped", cond->
ConditionValue1);
2266 return false;
2267 }
2269 {
2270 LOG_ERROR(
"sql.sql",
"DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self ({}), skipped", cond->
ConditionValue1);
2271 return false;
2272 }
2274 {
2276 return false;
2277 }
2278 break;
2279 }
2281 {
2288 break;
2289 }
2291 {
2293 {
2295 return false;
2296 }
2299 break;
2300 }
2302 {
2304 {
2306 return false;
2307 }
2309 {
2311 return false;
2312 }
2315 break;
2316 }
2319 break;
2321 {
2324 break;
2325 }
2327 {
2332 break;
2333 }
2335 {
2337 if (!titleEntry)
2338 {
2340 return false;
2341 }
2342 break;
2343 }
2345 {
2347 {
2348 LOG_ERROR(
"condition",
"SpawnMask condition has non existing SpawnMask in value1 ({}), skipped", cond->
ConditionValue1);
2349 return false;
2350 }
2351 break;
2352 }
2354 {
2356 {
2357 LOG_ERROR(
"condition",
"UnitState condition has non existing UnitState in value1 ({}), skipped", cond->
ConditionValue1);
2358 return false;
2359 }
2360 break;
2361 }
2363 {
2365 {
2366 LOG_ERROR(
"condition",
"CreatureType condition has non existing CreatureType in value1 ({}), skipped", cond->
ConditionValue1);
2367 return false;
2368 }
2369 break;
2370 }
2372 {
2374 if (!achievement)
2375 {
2376 LOG_ERROR(
"condition",
"CONDITION_REALM_ACHIEVEMENT has non existing realm first achivement id ({}), skipped.", cond->
ConditionValue1);
2377 return false;
2378 }
2379 break;
2380 }
2382 {
2384 if (!quest)
2385 {
2386 LOG_ERROR(
"sql.sql",
"CONDITION_QUEST_OBJECTIVE_PROGRESS points to non-existing quest ({}), skipped.", cond->
ConditionValue1);
2387 return false;
2388 }
2389
2391 {
2392 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);
2393 return false;
2394 }
2395
2397 {
2399 return false;
2400 }
2401
2403 {
2405 return false;
2406 }
2407 break;
2408 }
2410 {
2412 {
2414 return false;
2415 }
2416 break;
2417 }
2419 {
2420 bool valid = false;
2422 {
2423 case 0:
2425 break;
2426 case 1:
2428 break;
2429 default:
2430 valid = false;
2431 break;
2432 }
2433 if (!valid)
2434 {
2436 return false;
2437 }
2438 break;
2439 }
2442 {
2443 LOG_ERROR(
"sql.sql",
"CONDITION_DIFFICULTY_ID has non existing difficulty in value1 ({}), skipped.", cond->
ConditionValue1);
2444 return false;
2445 }
2446 break;
2449 {
2451 return false;
2452 }
2453 break;
2457 default:
2458 break;
2459 }
2460 return true;
2461}
@ COMP_TYPE_MAX
Definition: Util.h:593
@ CONDITION_TAXI
Definition: ConditionMgr.h:81
@ CONDITION_MAPID
Definition: ConditionMgr.h:57
@ CONDITION_SKILL
Definition: ConditionMgr.h:42
@ CONDITION_RACE
Definition: ConditionMgr.h:51
@ CONDITION_REACTION_TO
Definition: ConditionMgr.h:69
@ CONDITION_NEAR_GAMEOBJECT
Definition: ConditionMgr.h:65
@ CONDITION_QUESTREWARDED
Definition: ConditionMgr.h:43
@ CONDITION_REALM_ACHIEVEMENT
Definition: ConditionMgr.h:74
@ CONDITION_PHASEMASK
Definition: ConditionMgr.h:61
@ CONDITION_QUEST_OBJECTIVE_PROGRESS
Definition: ConditionMgr.h:83
@ CONDITION_DAILY_QUEST_DONE
Definition: ConditionMgr.h:78
@ CONDITION_ACTIVE_EVENT
Definition: ConditionMgr.h:47
@ CONDITION_INSTANCE_INFO
Definition: ConditionMgr.h:48
@ CONDITION_RELATION_TO
Definition: ConditionMgr.h:68
@ CONDITION_STAND_STATE
Definition: ConditionMgr.h:77
@ CONDITION_DRUNKENSTATE
Definition: ConditionMgr.h:45
@ CONDITION_AURA
Definition: ConditionMgr.h:36
@ CONDITION_ACHIEVEMENT
Definition: ConditionMgr.h:52
@ CONDITION_TC_END
Definition: ConditionMgr.h:85
@ CONDITION_OBJECT_ENTRY_GUID
Definition: ConditionMgr.h:66
@ CONDITION_PET_TYPE
Definition: ConditionMgr.h:80
@ CONDITION_DIFFICULTY_ID
Definition: ConditionMgr.h:84
@ CONDITION_DISTANCE_TO
Definition: ConditionMgr.h:70
@ CONDITION_HP_VAL
Definition: ConditionMgr.h:72
@ CONDITION_GENDER
Definition: ConditionMgr.h:55
@ CONDITION_TERRAIN_SWAP
Definition: ConditionMgr.h:76
@ CONDITION_REPUTATION_RANK
Definition: ConditionMgr.h:40
@ CONDITION_HP_PCT
Definition: ConditionMgr.h:73
@ CONDITION_QUEST_COMPLETE
Definition: ConditionMgr.h:63
@ CONDITION_SPELL
Definition: ConditionMgr.h:60
@ CONDITION_ZONEID
Definition: ConditionMgr.h:39
@ CONDITION_CHARMED
Definition: ConditionMgr.h:79
@ CONDITION_AC_START
Definition: ConditionMgr.h:87
@ CONDITION_TYPE_MASK
Definition: ConditionMgr.h:67
@ CONDITION_AREAID
Definition: ConditionMgr.h:58
@ CONDITION_IN_WATER
Definition: ConditionMgr.h:75
@ CONDITION_ITEM
Definition: ConditionMgr.h:37
@ CONDITION_WORLD_STATE
Definition: ConditionMgr.h:46
@ CONDITION_SPAWNMASK
Definition: ConditionMgr.h:54
@ CONDITION_CLASS
Definition: ConditionMgr.h:50
@ CONDITION_TEAM
Definition: ConditionMgr.h:41
@ CONDITION_NONE
Definition: ConditionMgr.h:35
@ CONDITION_QUEST_NONE
Definition: ConditionMgr.h:49
@ CONDITION_QUESTSTATE
Definition: ConditionMgr.h:82
@ CONDITION_ITEM_EQUIPPED
Definition: ConditionMgr.h:38
@ CONDITION_QUEST_SATISFY_EXCLUSIVE
Definition: ConditionMgr.h:88
@ CONDITION_LEVEL
Definition: ConditionMgr.h:62
@ CONDITION_QUESTTAKEN
Definition: ConditionMgr.h:44
@ CONDITION_NEAR_CREATURE
Definition: ConditionMgr.h:64
@ CONDITION_TITLE
Definition: ConditionMgr.h:53
@ CONDITION_AC_END
Definition: ConditionMgr.h:90
@ CONDITION_ALIVE
Definition: ConditionMgr.h:71
@ CONDITION_CREATURE_TYPE
Definition: ConditionMgr.h:59
@ CONDITION_UNIT_STATE
Definition: ConditionMgr.h:56
@ CONDITION_HAS_AURA_TYPE
Definition: ConditionMgr.h:89
@ RELATION_MAX
Definition: ConditionMgr.h:164
@ MAX_QUEST_STATUS
Definition: QuestDef.h:107
#define sGameEventMgr
Definition: GameEventMgr.h:186
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< AchievementEntry > sAchievementStore(Achievementfmt)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
@ UNIT_STAND_STATE_SUBMERGED
Definition: UnitDefines.h:41
@ UNIT_STATE_ALL_STATE_SUPPORTED
Definition: UnitDefines.h:179
@ 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
@ DRUNKEN_SMASHED
Definition: Player.h:467
@ MAX_PET_TYPE
Definition: PetDefines.h:33
@ TOTAL_AURAS
Definition: SpellAuraDefines.h:380
@ SPELL_AURA_NONE
Definition: SpellAuraDefines.h:63
ObjectData const creatureData[]
Definition: instance_blackwing_lair.cpp:45
events
Definition: boss_sartura.cpp:43
@ 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
#define MAX_DIFFICULTY
Definition: DBCEnums.h:283
@ SPAWNMASK_RAID_ALL
Definition: DBCEnums.h:301
#define sWorld
Definition: World.h:444
ConditionTypes ConditionType
Definition: ConditionMgr.h:200
ConditionSourceType SourceType
Definition: ConditionMgr.h:195
uint32 ConditionValue2
Definition: ConditionMgr.h:202
uint8 ConditionTarget
Definition: ConditionMgr.h:208
uint32 ConditionValue3
Definition: ConditionMgr.h:203
uint32 ConditionValue1
Definition: ConditionMgr.h:201
uint32 GetMaxAvailableConditionTargets()
Definition: ConditionMgr.cpp:780
Definition: CreatureData.h:373
Definition: GameObjectData.h:697
Definition: ItemTemplate.h:619
static bool IsValidGender(uint8 Gender)
Definition: Player.h:1561
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:40
Definition: DBCStructure.h:519
uint32 zone
Definition: DBCStructure.h:522
Definition: DBCStructure.h:632
Definition: DBCStructure.h:907
Definition: DBCStructure.h:1325
Definition: DBCStructure.h:1583