From c2b43f33da1461939df43657752ffd3651933b6e Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 31 Oct 2011 21:30:14 +0000 Subject: Player data is saved and loaded as human readable JSON now. cFileFormatUpdate will loop through old files and convert them to new files (should replace legacy old format loading code) cItem has two new functions to load from Json and output Json, this will keep the items in Json standard ChestEntity and FurnaceEntity use the new functions in cItem git-svn-id: http://mc-server.googlecode.com/svn/trunk@35 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cInventory.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/cInventory.h') diff --git a/source/cInventory.h b/source/cInventory.h index cebcf346b..7d98af853 100644 --- a/source/cInventory.h +++ b/source/cInventory.h @@ -4,6 +4,11 @@ #include "cWindowOwner.h" #include "FileDefine.h" +namespace Json +{ + class Value; +}; + class cItem; class cClientHandle; class cPlayer; @@ -25,8 +30,8 @@ public: bool RemoveItem( cItem & a_Item ); //tolua_export void DrawInventory(); - void WriteToFile(FILE* a_File); - bool LoadFromFile(FILE* a_File); + void SaveToJson(Json::Value & a_Value); + bool LoadFromJson(Json::Value & a_Value); void SendWholeInventory( cClientHandle* a_Client ); -- cgit v1.2.3