From a083b863f1bb091ae2b0a4ad964e3bbf935efb8b Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Thu, 8 Jan 2015 00:15:09 +0100 Subject: [PATCH] Add a fallback difficulty based on current zone --- BonusRollPreview.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/BonusRollPreview.lua b/BonusRollPreview.lua index 5aecc01..483b1f3 100644 --- a/BonusRollPreview.lua +++ b/BonusRollPreview.lua @@ -290,18 +290,21 @@ function Container:Update() button:Hide() end - local _, _, difficulty = GetInstanceInfo() - EJ_SetDifficulty(difficulty > 0 and difficulty or 4) - - local currentInstance = EJ_GetCurrentInstance() - if(not currentInstance or currentInstance == 0) then - local oldMap = GetCurrentMapAreaID() + local instanceID = EJ_GetCurrentInstance() + if(instanceID == 0) then + local oldAreaID = GetCurrentMapAreaID() SetMapToCurrentZone() - currentInstance = ns.continents[GetCurrentMapContinent()] - SetMapByID(oldMap) + instanceID = ns.continents[GetCurrentMapContinent()] + SetMapByID(oldAreaID) + end + + local _, _, difficulty = GetInstanceInfo() + if(difficulty == 0) then + difficulty = instanceID < 369 and 3 or 14 end - EJ_SelectInstance(currentInstance) + EJ_SetDifficulty(difficulty) + EJ_SelectInstance(instanceID) EJ_SelectEncounter(currentEncounterID) local _, _, classID = UnitClass('player') -- 1.7.9.5