Meivyn / AdventureGuideLockouts

A fork and continuation of Adventure Guide Saved Instances WoW add-on.
https://wow.curseforge.com/projects/adventure-guide-lockouts
GNU General Public License v3.0
9 stars 2 forks source link

Siege of Boralus wrong count #1

Closed xIGBClutchIx closed 6 years ago

xIGBClutchIx commented 6 years ago

In the BFA dungeon Siege of Boralus the count is wrong due to one of the bosses being only able to be killed by the opposite faction. Sergeant Bainbridge (Horde) or Chopper Redhook (Alliance). Intended should be 4/4 but instead saids 4/5.

Meivyn commented 6 years ago

Thanks for your report. I'll fix this in the next commit.

Meivyn commented 6 years ago

I don't have access to Siege of Boralus yet. Can you do a /dump GetInstanceInfo() while in the instance and give me the exact string at [1] please?

xIGBClutchIx commented 6 years ago

Yep here you go

[1]="Siege of Boralus", 
Meivyn commented 6 years ago

Thanks. Should be fixed in next release. Just do a /reload.

xIGBClutchIx commented 6 years ago

That looks to have fixed the icon but now when I highlight over it the final boss is missing in the tooltip. I assume looking at your fix it just scans the first 4 bosses but technically there is 5 bosses and wow just does not let you see one and kill it because of opposite faction.

Meivyn commented 6 years ago

If you have cleared the instance, it should display the 4 bosses you had killed. Can you give me a screenshot of your issue?

xIGBClutchIx commented 6 years ago

A before and after of the fix.

Before latest version: before

After latest version: after

What happens is when you put the maxBosses to 4 it can't get to the last one because it just loops to 4 and the last boss is 5. https://github.com/Meivyn/EncounterJournalSavedInstances/blob/master/EncounterJournalSavedInstances.lua#L303 The only way I thought of fixing it is putting in special code if a person is alliance or horde.

Meivyn commented 6 years ago

I can't test it myself so I'll need your help to try something. Try to replace the loop by this:

local b = 1
while GetSavedInstanceEncounterInfo(i, b) do
    local bossName, _, isKilled = GetSavedInstanceEncounterInfo(i, b)
    table.insert(bosses, {
        name = bossName,
        isKilled = isKilled
    })
    b = b + 1
end
xIGBClutchIx commented 6 years ago

That looks to have worked. test

Meivyn commented 6 years ago

Fixed in 5b77394c26a431256e72ff57d5952ad662a276bc.