|
|
@ -182,29 +182,11 @@ namespace MWMechanics
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float bestArrowRating = 0;
|
|
|
|
|
|
|
|
MWWorld::Ptr bestArrow;
|
|
|
|
MWWorld::Ptr bestArrow;
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
float bestArrowRating = rateAmmo(actor, enemy, bestArrow, ESM::Weapon::Arrow);
|
|
|
|
{
|
|
|
|
|
|
|
|
float rating = rateWeapon(*it, actor, enemy, ESM::Weapon::Arrow);
|
|
|
|
|
|
|
|
if (rating > bestArrowRating)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bestArrowRating = rating;
|
|
|
|
|
|
|
|
bestArrow = *it;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float bestBoltRating = 0;
|
|
|
|
|
|
|
|
MWWorld::Ptr bestBolt;
|
|
|
|
MWWorld::Ptr bestBolt;
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
float bestBoltRating = rateAmmo(actor, enemy, bestBolt, ESM::Weapon::Bolt);
|
|
|
|
{
|
|
|
|
|
|
|
|
float rating = rateWeapon(*it, actor, enemy, ESM::Weapon::Bolt);
|
|
|
|
|
|
|
|
if (rating > bestBoltRating)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bestBoltRating = rating;
|
|
|
|
|
|
|
|
bestBolt = *it;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -277,25 +259,9 @@ namespace MWMechanics
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float bestArrowRating = 0;
|
|
|
|
float bestArrowRating = rateAmmo(actor, enemy, ESM::Weapon::Arrow);
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
float rating = rateWeapon(*it, actor, enemy, ESM::Weapon::Arrow);
|
|
|
|
|
|
|
|
if (rating > bestArrowRating)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bestArrowRating = rating;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float bestBoltRating = 0;
|
|
|
|
float bestBoltRating = rateAmmo(actor, enemy, ESM::Weapon::Bolt);
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
float rating = rateWeapon(*it, actor, enemy, ESM::Weapon::Bolt);
|
|
|
|
|
|
|
|
if (rating > bestBoltRating)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bestBoltRating = rating;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
|
|
|
{
|
|
|
|
{
|
|
|
|