mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-01 20:49:41 +00:00
[Client] Fix autoequipping for creatures in WorldEvent::editContainers()
This commit is contained in:
parent
a86c68c5a1
commit
0eed05610b
1 changed files with 7 additions and 2 deletions
|
@ -80,7 +80,7 @@ void WorldEvent::addContainerItem(mwmp::WorldObject& worldObject, const MWWorld:
|
|||
containerItem.enchantmentCharge = itemPtr.getCellRef().getEnchantmentCharge();
|
||||
containerItem.actionCount = actionCount;
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Adding container item %s", containerItem.refId.c_str());
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Adding container item %s", containerItem.refId.c_str());
|
||||
|
||||
worldObject.containerItems.push_back(containerItem);
|
||||
}
|
||||
|
@ -232,7 +232,12 @@ void WorldEvent::editContainers(MWWorld::CellStore* cellStore)
|
|||
mwmp::Main::get().getCellController()->isLocalActor(ptrFound))
|
||||
{
|
||||
MWWorld::InventoryStore& invStore = ptrFound.getClass().getInventoryStore(ptrFound);
|
||||
invStore.autoEquip(ptrFound);
|
||||
|
||||
if (ptrFound.getTypeName() == typeid(ESM::NPC).name())
|
||||
invStore.autoEquip(ptrFound);
|
||||
// autoEquip only works on NPCs, so use the closest alternative for creatures
|
||||
else
|
||||
invStore.autoEquipShield(ptrFound);
|
||||
}
|
||||
|
||||
// If this container was open for us, update its view
|
||||
|
|
Loading…
Reference in a new issue