Best way to determine how many of which tier pieces the player is wearing
Sorry for continuous spamming :o
Title says pretty much all. What would be the best way to determine how many of which tier pieces the player is wearing? Should I create a table with each gears' id and check if the player is wearing that gear or not? Or is there any possible way to determine if the player's current gear is a tier piece or not? (doesn't seem like there is a straightforward API for this :confused:) |
You could scan the tooltips of each item. Maybe search for (#/6) and or (4) Set and then do a required level is 110 check or ilvl check to make sure it's a current expansion tier item.
|
This may be relevant to your interests.
https://www.mmo-champion.com/threads...ck-hidden-aura Might not do exactly what you're looking for, but if you are able to understand the code you may be able to adapt it to what you need (also, if that code still works in 7.3.) |
Wow... didn't expect I'd get replies this fast haha :banana:
Will have a go with both suggestions and see which matches well with my need! Thank you Ammako and Tim!! |
One more question here :p
Would it be possible to get a tier data for each classes without hard coding it? Not only the one that the player already owns, but in general. Thank you! -- EDIT #1 Guess I could use encounter journal APIs :banana: -- EDIT #2 Ughhhhhh... encounter journal APIs do not seem to provide an ability to check items dropped by each boss :( Gotta go back to research!!!!! |
Quote:
|
Quote:
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) |
Quote:
But, Atlas Loot is way too big for me to dig into... Would need more time to understand how that works :o Quote:
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 :confused: -- EDIT #1 I think I slightly got it :banana: Here's what I've done so far. Lua Code:
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 :p |
Another question!
Does items have different itemID per difficulties??? |
No. It's the same item, Blizzard uses an upgrade system to adjust item levels and the green text under the name. That's what all the numbers mean in the itemString past the itemID. More info here: https://wow.gamepedia.com/ItemString
|
Quote:
The reason that I asked this is because of the example here. If you see d87's usage example code, he has different tier id sets for each difficulties. Would that be only for old tiers? |
Yea, most likely different tiers, which would be completely different items.
|
d87's example is for t15 (ToT), which uses different item IDs per difficulty.
Anything past MoP will be using the same item IDs for every difficulty, just with different bonuses. Keep in mind still, that older tier also tends to have two or three different variations depending on role. |
Quote:
Quote:
|
All times are GMT -6. The time now is 07:58 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI