1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

Merge pull request #2929 from Capostrophic/barterprice

Don't offer a minimum price of 1 gold for zero value items/services (#5484)
This commit is contained in:
Bret Curtis 2020-06-25 14:55:52 +02:00 committed by GitHub
commit e0fb9c2390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,7 @@
Bug #5441: Enemies can't push a player character when in critical strike stance
Bug #5451: Magic projectiles don't disappear with the caster
Bug #5452: Autowalk is being included in savegames
Bug #5484: Zero value items shouldn't be able to be bought or sold for 1 gold
Feature #390: 3rd person look "over the shoulder"
Feature #2386: Distant Statics in the form of Object Paging
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher

View file

@ -679,7 +679,9 @@ namespace MWMechanics
int MechanicsManager::getBarterOffer(const MWWorld::Ptr& ptr,int basePrice, bool buying)
{
if (ptr.getTypeName() == typeid(ESM::Creature).name())
// Make sure zero base price items/services can't be bought/sold for 1 gold
// and return the intended base price for creature merchants
if (basePrice == 0 || ptr.getTypeName() == typeid(ESM::Creature).name())
return basePrice;
const MWMechanics::NpcStats &sellerStats = ptr.getClass().getNpcStats(ptr);