PDA

View Full Version : Bug I found


Bearik
12-20-2003, 01:57 PM
Another money dupe

If you buy something and sell it back to a vendor and zone it gives you the money you bought the item for back and adds the money you sold the item for aswel

It goes something like that, but still an annoying bug. And probobly the last money dupe one (The trade money dupe was fixed in 5.2 I think)

Tertiary
12-21-2003, 03:06 AM
I had a look at this. It seems that whenever you buy anything from an NPC merchant, it is not deducting the money from your 'Player Profile', although clientside it does, until you zone.

I tried a quick fix. In zone/client process.cpp, in the case OP_ShopPlayerBuy: section, make this change, around line 2942:

if (inst) {
freeslotid = m_inv.FindFreeSlot(false, true);
PutItemInInventory(freeslotid, *inst);
if(freeslotid!=SLOT_INVALID) // Add this line
TakeMoneyFromPP(mpo->price); // Add this line
SendItemPacket(freeslotid, inst, ItemPacketTrade);
safe_delete(inst);
}

I did some quick tests and it seems to fix it. This was with 5.3DR1 Dec 17 source.

Trumpcard
12-21-2003, 03:13 AM
Another good catch.. Thanks both of you. Fix merged in...