Closed byBackfish closed 2 years ago
I looked through the code with more context. I just can't understand how this patch is supposed to fix the stated problem "mythics in chests not being detected by Wynntils". All you are doing is adding a quick way out if there are no "actual" items in the container. I was thinking I'd see another use of actualItems where it was iterated over, looking for a mythic.
Wynncraft sends the chest items twice. The first time, everything is empty. Shortly after, the actual items "generate". So that the chest doesn't get handled twice, there is a check "if last Processed Chest == this Chest, then return". This would only take the first, empty, chest contents, and ignore the actual items. By adding this check, if the chest contains items or is empty, and then returning early. By doing this, the lastProcessedChestId is only set, if the chest contains items. This way, the first packet with the empty items is ignored, and only the second packet with the actual items is handled
Aha, I see. I think it would be great if you could include this description as a comment (possibly shorted down a bit).
👍
Fixes mythics in chests not being detected by Wynntils Removes the
/guild list
spamThe problem with the mythic's not being detected, was that Wynn sends two item change packets. One with empty items, one with the actual items. This PR makes Wynntils ignore the first, empty, packet and only handle the second, actual, packet. Before, Wynntils would only check the first packet, and then ignore the second, as the
lastProcessedChestID
was the same as the ID of the second packet