mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 14:36:39 +00:00
commit
afa502cfba
3 changed files with 0 additions and 27 deletions
|
@ -32,26 +32,6 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ItemStack::stacks(const ItemStack &other)
|
|
||||||
{
|
|
||||||
if(mBase == other.mBase)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// If one of the items is in an inventory and currently equipped, we need to check stacking both ways to be sure
|
|
||||||
if (mBase.getContainerStore() && other.mBase.getContainerStore())
|
|
||||||
return mBase.getContainerStore()->stacks(mBase, other.mBase)
|
|
||||||
&& other.mBase.getContainerStore()->stacks(mBase, other.mBase);
|
|
||||||
|
|
||||||
if (mBase.getContainerStore())
|
|
||||||
return mBase.getContainerStore()->stacks(mBase, other.mBase);
|
|
||||||
if (other.mBase.getContainerStore())
|
|
||||||
return other.mBase.getContainerStore()->stacks(mBase, other.mBase);
|
|
||||||
|
|
||||||
MWWorld::ContainerStore store;
|
|
||||||
return store.stacks(mBase, other.mBase);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator == (const ItemStack& left, const ItemStack& right)
|
bool operator == (const ItemStack& left, const ItemStack& right)
|
||||||
{
|
{
|
||||||
if (left.mType != right.mType)
|
if (left.mType != right.mType)
|
||||||
|
|
|
@ -13,7 +13,6 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
ItemStack (const MWWorld::Ptr& base, ItemModel* creator, size_t count);
|
ItemStack (const MWWorld::Ptr& base, ItemModel* creator, size_t count);
|
||||||
ItemStack();
|
ItemStack();
|
||||||
bool stacks (const ItemStack& other);
|
|
||||||
///< like operator==, only without checking mType
|
///< like operator==, only without checking mType
|
||||||
|
|
||||||
enum Type
|
enum Type
|
||||||
|
|
|
@ -7,9 +7,6 @@
|
||||||
#include <osg/Group>
|
#include <osg/Group>
|
||||||
#include <osg/LineWidth>
|
#include <osg/LineWidth>
|
||||||
|
|
||||||
#define OPENMW_TO_STRING(X) #X
|
|
||||||
#define OPENMW_LINE_STRING OPENMW_TO_STRING(__LINE__)
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
using DetourNavigator::operator<<;
|
using DetourNavigator::operator<<;
|
||||||
|
@ -121,6 +118,3 @@ namespace SceneUtil
|
||||||
mColors->push_back(value);
|
mColors->push_back(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef OPENMW_TO_STRING
|
|
||||||
#undef OPENMW_LINE_STRING
|
|
||||||
|
|
Loading…
Reference in a new issue