Merge branch 'travelprice' into 'master'

Rescale the base travel cost by the number of followers (#8446)

Closes #8446

See merge request OpenMW/openmw!4626
This commit is contained in:
psi29a 2025-07-04 11:05:56 +00:00
commit d0af16c5db

View File

@ -64,9 +64,6 @@ namespace MWGui
price = static_cast<int>(d);
}
price = std::max(1, price);
price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr, price, true);
// Add price for the travelling followers
std::set<MWWorld::Ptr> followers;
MWWorld::ActionTeleport::getFollowers(player, followers, !interior);
@ -74,6 +71,9 @@ namespace MWGui
// Apply followers cost, unlike vanilla the first follower doesn't travel for free
price *= 1 + static_cast<int>(followers.size());
price = std::max(1, price);
price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr, price, true);
const int lineHeight = Settings::gui().mFontSize + 2;
MyGUI::Button* toAdd = mDestinationsView->createWidget<MyGUI::Button>(