MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / SameSlot

Method SameSlot

ogsr_engine/xrGame/Inventory.cpp:719–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717//ищем на поясе вещь для слота
718
719PIItem CInventory::SameSlot(const u32 slot, PIItem pIItem, bool bSearchRuck) const
720{
721 if (slot == NO_ACTIVE_SLOT)
722 return NULL;
723
724 const TIItemContainer& list = bSearchRuck ? m_ruck : m_belt;
725
726 for (TIItemContainer::const_iterator it = list.begin(); list.end() != it; ++it)
727 {
728 PIItem _pIItem = *it;
729 if (_pIItem != pIItem && _pIItem->GetSlot() == slot)
730 return _pIItem;
731 }
732
733 return NULL;
734}
735
736//найти в инвенторе вещь с указанным именем
737PIItem CInventory::Get(const char* name, bool bSearchRuck) const

Callers 1

PutNextToSlotMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetSlotMethod · 0.45

Tested by

no test coverage detected