diff options
Diffstat (limited to 'source/Item.cpp')
-rw-r--r-- | source/Item.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Item.cpp b/source/Item.cpp index 7d8a18f98..759b23042 100644 --- a/source/Item.cpp +++ b/source/Item.cpp @@ -10,21 +10,21 @@ void cItem::GetJson( Json::Value & a_OutValue ) const { - a_OutValue["ID"] = m_ItemID; - if( m_ItemID > 0 ) + a_OutValue["ID"] = m_ItemType; + if( m_ItemType > 0 ) { a_OutValue["Count"] = m_ItemCount; - a_OutValue["Health"] = m_ItemHealth; + a_OutValue["Health"] = m_ItemDamage; } } void cItem::FromJson( const Json::Value & a_Value ) { - m_ItemID = (ENUM_ITEM_ID)a_Value.get("ID", -1 ).asInt(); - if( m_ItemID > 0 ) + m_ItemType = (ENUM_ITEM_ID)a_Value.get("ID", -1 ).asInt(); + if( m_ItemType > 0 ) { m_ItemCount = (char)a_Value.get("Count", -1 ).asInt(); - m_ItemHealth = (short)a_Value.get("Health", -1 ).asInt(); + m_ItemDamage = (short)a_Value.get("Health", -1 ).asInt(); } } |