Skip to content

Commit

Permalink
Fix astyle regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg authored Dec 19, 2019
1 parent 7baf434 commit b4d8131
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/npctrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void npc_trading::transfer_items( std::vector<item_pricing> &stuff, player &give
}
}
} else {
if( ip.charges > 0 ){
if( ip.charges > 0 ) {
ip.loc.get_item()->set_var( "trade_charges", charges );
} else {
ip.loc.get_item()->set_var( "trade_amount", 1 );
Expand Down Expand Up @@ -616,21 +616,21 @@ bool npc_trading::trade( npc &np, int cost, const std::string &deal )
npc_trading::transfer_items( trade_win.theirs, np, g->u, from_map, true );

for( item_location *loc_ptr : from_map ) {
if( !loc_ptr ){
if( !loc_ptr ) {
continue;
}
item *it = loc_ptr->get_item();
if( !it ){
if( !it ) {
continue;
}
if( it->has_var( "trade_charges" ) && it->count_by_charges() ){
if( it->has_var( "trade_charges" ) && it->count_by_charges() ) {
it->charges -= static_cast<int>( it->get_var( "trade_charges", 0 ) );
if( it->charges <= 0 ){
if( it->charges <= 0 ) {
loc_ptr->remove_item();
} else {
it->erase_var( "trade_charges" );
}
} else if( it->has_var( "trade_amount" ) ){
} else if( it->has_var( "trade_amount" ) ) {
loc_ptr->remove_item();
}
}
Expand Down

0 comments on commit b4d8131

Please sign in to comment.