forked from teamnwah/openmw-tes3coop
[Server] Use foreach loop
This commit is contained in:
parent
cd620e17ec
commit
4d0072a74c
1 changed files with 2 additions and 2 deletions
|
@ -129,8 +129,8 @@ void Inventory::removeItem(const std::string &refId, unsigned short count)
|
||||||
|
|
||||||
bool Inventory::hasItemEquipped(const std::string &refId) const
|
bool Inventory::hasItemEquipped(const std::string &refId) const
|
||||||
{
|
{
|
||||||
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; slot++)
|
for (const auto &equipmentItem : netActor->getNetCreature()->equipmentItems)
|
||||||
if (Misc::StringUtils::ciEqual(netActor->getNetCreature()->equipmentItems[slot].refId, refId))
|
if (Misc::StringUtils::ciEqual(equipmentItem.refId, refId))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue