diff --git a/Assets/Scripts/BidHandler.cs b/Assets/Scripts/BidHandler.cs index a5d0078e..500b41d9 100644 --- a/Assets/Scripts/BidHandler.cs +++ b/Assets/Scripts/BidHandler.cs @@ -371,7 +371,7 @@ public void ReleasePlayersIntoTile(GameTile gt, Vector3 beltWayPointPos) UpdateBiddingQ(); } - public void ClearFromQ(PlayerHandler ph, bool updateQ) + public void ClearFromQ(PlayerHandler ph, bool updateQ, bool unbid = false) { ph.ResetBid(); @@ -385,7 +385,7 @@ public void ClearFromQ(PlayerHandler ph, bool updateQ) if (ph.pb != null) ph.pb.ExplodeBall(); - CancelTicketsUsed(ph); + CancelTicketsUsed(ph, unbid); if (updateQ) UpdateBiddingQ(); @@ -593,12 +593,15 @@ private void SetBasePrizeByRarity(RarityType rarity) UpdateBiddingQ(); } - private async void CancelTicketsUsed(PlayerHandler ph) + private async void CancelTicketsUsed(PlayerHandler ph, bool unbid) { - foreach (var rewardID in ph.redemptionsIds.Keys) + if (unbid) { - List redemptionsIds = ph.redemptionsIds[rewardID]; - await TwitchApi.RejectRewardRedemption(rewardID, redemptionsIds); + foreach (var rewardID in ph.redemptionsIds.Keys) + { + List redemptionsIds = ph.redemptionsIds[rewardID]; + await TwitchApi.RejectRewardRedemption(rewardID, redemptionsIds); + } } ph.redemptionsIds.Clear(); diff --git a/Assets/Scripts/Networking/TwitchClient.cs b/Assets/Scripts/Networking/TwitchClient.cs index 01f163f4..890f9588 100644 --- a/Assets/Scripts/Networking/TwitchClient.cs +++ b/Assets/Scripts/Networking/TwitchClient.cs @@ -362,7 +362,7 @@ private void ProcessGlobalCommands(string messageId, PlayerHandler ph, string ms else if (commandKey.StartsWith("!cancelbid") || commandKey.StartsWith("!unbid")) { - _bidHandler.ClearFromQ(ph, updateQ:true); + _bidHandler.ClearFromQ(ph, updateQ:true, unbid:true); } else if (commandKey.StartsWith("!song")) @@ -687,4 +687,4 @@ private string RemoveTwitchEmotes(string rawMsg, List emotes) return noEmotesSb.ToString(); } -} \ No newline at end of file +} diff --git a/Assets/StreamingAssets/PlayerProfiles.db b/Assets/StreamingAssets/PlayerProfiles.db index e038ff61..32ed52c8 100644 Binary files a/Assets/StreamingAssets/PlayerProfiles.db and b/Assets/StreamingAssets/PlayerProfiles.db differ