Not totally fleshed out
Boss dataset:
Code:
- name (Boss name)
- health
# current (Current health)
# max (Max health)
# effmax (Max health)
# delta (Difference between current and max)
- fight
# start (Timestamp)
# dps (Current health delta / fight start)
# last_update (Timestamp)
- is_final (Is final boss [currently only raids])
- unit_tag
- hash (Hash of boss name)
Unit (trashmob) dataset:
Code:
- hash ("name:unit_id")
- unit_id
- name
- registered (timestamp)
- alive
- damage_taken
- max_health ( gets set when player targets this mob )
Dungeon dataset:
Code:
- name (localized)
- zone
- fasttravel_node
- access (basegame, dlc, addon)
Callbacks:
Code:
- OnBossTrackingStart(boss) - Triggered when entering boss area
- OnBossTrackingStop(boss) - Triggered when exiting boss area
- OnHardmodeActivation(boss) - Triggered when max health increases while in boss area
# This does not cover when entering the boss area and the hardmode was already activated or hardmodes where no health difference is present (Asylum/Cloudrest detection via amount of bossed killed)
# Use IsHardModeActive should work better in some cases
- OnHardmodeDeactivation(boss) - Triggered when max health decreases while in boss area
- OnBossFightStart(boss, hardmode) - Triggered when boss fight starts
- OnBossFightOver(boss) - Triggered when boss fight ends
# Either boss killed or health resetted to max (wipe)
- OnBossFightBossDPSUpdate(boss, dps, fight_start) - Triggered every X [threshold] seconds
# Boss specific dps update, only single target
# Based on health lost in current-fight_start
- OnBossFightDPSUpdate(dps) - Triggered every X [threshold] seconds
# Returns single target dps for every boss
- OnUnitTrackingStart(unit) - Triggered when trash mob presence detected
- OnUnitTrackingStop(unit) - currently not triggered
- OnUnitDamageTakenUpdate(unit, killing_blow) - Triggered when trash mob takes damage
- OnUnitDeath(unit) - Triggered when trash mob dies
# Only works when max health registered or directly targeted
Dungeon API (available without initializing LBF)
Code:
- PrintDungeonList()
- GetDungeonInfo(dungeon_id)
- GetUnitDungeonInfo(unit)
# (optional) unit: unit_tag (default: player)
- GetUnitDungeon(unit)
# (optional) unit: unit_tag (default: player)
- TravelToDungeon(dungeon_id)
Functions:
Code:
- Init(dps_threshold_duration, debug_level) - Initializes library
# (optional) dps_threshold_duration: interval in which bossfight dps updates are triggered
# (optional) debug_level: 5 full, 4 critical, 3 error, 2 warning, 1 info, 0 none
- IsInRaidBossFight(raid_id, check_final) - Check if raid boss fight is ongoing
# raid_id: current raid_id [sanity check]
# (optional) check_final: Check if final boss fight
- IsInFight(boss) - Check if in boss fight
# (optional) boss: Returns first found boss dataset
- GetKilledBosses() - Returns amount of killed bosses [works only in raids]
- IsArenaRaid(raid) - Returns if it is a round/arena based raid
# (optional) raid_id: check for raid id or current raid
- GetArenaString() - Returns string of current arena/round
- GetEstimatedScore(raid, tt, duration, remaining, hm, kb) - Calculates estimated score for raid
# (optional) raid
# (optional) target_time
# (optional) current_duration
# (optional) remaining_vitality
# (optional) hardmode_active
# (optional) killed_bosses
- IsHardModeActive() - Returns if hardmode is active
- DetectUnit(unitTag, unitName) - Returns boss based on unitTag or unitName
# (optional) unitTag
# (optional) unitName
- FullFightDPS() - Returns current dps on all currently present bosses
- IsNoTrashRaid(raid) - Returns if it is a raid containing trash mobs or not (AS;CR or rest)
# (optional) raid_id
Implementation in
RaidTools (StatusBar, RaidHelper Asylum)
Basic example
Lua Code:
local OLMS_ENGAGEMENT = false
RaidTools.LBF = LibStub('LibBossFight')
RaidTools.LBF:Init()
CALLBACK_MANAGER:RegisterCallback("OnBossFightStart", function(boss, hardmode)
if RaidTools.LBF:IsInRaidBossFight(TRIAL_ASYLUM_SANCTORIUM, true) then
OLMS_ENGAGEMENT = true
d(string.format('Asylum fight started! %s (hm: %s) ', boss.name, tostring(hardmode)))
end
end)
CALLBACK_MANAGER:RegisterCallback("OnBossFightOver", function(boss)
if OLMS_ENGAGEMENT then
d('Olms fight over')
end
end)
---------------------------------------------------------------------------------------------------------
CALLBACK_MANAGER:RegisterCallback("OnUnitDamageTakenUpdate", function(unit, killing_blow)
d(string.format('OnUnitDamageTakenUpdate(unit: %s, damage: %s [%s], killing_blow: %s)', unit.name, unit.damage_taken, tostring(unit.max_health), tostring(killing_blow)))
end)
CALLBACK_MANAGER:RegisterCallback("OnUnitDeath", function(unit)
d(string.format('OnUnitDeath(unit: %s)', tostring(unit.name)))
end)
CALLBACK_MANAGER:RegisterCallback("OnUnitTrackingStart", function(unit)
local count = 0
for _, _ in pairs(unit_list) do
count = count + 1
end
d(string.format('OnUnitTrackingStart(unit: %s, hash: %s, total_units: %s)', unit.name, unit.hash, count))
end)
Public trial/dungeon ids
Lua Code:
-- Craglorn (Basegame)
TRIAL_HEL_RA_CITADEL = 1
TRIAL_AETHERIAN_ARCHIVE = 2
TRIAL_SANCTUM_OPHIDIA = 3
TRIAL_DRAGONSTAR_ARENA = 4
-- ThievesGuild (DLC)
TRIAL_MAW_OF_LORKHAJ = 5
-- Orsinium (DLC)
TRIAL_MAELSTROM_ARENA = 6
-- Morrowind (Addon)
TRIAL_HALLS_OF_FABRICATION = 7
-- ClockworkCity (DLC)
TRIAL_ASYLUM_SANCTORIUM = 8
-- Summerset (Addon)
TRIAL_CLOUDREST = 9
-- Basegame
DNG_FUNGAL_GROTTO_I = 1
DNG_FUNGAL_GROTTO_II = 2
DNG_SPINDLECLUTCH_I = 3
DNG_SPINDLECLUTCH_II = 4
DNG_BANISHED_CELLS_I = 5
DNG_BANISHED_CELLS_II = 6
DNG_DARKSHADE_CAVERNS_I = 7
DNG_DARKSHADE_CAVERNS_II = 8
DNG_ELDEN_HOLLOW_I = 9
DNG_ELDEN_HOLLOW_II = 10
DNG_WAYREST_SEWERS_I = 11
DNG_WAYREST_SEWERS_II = 12
DNG_ARX_CORINIUM_I = 13
DNG_CITY_OF_ASH_I = 14
DNG_CITY_OF_ASH_II = 15
DNG_CRYPT_OF_HEARTS_I = 16
DNG_CRYPT_OF_HEARTS_II = 17
DNG_DIREFROST_KEEP_I = 18
DNG_TEMPEST_ISLAND_I = 19
DNG_VOLENFELL_I = 20
DNG_BLEACKHEART_HAVEN_I = 21
DNG_BLESSED_CRUCIBLE_I = 22
DNG_SELENES_WEB_I = 23
DNG_VAULTS_OF_MADNESS_I = 24
-- ImperialCity DLC
DNG_WHITEGOLD_TOWER_I = 25
DNG_IMPERIAL_CITY_PRISON_I = 26
-- ShadowOfTheHist DLC
DNG_RUINS_OF_MAZZATUN_I = 27
DNG_CRADLE_OF_SHADOWS_I = 28
-- HornsOfTheReach DLC
DNG_BLOODROOT_FORGE_I = 29
DNG_FALKREATH_HOLD_I = 30
-- Dragonbones DLC
DNG_FANG_LAIR_I = 31
DNG_SCALECALLER_PEAK_I = 32
Raid specifics
LibAsylum
Lua Code:
-- Events:
- OnLlothisPresenceDetected(unit)
- OnFelmsPresenceDetected(unit)
- OnASNonMinibossPresenceDetected(unit)
- FelmsEffect(changeType, effectName, abilityId, unitTag, unitName, beginTime, endTime, stackCount, buffType, effectType)
- LlothisEffect(changeType, effectName, abilityId, unitTag, unitName, beginTime, endTime, stackCount, buffType, effectType)
- FelmsEvent(targeted, result, abilityName, abilityId, sourceType, sourceName, hitValue, powerType)
- LlothisEvent(targeted, result, abilityName, abilityId, sourceType, sourceName, hitValue, powerType)
- OlmsEvent(targeted, result, abilityName, abilityId, sourceType, sourceName, hitValue, powerType)
- OlmsFightStarted
- OlmsFightOver
-- Functions:
- GetLlothis()
- GetFelms()