LittleLightForDestiny / littlelight

Little Light is an inventory manager/companion app for Destiny 2 for both iOS and Android. It helps guardians move their gear and track their ingame progress.
MIT License
159 stars 31 forks source link

almost complete rewrite #248

Closed joaopmarquesini closed 1 year ago

joaopmarquesini commented 1 year ago

What's still missing:

bill0042 commented 1 year ago

The last item, "fix damagetype icon not showing on definition details" is 2 separate issues. The damagetype icon and also the item's icon sometimes do not load because they both need the DestinyItemInfo item which may be created after the widgets

joaopmarquesini commented 1 year ago

The last item, "fix damagetype icon not showing on definition details" is 2 separate issues. The damagetype icon and also the item's icon sometimes do not load because they both need the DestinyItemInfo item which may be created after the widgets

It might be something related to the widget not being rebuilt when it should, maybe a missing notifyListeners() somewhere or some header cover sliver shenanigans.

bill0042 commented 1 year ago

Yes, the PR I made added the notifyListener() after the DestinyItemInfo was built and added the context.watch to buildIcon so it would rebuild. A state parameter was being passed to the class and it was referenced in buildIcon, but it would not cause the rebuild unless the context.watch was there. The other change in the PR was to get damagetype from definition.defaultDamageType so it didn't need to depend on the DestinyItemInfo, but I think that may be incorrect. Quicksiver Storm's catalyst changes it from kinetic to strand so we should probably get the damagetype from the profile. So maybe we need context.watch in buildPrimaryStat as well.

bill0042 commented 1 year ago

New issue: Exception always occurs when selecting a duplicate of a vendor item while viewing vendor item details:

`ProviderNotFoundException (Error: Could not find the correct Provider above this LayoutBuilder Widget

This happens because you used a BuildContext that does not include the provider of your choice.`

bill0042 commented 1 year ago

New Issue: Missing perks on some weapons in item details. About 40 weapons have this issue. A few are newer craftable weapons and the rest are old sunset weapons. The missing perks are all in sockets with plugSources == 0 and I believe all of them have a randomizedPlugSetHash with plugs. Maybe this is Bungie's error and we should not always rely on plugSources? Below are some examples comparing the new and old versions of LL: OsteoStrigaMissingPerks IMG_00720EAA680A-1 EdgeOfActionMissingPerk IMG_7F5BFCEC2F13-1 TripwireCanaryMissingPerks IMG_C6C75364154E-1

kj415j45 commented 1 year ago

New Issue: Missing perks on some weapons in item details. About 40 weapons have this issue. A few are newer craftable weapons and the rest are old sunset weapons. The missing perks are all in sockets with plugSources == 0 and I believe all of them have a randomizedPlugSetHash with plugs.

@bill0042 I suppose this is a bug at bungie side. And you're right, it's safe to use randomizedPlugSetHash to render the available weapon perks in collection view according to the following code that runs on Destiny Data Explorer:

$InventoryItem.filter((e) => e.itemType === 3).filter(function (e) {
    var sockets = e.sockets?.socketEntries ?? [];
    if(sockets.lenth == 0) return false;
    sockets = sockets.filter((s) => s.plugSources === 0) // Init potential buggy sockets
    weaponPerks = 4241085061;
    sockets = sockets.filter((s) => $SocketType[s.socketTypeHash].socketCategoryHash === weaponPerks); // Only consider weapon perks
    originTraits = 3993098925; 
    sockets = sockets.filter((s) => s.socketTypeHash !== originTraits); // Exclude origin trait
    if(sockets.length != 0){
        let patchedBy = '|';
        sockets.forEach(function (s) {
            if((s.reusablePlugItems?.length ?? 0) != 0) patchedBy += 'U';
            if(s.randomizedPlugSetHash != undefined) patchedBy += 'R';
            patchedBy += '|';
        });
        console.log(e.hash + '\t' + patchedBy + '\t' + e.displayProperties.name);
    }
    return sockets.length != 0;
}).show();

image

Also I notice that all the origin trait sockets that excluded in above codes, can use randomizedPlugSetHash as a valid render info source.

You may want to report this issue to bungie, but using that property should be a viable patch before they fix it. (if they do)

bill0042 commented 1 year ago

@bill0042 I suppose this is a bug at bungie side. And you're right, it's safe to use randomizedPlugSetHash to render the available weapon perks in collection view according to the following code that runs on [Destiny Data Explorer]

@kj415j45 Thank you for this info! You seem to know this stuff very well.

bill0042 commented 1 year ago

New Issue: Exception when opening Progress tab even after erasing simulator and restarting. Exception has occurred. _TypeError (type 'Null' is not a subtype of type '_SelectedActivityKey' in type cast)

Stack: ScopedValueRepositoryBloc.getValue (/Users/bill/projects/ll/littlelight/lib/shared/blocs/scoped_value_repository/scoped_value_repository.bloc.dart:37) PageStorageHelper.readValue (/Users/bill/projects/ll/littlelight/lib/shared/blocs/scoped_value_repository/page_storage_helper.dart:8) MilestoneItemWidget.getSelectedActivity (/Users/bill/projects/ll/littlelight/lib/modules/progress/widgets/milestone_item.widget.dart:37) MilestoneItemWidget.buildModifiers (/Users/bill/projects/ll/littlelight/lib/modules/progress/widgets/milestone_item.widget.dart:279) MilestoneItemWidget.buildForeground (/Users/bill/projects/ll/littlelight/lib/modules/progress/widgets/milestone_item.widget.dart:71) MilestoneItemWidget.buildWithDefinition (/Users/bill/projects/ll/littlelight/lib/modules/progress/widgets/milestone_item.widget.dart:56) MilestoneItemWidget.build (/Users/bill/projects/ll/littlelight/lib/modules/progress/widgets/milestone_item.widget.dart:46) StatelessElement.build (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:5156) ComponentElement.performRebuild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:5086) Element.rebuild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:4805) ComponentElement._firstBuild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:5068) ComponentElement.mount (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:5062) Element.inflateWidget (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3971) Element.updateChild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3708) SingleChildRenderObjectElement.mount (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:6435) Element.inflateWidget (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3971) Element.updateChild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3708) SingleChildRenderObjectElement.mount (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:6435) Element.inflateWidget (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3971) Element.updateChild (/Users/bill/projects/flutter3/packages/flutter/lib/src/widgets/framework.dart:3708)

bill0042 commented 1 year ago

New issue: Vendor items in focused decoding don't show duplicates and don't show all perks. Looks like the main vendor items did before. image

bill0042 commented 1 year ago

New issue: Default tag names are empty. image

kj415j45 commented 1 year ago

New issue: Vendor items in focused decoding don't show duplicates and don't show all perks. Looks like the main vendor items did before.

That's bungie intended behavior, as you're looking up in Vendor[3388267042](Focused Decoding (Iron Banner)), which points to InventoryItem[3347222080](Randomized Perks version). It is a stub item for vendor rendering. Though it may be redeemed as InventoryItem[1028124540](S20 version). I don't see if there's a way to match the stub item with the actual drop. But IIRC someone makes an external manifest to match them.

I think bungie internally use those stub items to control which version should be dropped in vendor and even in post-match reward. As there are other stub version for "The Hero's Burden", and their actual drops. Like Vendor[2672927612](Legacy Gear (IB)) points to InventoryItem[4191188167](Introduced in S21) and may matches InventoryItem[2488587246](S17). However, I can't find reference for InventoryItem[2224334284](Introduced in S21).

It's not worthy to match them if there's no such manifest can help us. Bungie may update the drop pool with any season updates and it's obviously too hard to track and maintain all of them on our side at this time.

joaopmarquesini commented 1 year ago

@bill0042 that one is ... "odd" to say the least lol, but probably broke when I changed the translated text widget

joaopmarquesini commented 1 year ago

It's not worthy to match them if there's no such manifest can help us. Bungie may update the drop pool with any season updates and it's obviously too hard to track and maintain all of them on our side at this time.

Maybe there's something already done for that in d2ai but looks like a future version issue to me.

bill0042 commented 1 year ago

New issue: Vendor items in focused decoding don't show duplicates and don't show all perks. Looks like the main vendor items did before.

That's bungie intended behavior, as you're looking up in Vendor[3388267042](Focused Decoding (Iron Banner)), which points to InventoryItem[3347222080](Randomized Perks version). It is a stub item for vendor rendering. Though it may be redeemed as InventoryItem[1028124540](S20 version). I don't see if there's a way to match the stub item with the actual drop. But IIRC someone makes an external manifest to match them.

I think bungie internally use those stub items to control which version should be dropped in vendor and even in post-match reward. As there are other stub version for "The Hero's Burden", and their actual drops. Like Vendor[2672927612](Legacy Gear (IB)) points to InventoryItem[4191188167](Introduced in S21) and may matches InventoryItem[2488587246](S17). However, I can't find reference for InventoryItem[2224334284](Introduced in S21).

It's not worthy to match them if there's no such manifest can help us. Bungie may update the drop pool with any season updates and it's obviously too hard to track and maintain all of them on our side at this time.

@kj415j45 Thanks for the info! It was a dummy item with itemType 0. I'm surprised to see such an expert over in Zhong Guo, west of the guang that nobody knows where it is.

kj415j45 commented 1 year ago

@kj415j45 Thanks for the info! It was a dummy item with itemType 0. I'm surprised to see such an expert over in Zhong Guo, west of the guang that nobody knows where it is.

@bill0042 Thank you for your appreciation. I made some further investigation and found there's a reddit thread reporting that both of them are redeemed as the latest one. Which means you can never get an old version.

If that's true, we don't need to match them to make it looks like other main vendor items. As user can always look them up in Collections. The items in collection are latest too. Try link them together would improve UX significantly.