diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml index 6d55a51c..609593f7 100644 --- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml @@ -8,9 +8,7 @@ - - diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp index e9cf2b52..44257234 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp @@ -53,12 +53,15 @@ void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI) void ABountyHunterCharacter::CompletedASideBounty(int CompletedSideBountiesUID) { - for (auto SBStruct : SideBountyStructs) + for (int i = 0; i < SideBountyStructs.Num(); i++) { - if (SBStruct.SideBountyUID != CompletedSideBountiesUID) continue; - EarnMoney(SBStruct.MoneyEarnedForCompletion); - EarnFavours(SBStruct.FavoursEarnedForCompletion); + if (SideBountyStructs[i].SideBountyUID != CompletedSideBountiesUID) continue; + EarnMoney(SideBountyStructs[i].MoneyEarnedForCompletion); + EarnFavours(SideBountyStructs[i].FavoursEarnedForCompletion); if (IsValid(PauseMenu)) PauseMenu->UpdatePlayerStatistics(Money, Favours); + + SideBountyStructs.RemoveAt(i); + UpdateBountyTabInfo(); } }