Skip to content

Commit

Permalink
Allow NPCs to accept exact trades. (CleverRaven#49470)
Browse files Browse the repository at this point in the history
This solves issues where an NPC offers to train you for (say) $10, but
actually insists on $10.01 or more in value.
  • Loading branch information
pjf authored Jun 28, 2021
1 parent 0d9e284 commit ba7ebad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/npctrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,5 +754,5 @@ bool npc_trading::trade( npc &np, int cost, const std::string &deal )
// Will the NPC accept the trade that's currently on offer?
bool trading_window::npc_will_accept_trade( const npc &np ) const
{
return np.will_exchange_items_freely() || your_balance + np.max_credit_extended() > 0;
return np.will_exchange_items_freely() || your_balance + np.max_credit_extended() >= 0;
}

0 comments on commit ba7ebad

Please sign in to comment.