ignore market maker account

This commit is contained in:
Lorenc Pekaj 2019-02-24 19:58:26 +11:00
parent e0db7e6403
commit 7cdc3ac697

View File

@ -474,6 +474,9 @@ thread StockMarket_PanicSell( stockid )
{ {
new user_id = cache_get_field_content_int( row, "USER_ID" ); new user_id = cache_get_field_content_int( row, "USER_ID" );
if ( user_id == STOCK_MM_USER_ID )
continue; // ignore market maker account
new Float: held_shares = cache_get_field_content_float( row, "HELD_SHARES" ); new Float: held_shares = cache_get_field_content_float( row, "HELD_SHARES" );
new Float: owned_shares = cache_get_field_content_float( row, "OWNED_SHARES" ); new Float: owned_shares = cache_get_field_content_float( row, "OWNED_SHARES" );
new Float: player_shares_forfeited = floatround( ( held_shares + owned_shares ) * STOCK_BANKRUPTCY_LOSS_PERCENT / 100.0 ); new Float: player_shares_forfeited = floatround( ( held_shares + owned_shares ) * STOCK_BANKRUPTCY_LOSS_PERCENT / 100.0 );