LibBossIDs-1.0
LibBossIDs-1.0 provides a table that flags mobIDs true if the mob linked to the ID is a boss.
Example:
if LibStub("LibBossIDs-1.0").BossIDs[tonumber(mobID)] then print("Found a boss!") end
One can get the mobID from a GUID in the following way:
local _, _, _, _, _, mobID = strsplit("-", UnitGUID("target"))
Target macro:
/run print(tonumber((select(6, strsplit("-", UnitGUID("target"))))))
Thanks Yoshimo for update. It's possible to update lib use. LibStub to r97 http://www.wowace.com/addons/libstub/ Release 1.0.2-40200
thanks.
the ID for warmaster blackhorn is wrong [39399] = true,
Warmaster Blackhorn Warmaster Blackhorn is "56427" Thanks for change.I'm pretty sure GUID is now 5 digits, and that that was the reason for the change. We're coming up on 65535 (0xffff) mobs soon.
My preferred extractor is :sub(-13, -9) since this works backwards from the least significant digit, which is always there, something which is not necessarily true for the most significant digits (when it's 0 =)). Oh and it also works if the leading "0x" is missing.
Anyone checking the tickets on this project?
that change is back in 4.0 though. i know i'm bumping an old discussion but just saying ;) I doubt it's perminent. probably just for debug/testing and will be reverted on live again like it was in 3.3
@jokerrhyme, That change didn't make it to live, so the library description is still accurate.
Just a heads up. I believe the 3.3 method of getting a MobID is now:
I sourced this from the official 3.3 API Changes thread which states: