Flat-Badger-1971 / ArchiveHelper

0 stars 1 forks source link

Bug: if the second player enters the archive after the first phase, avatar sets counts are not reset #21

Closed Stemuweb closed 5 months ago

Stemuweb commented 5 months ago

To reproduce:

Note: ENDLESS_DUNGEON_MANAGER:GetState() returns 2 in both calls to the function.

Edit: finishing phase 1 is not needed. If player B enters while player A has started the first fight, the bug occurs too.

Stemuweb commented 5 months ago

The debug messages I have added to test:

local function onDungeonInitialised()
    AH.Chat:Print("onDungeonInitialised");

    local state = ENDLESS_DUNGEON_MANAGER:GetState()
    AH.Chat:Print("dungeon state = " .. tostring(state))

    if (not IsEndlessDungeonStarted()) then
        AH.Chat:Print("reset AvatarVisionCount: YES")
        AH.Vars.AvatarVisionCount = {ICE = 0, WOLF = 0, IRON = 0}
    else
        AH.Chat:Print("reset AvatarVisionCount: NO")
    end
end

Not idea how the function IsEndlessDungeonStarted() works and/or if it's enough.