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:
Code:
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.