mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
Fix bug where stacks of non-stackable items are removed when you buy 1.
This commit is contained in:
parent
69244a094d
commit
05ac8499df
@ -361,7 +361,8 @@ void Zone::DumpMerchantList(uint32 npcid) {
|
||||
|
||||
int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charges, bool sold) {
|
||||
|
||||
LogInventory("Transaction of [{}] [{}]", charges, item);
|
||||
LogInventory("[{}] [{}] charges of [{}]", ((sold) ? "Sold" : "Bought"),
|
||||
charges, item);
|
||||
//DumpMerchantList(npcid);
|
||||
// Iterate past main items.
|
||||
// If the item being transacted is in this list, return 0;
|
||||
@ -419,8 +420,7 @@ int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charg
|
||||
if (!ml.origslot) {
|
||||
ml.origslot = ml.slot;
|
||||
}
|
||||
bool is_stackable = database.GetItem(item)->Stackable;
|
||||
if ((is_stackable && charges > 0) || (!is_stackable && sold)) {
|
||||
if (ml.charges > 0) {
|
||||
database.SaveMerchantTemp(npcid, ml.origslot, item, ml.charges);
|
||||
tmp_merlist.push_back(ml);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user