Bug - Fixed Buying Fancy Oil Painting doesn't reduce old silver coin count

Darzil

Developer
Not sure why, but buying the Fancy Oil Painting (and I think I had the same issue with Solid Gold Rosary) doesn't decrement old silver coin count. Polo Trophy does appear to, however (my coins went from 4 to 1 when I tried and failed to get one after getting fancy oil painting). Am in run so cannot look into it further (and a hardware crash on my old mafia drive got rid my copy of the source for the boutique).
 
I believe I got the row numbers in coinmasters.txt just before I picked up a fancy oil painting. I don't see extra tabs or anything there, and those row numbers are so nicely in order that it seems like they should be right... If there was an off-by-one error, I would still expect the wrong number of coins to be deducted. Having coins deducted for any purchase shows that the shop is working in general, at least.
 
Am testing on an alt - after all, what else are they for.

Looks like it's that it's not deducting for things bought in relay browser, but is for things bought in item manager.
 
Look at NPCPurchaseRequest.parseShopResponse(). In particular, the section following the comment that says "The following are coinmasters". shop.php calls that are coinmasters are, unfortunately, hardcoded there.

(And for no obvious reason, somebody stuck "hiddentavern" - which is NOT a coinmaster, since it deals in Meat, not tokens. - right in the middle of those shop.php shops that are coinmasters.)

There is a similar hardcoded list in NPCPurchaseRequest.registerShopRequest for "The following are coinmasters".

You need to add shopId.equals( "cindy" ) checks to both of those methods.
 
ExampleCoinMaster.txt should probably be updated. It could serve as a nice checklist, and it should even look simpler than the current version (back when coinmasters were hard to add even if you knew what to do from the start).
 
Back
Top