AlekseyAfonin / EquipBestItem

Mount & Blade: Bannerlord mod
https://www.nexusmods.com/mountandblade2bannerlord/mods/369/
MIT License
6 stars 3 forks source link

Apply item modifer when calculating equipment values #1

Closed epistemancer closed 4 years ago

epistemancer commented 4 years ago

Hi Aleksey,

Thanks for the great mod!

I noticed that the value calculation wasn't taking item modifiers (like "fine" or "tattered") into account, and it was sometimes choosing the wrong equipment because of that. I think this update will fix that. I had to discover the ItemModifer methods by trial & error since I haven't found any API documentation for items, but I've been testing this and it appears to work correctly.

Please feel free to merge, borrow from, or ignore this as you prefer. I'd also welcome comments on my C#; I'm a longtime developer but haven't worked with C# before.

AlekseyAfonin commented 4 years ago

Hi Jonathan,

Thank you for the changes. This is the problem that I had to deal with soon. I'm not a professional developer myself, but I like your code.