Coins disappeared

1
Hi,
on my server i have an second incident where coins are disappeared.
I was at this time directly at the player at the trading post, no bags ec...

The Player bought slaves with 89 silver coins, but got 0 back...
I check coins in my database but sum < 89...

after this i try to check this transfer in my server logs, but all seems perfect:

Code: Select all

WARN 2018-10-21 15:39:18.279 {} <<Thread>> [] DBI::processQuotedSelectQuery(4 ms) SELECT * FROM nyu_tradepost_transfers WHERE Status = 0 [T:DBIPrimary:6988]
ECHO 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] FTTP | TransferID 289 with type payment registered.
INFO 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] Player::inventoryAdditem() Type: 1060  Quantity: 89  Quality: 100  Durability: 0  CreatedDurability: 0
WARN 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] DB::noRS(0 ms) START TRANSACTION;
WARN 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] DB::RS(0 ms) SELECT f_insertNewItemInventory(780,1060,100,89,0,0, '', 0, NULL, NULL, NULL, NULL);
WARN 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] DB::noRS(0 ms) COMMIT;
INFO 2018-10-21 15:39:18.294 {03} <FTTPTransfer::confirm> [4148896] FTTP | Transfer 289 completed successfully.
ECHO 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] FTTP | TransferID 290 with type market_buy registered.

WARN 2018-10-21 15:39:18.294 {} <<Thread>> [] DBI::processGenericUpdateQuery(4 ms) UPDATE nyu_tradepost_transfers SET Status = 1 WHERE ID = 289 [T:DBIPrimary:6988]

WARN 2018-10-21 15:39:18.294 {} <<Thread>> [] DBI::processQuotedSelectQuery(0 ms) SELECT * FROM nyu_tradepost_market WHERE ID = '23' [T:DBIPrimary:6988]
INFO 2018-10-21 15:39:18.310 {01} <FTTPTransfer::buySubject> [4148898] Player::inventoryAdditem() Type: 1700  Quantity: 1  Quality: 80  Durability: 10000  CreatedDurability: 10000
WARN 2018-10-21 15:39:18.310 {01} <FTTPTransfer::buySubject> [4148898] DB::noRS(0 ms) START TRANSACTION;
WARN 2018-10-21 15:39:18.310 {01} <FTTPTransfer::buySubject> [4148898] DB::RS(4 ms) SELECT f_insertNewItemInventory(780,1700,80,1,10000,10000, '', 0, NULL, NULL, NULL, NULL);
WARN 2018-10-21 15:39:18.310 {01} <FTTPTransfer::buySubject> [4148898] DB::noRS(0 ms) COMMIT;
INFO 2018-10-21 15:39:18.310 {02} <FTTPTransfer::confirm> [4148898] FTTP | Transfer 290 completed successfully.
Any ideas?

Is it possible to log coin amounts on tradepost transfers?


Serverid: 2199
Tradepost mods are up to date.

best regards
Christian

Re: Coins disappeared

4
That's an easy one.

CharID 15 tried to trade something at 15:39:23 according to webserver log:

Code: Select all

2018-10-21 15:39:23 ServerID 2199 > MARKET TRADE | CHAR 15 | REQUEST {"Quantity":"1","action":"market_trade","OfferID":"23"}
but according to your log, he had left the trading post area half a minute earlier:

Code: Select all

ECHO 2018-10-21 15:38:58.982 {02} <NyuTrigger::playerLeave> [4146919] TTmod | Character ID 15 has left the trigger at position -285.89 -241.521 1030
So the trade failing is correct behavior in the first place.
However I'm not 100% sure why the coins disappeared. I think a part of a the failed trade was executed when CharID 12 entered the trading post just a few milliseconds before the failed trade would've been removed from the database. Need to check that later.

Meanwhile please tell your players to not leave the trading post area when they are trading so they will not lose items.

Re: Coins disappeared

5
thanks for evaluating!

There where a lot of trades (~150) in few minutes there.

But:

Code: Select all

WARN 2018-10-21 15:39:18.294 {02} <FTTPTransfer::start> [4148896] DB::RS(0 ms) SELECT f_insertNewItemInventory(780,1060,100,89,0,0, '', 0, NULL, NULL, NULL, NULL);
This coins didn't received the player... i dont know where they are...

best regards
Tjaden

Re: Coins disappeared

6
The coins were received, but they were removed by the failed trade a few seconds later. And that trade was only partially executed because the person left the trading post area.

Code: Select all

ECHO 2018-10-21 15:39:33.310 {02} <FTTPTransfer::start> [4150413] FTTP | TransferID 291 with type remove_item registered.
WARN 2018-10-21 15:39:33.310 {} <<Thread>> [] DBI::processQuotedSelectQuery(0 ms) SELECT * FROM items WHERE ID = '59046' [T:DBIPrimary:6988]

INFO 2018-10-21 15:39:33.326 {01} <FTTPTransfer::sellSubject> [4150415] Player::inventoryRemoveItem() ItemId: 59046
INFO 2018-10-21 15:39:33.326 {02} <FTTPTransfer::confirm> [4150415] FTTP | Transfer 291 completed successfully.

Re: Coins disappeared

7
Ok,

i can inform my players, but i think it isnt an long-term solution for everyone.

For the future, maybe you can log the newItemId result from f_insertNewItemInventory?
It probably makes it easier for admins.

best regards
Christian