Thread Tools Display Modes
03/18/19, 08:55 AM   #1
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
Boss room

Hello,
a short question I could not find the answer to - how do I determine if I'm boss room/location?

And also what boss/bosses are there?
  Reply With Quote
03/18/19, 09:13 AM   #2
Wheels
AddOn Author - Click to view addons
Join Date: Feb 2017
Posts: 60
The unitTag for bosses is 'bossX' where X is a number between 1 and MAX_BOSSES (currently 6).

Code:
DoesUnitExist('boss1')
will return true if you are in range of a boss with the unitTag 'boss1'.

Code:
GetUnitName('boss1')
will return the name of the unit with the unitTag 'boss1' if it exists.
  Reply With Quote
03/18/19, 09:30 AM   #3
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
Thank you. Can I also get the Boss ID? `GetUnitId`doesn't seem to exist.

Meaning, the name alone does not tell me if the boss is normal/vet or has adds around it (ie mini trials). But they do have different IDs though (at least I hope so).
  Reply With Quote
03/18/19, 09:36 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Nope they got no id. Just the name If you build something for it be sure to support other languages as well.
You are able to change the visible language ingame via:
/Script SetCVar("language.2", "<lang2>")
Where <lang2> can be:
de
en
fr
jp (only if you have installed the Japanese client!)

Only with a custom addon to support the languages:
ru
pl
pt
es
it
zh
and maybe others

You are able to check if you are in a vet or normal dungeon though.

Function to use:
* GetCurrentZoneDungeonDifficulty()
** _Returns:_ *[DungeonDifficulty|#DungeonDifficulty]* _isVeteranDifficulty_


The value returned is of this type "DungeonDifficulty":
* DUNGEON_DIFFICULTY_NONE
* DUNGEON_DIFFICULTY_NORMAL
* DUNGEON_DIFFICULTY_VETERAN

There is also an event fired if the difficulty changes so you need not to check it at EACH boss fight but only once if you get into a dungeon and in between as it changes:
* EVENT_GROUP_VETERAN_DIFFICULTY_CHANGED (*bool* _isVeteranDifficulty_)

For entering the dungeon I'm not sure if there is an event but you can search the API files and the wiki!


Find all api functions here (check the current's API .txt file):
https://wiki.esoui.com/APIVersion
  Reply With Quote
03/18/19, 09:48 AM   #5
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
Thank you, that will have to do
  Reply With Quote
03/18/19, 10:00 AM   #6
Wheels
AddOn Author - Click to view addons
Join Date: Feb 2017
Posts: 60
Technically they do have "IDs", but not in the sense you are hoping for, as Baer has said. Events like EVENT_COMBAT_EVENT will give values for 'sourceUnitId' and 'targetUnitId' for events in the area, but these IDs will be unique to the instance and not helpful for building a table of known bosses.
  Reply With Quote
03/18/19, 02:01 PM   #7
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 312
you should listen to:EVENT BOSSES CHANGED
  Reply With Quote
03/18/19, 02:26 PM   #8
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
And about the difficulty. I get 2 for veteran. But how do I see if any mini bosses are killed. In mini trials there is more then one difficulty for each version

Last edited by Aaxc : 03/18/19 at 02:29 PM.
  Reply With Quote
03/18/19, 03:09 PM   #9
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Sorry, no idea.
Check if the lua API files I linked have some event or API function for this.
Or try Scootworks event mentioned above.

If this does not help: Build a table with multilanguage boss names and use it.
Or check if there is a library like libBosses already which helps and did build the table already for you?
e.g.
https://www.esoui.com/downloads/info...BossFight.html

This looks liek it already does what you want to do. So use it :-D
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Boss room

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