diff options
author | KingPin <none@none> | 2008-10-26 13:32:42 -0500 |
---|---|---|
committer | KingPin <none@none> | 2008-10-26 13:32:42 -0500 |
commit | a0f843a3ebe505dabe138294dd7c6dbc0dcfe094 (patch) | |
tree | e6d8c282355f1affbe5bce524a7d3df23e7e4661 /src/game/PlayerDump.h | |
parent | 6f2e0ee48a24dff1ac7acf441b1559e9d7c26657 (diff) |
[svn] * Merge CLI Commands with regular commands and give them level4 access. sec_console. Source mangos - thanks to ogeraisi for the amalgamated patch.
* Redid/Fixed/Added some lang strings.
* As usual remember this is a trunk rev so stability only guaranteed on northern countries of Mars and western parts of Pluto. No warranties outside the solar system, sorry :( . Check with your local government or dictator on regulations regarding export.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PlayerDump.h')
-rw-r--r-- | src/game/PlayerDump.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/game/PlayerDump.h b/src/game/PlayerDump.h index 6f5b6eed1e7..af5462e1fd6 100644 --- a/src/game/PlayerDump.h +++ b/src/game/PlayerDump.h @@ -73,6 +73,15 @@ enum DumpTableType DTT_ITEM_TEXT, // <- item_text // item_text }; +enum DumpReturn +{ + DUMP_SUCCESS, + DUMP_FILE_OPEN_ERROR, + DUMP_TOO_MANY_CHARS, + DUMP_UNEXPECTED_END, + DUMP_FILE_BROKEN, +}; + class PlayerDump { protected: @@ -85,11 +94,11 @@ class PlayerDumpWriter : public PlayerDump PlayerDumpWriter() {} std::string GetDump(uint32 guid); - bool WriteDump(std::string file, uint32 guid); + DumpReturn WriteDump(std::string file, uint32 guid); private: typedef std::set<uint32> GUIDs; - bool DumpTable(std::string& dump, uint32 guid, char const*tableFrom, char const*tableTo, DumpTableType type); + 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); @@ -104,7 +113,7 @@ class PlayerDumpReader : public PlayerDump public: PlayerDumpReader() {} - bool LoadDump(std::string file, uint32 account, std::string name, uint32 guid); + DumpReturn LoadDump(std::string file, uint32 account, std::string name, uint32 guid); }; #endif |