Skip to content

Conversation

@jprzimba
Copy link
Collaborator

This PR fixes an issue where players selling items without enough capacity or backpack space causes the gold to drop on the ground.

This PR fixes an issue where players selling items without enough capacity or backpack space causes the gold to drop on the ground.
@caduhsn
Copy link
Contributor

caduhsn commented Oct 25, 2025

I checked and it looks like there is a 'wrong' message.

If the player has no bp or no space, but has items to sell, the message appears: you have no sellable items in your loot bag

suggested message (or something similar): You don't have enough space, free up space in your bag

apparently not all lines of code are being processed.

		if (!madeProgress) {
			if (totalPrice == 0) {
				ss << "You have no sellable items in your loot pouch.";
				player->sendTextMessage(MESSAGE_FAILURE, ss.str());
			} else {
				ss << "Finished selling. Some items in your loot pouch could not be sold.";
				player->sendTextMessage(MESSAGE_LOOK, ss.str());
			}
		} else {
			if (totalPrice == 0) {
				ss << "You have no items in your loot pouch.";
				player->sendTextMessage(MESSAGE_FAILURE, ss.str());
			} else {
				ss << "You sold all of the items from your loot pouch for " << totalPrice << " gold.";
				player->sendTextMessage(MESSAGE_LOOK, ss.str());
			}
		}
image

@jprzimba
Copy link
Collaborator Author

I checked and it looks like there is a 'wrong' message.

If the player has no bp or no space, but has items to sell, the message appears: you have no sellable items in your loot bag

suggested message (or something similar): You don't have enough space, free up space in your bag

apparently not all lines of code are being processed.

updated code, thanks
Test and post results

@jprzimba jprzimba merged commit 0958a61 into main Nov 5, 2025
22 checks passed
@jprzimba jprzimba deleted the fix-sell-loot branch November 5, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants