From 880e4bc322a6e527ed1c22d0e25068d6c163b7d4 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Tue, 17 May 2022 08:01:43 +0200 Subject: [PATCH] use mall_price if historical_price of consumable is 0 (#1126) --- RELEASE/scripts/autoscend/auto_acquire.ash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_acquire.ash b/RELEASE/scripts/autoscend/auto_acquire.ash index b819c5fb1..5d57b3be2 100644 --- a/RELEASE/scripts/autoscend/auto_acquire.ash +++ b/RELEASE/scripts/autoscend/auto_acquire.ash @@ -135,10 +135,14 @@ int auto_mall_price(item it) string it_type = item_type(it); if(it_type == "food" || it_type == "booze") { - //autoscend does Bulk cache mall prices for food,booze,hprestore,mprestore so mafia will give historical_price when asked for mall_price - //directly ask for historical_price here because if mafia session has to be restarted mafia will forget it has already cached these prices + //autoscend does Bulk cache mall prices for food,booze,hprestore,mprestore so that when asking for mall_price it gets a cached mafia session price + //directly ask for historical_price here if it exists because if mafia session has to be restarted mafia will do another search despite recent price //hprestore and mprestore types corresponding with mall_prices search categories are not available retval = historical_price(it); + if(retval == 0) + { + retval = mall_price(it); + } } else {