From 1881a0842a91f3e3d65d264e2d3fcbfb9dc2083d Mon Sep 17 00:00:00 2001 From: micyael Date: Tue, 23 Apr 2024 10:15:29 +0000 Subject: [PATCH] Fixed incorrect handbook price using CustomItemService (!301) The handbookPriceRoubles member of base class NewItemDetails was never used to create the new item. Co-authored-by: Refringe Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/301 Co-authored-by: micyael Co-committed-by: micyael --- .gitea/workflows/clear-itemdb-cache.yaml | 21 +++++++++++++++++++ project/src/services/mod/CustomItemService.ts | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/clear-itemdb-cache.yaml diff --git a/.gitea/workflows/clear-itemdb-cache.yaml b/.gitea/workflows/clear-itemdb-cache.yaml new file mode 100644 index 00000000..8783caa3 --- /dev/null +++ b/.gitea/workflows/clear-itemdb-cache.yaml @@ -0,0 +1,21 @@ +name: Clear Item DB Website Cache + +on: + push: + branches: [ master ] + +jobs: + clear-cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - id: filter + uses: dorny/paths-filter@v3.0.2 + with: + list-files: shell + filters: | + database: + - 'project/assets/database/**' + - name: Send Refresh Request + if: steps.filter.outputs.database == 'true' + run: curl --max-time 30 https://db.sp-tarkov.com/api/refresh diff --git a/project/src/services/mod/CustomItemService.ts b/project/src/services/mod/CustomItemService.ts index 2f5954d5..5018a0d9 100644 --- a/project/src/services/mod/CustomItemService.ts +++ b/project/src/services/mod/CustomItemService.ts @@ -72,7 +72,7 @@ export class CustomItemService this.addToItemsDb(newItemId, itemClone); - this.addToHandbookDb(newItemId, newItemDetails.handbookParentId, newItemDetails.fleaPriceRoubles); + this.addToHandbookDb(newItemId, newItemDetails.handbookParentId, newItemDetails.handbookPriceRoubles); this.addToLocaleDbs(newItemDetails.locales, newItemId); @@ -116,7 +116,7 @@ export class CustomItemService this.addToItemsDb(newItem._id, newItem); - this.addToHandbookDb(newItem._id, newItemDetails.handbookParentId, newItemDetails.fleaPriceRoubles); + this.addToHandbookDb(newItem._id, newItemDetails.handbookParentId, newItemDetails.handbookPriceRoubles); this.addToLocaleDbs(newItemDetails.locales, newItem._id);