Code: Select all
if (playerBought.begin() == playerBought.end())
Edit: Nevermind, I think the problem is somewhere else...
Code: Select all
if (playerBought.begin() == playerBought.end())
Code: Select all
for (MWWorld::ContainerStoreIterator it = playerBought.begin();
it != playerBought.end(); ++it)
{
std::cout << "item in playerbought with count " << it->getRefData().getCount() << std::endl;
}
Code: Select all
bool traded=false;
for (MWWorld::ContainerStoreIterator it = playerBought.begin();
it != playerBought.end(); ++it)
{
if (it->getRefData().getCount() > 0)
traded = true;
}
That is handled.Creatures and containers on the other hand don't have an InventoryStore at all.