Rarity

Rarity

17M Downloads

Duplicate attempts are being counted for Invincible's Reins

rdw-software opened this issue ยท 3 comments

commented

Source: WowAce

I accidentally managed to reproduce it while trying to troubleshoot an unrelated issue (#182). Here is the debug log:

https://i.imgur.com/cGSTGfy.png

https://i.imgur.com/UUQAgn4.png

https://i.imgur.com/BzZB3WY.png

https://i.imgur.com/76HwmBw.png

commented

I suppose the answers to the above questions are:

  1. Because the duplicate attempt comes from the UNIT_DIED event handler, i.e. the BOSS detection method (combat log events)
  2. It should happen every time, as long as UNIT_DIED is triggered by the game
  3. All items seem to be using BOSS so changing the UNIT_DIED event handler is likely easiest

The simplest fix would be to just check if the item has statistics and then not add attempts for a UNIT_DIED event.

commented

The problem is that Rarity.npcs_to_items[36597] contains all items that are related to the boss, and then OnCombat blindly adds attempts for all of them while handling UNIT_DIED. Invincible uses this event with a fake NPC ID, but also uses kill statistics (which adds the second attempt). Clearly this isn't right. I suppose switching to SPECIAL instead of BOSS might help?

Source: Core/EventHandlers.lua

Now, there are still a few questions:

  1. Why are the pets (that use NPC and kill statistics) only counting once?
  2. Does the problem occur always or only "sometimes" (see #174)?
  3. Should items with kill statistics use NPC, BOSS, or SPECIAL? (check the DB for other items?)
commented

Also, is it possible this might be related to #174?