Use the actual damage for deducting weapon rating

pull/469/head
Capostrophic 7 years ago committed by GitHub
parent bec47dfb7c
commit 9d85b7c2d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,20 +50,27 @@ namespace MWMechanics
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow) if (weapon->mData.mType >= ESM::Weapon::MarksmanBow)
{ {
rating = (weapon->mData.mChop[0] + weapon->mData.mChop[1]) / 2.f; float rangedDamage = weapon->mData.mChop[0] + weapon->mData.mChop[1];
MWMechanics::adjustWeaponDamage(rangedDamage, item, actor);
rating = rangedDamage / 2.f;
if (weapon->mData.mType >= ESM::Weapon::MarksmanThrown) if (weapon->mData.mType >= ESM::Weapon::MarksmanThrown)
MWMechanics::resistNormalWeapon(enemy, actor, item, rating); MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
} }
else else
{ {
float meleeDamage = 0.f;
for (int i=0; i<2; ++i) for (int i=0; i<2; ++i)
{ {
rating += weapon->mData.mSlash[i]; meleeDamage += weapon->mData.mSlash[i];
rating += weapon->mData.mThrust[i]; meleeDamage += weapon->mData.mThrust[i];
rating += weapon->mData.mChop[i]; meleeDamage += weapon->mData.mChop[i];
} }
rating /= 6.f;
MWMechanics::adjustWeaponDamage(meleeDamage, item, actor);
rating = meleeDamage / 6.f;
MWMechanics::resistNormalWeapon(enemy, actor, item, rating); MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
} }

Loading…
Cancel
Save