WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Determine active essences (https://www.wowinterface.com/forums/showthread.php?t=57996)

doofus 05-15-20 04:39 PM

Determine active essences
 
Is there a way to find out the currently active essences on the necklace?

Xrystal 05-15-20 05:01 PM

I haven't played with the new changes to the Azerite system yet for nUI but the old way is still working for me so I haven't needed to expand further yet.

But .. I saw this and there are some potential items to look into.

https://www.townlong-yak.com/framexm...eEssenceUI.lua

doofus 05-16-20 01:23 AM

OK thanks for the pointers. The following code stores your equipped essences, in case anyone wants to know.

Code:

  local essences = C_AzeriteEssence.GetEssences();
  BA_Data["function LogTextLine"](string.format("**** essences ****"));
  for _, ve in pairs(essences) do
    local eid = ve["ID"];
    local name = ve["name"];
    local rank = ve["rank"];
    local unlocked = ve["unlocked"];
    local valid = ve["valid"];
    local icon = ve["icon"];
    -- BA_Data["function LogTextLine"](string.format("essence id: %d - name: %s - rank: %d - unl: %s - valid: %s ",eid,name,rank,tostring(unlocked),tostring(valid)));
  end
  local wornEssences = { };
  local milestones = C_AzeriteEssence.GetMilestones();
  for _, vm in pairs(milestones) do
    local mid = vm["ID"];
    local slot = vm["slot"];
    if ( slot ) then
      local essenceID = C_AzeriteEssence.GetMilestoneEssence(mid);
      for _, ve in pairs(essences) do
        local eid = ve["ID"];
        if ( eid == essenceID ) then
          wornEssences[#wornEssences+1] = { essenceID, ve["name"], ve["rank"], slot };
          break;
        end
      end
    end
  end
 for _, we in pairs(wornEssences) do
    BA_Data["function LogTextLine"](string.format("essence id: %d - [%s] - rank: %d - slot: %d",we[1],we[2],we[3],we[4]));
  end



All times are GMT -6. The time now is 10:30 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI