mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
fix free change still deduct trader standing (!379)
Fix that free change repeatable chance quest still deduct trader standing, now it will deduct when player have no access to free change or have no free change counts Reviewed-on: SPT/Server#379 Co-authored-by: HiddenCirno <2301697863@qq.com> Co-committed-by: HiddenCirno <2301697863@qq.com> (cherry picked from commit dcb98f7d1b21ccde76d0a6c26514a718290b19b6)
This commit is contained in:
parent
776a41499f
commit
7a05acacdd
@ -595,6 +595,9 @@ export class RepeatableQuestController
|
||||
const isFreeToReplace = this.useFreeRefreshIfAvailable(fullProfile, repeatablesInProfile, repeatableTypeLower);
|
||||
if (!isFreeToReplace)
|
||||
{
|
||||
// Reduce standing with trader for not doing their quest
|
||||
const traderOfReplacedQuest = pmcData.TradersInfo[replacedQuestTraderId];
|
||||
traderOfReplacedQuest.standing -= previousChangeRequirement.changeStandingCost;
|
||||
// not free, Charge player
|
||||
for (const cost of previousChangeRequirement.changeCost)
|
||||
{
|
||||
@ -621,10 +624,6 @@ export class RepeatableQuestController
|
||||
return this.httpResponse.appendErrorToOutput(output, message);
|
||||
}
|
||||
|
||||
// Reduce standing with trader for not doing their quest
|
||||
const traderOfReplacedQuest = pmcData.TradersInfo[replacedQuestTraderId];
|
||||
traderOfReplacedQuest.standing -= previousChangeRequirement.changeStandingCost;
|
||||
|
||||
// Nullguard
|
||||
output.profileChanges[sessionID].repeatableQuests ||= [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user