cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 47 forks source link

[TBC][WOTLK] You can dublicate items using auction if you do price as "5555555" #1732

Closed datchannin closed 5 years ago

datchannin commented 5 years ago

Current behavior: Sorry, but one more bug: If you try to sell stack of items using auction. You can dublicate this stack. You should write price as "5555555". Then you price will transforme to 401594. But after your logout and login - you will see that all items are in your bag and the same items are on the auction.

Check my video: https://radikal.ru/video/LBpKjyvyadU

Expected behavior: Items should not be dublicated

Steps to reproduce:

  1. Go to the auc
  2. Split stack as 19+1
  3. Put 19 to auc and set price as 5555555 - like on the video
  4. Start auc
  5. Logout
  6. Login

Client version: 2.4.3 Commit hash: latest Database version: october Operating system: win64

CabrasDaPeste commented 5 years ago

I coudn't reproduce this issue on TBC.

datchannin commented 5 years ago

I've checked it again 5 mins ago with the latest version on WotLK core. And it works for this WotLK core too. Video: https://radikal.ru/video/G3rnhF8ia4P

I believe it will be the same for classic core, but I don't have client to check it.

datchannin commented 5 years ago

If it is necessary, I have this data in console: SQL: INSERT INTO auction (id,houseid,itemguid,item_template,item_count,item_randompropertyid,itemowner,buyoutprice,time,moneyTime,buyguid,lastbid,startbid,deposit) VALUES ('1', '6', '14', '2321', '19', '0', '1', '4015942448', '1539812276', '0', '0', '0', '10712', '142') SQL ERROR: Out of range value for column 'buyoutprice' at row 1

CabrasDaPeste commented 5 years ago

I'll recompile it and try again on TBC.

hipejoe commented 5 years ago

I was able to confirm this. create a stack of 19 for auction and set buyout for the value in OP. WOTLK

Warlockbugs commented 5 years ago

Same pattern as https://github.com/cmangos/issues/issues/1638 Cannot reproduce on Linux. Stacks are saved correctly. No SQL error either.

Ve1vet commented 5 years ago

@Warlockbugs price should be higher than max price value in DB table. Value depends from system. Maybe he have old computer or something...

Ve1vet commented 5 years ago

@Warlockbugs P.S. If it helps. Couple years ago max value was 214748 gold 36 silver 47 cooper. But he gets 401594 gold 24 silver 48 cooper... Something goes wrong here, somwhere mistake in data types( maybe converting data dypes ).

killerwife commented 5 years ago

Fix coming soon™. Next week.

Lillecarl commented 5 years ago

I'd say a good idea would be to start a transaction whenever doing money or item transfer, and if it fails roll back in game as well?

killerwife commented 5 years ago

https://github.com/cmangos/mangos-tbc/commit/09306e6e11b02cd634365b8442db47801278da3e Fixed

Lillecarl commented 5 years ago

Interesting how it slipped through this long!