aboutsummaryrefslogtreecommitdiff
path: root/src/game/PlayerDump.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:35:07 -0700
committermaximius <none@none>2009-10-17 15:35:07 -0700
commit26b5e033ffde3d161382fc9addbfa99738379641 (patch)
treea344f369ca32945f787a02dee35c3dbe342bed7e /src/game/PlayerDump.h
parentf21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff)
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
Diffstat (limited to 'src/game/PlayerDump.h')
-rw-r--r--src/game/PlayerDump.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/game/PlayerDump.h b/src/game/PlayerDump.h
index e3dfd192efb..934244b5d09 100644
--- a/src/game/PlayerDump.h
+++ b/src/game/PlayerDump.h
@@ -17,41 +17,30 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#ifndef _PLAYER_DUMP_H
#define _PLAYER_DUMP_H
-
#include <string>
#include <map>
#include <set>
-
enum DumpTableType
{
DTT_CHARACTER, // // characters
-
DTT_CHAR_TABLE, // // character_achievement, character_achievement_progress,
// character_action, character_aura, character_homebind,
// character_queststatus, character_reputation, character_spell,
// character_spell_cooldown, character_ticket, character_tutorial
-
DTT_INVENTORY, // -> item guids collection // character_inventory
-
DTT_MAIL, // -> mail ids collection // mail
// -> item_text
-
DTT_MAIL_ITEM, // <- mail ids // mail_items
// -> item guids collection
-
DTT_ITEM, // <- item guids // item_instance
// -> item_text
-
DTT_ITEM_GIFT, // <- item guids // character_gifts
-
DTT_PET, // -> pet guids collection // character_pet
DTT_PET_TABLE, // <- pet guids // pet_aura, pet_spell, pet_spell_cooldown
DTT_ITEM_TEXT, // <- item_text // item_text
};
-
enum DumpReturn
{
DUMP_SUCCESS,
@@ -60,40 +49,32 @@ enum DumpReturn
DUMP_UNEXPECTED_END,
DUMP_FILE_BROKEN,
};
-
class PlayerDump
{
protected:
PlayerDump() {}
};
-
class PlayerDumpWriter : public PlayerDump
{
public:
PlayerDumpWriter() {}
-
std::string GetDump(uint32 guid);
DumpReturn WriteDump(const std::string& file, uint32 guid);
private:
typedef std::set<uint32> GUIDs;
-
void DumpTable(std::string& dump, uint32 guid, char const*tableFrom, char const*tableTo, DumpTableType type);
std::string GenerateWhereStr(char const* field, GUIDs const& guids, GUIDs::const_iterator& itr);
std::string GenerateWhereStr(char const* field, uint32 guid);
-
GUIDs pets;
GUIDs mails;
GUIDs items;
GUIDs texts;
};
-
class PlayerDumpReader : public PlayerDump
{
public:
PlayerDumpReader() {}
-
DumpReturn LoadDump(const std::string& file, uint32 account, std::string name, uint32 guid);
};
-
#endif