Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested inventory + trading with NPC = counting items twice #49209

Closed
big-smitty opened this issue Jun 7, 2021 · 2 comments · Fixed by #51704
Closed

Nested inventory + trading with NPC = counting items twice #49209

big-smitty opened this issue Jun 7, 2021 · 2 comments · Fixed by #51704
Labels
NPC / Factions NPCs, AI, Speech, Factions, Ownership (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@big-smitty
Copy link

Description

When trading with an NPC, you can sell a container and it's contents, then sell its contents, doubling the expected gain.

Steps To Reproduce

  1. Trade with an NPC
  2. Sell a container:
    bug1
  3. Sell the contents of the container, note the difference in credit, and the expected price of selling:
    bug2

Expected behavior

Selling the container implies selling the contents, so you shouldn't be able to select the subcontents of a container if you are selling the container.
eg.
Selling a bottle of water -> you shouldn't be able to sell the water as well.
so the water would auto-select on selecting the bottle.

Versions and configuration

  • OS: Win 10
  • Version: experimental 38074ba, released 05/25/21@1559
  • Graphics: Tiles
  • Language: en-us
  • Mods: Aftershock, stats through kills, Magiclysm
@Maleclypse Maleclypse added (S2 - Confirmed) Bug that's been confirmed to exist NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Jun 7, 2021
@natsirt721
Copy link
Contributor

natsirt721 commented Jun 7, 2021

This works the other way around too - you can dupe items by buying the item and the container that it is in. See #48922

@RoyBerube
Copy link
Contributor

PR #48580 addressed this kind of problem by disallowing a duplicate selection when in a container. The same approach should work here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPC / Factions NPCs, AI, Speech, Factions, Ownership (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants