From d23f96f3db56ccf35a7f19d76af355bc7daaab21 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 12 Sep 2023 14:36:36 +0100 Subject: [PATCH] Update types --- .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../RagfairTaxService.d.ts} | 9 ++++++-- .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../RagfairTaxService.d.ts} | 9 ++++++-- .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../RagfairTaxService.d.ts} | 9 ++++++-- .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../RagfairTaxService.d.ts} | 9 ++++++-- .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ .../types/callbacks/RagfairCallbacks.d.ts | 6 +++++- .../types/controllers/GameController.d.ts | 5 ++++- .../controllers/InsuranceController.d.ts | 6 ++++++ .../types/controllers/RagfairController.d.ts | 6 +++--- .../generators/BotEquipmentModGenerator.d.ts | 13 +++++++----- .../types/helpers/BotGeneratorHelper.d.ts | 9 +++++++- .../types/helpers/RagfairTaxHelper.d.ts | 16 -------------- .../models/eft/common/tables/IBotBase.d.ts | 10 ++++++++- .../models/eft/game/IGameConfigResponse.d.ts | 2 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 ++-- ...IStorePlayerOfferTaxAmountRequestData.d.ts | 6 ++++++ .../types/models/enums/BaseClasses.d.ts | 1 + .../types/models/enums/ConfigTypes.d.ts | 1 + .../types/models/spt/config/IBotConfig.d.ts | 14 ++++++++++++- .../models/spt/config/ILocationConfig.d.ts | 1 - .../types/models/spt/config/ILootConfig.d.ts | 9 ++++++++ .../types/routers/EventOutputHolder.d.ts | 8 ++++++- .../services/BotEquipmentFilterService.d.ts | 4 ++-- .../types/services/ProfileFixerService.d.ts | 7 +++++-- .../types/services/RagfairTaxService.d.ts | 21 +++++++++++++++++++ 376 files changed, 2053 insertions(+), 666 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/config/ILootConfig.d.ts rename TypeScript/10ScopesAndTypes/types/{helpers/RagfairTaxHelper.d.ts => services/RagfairTaxService.d.ts} (63%) create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/config/ILootConfig.d.ts rename TypeScript/11BundleLoadingSample/types/{helpers/RagfairTaxHelper.d.ts => services/RagfairTaxService.d.ts} (63%) create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/config/ILootConfig.d.ts rename TypeScript/12ClassExtensionOverride/types/{helpers/RagfairTaxHelper.d.ts => services/RagfairTaxService.d.ts} (63%) create mode 100644 TypeScript/13AddTrader/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/spt/config/ILootConfig.d.ts rename TypeScript/13AddTrader/types/{helpers/RagfairTaxHelper.d.ts => services/RagfairTaxService.d.ts} (63%) delete mode 100644 TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/16ImporterUtil/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/18CustomItemService/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/1LogToConsole/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/2EditDatabase/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/7OnLoadHook/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/services/RagfairTaxService.d.ts delete mode 100644 TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/spt/config/ILootConfig.d.ts create mode 100644 TypeScript/9RouterHooks/types/services/RagfairTaxService.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILootConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairTaxService.d.ts similarity index 63% rename from TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts rename to TypeScript/10ScopesAndTypes/types/services/RagfairTaxService.d.ts index 5ba2917..e6b3d7c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairTaxService.d.ts @@ -1,16 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { +export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected ragfairPriceService: RagfairPriceService; protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILootConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairTaxService.d.ts similarity index 63% rename from TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts rename to TypeScript/11BundleLoadingSample/types/services/RagfairTaxService.d.ts index 5ba2917..e6b3d7c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairTaxService.d.ts @@ -1,16 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { +export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected ragfairPriceService: RagfairPriceService; protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILootConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairTaxService.d.ts similarity index 63% rename from TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts rename to TypeScript/12ClassExtensionOverride/types/services/RagfairTaxService.d.ts index 5ba2917..e6b3d7c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairTaxService.d.ts @@ -1,16 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { +export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected ragfairPriceService: RagfairPriceService; protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/13AddTrader/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/13AddTrader/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/13AddTrader/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts b/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ILootConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts b/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/13AddTrader/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/13AddTrader/types/services/RagfairTaxService.d.ts similarity index 63% rename from TypeScript/13AddTrader/types/helpers/RagfairTaxHelper.d.ts rename to TypeScript/13AddTrader/types/services/RagfairTaxService.d.ts index 5ba2917..e6b3d7c 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/13AddTrader/types/services/RagfairTaxService.d.ts @@ -1,16 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { +export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected ragfairPriceService: RagfairPriceService; protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILootConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/RagfairTaxService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILootConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/RagfairTaxService.d.ts b/TypeScript/15HttpListenerExample/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts b/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILootConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts b/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/16ImporterUtil/types/services/RagfairTaxService.d.ts b/TypeScript/16ImporterUtil/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILootConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairTaxService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILootConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairTaxService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/18CustomItemService/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/18CustomItemService/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts b/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts b/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ILootConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts b/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/18CustomItemService/types/services/RagfairTaxService.d.ts b/TypeScript/18CustomItemService/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/1LogToConsole/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/1LogToConsole/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/1LogToConsole/types/models/enums/BaseClasses.d.ts b/TypeScript/1LogToConsole/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/1LogToConsole/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts b/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ILootConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts b/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/1LogToConsole/types/services/RagfairTaxService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/1LogToConsole/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/2EditDatabase/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/2EditDatabase/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/2EditDatabase/types/models/enums/BaseClasses.d.ts b/TypeScript/2EditDatabase/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/2EditDatabase/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts b/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ILootConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts b/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/2EditDatabase/types/services/RagfairTaxService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/2EditDatabase/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/BaseClasses.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILootConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/3GetSptConfigFile/types/services/RagfairTaxService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILootConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairTaxService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILootConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairTaxService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILootConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairTaxService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts b/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILootConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/7OnLoadHook/types/services/RagfairTaxService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILootConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairTaxService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +} diff --git a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts index 1f37b07..5ba1176 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts @@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; /** @@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; + protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; + storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; } diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index 80d855d..04e3abb 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; +import { ILootConfig } from "../models/spt/config/ILootConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -58,12 +59,14 @@ export declare class GameController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected makeCustomsWishingTreeLootGuaranteed(): void; + protected addCustomLooseLootPositions(): void; + protected adjustLooseLootSpawnProbabilities(): void; protected setHideoutAreasAndCraftsTo30Secs(): void; /** * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index 2692121..dbb6b4b 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -7,6 +7,7 @@ import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsura import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "../models/eft/profile/IAkiProfile"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; @@ -36,6 +37,11 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Change SlotId of children inside Containers to be a root item + * @param insured Insured Items + */ + protected updateSlotIdOfContainersChildren(insured: Insurance): void; /** * Should the passed in item be removed from player inventory * @param insuredItem Insurued item to roll to lose diff --git a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts index 9c63855..76c27f7 100644 --- a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts @@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper"; import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "../helpers/RagfairSellHelper"; import { RagfairSortHelper } from "../helpers/RagfairSortHelper"; -import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; @@ -34,6 +33,7 @@ import { PaymentService } from "../services/PaymentService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "../services/RagfairTaxService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; /** @@ -50,7 +50,7 @@ export declare class RagfairController { protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairTaxService: RagfairTaxService; protected ragfairSortHelper: RagfairSortHelper; protected ragfairOfferHelper: RagfairOfferHelper; protected profileHelper: ProfileHelper; @@ -66,7 +66,7 @@ export declare class RagfairController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** * Get offers for the client based on type of search being performed diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index ad44c17..ccbbbbf 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -83,10 +83,11 @@ export declare class BotEquipmentModGenerator { */ protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; /** - * Set all scope mod chances to 100% - * @param modSpawnChances Chances objet to update + * Set mod spawn chances to defined amount + * @param modSpawnChances Chance dictionary to update */ - protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void; + protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; protected sortModKeys(unsortedKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) @@ -193,10 +194,12 @@ export declare class BotEquipmentModGenerator { protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes + * Controlled by bot.json weaponSightWhitelist + * e.g. filter out rifle scopes from SMGs * @param weapon Weapon scopes will be added to * @param scopes Full scope pool - * @param botWeaponSightWhitelist whitelist of scope types by weapon base type - * @returns array of scope tpls that have been filtered + * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type + * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type */ protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; } diff --git a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts index 292e371..81750bd 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from "../context/ApplicationContext"; import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,6 +33,13 @@ export declare class BotGeneratorHelper { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }; + /** + * Randomize the HpResource for bots e.g (245/400 resources) + * @param maxResource Max resource value of medical items + * @param randomizationValues Value provided from config + * @returns Randomized value from maxHpResource + */ + protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; /** * Get the chance for the weapon attachment or helmet equipment to be set as activated * @param botRole role of bot with weapon/helmet diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts deleted file mode 100644 index 5ba2917..0000000 --- a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; -import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -import { RagfairPriceService } from "../services/RagfairPriceService"; -import { ItemHelper } from "./ItemHelper"; -export declare class RagfairTaxHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts index efb6146..29fd630 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -367,10 +367,18 @@ export interface Quest { export interface TraderInfo { loyaltyLevel: number; salesSum: number; - disabled: boolean; standing: number; nextResupply: number; unlocked: boolean; + disabled: boolean; +} +/** This object is sent to the client as part of traderRelations */ +export interface TraderData { + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; } export interface RagfairInfo { rating: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/IGameConfigResponse.d.ts index 8298315..2bff352 100644 --- a/TypeScript/9RouterHooks/types/models/eft/game/IGameConfigResponse.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/game/IGameConfigResponse.d.ts @@ -1,5 +1,5 @@ export interface IGameConfigResponse { - aid: string; + aid: number; lang: string; languages: Record; ndaFree: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index e4c2ab9..fd7801e 100644 --- a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,6 +1,6 @@ import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType"; import { QuestStatus } from "../../../models/enums/QuestStatus"; -import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase"; +import { Health, Productive, Skills, TraderData } from "../common/tables/IBotBase"; import { Item, Upd } from "../common/tables/IItem"; import { IQuest } from "../common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests"; @@ -29,7 +29,7 @@ export interface ProfileChange { improvements: Record; skills: Skills; health: Health; - traderRelations: Record; + traderRelations: Record; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; changedHideoutStashes?: Record; diff --git a/TypeScript/9RouterHooks/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts new file mode 100644 index 0000000..ebf470e --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts @@ -0,0 +1,6 @@ +export interface IStorePlayerOfferTaxAmountRequestData { + id: string; + tpl: string; + count: number; + fee: number; +} diff --git a/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts b/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts index cd7f5cd..76938ad 100644 --- a/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts @@ -3,6 +3,7 @@ export declare enum BaseClasses { UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", + REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", VEST = "5448e5284bdc2dcb718b4567", diff --git a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts index 1ee8149..27340c4 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts @@ -12,6 +12,7 @@ export declare enum ConfigTypes { ITEM = "aki-item", LOCALE = "aki-locale", LOCATION = "aki-location", + LOOT = "aki-loot", MATCH = "aki-match", PLAYERSCAV = "aki-playerscav", PMC_CHAT_RESPONSE = "aki-pmcchatresponse", diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts index 6bca539..b5a406b 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts @@ -10,6 +10,8 @@ export interface IBotConfig extends IBaseConfig { bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; + /** Controls the percentage values of randomization item resources */ + lootItemResourceRandomization: Record; /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ @@ -133,10 +135,20 @@ export interface WeightingAdjustmentDetails { ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ equipment?: AdjustmentDetails; - /** Key: clothing slor e.g. feet, value: item tpl + weight */ + /** Key: clothing slot e.g. feet, value: item tpl + weight */ clothing?: AdjustmentDetails; } export interface AdjustmentDetails { add: Record>; edit: Record>; } +export interface IRandomisedResourceDetails { + food: IRandomisedResourceValues; + meds: IRandomisedResourceValues; +} +export interface IRandomisedResourceValues { + /** Minimum percent of item to randomized between min and max resource*/ + resourcePercent: number; + /** Chance for randomization to not occur */ + chanceMaxResourcePercent: number; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts index 16bb7c2..d1af8b3 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts @@ -33,7 +33,6 @@ export interface ILocationConfig extends IBaseConfig { minFillLooseMagazinePercent: number; /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; - makeWishingTreeAlwaysGiveGift: boolean; allowDuplicateItemsInStaticContainers: boolean; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILootConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILootConfig.d.ts new file mode 100644 index 0000000..f7fb472 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILootConfig.d.ts @@ -0,0 +1,9 @@ +import { Spawnpoint } from "../../../models/eft/common/ILooseLoot"; +import { IBaseConfig } from "./IBaseConfig"; +export interface ILootConfig extends IBaseConfig { + kind: "aki-loot"; + /** Spawn positions to add into a map, key=mapid */ + looseLoot: Record; + /** Loose loot probability adjustments to apply on game start */ + looseLootSpawnPointAdjustments: Record>; +} diff --git a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts index a6b003d..1966741 100644 --- a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts @@ -1,6 +1,6 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase"; +import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "../models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -26,6 +26,12 @@ export declare class EventOutputHolder { * @param sessionId Session id */ updateOutputProperties(sessionId: string): void; + /** + * Convert the internal trader data object into an object we can send to the client + * @param traderData server data for traders + * @returns + */ + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts b/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts index 0b8cf61..d50c52d 100644 --- a/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts @@ -22,9 +22,9 @@ export declare class BotEquipmentFilterService { */ filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; /** - * Iterate over the changes passed in and alter data in baseValues + * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply - * @param baseValues Values to update + * @param baseValues data to update */ protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; /** diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 14f4e22..e066e56 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -64,7 +64,6 @@ export declare class ProfileFixerService { */ protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; /** * Some profiles have hideout maxed and therefore no improvements * @param pmcProfile Profile to add improvement data to @@ -92,7 +91,6 @@ export declare class ProfileFixerService { * @param pmcProfile */ protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; - addMissingArmorRepairSkill(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -126,4 +124,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to update */ removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; + /** + * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets + * @param pmcProfile Profile to add missing IDs to + */ + addMissingIdsToBonuses(pmcProfile: IPmcData): void; } diff --git a/TypeScript/9RouterHooks/types/services/RagfairTaxService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairTaxService.d.ts new file mode 100644 index 0000000..e6b3d7c --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/RagfairTaxService.d.ts @@ -0,0 +1,21 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { RagfairPriceService } from "../services/RagfairPriceService"; +export declare class RagfairTaxService { + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; + protected playerOfferTaxCache: Record; + constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); + storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; + clearStoredOfferTaxById(offerIdToRemove: string): void; + getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; + calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; +}