collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
872 stars 99 forks source link

Initial CharData update event #75

Open collinsmith opened 4 years ago

collinsmith commented 4 years ago

6860d8cba183f60d6902d5a1416d462c456bbc30 introduced a bug within the UI where the initial CharData update isn't performed until an item is modified. I'm going to implement a workaround for the issue and add a manual update function to CharData, but I think this can be better handled by updating the items within the engine somewhere more appropriate.

Possibly a won't fix related issue: this issue manifested itself by having the SpellQuickPanel completely empty and SpellsPanel without any skill points. I.e., all spots where CharData is accessed appears blank. This shouldn't happen in production assuming this issue is fixed.

I tried moving my update event subscription so that it receives the update events when the items are preprocessed for the first time, but this didn't help.

collinsmith commented 4 years ago

76643ef2a96aa02cea651801ff0a52088e2a6d0b fixed support within SpellsPanel by making it's structures update by listening to events sent by CharData. This doesn't fix the initial update issue, but it means that updating the skills or stats of a character will now be reflected within the SpellsPanel.