Didn't mean anything by the C+D quip, just a bit of levity.
Clarifying my request a bit. So here's what historical_price does:
Code:
public static Value historical_price( Interpreter interpreter, final Value item )
{
return new Value( MallPriceDatabase.getPrice( (int) item.intValue() ) );
}
Likewise, the "mallprice" column in the item manager displays that same value, MallPriceDatabase.getPrice().
If I go to the purchases tab and search for an item, the "mallprice" column will not update for that item. If I do mall_price(item), on the other hand, the "mallprice" column will update. I believe this is because mall_price() will call StoreManager.updateMallPrice (once per item per session), which will update the value in MallPriceDatabase as well as in the store manager. The purchases tab does not call updateMallPrice.
-------
Getting back to your question: what does historical_price mean? That's something I hadn't really considered. I had always thought of it as your second option: a historical snapshot of the (fifth) lowest price for the item in question.
Without researching what is actually being done now, I'm inclined to propose that any time mall_price is updated then so is historical_price and it is updated to the same value, if "the fifth". I am having a hard time figuring out how that could be abused to make a mall bot.
I would agree.
Though I'm not sure if a search on the purchases tab updates mall_price - if it doesn't, I think it should? For reference, mall_price is backed by an array in StoreManager, and historical_price is backed by an array in MallPriceDatabase.
Edit: Bale ninja. This was @ frono.