File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Libraries/SPTarkov.Server.Core/Helpers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11using SPTarkov . DI . Annotations ;
2+ using SPTarkov . Server . Core . Extensions ;
23using SPTarkov . Server . Core . Models . Common ;
34using SPTarkov . Server . Core . Models . Eft . Common . Tables ;
45using SPTarkov . Server . Core . Models . Eft . Profile ;
@@ -67,9 +68,10 @@ public MessagePreview GetMessagePreview(Models.Eft.Profile.Dialogue? dialogue)
6768 message . Items ??= new MessageItems ( ) ;
6869 message . Items . Data ??= [ ] ;
6970
70- // Check reward count when item being moved isn't in reward list
71+ // Check reward count when item being moved (and its children) isn't in reward list
7172 // If count is 0, it means after this move occurs the reward array will be empty and all rewards collected
72- var remainingItems = message . Items . Data . Where ( x => x . Id != itemId ) ;
73+ var itemWithChildren = message . Items . Data . GetItemWithChildren ( itemId ) ;
74+ var remainingItems = message . Items . Data . Except ( itemWithChildren ) ;
7375 if ( ! remainingItems . Any ( ) )
7476 {
7577 message . RewardCollected = true ;
You can’t perform that action at this time.
0 commit comments