some optimization + adding level to CharacterNameData
This commit is contained in:
1 parent
d49c2a5e4d
commit
5896da6689
7 files changed
+43
-38
No files matched your search
@@ -457,6 +457,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
uint8 gender = GENDER_NONE;
|
||||
uint8 race = RACE_NONE;
|
||||
uint8 playerClass = 0;
|
||||
uint8 level = 1;
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
while (!feof(fin))
|
||||
@@ -531,6 +532,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
race = uint8(atol(getnth(line, 4).c_str()));
|
||||
playerClass = uint8(atol(getnth(line, 5).c_str()));
|
||||
gender = uint8(atol(getnth(line, 6).c_str()));
|
||||
level = uint8(atol(getnth(line, 7).c_str()));
|
||||
if (name == "")
|
||||
{
|
||||
// check if the original name already exists
|
||||
@@ -674,7 +676,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
// in case of name conflict player has to rename at login anyway
|
||||
sWorld->AddCharacterNameData(guid, name, gender, race, playerClass);
|
||||
sWorld->AddCharacterNameData(guid, name, gender, race, playerClass, level);
|
||||
|
||||
sObjectMgr->_hiItemGuid += items.size();
|
||||
sObjectMgr->_mailId += mails.size();
|
||||
|
||||
Reference in new issue
Block a user