Skip to content

Commit

Permalink
fixed price when sell more than one item (#429)
Browse files Browse the repository at this point in the history
* fixed price when sell more than one item

---------

Co-authored-by: Try <try9998@gmail.com>
  • Loading branch information
yuriytaranov and Try authored Mar 14, 2023
1 parent 60d1c5f commit f973732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game/world/objects/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2920,7 +2920,7 @@ void Npc::sellItem(size_t id, Npc &to, size_t count) {
return;
int32_t price = invent.sellPriceOf(id);
Inventory::trasfer(to.invent,invent,this,id,count,owner);
invent.addItem(owner.script().goldId()->index(),size_t(price),owner);
invent.addItem(owner.script().goldId()->index(),size_t(price)*count,owner);
}

void Npc::buyItem(size_t id, Npc &from, size_t count) {
Expand Down

0 comments on commit f973732

Please sign in to comment.