From cc26f1646308a71ea78f0656efa670915e5e7345 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 10 Apr 2013 19:52:03 +0000 Subject: Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid. http://forum.mc-server.org/showthread.php?tid=831 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Item.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/Item.cpp') diff --git a/source/Item.cpp b/source/Item.cpp index 759b23042..b96500a30 100644 --- a/source/Item.cpp +++ b/source/Item.cpp @@ -8,6 +8,21 @@ +bool cItem::IsStackableWith(const cItem & a_OtherStack) +{ + if (a_OtherStack.m_ItemType != m_ItemType) + { + return false; + } + + // TODO: match enchantments etc. + return true; +} + + + + + void cItem::GetJson( Json::Value & a_OutValue ) const { a_OutValue["ID"] = m_ItemType; -- cgit v1.2.3