49{
51 {
52 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` for criteria (Entry: {}) has wrong data type ({}), ignored.", criteria->ID,
dataType);
53 return false;
54 }
55
56 switch (criteria->requiredType)
57 {
86 break;
87 default:
89 {
90 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` has data for non-supported criteria type (Entry: {} Type: {}), ignored.", criteria->ID, criteria->requiredType);
91 return false;
92 }
93 break;
94 }
95
97 {
101 return true;
104 {
105 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE ({}) has non-existing creature id in value1 ({}), ignored.",
107 return false;
108 }
109 return true;
112 {
113 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({}) has non-existing class in value1 ({}), ignored.",
115 return false;
116 }
118 {
119 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({}) has non-existing race in value2 ({}), ignored.",
121 return false;
122 }
123 return true;
126 {
127 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH ({}) has wrong percent value in value1 ({}), ignored.",
129 return false;
130 }
131 return true;
134 {
135 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD ({}) has wrong boolean value1 ({}).",
137 return false;
138 }
139 return true;
142 {
144 if (!spellInfo)
145 {
146 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type {} ({}) has wrong spell id in value1 ({}), ignored.",
148 return false;
149 }
150 if (
aura.effect_idx >= 3)
151 {
152 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type {} ({}) has wrong spell effect index in value2 ({}), ignored.",
154 return false;
155 }
156 if (!spellInfo->
Effects[
aura.effect_idx].ApplyAuraName)
157 {
158 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type {} ({}) has non-aura spell effect (ID: {} Effect: {}), ignores.",
160 return false;
161 }
162 return true;
163 }
166 {
167 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA ({}) has wrong area id in value1 ({}), ignored.",
168 criteria->ID, criteria->requiredType,
dataType,
area.id);
169 return false;
170 }
171 return true;
174 {
175 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE ({}) has wrong ComparisionType in value2 ({}), ignored.",
177 return false;
178 }
179 return true;
182 {
183 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL ({}) has wrong minlevel in value1 ({}), ignored.",
184 criteria->ID, criteria->requiredType,
dataType,
level.minlevel);
185 return false;
186 }
187 return true;
190 {
191 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER ({}) has wrong gender in value1 ({}), ignored.",
193 return false;
194 }
195 return true;
198 {
199 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT ({}) does not have ScriptName set, ignored.",
200 criteria->ID, criteria->requiredType,
dataType);
201 return false;
202 }
203 return true;
206 {
207 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY ({}) has wrong difficulty in value1 ({}), ignored.",
209 return false;
210 }
211 return true;
214 {
215 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT ({}) has wrong max players count in value1 ({}), ignored.",
217 return false;
218 }
219 return true;
222 {
223 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM ({}) has unknown team in value1 ({}), ignored.",
224 criteria->ID, criteria->requiredType,
dataType,
team.team);
225 return false;
226 }
227 return true;
230 {
231 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK ({}) has unknown drunken state in value1 ({}), ignored.",
232 criteria->ID, criteria->requiredType,
dataType,
drunk.state);
233 return false;
234 }
235 return true;
238 {
239 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY ({}) has unknown holiday in value1 ({}), ignored.",
241 return false;
242 }
243 return true;
246 return true;
250 {
251 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_requirement` (Entry: {} Type: {}) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM ({}) has unknown quality state in value1 ({}), ignored.",
253 return false;
254 }
255 return true;
258 {
259 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_requirement` (Entry: {} Type: {}) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID ({}) has unknown map id in value1 ({}), ignored.",
261 return false;
262 }
263 return true;
266 {
267 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({}) must not have 0 in either value field, ignored.",
268 criteria->ID, criteria->requiredType,
dataType);
269 return false;
270 }
272 {
273 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({}) has non-existing class in value1 ({}), ignored.",
275 return false;
276 }
278 {
279 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({}) has non-existing race in value2 ({}), ignored.",
281 return false;
282 }
283 return true;
285 {
287 {
288 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_requirement` (Entry: {} Type: {}) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE ({}) have unknown title_id in value1 ({}), ignore.",
290 return false;
291 }
292 return true;
293 }
294 default:
295 LOG_ERROR(
"sql.sql",
"Table `achievement_criteria_data` (Entry: {} Type: {}) has data for non-supported data type ({}), ignored.", criteria->ID, criteria->requiredType,
dataType);
296 return false;
297 }
298}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
@ COMP_TYPE_MAX
Definition: Util.h:593
#define MAX_DIFFICULTY
Definition: DBCEnums.h:283
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE
Definition: DBCEnums.h:216
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2
Definition: DBCEnums.h:181
@ ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM
Definition: DBCEnums.h:155
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition: DBCEnums.h:142
@ ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING
Definition: DBCEnums.h:139
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL
Definition: DBCEnums.h:143
@ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST
Definition: DBCEnums.h:131
@ ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK
Definition: DBCEnums.h:158
@ ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT
Definition: DBCEnums.h:165
@ ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE
Definition: DBCEnums.h:168
@ ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL
Definition: DBCEnums.h:124
@ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE
Definition: DBCEnums.h:188
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM
Definition: DBCEnums.h:198
@ ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL
Definition: DBCEnums.h:149
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2
Definition: DBCEnums.h:217
@ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST
Definition: DBCEnums.h:141
@ ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA
Definition: DBCEnums.h:151
@ ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM
Definition: DBCEnums.h:163
@ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE
Definition: DBCEnums.h:122
@ ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL
Definition: DBCEnums.h:186
@ ACHIEVEMENT_CRITERIA_TYPE_WIN_BG
Definition: DBCEnums.h:123
@ ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL
Definition: DBCEnums.h:182
@ ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE
Definition: DBCEnums.h:144
@ ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS
Definition: DBCEnums.h:170
@ ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA
Definition: DBCEnums.h:146
@ ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT
Definition: DBCEnums.h:164
@ ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM
Definition: DBCEnums.h:199
@ ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN
Definition: DBCEnums.h:184
#define STRONG_MAX_LEVEL
Definition: DBCEnums.h:43
@ GENDER_NONE
Definition: SharedDefines.h:63
#define MAX_ITEM_QUALITY
Definition: SharedDefines.h:339
@ 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 sObjectMgr
Definition: ObjectMgr.h:1635
#define sSpellMgr
Definition: SpellMgr.h:825
#define MAX_DRUNKEN
Definition: Player.h:475
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< HolidaysEntry > sHolidaysStore(Holidaysfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY
Definition: AchievementMgr.h:81
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT
Definition: AchievementMgr.h:70
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT
Definition: AchievementMgr.h:72
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER
Definition: AchievementMgr.h:69
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE
Definition: AchievementMgr.h:82
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA
Definition: AchievementMgr.h:65
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE
Definition: AchievementMgr.h:61
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE
Definition: AchievementMgr.h:67
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY
Definition: AchievementMgr.h:71
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM
Definition: AchievementMgr.h:78
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK
Definition: AchievementMgr.h:74
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID
Definition: AchievementMgr.h:79
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA
Definition: AchievementMgr.h:64
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY
Definition: AchievementMgr.h:75
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA
Definition: AchievementMgr.h:66
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE
Definition: AchievementMgr.h:80
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE
Definition: AchievementMgr.h:76
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL
Definition: AchievementMgr.h:68
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE
Definition: AchievementMgr.h:60
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH
Definition: AchievementMgr.h:62
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM
Definition: AchievementMgr.h:73
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT
Definition: AchievementMgr.h:77
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD
Definition: AchievementMgr.h:63
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE
Definition: AchievementMgr.h:59
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY
Definition: AchievementMgr.h:84
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_TEAMS_SCORES
Definition: AchievementMgr.h:83
#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE
Definition: AchievementMgr.h:86
struct AchievementCriteriaData::@6::@11 player_dead
struct AchievementCriteriaData::@6::@15 level
struct AchievementCriteriaData::@6::@23 equipped_item
uint32 team
Definition: AchievementMgr.h:167
struct AchievementCriteriaData::@6::@26 known_title
uint32 value
Definition: AchievementMgr.h:140
uint32 difficulty
Definition: AchievementMgr.h:157
struct AchievementCriteriaData::@6::@12 aura
struct AchievementCriteriaData::@6::@8 creature
struct AchievementCriteriaData::@6::@9 classRace
struct AchievementCriteriaData::@6::@13 area
struct AchievementCriteriaData::@6::@20 drunk
struct AchievementCriteriaData::@6::@21 holiday
struct AchievementCriteriaData::@6::@10 health
struct AchievementCriteriaData::@6::@18 map_players
uint32 gender
Definition: AchievementMgr.h:151
Definition: SpellInfo.h:316
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition: SpellInfo.h:393
Definition: System.cpp:62