254{
256
258 {
261
263
265
267 do
268 {
269 std::string columnName = (*result)[0].Get<std::string>();
271
274
277
279 } while (result->NextRow());
280
281 switch (dumpTable.Type)
282 {
285
288
292 break;
295
297 break;
300
303
304
306 {
309 }
310 break;
313
317 break;
320
323 break;
326
330 break;
333
336 break;
339
342 break;
345
348 break;
351
353 break;
354 default:
355 LOG_FATAL(
"server.loading",
"Wrong dump table type {}, probably added a new table type without updating code",
uint32(dumpTable.Type));
357 return;
358 }
359
361 }
362
363
365 {
366 if (tableStruct.WhereFieldName.empty())
367 {
368 LOG_FATAL(
"server.loading",
"Table `{}` defined in player dump doesn't have a WHERE query field", tableStruct.TableName);
370 }
371 }
372
375
377
380}
#define ABORT
Definition: Errors.h:76
#define ASSERT
Definition: Errors.h:68
#define LOG_FATAL(filterType__,...)
Definition: Log.h:153
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:131
uint32 getMSTime()
Definition: Timer.h:103
bool Utf8ToUpperOnlyLatin(std::string &utf8String)
Definition: Util.cpp:532
std::int32_t int32
Definition: Define.h:103
std::uint32_t uint32
Definition: Define.h:107
@ EQUIPMENT_SLOT_END
Definition: Player.h:699
void MarkDependentColumn(TableStruct &tableStruct, std::string const &columnName, GuidType dependentType)
Definition: PlayerDump.cpp:198
void AssertBaseTable(BaseTable const &baseTable)
Definition: PlayerDump.cpp:237
uint32 const DUMP_TABLE_COUNT
Definition: PlayerDump.cpp:123
@ GUID_TYPE_NULL
Definition: PlayerDump.cpp:45
@ GUID_TYPE_MAIL
Definition: PlayerDump.cpp:38
@ GUID_TYPE_PET
Definition: PlayerDump.cpp:37
@ GUID_TYPE_EQUIPMENT_SET
Definition: PlayerDump.cpp:42
@ GUID_TYPE_CHAR
Definition: PlayerDump.cpp:36
@ GUID_TYPE_ITEM
Definition: PlayerDump.cpp:39
@ GUID_TYPE_ACCOUNT
Definition: PlayerDump.cpp:35
DumpTable const DumpTables[]
Definition: PlayerDump.cpp:88
BaseTable const BaseTables[]
Definition: PlayerDump.cpp:73
void MarkWhereField(TableStruct &tableStruct, std::string const &whereField)
Definition: PlayerDump.cpp:221
std::vector< TableStruct > CharacterTables
Definition: PlayerDump.cpp:166
@ DTT_EQSET_TABLE
Definition: PlayerDump.h:33
@ DTT_INVENTORY
Definition: PlayerDump.h:35
@ DTT_CHAR_TABLE
Definition: PlayerDump.h:28
@ DTT_PET_TABLE
Definition: PlayerDump.h:49
@ DTT_MAIL
Definition: PlayerDump.h:37
@ DTT_MAIL_ITEM
Definition: PlayerDump.h:40
@ DTT_PET
Definition: PlayerDump.h:48
@ DTT_ITEM
Definition: PlayerDump.h:43
@ DTT_ITEM_GIFT
Definition: PlayerDump.h:46
@ DTT_CHARACTER
Definition: PlayerDump.h:26
std::shared_ptr< ResultSet > QueryResult
Definition: DatabaseEnvFwd.h:27
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default AC string format function.
Definition: StringFormat.h:34
Definition: PlayerDump.cpp:65
Definition: PlayerDump.cpp:83
Definition: PlayerDump.cpp:149
std::string FieldName
Definition: PlayerDump.cpp:150
Definition: PlayerDump.cpp:157
std::unordered_map< std::string, int32 > FieldIndices
Definition: PlayerDump.cpp:163
std::string TableName
Definition: PlayerDump.cpp:158
std::vector< TableField > TableFields
Definition: PlayerDump.cpp:160