mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Call itemBaseClassService.hydrateItemBaseClassCache()
as part of adding custom item
This commit is contained in:
parent
64f644c417
commit
ab2018c13f
@ -12,6 +12,7 @@ import {
|
|||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ export class CustomItemService
|
|||||||
@inject("JsonUtil") protected jsonUtil: JsonUtil,
|
@inject("JsonUtil") protected jsonUtil: JsonUtil,
|
||||||
@inject("DatabaseServer") protected databaseServer: DatabaseServer,
|
@inject("DatabaseServer") protected databaseServer: DatabaseServer,
|
||||||
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
||||||
|
@inject("ItemBaseClassService") protected itemBaseClassService: ItemBaseClassService,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.tables = this.databaseServer.getTables();
|
this.tables = this.databaseServer.getTables();
|
||||||
@ -73,6 +75,8 @@ export class CustomItemService
|
|||||||
|
|
||||||
this.addToFleaPriceDb(newItemId, newItemDetails.fleaPriceRoubles);
|
this.addToFleaPriceDb(newItemId, newItemDetails.fleaPriceRoubles);
|
||||||
|
|
||||||
|
this.itemBaseClassService.hydrateItemBaseClassCache();
|
||||||
|
|
||||||
if (this.itemHelper.isOfBaseclass(itemClone._id, BaseClasses.WEAPON))
|
if (this.itemHelper.isOfBaseclass(itemClone._id, BaseClasses.WEAPON))
|
||||||
{
|
{
|
||||||
this.addToWeaponShelf(newItemId);
|
this.addToWeaponShelf(newItemId);
|
||||||
@ -115,6 +119,8 @@ export class CustomItemService
|
|||||||
|
|
||||||
this.addToFleaPriceDb(newItem._id, newItemDetails.fleaPriceRoubles);
|
this.addToFleaPriceDb(newItem._id, newItemDetails.fleaPriceRoubles);
|
||||||
|
|
||||||
|
this.itemBaseClassService.hydrateItemBaseClassCache();
|
||||||
|
|
||||||
if (this.itemHelper.isOfBaseclass(newItem._id, BaseClasses.WEAPON))
|
if (this.itemHelper.isOfBaseclass(newItem._id, BaseClasses.WEAPON))
|
||||||
{
|
{
|
||||||
this.addToWeaponShelf(newItem._id);
|
this.addToWeaponShelf(newItem._id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user