mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Bug Fix] Fix for charges not being sold correctly (#1357)
* fix for charges not being sold correctly https://github.com/EQEmu/Server/issues/1350 this fixes this issue * Update client_packet.cpp * Update zone.cpp this completes the fix for all charge items being sold to merchants * code opmizations could probably be fixed up better but this is a little cleaner * Update snake_casing Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
+3
-4
@@ -419,12 +419,11 @@ int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charg
|
||||
if (!ml.origslot) {
|
||||
ml.origslot = ml.slot;
|
||||
}
|
||||
|
||||
if (charges > 0) {
|
||||
bool is_stackable = database.GetItem(item)->Stackable;
|
||||
if ((is_stackable && charges > 0) || (!is_stackable && sold)) {
|
||||
database.SaveMerchantTemp(npcid, ml.origslot, item, ml.charges);
|
||||
tmp_merlist.push_back(ml);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
database.DeleteMerchantTemp(npcid, ml.origslot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user