2 * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef _PLAYER_DUMP_H
20 #define _PLAYER_DUMP_H
28 DTT_CHARACTER
, // // characters
30 DTT_CHAR_TABLE
, // // character_achievement, character_achievement_progress,
31 // character_action, character_aura, character_homebind,
32 // character_queststatus, character_reputation, character_spell,
33 // character_spell_cooldown, character_ticket, character_tutorial
35 DTT_INVENTORY
, // -> item guids collection // character_inventory
37 DTT_MAIL
, // -> mail ids collection // mail
40 DTT_MAIL_ITEM
, // <- mail ids // mail_items
41 // -> item guids collection
43 DTT_ITEM
, // <- item guids // item_instance
46 DTT_ITEM_GIFT
, // <- item guids // character_gifts
48 DTT_PET
, // -> pet guids collection // character_pet
49 DTT_PET_TABLE
, // <- pet guids // pet_aura, pet_spell, pet_spell_cooldown
50 DTT_ITEM_TEXT
, // <- item_text // item_text
68 class PlayerDumpWriter
: public PlayerDump
73 std::string
GetDump(uint32 guid
);
74 DumpReturn
WriteDump(const std::string
& file
, uint32 guid
);
76 typedef std::set
<uint32
> GUIDs
;
78 void DumpTable(std::string
& dump
, uint32 guid
, char const*tableFrom
, char const*tableTo
, DumpTableType type
);
79 std::string
GenerateWhereStr(char const* field
, GUIDs
const& guids
, GUIDs::const_iterator
& itr
);
80 std::string
GenerateWhereStr(char const* field
, uint32 guid
);
88 class PlayerDumpReader
: public PlayerDump
93 DumpReturn
LoadDump(const std::string
& file
, uint32 account
, std::string name
, uint32 guid
);