Core/PlayerDump: Generate new guids for equipement sets when loading dumps
--HG-- branch : trunk
This commit is contained in:
@@ -497,11 +497,6 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||||||
// change the data to server values
|
// change the data to server values
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case DTT_CHAR_TABLE:
|
|
||||||
if (!changenth(line, 1, newguid)) // character_*.guid update
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DTT_CHARACTER:
|
case DTT_CHARACTER:
|
||||||
{
|
{
|
||||||
if (!changenth(line, 1, newguid)) // characters.guid update
|
if (!changenth(line, 1, newguid)) // characters.guid update
|
||||||
@@ -535,6 +530,20 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||||||
ROLLBACK(DUMP_FILE_BROKEN);
|
ROLLBACK(DUMP_FILE_BROKEN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DTT_CHAR_TABLE:
|
||||||
|
{
|
||||||
|
if (!changenth(line, 1, newguid)) // character_*.guid update
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DTT_EQSET_TABLE:
|
||||||
|
{
|
||||||
|
if (!changenth(line, 1, newguid))
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN); // character_equipmentsets.guid
|
||||||
|
if (!changenth(line, 2, sObjectMgr.GenerateEquipmentSetGuid()))
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN); // character_equipmentsets.setguid
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DTT_INVENTORY:
|
case DTT_INVENTORY:
|
||||||
{
|
{
|
||||||
if (!changenth(line, 1, newguid)) // character_inventory.guid update
|
if (!changenth(line, 1, newguid)) // character_inventory.guid update
|
||||||
@@ -546,6 +555,24 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||||||
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
|
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DTT_MAIL: // mail
|
||||||
|
{
|
||||||
|
if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
|
||||||
|
if (!changenth(line, 6, newguid)) // mail.receiver update
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DTT_MAIL_ITEM: // mail_items
|
||||||
|
{
|
||||||
|
if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
|
||||||
|
if (!changeGuid(line, 2, items, sObjectMgr.m_hiItemGuid))
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
|
||||||
|
if (!changenth(line, 4, newguid)) // mail_items.receiver
|
||||||
|
ROLLBACK(DUMP_FILE_BROKEN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DTT_ITEM:
|
case DTT_ITEM:
|
||||||
{
|
{
|
||||||
// item, owner, data field:item, owner guid
|
// item, owner, data field:item, owner guid
|
||||||
@@ -604,24 +631,6 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DTT_MAIL: // mail
|
|
||||||
{
|
|
||||||
if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
|
|
||||||
if (!changenth(line, 6, newguid)) // mail.receiver update
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DTT_MAIL_ITEM: // mail_items
|
|
||||||
{
|
|
||||||
if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
|
|
||||||
if (!changeGuid(line, 2, items, sObjectMgr.m_hiItemGuid))
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
|
|
||||||
if (!changenth(line, 4, newguid)) // mail_items.receiver
|
|
||||||
ROLLBACK(DUMP_FILE_BROKEN);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
sLog.outError("Unknown dump table type: %u",type);
|
sLog.outError("Unknown dump table type: %u",type);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user