From 7b6f0d7191afda53ce7dee784598faaee858e346 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 30 May 2023 10:48:07 +0100 Subject: [PATCH] Update types for 3.5.7 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../13AddTrader/types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../7OnLoadHook/types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- .../types/callbacks/DialogueCallbacks.d.ts | 2 + .../types/callbacks/MatchCallbacks.d.ts | 8 ++- .../types/controllers/GameController.d.ts | 8 ++- .../controllers/InsuranceController.d.ts | 9 ++++ .../types/controllers/MatchController.d.ts | 3 +- .../generators/ScavCaseRewardGenerator.d.ts | 2 +- .../types/helpers/ItemHelper.d.ts | 1 + .../types/helpers/RagfairOfferHelper.d.ts | 49 ++++++++++++++++++- .../types/helpers/TradeHelper.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../models/eft/common/ILocationBase.d.ts | 5 +- .../models/eft/common/tables/IBotBase.d.ts | 3 +- .../eft/common/tables/ITemplateItem.d.ts | 18 +++++++ .../eft/dialog/IAcceptFriendRequestData.d.ts | 3 ++ .../eft/game/ICurrentGroupResponse.d.ts | 17 +++++++ .../eft/match/IGetGroupStatusRequestData.d.ts | 2 +- .../eft/match/IJoinMatchRequestData.d.ts | 5 +- .../models/eft/match/IJoinMatchResult.d.ts | 5 ++ .../eft/match/ITransferGroupRequest.d.ts | 3 ++ .../types/models/eft/profile/IAkiProfile.d.ts | 2 +- .../ScavCaseRewardCountsAndPrices.d.ts | 6 +-- .../types/services/InsuranceService.d.ts | 8 --- 396 files changed, 2556 insertions(+), 522 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/ICurrentGroupResponse.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts b/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in diff --git a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts index 5630859..4ed6171 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts @@ -1,6 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate { listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts index 70a0d60..b9341fd 100644 --- a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts @@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -36,11 +37,13 @@ export declare class MatchCallbacks { acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/transfer */ + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData | IGetBodyResponseData; - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Handle client/match/group/status @@ -49,6 +52,7 @@ export declare class MatchCallbacks { getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index 739c48b..18c8091 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; @@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { EncodingUtil } from "../utils/EncodingUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { @@ -29,6 +31,7 @@ export declare class GameController { protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; + protected encodingUtil: EncodingUtil; protected hideoutHelper: HideoutHelper; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; @@ -38,10 +41,11 @@ export declare class GameController { protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value @@ -91,6 +95,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; - getCurrentGroup(sessionId: any): any; + getCurrentGroup(sessionId: string): ICurrentGroupResponse; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index af6e68d..ccbd0a0 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; @@ -35,6 +36,14 @@ export declare class InsuranceController { * Process insurance items prior to being given to player in mail */ processReturn(): void; + /** + * Should the passed in item be removed from player inventory + * @param insuredItem Insurued item to roll to lose + * @param traderId Trader the item was insured by + * @param itemsBeingDeleted All items to remove from player + * @returns True if item should be removed + */ + protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean; /** * Add insurance to an item * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index 55e2029..f7418bf 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -38,8 +38,7 @@ export declare class MatchController { getProfile(info: IGetProfileRequestData): IPmcData[]; createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; - joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; - protected getMatch(location: string): any; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; getGroupStatus(info: IGetGroupStatusRequestData): any; /** * Handle /client/raid/configuration diff --git a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index 394eeb0..a7f4302 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator { */ protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; /** - * Gathers the reward options from config and scavcase.json into a single object + * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index ba34062..98fe95e 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -105,6 +105,7 @@ declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; + isItemInDb(tpl: string): boolean; /** * get normalized value (0-1) based on item condition * @param item diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index 0e92762..41e5f85 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -1,6 +1,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { IQuestConfig } from "../models/spt/config/IQuestConfig"; @@ -46,6 +47,14 @@ export declare class RagfairOfferHelper { protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + /** + * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see + * @param searchRequest + * @param itemsToAdd + * @param traderAssorts Trader assorts + * @param pmcProfile Player profile + * @returns Offers the player should see + */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset @@ -53,7 +62,7 @@ export declare class RagfairOfferHelper { * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy * @param pmcProfile Player profile - * @returns ITraderAssort + * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** @@ -79,11 +88,49 @@ export declare class RagfairOfferHelper { * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * @param offers Offers to check * @param pmcProfile Players profile with trader loyalty levels + * @returns array of offer ids player cannot see */ protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; + /** + * Process all player-listed flea offers for a desired profile + * @param sessionID Session id to process offers for + * @returns true = complete + */ processOffersOnProfile(sessionID: string): boolean; + /** + * Add amount to players ragfair rating + * @param sessionId Profile to update + * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) + */ + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; + /** + * Return all offers a player has listed on a desired profile + * @param sessionID Session id + * @returns Array of ragfair offers + */ protected getProfileOffers(sessionID: string): IRagfairOffer[]; + /** + * Delete an offer from a desired profile + * @param sessionID Session id of profile to delete offer from + * @param offerId Offer id to delete + */ protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + /** + * Complete the selling of players' offer + * @param sessionID Session id + * @param offer Sold offer details + * @param boughtAmount Amount item was purchased for + * @returns Client response + */ protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; + /** + * Should a ragfair offer be visible to the player + * @param info Search request + * @param itemsToAdd ? + * @param traderAssorts Trader assort items + * @param offer The flea offer + * @param pmcProfile Player profile + * @returns True = should be shown to player + */ isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts index 6811dd1..8f82365 100644 --- a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -20,11 +21,12 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; + protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile @@ -38,7 +40,7 @@ export declare class TradeHelper { /** * Sell item to trader * @param pmcData Profile to update - * @param sellRequest request data + * @param sellRequest Request data * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts index 5790cde..f1845f6 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts @@ -956,9 +956,11 @@ export interface Endurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; + DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } export interface Strength { + DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; MovementActionMin: number; @@ -969,6 +971,10 @@ export interface Strength { FistfightAction: number; ThrowAction: number; } +export interface IDependentSkillRatio { + Ratio: number; + SkillId: string; +} export interface IQTELevelMultiplier { Level: number; Multiplier: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts index 1c3a2fa..54c70ba 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts @@ -49,7 +49,10 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; - RequiredPlayerLevel: number; + RequiredPlayerLevel?: number; + RequiredPlayerLevelMin?: number; + RequiredPlayerLevelMax?: number; + MinPlayerLvlAccessKeys: number; PmcMaxPlayersInGroup: number; ScavMaxPlayersInGroup: number; Rules: string; 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 1e01efc..cd4169d 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -258,7 +258,7 @@ export interface LastPlayerStateInfo { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; } export interface BackendCounter { id: string; @@ -273,6 +273,7 @@ export interface Hideout { Production: Record; Areas: HideoutArea[]; Improvements: Record; + Seed: number; sptUpdateLastRunTimestamp: number; } export interface IHideoutImprovement { diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts index 0010ee2..f2dc57f 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts @@ -256,9 +256,11 @@ export interface Props { CompressorGain?: number; CutoffFreq?: number; Resonance?: number; + RolloffMultiplier?: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; + HighFrequenciesGain?: number; foodUseTime?: number; foodEffectType?: string; StimulatorBuffs?: string; @@ -375,6 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; + RandomLootSettings: IRandomLootSettings; } export interface IHealthEffect { type: string; @@ -439,6 +442,21 @@ export interface StackSlot { export interface StackSlotProps { filters: SlotFilter[]; } +export interface IRandomLootSettings { + allowToSpawnIdenticalItems: boolean; + allowToSpawnQuestItems: boolean; + countByRarity: any[]; + excluded: IRandomLootExcluded; + filters: any[]; + findInRaid: boolean; + maxCount: number; + minCount: number; +} +export interface IRandomLootExcluded { + categoryTemplates: any[]; + rarity: string[]; + templates: any[]; +} export interface EffectsHealth { Energy: EffectsHealthProps; Hydration: EffectsHealthProps; diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts new file mode 100644 index 0000000..190ee69 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptFriendRequestData { + request_id: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/ICurrentGroupResponse.d.ts new file mode 100644 index 0000000..1f496fa --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -0,0 +1,17 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; +export interface ICurrentGroupResponse { + squad: any[]; +} +export interface ICurrentGroupSquadMember { + _id: string; + aid: string; + info: ICurrentGroupMemberInfo; + isLeader: boolean; + isReady: boolean; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts index 55d7079..911c040 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData { dt: string; keyId: string; raidMode: RaidMode; - startInGroup: boolean; + spawnPlace: string; } diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts index cd34f7b..b9b7568 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -1,9 +1,6 @@ export interface IJoinMatchRequestData { - location: string; - savage: boolean; - dt: string; + groupid: string; servers: Server[]; - keyId: string; } export interface Server { ping: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts index 81c9055..e0e867f 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts @@ -1,5 +1,10 @@ export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { profileid: string; + profileToken: string; status: string; sid: string; ip: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts index 3840e83..f24a788 100644 --- a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts @@ -104,7 +104,7 @@ export interface IUpdatableChatMember { Nickname: string; Side: string; Level: number; - MemberCategory: string; + MemberCategory: MemberCategory; Ignored: boolean; Banned: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index 1b5af39..ee1893d 100644 --- a/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,7 +1,7 @@ export interface ScavCaseRewardCountsAndPrices { - common: RewardCountAndPriceDetails; - rare: RewardCountAndPriceDetails; - superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails; + Rare: RewardCountAndPriceDetails; + Superrare: RewardCountAndPriceDetails; } export interface RewardCountAndPriceDetails { minCount: number; diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 1605bc9..7ddf679 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -73,14 +73,6 @@ export declare class InsuranceService { * @returns Hashtable */ protected createItemHashTable(items: Item[]): Record; - /** - * Store insured items on pmc death inside insurance array in player profile - * @param pmcData Player profile - * @param offraidData Player gear post-raid - * @param preRaidGear Player gear before raid - * @param sessionID Session id - */ - storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile * @param pmcData profile to store item in