[10673] Include item_loot into pdumps

This commit is contained in:
VladimirMangos 2010-11-02 02:15:38 +03:00
parent 54d0c9b77d
commit b806495563
3 changed files with 14 additions and 1 deletions

View file

@ -63,6 +63,7 @@ static DumpTable dumpTables[] =
{ "pet_spell_cooldown", DTT_PET_TABLE }, // <- pet number { "pet_spell_cooldown", DTT_PET_TABLE }, // <- pet number
{ "character_gifts", DTT_ITEM_GIFT }, // <- item guids { "character_gifts", DTT_ITEM_GIFT }, // <- item guids
{ "item_instance", DTT_ITEM }, // <- item guids { "item_instance", DTT_ITEM }, // <- item guids
{ "item_loot", DTT_ITEM_LOOT }, // <- item guids
{ NULL, DTT_CHAR_TABLE }, // end marker { NULL, DTT_CHAR_TABLE }, // end marker
}; };
@ -285,6 +286,7 @@ void PlayerDumpWriter::DumpTableContent(std::string& dump, uint32 guid, char con
{ {
case DTT_ITEM: fieldname = "guid"; guids = &items; break; case DTT_ITEM: fieldname = "guid"; guids = &items; break;
case DTT_ITEM_GIFT: fieldname = "item_guid"; guids = &items; break; case DTT_ITEM_GIFT: fieldname = "item_guid"; guids = &items; break;
case DTT_ITEM_LOOT: fieldname = "guid"; guids = &items; break;
case DTT_PET: fieldname = "owner"; break; case DTT_PET: fieldname = "owner"; break;
case DTT_PET_TABLE: fieldname = "guid"; guids = &pets; break; case DTT_PET_TABLE: fieldname = "guid"; guids = &pets; break;
case DTT_PET_DECL: fieldname = "id"; break; case DTT_PET_DECL: fieldname = "id"; break;
@ -610,6 +612,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
break; break;
} }
case DTT_ITEM_LOOT:
{
// item, owner
if (!changeGuid(line, 1, items, sObjectMgr.m_ItemGuids.GetNextAfterMaxUsed()))
ROLLBACK(DUMP_FILE_BROKEN); // item_loot.guid update
if (!changenth(line, 2, newguid)) // item_Loot.owner_guid update
ROLLBACK(DUMP_FILE_BROKEN);
break;
}
case DTT_PET: case DTT_PET:
{ {
//store a map of old pet id to new inserted pet id for use by type 5 tables //store a map of old pet id to new inserted pet id for use by type 5 tables

View file

@ -50,6 +50,8 @@ enum DumpTableType
DTT_ITEM_GIFT, // <- item guids // character_gifts DTT_ITEM_GIFT, // <- item guids // character_gifts
DTT_ITEM_LOOT, // <- item guids // item_loot
DTT_PET, // -> pet guids collection // character_pet DTT_PET, // -> pet guids collection // character_pet
DTT_PET_TABLE, // <- pet guids // pet_aura, pet_spell, pet_spell_cooldown DTT_PET_TABLE, // <- pet guids // pet_aura, pet_spell, pet_spell_cooldown
DTT_PET_DECL, // <- pet guids // character_pet_declinedname DTT_PET_DECL, // <- pet guids // character_pet_declinedname

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10672" #define REVISION_NR "10673"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__