Fixed cancelled/expired player offer items not being returned #400
We were missing player offer processing when handling stale offers
This commit is contained in:
@@ -151,11 +151,16 @@ public class RagfairOfferService(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process stored offer ids and remove expired
|
||||
/// Process cached expired offer ids
|
||||
/// </summary>
|
||||
public void RemoveExpiredOffers()
|
||||
{
|
||||
ragfairOfferHolder.RemoveExpiredOffers();
|
||||
// Gather all stale offers
|
||||
var staleOffersIds = ragfairOfferHolder.GetStaleOfferIds();
|
||||
foreach (var offerId in staleOffersIds)
|
||||
{
|
||||
ProcessStaleOffer(offerId);
|
||||
}
|
||||
|
||||
// Clear out expired offer ids now we've regenerated them
|
||||
ragfairOfferHolder.ResetExpiredOfferIds();
|
||||
|
||||
@@ -36,6 +36,15 @@ public class RagfairOfferHolder(
|
||||
return _offersById.GetValueOrDefault(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a ragfair offer by its id
|
||||
/// </summary>
|
||||
/// <returns>RagfairOffer</returns>
|
||||
public HashSet<string> GetStaleOfferIds()
|
||||
{
|
||||
return _expiredOfferIds;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get ragfair offers that match the passed in tpl
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user