KarazhanSucks / DBM-WotLKPlus

DBM-WotLKPlus
0 stars 0 forks source link

Check Heroic and Mythic dungeon loading #1

Open KarazhanSucks opened 2 years ago

KarazhanSucks commented 2 years ago

How does patch-M behave with Heroic and Mythic? Do difficulties load correctly? Will Cata and MoP dungeons load correctly?

/dump GetInstanceDifficulty() /dump GetInstanceInfo() /dump IsInInstance() /dump MiniMapInstanceDifficultyTexture:GetTexCoord() /dump GetDungeonDifficulty() /dump GetRaidDifficulty()

KarazhanSucks commented 2 years ago

RFC Mythic:

[12:34:12] 3 [12:34:12] "Ragefire Chasm", "party", 3, "5 Player (Mythic)", 5, 0, false [12:34:12] 1, "party" [12:34:12] 0, 0.0703125, 0, 0.4140625, 0.25, 0.0703125, 0.25, 0.4140625 [12:34:12] 3, 3 [12:34:12] 1, 1

ZoneID: 681

KarazhanSucks commented 2 years ago

function DBM:GetCurrentInstanceDifficulty() local _, instanceType, difficulty, difficultyName, maxPlayers, dynamicDifficulty, isDynamicInstance = GetInstanceInfo() if instanceType == "none" then return difficulty == 1 and "worldboss", L.RAID_INFO_WORLD_BOSS.." - ", difficulty, maxPlayers elseif instanceType == "raid" then if isDynamicInstance then -- Dynamic raids (ICC, RS) if difficulty == 1 then -- 10 players return dynamicDifficulty == 0 and "normal10" or dynamicDifficulty == 1 and "heroic10" or "unknown", difficultyName.." - ", difficulty, maxPlayers elseif difficulty == 2 then -- 25 players return dynamicDifficulty == 0 and "normal25" or dynamicDifficulty == 1 and "heroic25" or "unknown", difficultyName.." - ", difficulty, maxPlayers -- On Warmane, it was confirmed by Midna that difficulty returning only 1 or 2 is their intended behaviour: https://www.warmane.com/bugtracker/report/91065 -- code below (difficulty 3 and 4 in dynamic instances) prevents GetCurrentInstanceDifficulty() from breaking on servers that correctly assign difficulty 1-4 in dynamic instances. elseif difficulty == 3 then -- 10 heroic, dynamic return "heroic10", difficultyName.." - ", difficulty, maxPlayers elseif difficulty == 4 then -- 25 heroic, dynamic return "heroic25", difficultyName.." - ", difficulty, maxPlayers end else -- Non-dynamic raids if difficulty == 1 then -- check for Timewalking instance (workaround using GetRaidDifficulty since on Warmane all the usual APIs fail and return "normal" difficulty) local raidDifficulty = GetRaidDifficulty() if raidDifficulty ~= difficulty and (raidDifficulty == 2 or raidDifficulty == 4) then -- extra checks due to lack of tests and no access to a timewalking server return "timewalker", difficultyName.." - ", raidDifficulty, maxPlayers else return maxPlayers and "normal"..maxPlayers or "normal10", difficultyName.." - ", difficulty, maxPlayers end elseif difficulty == 2 then return "normal25", difficultyName.." - ", difficulty, maxPlayers elseif difficulty == 3 then return "heroic10", difficultyName.." - ", difficulty, maxPlayers elseif difficulty == 4 then return "heroic25", difficultyName.." - ", difficulty, maxPlayers end end elseif instanceType == "party" then -- 5 man Dungeons if difficulty == 1 then return "normal5", difficultyName.." - ", difficulty, maxPlayers elseif difficulty == 2 then -- check for Mythic instance (workaround using GetDungeonDifficulty since on Warmane all the usual APIs fail and return "heroic" difficulty) local dungeonDifficulty = GetDungeonDifficulty() if dungeonDifficulty == 3 then return "mythic", difficultyName.." - ", dungeonDifficulty, maxPlayers else return "heroic5", difficultyName.." - ", difficulty, maxPlayers end elseif difficulty == 3 then return "mythic", difficultyName.." - ", 3, maxPlayers end end end

KarazhanSucks commented 2 years ago

DBM RegisterMapSize in DBM-RangeCheck.lua: image

ABS(LocRight - LocLeft) ABS(LocTop-LocBottom)

image image