Recently I started noticing a problem with my loot tracking addon, specifically that the instance difficulty was being grabbed as an empty string from GetInstanceInfo();
Code:
if (event == "PLAYER_ENTERING_WORLD") then
local name, typeOfInstance, difficulty, difficultyName, _, _, _, instanceMapId, _ = GetInstanceInfo();
For something like Ragefire Chasm, this should return:
Code:
name => Ragefire Chasm
typeOfInstance => party
difficulty => 1
difficultyName => Normal
instanceMapId => 389
What I actually get is:
Code:
name => Ragefire Chasm
typeOfInstance => party
difficulty => 0
difficultyName => 0
instanceMapId => 389
If I manually run /script print(GetInstanceInfo()); when inside, it gives me the correct information, so I'm thinking it's a problem with timing and the PLAYER_ENTERING_WORLD event. Is there a better event I could be using?