summaryrefslogtreecommitdiffstats
path: root/source/Item.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-12 05:46:01 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-12 05:46:01 +0100
commit43e684071933adef93040e8d4b830d5c6b71cf9a (patch)
tree014e5300feb1cdbbb8f24e4e42594eeb841f0be2 /source/Item.cpp
parentFixed rclk in doublechests (diff)
downloadcuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.gz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.bz2
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.lz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.xz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.zst
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.zip
Diffstat (limited to 'source/Item.cpp')
-rw-r--r--source/Item.cpp12
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();
}
}