Return after returning player offers to avoid redundant remove offer following (!237)
#### Summary > Should fix [Issue 523](https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/523) Tested a few different scenarios and the items were always correctly removed and returned to the player, however I did see the console warnings reported in the issue. Both of the following call `this.ragfairOfferHandler.removeOffer(...)`: - `this.returnPlayerOffer(...)` - `this.removeOfferById(...)` The latter logs a warning to the console because the offer is already removed when we reach that point. This fix simply returns after the offer has been returned to the player, letting `returnPlayerOffer` deal with removing from the flea Co-authored-by: phrisk <phrisk@phrisk.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/237 Co-authored-by: phrisk <phrisk@noreply.dev.sp-tarkov.com> Co-committed-by: phrisk <phrisk@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
a1a5aa356a
commit
42782589e0
@ -229,6 +229,7 @@ export class RagfairOfferService
|
|||||||
if (isPlayer && staleOffer.endTime <= this.timeUtil.getTimestamp())
|
if (isPlayer && staleOffer.endTime <= this.timeUtil.getTimestamp())
|
||||||
{
|
{
|
||||||
this.returnPlayerOffer(staleOffer);
|
this.returnPlayerOffer(staleOffer);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove expired existing offer from global offers
|
// Remove expired existing offer from global offers
|
||||||
|
Loading…
Reference in New Issue
Block a user