Thread Tools Display Modes
03-27-19, 06:10 AM   #1
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
KGPanels not registering "worldboss" event

I tested with multiple scripts many times. Elite frames work wonderfully, but as soon as I try to set a boss ("worldboss") perimeter it stops working. Basically I just want the panel to show for Raid, Dungeon and World Bosses (in other word all types of boss mobs).

Can someone please help?
  Reply With Quote
03-27-19, 07:30 AM   #2
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
Post your code
  Reply With Quote
03-27-19, 08:11 AM   #3
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
OnLoad

self:RegisterEvent("PLAYER_TARGET_CHANGED")
self:Hide()

OnEvent

if ( UnitClassification("target") == "worldboss" ) then
self:Show()
else
self:Hide()
end

As soon as I change worldboss with elite, it starts working, well, for every elite target. Tried it with sample scripts from the wiki as well. Also tried "boss" "raidboss" and some other combinations to test it. No luck.

Last edited by bender1453 : 03-27-19 at 09:17 AM.
  Reply With Quote
03-27-19, 09:47 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Above your IF statement add

Code:
print(UnitClassification("target"))
see what it is actually returning rather than just guessing what it should be.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
03-27-19, 10:20 AM   #5
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
Fizzlemizz thank you very much mate. Tried your method, it showed "rareelite" for a Legion World Boss and "elite" for Siege of Orgrimmar Raid Boss. That must be the problem. So how can I set a perimeter for Dungeon and World Bosses? Seems difficult now...
  Reply With Quote
03-27-19, 08:29 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Blizzard still believe they have (may have) actual World Bosses, from TargetFrame.lua

Lua Code:
  1. elseif ( classification == "minus" ) then
  2.     self.borderTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Minus");
  3.     self.nameBackground:Hide();
  4.     self.manabar.pauseUpdates = true;
  5.     self.manabar:Hide();
  6.     self.manabar.TextString:Hide();
  7.     self.manabar.LeftText:Hide();
  8.     self.manabar.RightText:Hide();
  9.     forceNormalTexture = true;
  10. elseif ( classification == "worldboss" or classification == "elite" ) then
  11.     self.borderTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Elite");
  12. elseif ( classification == "rareelite" ) then
  13.     self.borderTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite");
  14. elseif ( classification == "rare" ) then
  15.     self.borderTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare");
  16. else
  17.     self.borderTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame");
  18.     forceNormalTexture = true;
  19. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
03-28-19, 03:41 AM   #7
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
All of the classifications above work except worldboss for some reason. If it's not working maybe I can try an alternative script. Other than being coded as "boss" what difference do bosses have? Higher level? For example a Level 60 raid will contain a Level 63 boss? Feel free to correct me.
  Reply With Quote
03-28-19, 12:14 PM   #8
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 308
The way classifications are these days you may have to create your own table and poll through it for a name with your own hard coded classification to make things work the way you want.
__________________
AddOns: Tim @ WoWInterface
Characters: Mage, Priest, Devoker, Pally
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
03-28-19, 12:47 PM   #9
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
I'm not a programmer unfortunately. I may change some codes in lua file but that's it. I guess I'll have to pass on this one as it seems way too difficult for me to manage.

Thanks for the help everyone.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KGPanels not registering "worldboss" event

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off