|
|
|
@ -765,8 +765,8 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
|
|
|
|
|
|
|
|
|
if (!mSoundsDisabled)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ContainerStoreIterator csi = inv.getSlot(group < 0 ? MWWorld::InventoryStore::Slot_Helmet : group);
|
|
|
|
|
const MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator csi = inv.getSlot(group < 0 ? MWWorld::InventoryStore::Slot_Helmet : group);
|
|
|
|
|
if (csi != inv.end())
|
|
|
|
|
{
|
|
|
|
|
mSoundIds[type] = csi->getClass().getSound(*csi);
|
|
|
|
@ -899,8 +899,8 @@ void NpcAnimation::showWeapons(bool showWeapon)
|
|
|
|
|
mShowWeapons = showWeapon;
|
|
|
|
|
if(showWeapon)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ContainerStoreIterator weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
|
|
|
|
const MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
|
|
|
|
if(weapon != inv.end())
|
|
|
|
|
{
|
|
|
|
|
osg::Vec4f glowColor = getEnchantmentColor(*weapon);
|
|
|
|
@ -912,7 +912,7 @@ void NpcAnimation::showWeapons(bool showWeapon)
|
|
|
|
|
if (weapon->getTypeName() == typeid(ESM::Weapon).name() &&
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::ContainerStoreIterator ammo = inv.getSlot(MWWorld::InventoryStore::Slot_Ammunition);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator ammo = inv.getSlot(MWWorld::InventoryStore::Slot_Ammunition);
|
|
|
|
|
if (ammo != inv.end() && ammo->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::Bolt)
|
|
|
|
|
attachArrow();
|
|
|
|
|
else
|
|
|
|
@ -931,8 +931,8 @@ void NpcAnimation::showWeapons(bool showWeapon)
|
|
|
|
|
void NpcAnimation::showCarriedLeft(bool show)
|
|
|
|
|
{
|
|
|
|
|
mShowCarriedLeft = show;
|
|
|
|
|
MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ContainerStoreIterator iter = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
|
|
|
|
const MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator iter = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
|
|
|
|
if(show && iter != inv.end())
|
|
|
|
|
{
|
|
|
|
|
osg::Vec4f glowColor = getEnchantmentColor(*iter);
|
|
|
|
|