View Single Post
12-29-17, 05:09 PM   #8
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by JDoubleU00 View Post
Have you looked at Atlas Loot?
I did

But, Atlas Loot is way too big for me to dig into...

Would need more time to understand how that works

Originally Posted by Tim View Post
I really don't think that data is readily available. I'm pretty sure you're going to have to hard code it.

You can definitely get items dropped from each boss from the EJ.
- https://wow.gamepedia.com/World_of_W...rnal_Functions

However, you're still going to have to have some kind of table with gear IDs to check against.


Code:
local name, icon, slot, armorType, itemID, link, encounterID = EJ_GetLootInfoByIndex(index)
Does that function work even if you don't have a drop?

I mean, in order to use EJ_GetLootInfoByIndex(index), this requires to get a number of loots via EJ_GetNumLoot() which then requires EJ_LOOT_DATA_RECIEVED event to be fired

-- EDIT #1

I think I slightly got it

Here's what I've done so far.

Lua Code:
  1. local frame = CreateFrame("Frame");
  2. frame:RegisterEvent("PLAYER_LOGIN");
  3. frame:SetScript("OnEvent", function(self, event, ...)
  4.     if not IsAddOnLoaded("Blizzard_EncounterJournal") then
  5.         LoadAddOn("Blizzard_EncounterJournal");
  6.     end
  7.  
  8.     EJ_SelectTier(7);
  9.     EJ_SelectInstance(707);
  10.  
  11.     local i = 1;
  12.     while EJ_GetEncounterInfoByIndex(i) do
  13.         local _, _, encounterID = EJ_GetEncounterInfoByIndex(i);
  14.  
  15.         EJ_SelectEncounter(encounterID);
  16.  
  17.         print(EJ_GetNumLoot());
  18.  
  19.         i = i + 1;
  20.     end
  21. end);

This currently prints a number of loots available from each boss on Vault of the Wardens for player's current specialization.

The next thing would be another while loop after EJ_SelectEncounter(encounterID) for EJ_GetLootInfoByIndex(index) as Tim has pointed!!

-- EDIT #2

I'm an idiot...

Since you can get a number of loots with EJ_GetNumLoot(), you don't need to use another while loop and just use a for loop

Last edited by Layback_ : 12-29-17 at 08:59 PM.
  Reply With Quote