diff --git a/project/src/services/RagfairOfferService.ts b/project/src/services/RagfairOfferService.ts index 07feab5b..4392bab0 100644 --- a/project/src/services/RagfairOfferService.ts +++ b/project/src/services/RagfairOfferService.ts @@ -236,15 +236,15 @@ export class RagfairOfferService const sessionID = profile.sessionId; const offerIndex = profile.RagfairInfo.offers.findIndex(o => o._id === offer._id); - profile.RagfairInfo.rating -= this.ragfairConfig.sell.reputation.loss; - profile.RagfairInfo.isRatingGrowing = false; - if (offerIndex === -1) { this.logger.warning(this.localisationService.getText("ragfair-unable_to_find_offer_to_remove", offer._id)); return this.httpResponse.appendErrorToOutput(this.eventOutputHolder.getOutput(sessionID), this.localisationService.getText("ragfair-offer_not_found_in_profile_short")); } + profile.RagfairInfo.rating -= this.ragfairConfig.sell.reputation.loss; + profile.RagfairInfo.isRatingGrowing = false; + if (offer.items[0].upd.StackObjectsCount > offer.items[0].upd.OriginalStackObjectsCount) { offer.items[0].upd.StackObjectsCount = offer.items[0].upd.OriginalStackObjectsCount;