fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Marketplace window, do not cancel the current trade by closing the Gift window if there are sufficient resources to execute the trade

Open LeHerosInconnu opened this issue 3 years ago • 4 comments

Preliminary checks

Describe the problem requiring a solution

Currently, if the player starts a trade and opens the Gift window, the trade is cancelled when the Gift window is closed.

In fheroes2:

Do not cancel current trade when gift window 001

Do not cancel current trade when gift window 002

Do not cancel current trade when gift window 003

https://user-images.githubusercontent.com/43583994/144721740-ae6fc22b-9e0a-472f-a8c6-5fd3647f3e83.mp4

Describe the possible solution

I suggest to not cancel the current trade by closing the Gift window if there are sufficient resources to execute the trade. (Same for Trading Post window.)

Additional info

No response

LeHerosInconnu avatar Dec 04 '21 19:12 LeHerosInconnu

I had to make it like this on purpose because if not then someone would be able to spend the same resources twice with how the menu currently worked, and I also thought that no one would care because who would setup their trade and then go to the gift menu before finalizing their trade, right? Well I guess I was wrong 😂. Anyways I also explained why I did this in the PR, but if this is still deemed necessary then I have no objections.

zenseii avatar Dec 04 '21 19:12 zenseii

@zenseii.

I had to make it like this on purpose because if not then someone would be able to spend the same resources twice with how the menu currently worked, and I also thought that no one would care because who would setup their trade and then go to the gift menu before finalizing their trade, right? Well I guess I was wrong joy. Anyways I also explained why I did this in the PR, but if this is still deemed necessary then I have no objections.

The user can start a trade to see how many resources he can give, then make the gift and return to finish the started trade. :)

LeHerosInconnu avatar Dec 04 '21 19:12 LeHerosInconnu

@zenseii.

I had to make it like this on purpose because if not then someone would be able to spend the same resources twice with how the menu currently worked, and I also thought that no one would care because who would setup their trade and then go to the gift menu before finalizing their trade, right? Well I guess I was wrong joy. Anyways I also explained why I did this in the PR, but if this is still deemed necessary then I have no objections.

The user can start a trade to see how many resources he can give, then make the gift and return to finish the started trade. :)

But you can see how much you can give in the gift window? Or do you mean that you want to check what the exchange rate of that resource is first? That would be a valid reason, yes.

zenseii avatar Dec 04 '21 19:12 zenseii

@zenseii.

...I also explained why I did this in the PR...

Sorry I squashed your plan. :) I always make sure to try as many possibilities when I use an interface because people use it in different ways.

@zenseii.

I had to make it like this on purpose because if not then someone would be able to spend the same resources twice with how the menu currently worked, and I also thought that no one would care because who would setup their trade and then go to the gift menu before finalizing their trade, right? Well I guess I was wrong joy. Anyways I also explained why I did this in the PR, but if this is still deemed necessary then I have no objections.

The user can start a trade to see how many resources he can give, then make the gift and return to finish the started trade. :)

But you can see how much you can give in the gift window? Or do you mean that you want to check what the exchange rate of that resource is first? That would be a valid reason, yes.

Yes just this way. :)

LeHerosInconnu avatar Dec 04 '21 19:12 LeHerosInconnu