Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
PlayerDump.cpp File Reference
#include "AccountMgr.h"
#include "Common.h"
#include "DatabaseEnv.h"
#include "ObjectMgr.h"
#include "PlayerDump.h"
#include "UpdateFields.h"
#include "World.h"
Include dependency graph for PlayerDump.cpp:

Go to the source code of this file.

Classes

struct  DumpTable

Macros

#define DUMP_TABLE_COUNT   29
#define ROLLBACK(DR)

Functions

bool changeGuid (std::string &str, int n, std::map< uint32, uint32 > &guidMap, uint32 hiGuid, bool nonzero=false)
bool changenth (std::string &str, int n, char const *with, bool insert=false, bool nonzero=false)
bool changetokGuid (std::string &str, int n, std::map< uint32, uint32 > &guidMap, uint32 hiGuid, bool nonzero=false)
bool changetoknth (std::string &str, int n, char const *with, bool insert=false, bool nonzero=false)
std::string CreateDumpString (char const *tableName, QueryResult result)
bool findnth (std::string &str, int n, std::string::size_type &s, std::string::size_type &e)
static bool findtoknth (std::string &str, int n, std::string::size_type &s, std::string::size_type &e)
void fixNULLfields (std::string &line)
std::string getnth (std::string &str, int n)
std::string gettablename (std::string &str)
std::string gettoknth (std::string &str, int n)
uint32 registerNewGuid (uint32 oldGuid, std::map< uint32, uint32 > &guidMap, uint32 hiGuid)
void StoreGUID (QueryResult result, uint32 data, uint32 field, std::set< uint32 > &guids)
void StoreGUID (QueryResult result, uint32 field, std::set< uint32 > &guids)

Variables

static DumpTable dumpTables [DUMP_TABLE_COUNT]

Macro Definition Documentation

◆ DUMP_TABLE_COUNT

#define DUMP_TABLE_COUNT   29

Definition at line 14 of file PlayerDump.cpp.

Referenced by PlayerDumpWriter::GetDump(), and PlayerDumpReader::LoadDump().

◆ ROLLBACK

#define ROLLBACK ( DR)
Value:
{fclose(fin); return (DR);}

Definition at line 384 of file PlayerDump.cpp.

Referenced by PlayerDumpReader::LoadDump().

Function Documentation

◆ changeGuid()

bool changeGuid ( std::string & str,
int n,
std::map< uint32, uint32 > & guidMap,
uint32 hiGuid,
bool nonzero = false )

Definition at line 166 of file PlayerDump.cpp.

References changenth(), getnth(), and registerNewGuid().

Referenced by PlayerDumpReader::LoadDump().

◆ changenth()

bool changenth ( std::string & str,
int n,
char const * with,
bool insert = false,
bool nonzero = false )

Definition at line 115 of file PlayerDump.cpp.

References findnth().

Referenced by changeGuid(), and PlayerDumpReader::LoadDump().

◆ changetokGuid()

bool changetokGuid ( std::string & str,
int n,
std::map< uint32, uint32 > & guidMap,
uint32 hiGuid,
bool nonzero = false )

Definition at line 179 of file PlayerDump.cpp.

References changetoknth(), gettoknth(), and registerNewGuid().

◆ changetoknth()

bool changetoknth ( std::string & str,
int n,
char const * with,
bool insert = false,
bool nonzero = false )

Definition at line 140 of file PlayerDump.cpp.

References findtoknth().

Referenced by changetokGuid().

◆ CreateDumpString()

std::string CreateDumpString ( char const * tableName,
QueryResult result )

Definition at line 192 of file PlayerDump.cpp.

References _TABLE_SIM_, CharacterDatabase, and Field::GetString().

Referenced by PlayerDumpWriter::DumpTable().

◆ findnth()

bool findnth ( std::string & str,
int n,
std::string::size_type & s,
std::string::size_type & e )

Definition at line 82 of file PlayerDump.cpp.

Referenced by changenth(), and getnth().

◆ findtoknth()

bool findtoknth ( std::string & str,
int n,
std::string::size_type & s,
std::string::size_type & e )
static

Definition at line 60 of file PlayerDump.cpp.

Referenced by changetoknth(), and gettoknth().

◆ fixNULLfields()

void fixNULLfields ( std::string & line)

Definition at line 386 of file PlayerDump.cpp.

Referenced by PlayerDumpReader::LoadDump().

◆ getnth()

std::string getnth ( std::string & str,
int n )

Definition at line 131 of file PlayerDump.cpp.

References findnth().

Referenced by changeGuid(), and PlayerDumpReader::LoadDump().

◆ gettablename()

std::string gettablename ( std::string & str)

Definition at line 105 of file PlayerDump.cpp.

References _TABLE_SIM_.

Referenced by PlayerDumpReader::LoadDump().

◆ gettoknth()

std::string gettoknth ( std::string & str,
int n )

Definition at line 73 of file PlayerDump.cpp.

References findtoknth().

Referenced by changetokGuid(), and StoreGUID().

◆ registerNewGuid()

uint32 registerNewGuid ( uint32 oldGuid,
std::map< uint32, uint32 > & guidMap,
uint32 hiGuid )

Definition at line 155 of file PlayerDump.cpp.

Referenced by changeGuid(), and changetokGuid().

◆ StoreGUID() [1/2]

void StoreGUID ( QueryResult result,
uint32 data,
uint32 field,
std::set< uint32 > & guids )

Definition at line 250 of file PlayerDump.cpp.

References Field::GetString(), and gettoknth().

◆ StoreGUID() [2/2]

void StoreGUID ( QueryResult result,
uint32 field,
std::set< uint32 > & guids )

Definition at line 242 of file PlayerDump.cpp.

References Field::GetUInt32().

Referenced by PlayerDumpWriter::DumpTable().

Variable Documentation

◆ dumpTables

DumpTable dumpTables[DUMP_TABLE_COUNT]
static

Definition at line 26 of file PlayerDump.cpp.

Referenced by PlayerDumpWriter::GetDump(), and PlayerDumpReader::LoadDump().