More generally, I wonder if/how code could be shared with stack splitting:
Code: Select all
// Check wagon weight limit if (usingWagon && (remoteItems.GetWeight() + (goldToDrop / DaggerfallBankManager.gold1kg) > ItemHelper.wagonKgLimit)) return;
- player gold is handled as an int instead of a DaggerfallUnityItem;
- dropping gold uses dedicated message:
- WagonCanHoldAmount() mush be used carefully as it can itself display a message if no item can be dropped;
- I think player gold amount is inserted into dedicated message by a macro, so no other amount can be used if the wagon capacity is the limiting factor;
- some players (including myself) came to rely on this message to know how many gold pieces they have in their inventory (character sheet includes letters of credit).
- when you try to drop more gold in your wagon that it can hold (well, plus 399), action is silently discarded; So to drop as much gold as you can becomes a process of trial and error.