getTemplatePrice(), when an item cannot be found in the handbook, add it with the price of 0 instead of 1

This commit is contained in:
Dev 2023-11-07 21:21:34 +00:00
parent 7941675102
commit dfd1bcc589

View File

@ -92,9 +92,10 @@ export class HandbookHelper
const handbookItem = this.databaseServer.getTables().templates.handbook.Items.find(x => x.Id === tpl);
if (!handbookItem)
{
this.handbookPriceCache.items.byId.set(tpl, 1);
const newValue = 0;
this.handbookPriceCache.items.byId.set(tpl, newValue);
return 1;
return newValue;
}
return handbookItem.Price;