const Property Inventory::getProperty(const CeGuiString& key) const
	{
		Property prop;
		if (key == Inventory::PROPERTY_CONTENT)
		{
			PropertyMap contentProp;

			SlotMap slots = getAllSlots();
			for (SlotMap::const_iterator it = slots.begin(); it != slots.end(); ++it)
			{
				Slot* curSlot = (*it).second;
				if (curSlot->getItem())
				{
					contentProp[(*it).first] =
						GameObjectManager::getSingleton().toProperty(curSlot->getItem());
				}
			}

			prop.setValue(contentProp);
		}
		return prop;
	}
Beispiel #2
0
static void fillServers(SlotMap& m)
{
    std::fill(m.begin(), m.end(), nullptr);
}