Skip to content

Commit

Permalink
Merge pull request #96 from ESOUIMods/master: Add Italian, remove Lib…
Browse files Browse the repository at this point in the history
…Stub
  • Loading branch information
MysteryDragon authored May 25, 2024
2 parents d161177 + 22cd4d6 commit 0c0cdee
Show file tree
Hide file tree
Showing 18 changed files with 1,602 additions and 171 deletions.
11 changes: 5 additions & 6 deletions RaidNotifier.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
RaidNotifier = RaidNotifier or {}
RaidNotifier.Util = RaidNotifier.Util or {}
local LCSA = LibCSA
local LGS = LibGroupSocket
local LUNIT = LibUnits2

local RaidNotifier = RaidNotifier

RaidNotifier.Name = "RaidNotifier"
RaidNotifier.DisplayName = "Raid Notifier"
RaidNotifier.Version = "2.28.1"
RaidNotifier.Version = "2.29"
RaidNotifier.Author = "|c009ad6Kyoma, Memus, Woeler, silentgecko|r"
RaidNotifier.SV_Name = "RNVars"
RaidNotifier.SV_Version = 4
Expand Down Expand Up @@ -128,7 +131,6 @@ do ---------------------------------
end

local CSA = CENTER_SCREEN_ANNOUNCE
local LCSA = LibStub:GetLibrary("LibCSA")

function RaidNotifier:AddAnnouncement(text, category, setting, interval)

Expand Down Expand Up @@ -265,8 +267,7 @@ do ----------------------

local window = nil

local LGS = LibStub("LibGroupSocket", true)
local ultimateHandler = LGS and LGS:GetHandler(LGS.MESSAGE_TYPE_ULTIMATE)
local ultimateHandler = LGS:GetHandler(LGS.MESSAGE_TYPE_ULTIMATE)
RNUltimateHandler = ultimateHandler -- debug
local ultimateAbilityId = 40223 -- Aggressive Warhorn Rank IV
local ultimateGroupId = 29 -- hardcoded for now
Expand Down Expand Up @@ -872,7 +873,6 @@ do ----------------------
CALLBACK_MANAGER:RegisterCallback("OnWorldMapChanged", OnZoneChanged) -- might as well listen to this since that code is executed anyways

-- Change vitality bonus announcement to not conflict with our own
local LCSA = LibStub:GetLibrary("LibCSA")
LCSA:HookHandler(EVENT_RAID_REVIVE_COUNTER_UPDATE, function(messageParams, currentCount, countDelta)
if messageParams then
messageParams:SetCategory(CSA_CATEGORY_SMALL_TEXT)
Expand Down Expand Up @@ -912,7 +912,6 @@ end

do ---------------------------

local LUNIT = LibUnits2
local Util = RaidNotifier.Util

function RaidNotifier.UnitIdToString(id)
Expand Down
11 changes: 4 additions & 7 deletions RaidNotifier.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
## Title: |cEFEBBERaidNotifier|r
## Description: Displays on-screen notifications on different events during trials.
## Author: |c009ad6Kyoma, Memus, Woeler, silentgecko|r
## Version: 2.28.1
## APIVersion: 101041
## Version: 2.29
## AddOnVersion: 229
## APIVersion: 101040 101041
## SavedVariables: RNVars RN_DEBUG_LOG
## DependsOn: LibAddonMenu-2.0>=28 LibUnits2
## OptionalDependsOn: LibGroupSocket
## DependsOn: LibAddonMenu-2.0>=36 LibGroupSocket>=13 LibUnits2>=102 LibCSA>=210

libs/LibStub/LibStub.lua
libs/LibCustomTitles/LibTitleLocale.lua
libs/LibCustomTitles/LibCustomTitles.lua
libs/LibCustomTitles/Titles/Kyoma.lua
libs/LibCustomTitles/Titles/Woeler.lua
libs/LibCustomTitles/Titles/Valve.lua
libs/LibCustomTitles/Titles/Memus.lua

libs/LibCSA/LibCSA.lua

UltimateHandler.lua
TrialAetherianArchive.lua
TrialAsylumSanctorium.lua
Expand Down
3 changes: 2 additions & 1 deletion Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ local tinsert = table.insert
local tremove = table.remove
local tsort = table.sort

local LAM = LibAddonMenu2

-- Constants for easy reading
RAID_HEL_RA_CITADEL = 1
RAID_AETHERIAN_ARCHIVE = 2
Expand Down Expand Up @@ -453,7 +455,6 @@ function RaidNotifier:CreateSettingsMenu()

self:TryUpgradeSettings()

local LAM = LibAddonMenu2
self.panelData = {
type = "panel",
name = self.DisplayName,
Expand Down
28 changes: 14 additions & 14 deletions TrialAsylumSanctorium.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ end
local function OnIntervalCheck()
local self = RaidNotifier
local raidId = RaidNotifier.raidId
local buffsDebuffs = RaidNotifier.BuffsDebuffs[raidId]
local buffsDebuffs = RaidNotifier.BuffsDebuffs[raidId]
local settings = self.Vars.asylum

if (settings.olms_gusts_of_steam and settings.olms_gusts_of_steam_slider > 0) then
local health, maxHealth = GetUnitPower("boss1", POWERTYPE_HEALTH) -- It's always Olms in AS
-- Precautious check in case of situation when the fight is finished already but the combat state check didn't fire yet
Expand Down Expand Up @@ -65,30 +65,30 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
local raidId = RaidNotifier.raidId
local self = RaidNotifier
local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.asylum

--if buffsDebuffs.interest_list[abilityId] then
-- dbg("[%d] #%d %s (%d)", result, abilityId, GetAbilityName(abilityId), tUnitId)
--end

if (tName == nil or tName == "") then
tName = self.UnitIdToString(tUnitId)
end
end

if result == ACTION_RESULT_BEGIN then
if abilityId == buffsDebuffs.llothis_defiling_blast and hitValue == 2000 then
if settings.llothis_defiling_blast >= 1 then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ASYLUM_DEFILING_BLAST), "asylum", "llothis_defiling_blast")
elseif (tName ~= "" and settings.llothis_defiling_blast == 2 ) then
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_ASYLUM_DEFILING_BLAST_OTHER), tName), "asylum", "llothis_defiling_blast")
end
end
elseif abilityId == buffsDebuffs.olms_exhaustive_charges then
if settings.olms_exhaustive_charges then
if settings.olms_exhaustive_charges then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ASYLUM_EXHAUSTIVE_CHARGES), "asylum", "olms_exhaustive_charges", 5)
end
elseif abilityId == buffsDebuffs.olms_storm_the_heavens then
if settings.olms_storm_the_heavens then
if settings.olms_storm_the_heavens then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ASYLUM_STORM_THE_HEAVENS), "asylum", "olms_storm_the_heavens", 5)
end
elseif abilityId == buffsDebuffs.olms_gusts_of_steam then
Expand Down Expand Up @@ -117,7 +117,7 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
if abilityId == buffsDebuffs.boss_spawn then
-- This one is tricky as it triggers each time a boss or minion spawns, thus without context it's not very useful.
-- Ways to use this:
-- Single occurance: Protector spawns (before it reaches its target location) or miniboss appears. Always a protector when
-- Single occurance: Protector spawns (before it reaches its target location) or miniboss appears. Always a protector when
-- phase 2, then ~10 seconds later the Llothis boss. Also around ~25 seconds later for the Felms boss.
-- Triple occurance: Those fancy fire robo-spiders we just ignore. Always when phase 3 starts
--
Expand All @@ -129,7 +129,7 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
data.ignoreSpawn = true
else
zo_callLater(function()
if data.lastBossSpawnTimeMs and not data.ignoreSpawn then
if data.lastBossSpawnTimeMs and not data.ignoreSpawn then
local isProtector = true
if data.nextSpawnIsProtector then
data.nextSpawnIsProtector = false
Expand All @@ -149,10 +149,10 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
-- local diff = curTimeMs - data.lastPhaseTimeMs
-- if diff <= 25000 then -- small window for it to spawn, in case it's only +Llothis (normal is ~15 seconds??)
-- if data.bossFelmsId then
-- data.bossFelmsIdBackup = tUnitId
-- data.bossFelmsIdBackup = tUnitId
-- dbg("Found Felms Boss BACKUP: %d after %d ms", tUnitId, diff)
-- else
-- data.bossFelmsId = tUnitId
-- data.bossFelmsId = tUnitId
-- dbg("Found Felms Boss: %d after %d ms", tUnitId, diff)
-- end
-- isProtector = false
Expand All @@ -169,7 +169,7 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
if isProtector then
data.latestProtectorId = tUnitId
--dbg("Protector about to spawn #%d", tUnitId)
if settings.olms_protector_spawn then
if settings.olms_protector_spawn then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ASYLUM_PROTECTOR_SPAWN), "asylum", "olms_protector_spawn")
end
end
Expand Down Expand Up @@ -222,7 +222,7 @@ function RaidNotifier.AS.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
--dbg("Phase5")
end
elseif (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then

elseif (result == ACTION_RESULT_EFFECT_FADED) then
--if abilityId == buffsDebuffs.olms_protector_spawn then
-- -- It died, new protectors spawn ~9s later (coincidence?)
Expand Down
24 changes: 12 additions & 12 deletions TrialCloudrest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local data = {}
function RaidNotifier.CR.Initialize()
p = RaidNotifier.p
dbg = RaidNotifier.dbg

data = {}
data.spearCounter = 0
data.portalCounter = 0
Expand All @@ -20,9 +20,9 @@ end
--function RaidNotifier.CR.OnBossesChanged()
-- local bossCount, bossAlive, bossFull = RaidNotifier:GetNumBosses(true)

-- reset if:
-- 1) there are no bosses
-- 2) all bosses are dead
-- reset if:
-- 1) there are no bosses
-- 2) all bosses are dead
-- 3) all bosses are at full health
-- if bossCount == 0 or bossAlive == 0 or bossFull == bossCount then
-- dbg("clear data before")
Expand Down Expand Up @@ -109,7 +109,7 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
--self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_CLOUDREST_SHADOW_REALM_CAST), "cloudrest", "shadow_realm_cast")
self:StartCountdown(hitValue, zo_strformat(GetString(RAIDNOTIFIER_ALERTS_CLOUDREST_SHADOW_REALM_CAST), (data.portalCounter % 2) + 1), "cloudrest", "shadow_realm_cast", false)
end
data.portalCounter = data.portalCounter + 1
data.portalCounter = data.portalCounter + 1
elseif abilityId == buffsDebuffs.sum_shadow_beads then
if (settings.sum_shadow_beads == true and not (data.break_amulet and settings.break_amulet)) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_CLOUDREST_SUM_SHADOW_BEADS), "cloudrest", "sum_shadow_beads")
Expand Down Expand Up @@ -173,15 +173,15 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_CLOUDREST_CHILLING_COMET), "cloudrest", "chilling_comet")
end
end
end
elseif (buffsDebuffs.malicious_strike[abilityId]) then
if (settings.malicious_strike == true) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_CLOUDREST_MALICIOUS_STRIKE), "cloudrest", "malicious_strike", 1)
end
end
end
elseif buffsDebuffs.hoarfrost_new[abilityId] then
if hitValue == 1 then
if hitValue == 1 then
local track = buffsDebuffs.hoarfrost_new[abilityId]
local d = data.hoarfrost[track]
d.count = d.count + 1
Expand Down Expand Up @@ -229,7 +229,7 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
end
elseif abilityId == buffsDebuffs.olorime_spears_synergized then
--dbg("Spear Synergized ")

elseif abilityId == buffsDebuffs.hoarfrost_syn then
if (settings.hoarfrost > 0) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
Expand All @@ -242,7 +242,7 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
dbg("Enter ShadowRealm >> %s", tName)
if tType == COMBAT_UNIT_TYPE_PLAYER then
dbg("Reset hoarfrost count for me")
if data.hoarfrost then
if data.hoarfrost then
if data.hoarfrost[1] then
data.hoarfrost[1].count = 0
end
Expand Down Expand Up @@ -274,7 +274,7 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
-- local now = GetGameTimeMilliseconds()
-- dbg("Spear Synergized Done at %d", now)
-- if data.lastOlorimeSpearMs > 0 then
-- local diff = now - data.lastOlorimeSpearMs
-- local diff = now - data.lastOlorimeSpearMs
-- local x, y = GetMapPlayerPosition(LUNIT:GetUnitTagForUnitId(tUnitId))
-- dbg(" DiffMs: %d, Pos: %f / %f", diff, x, y)
-- else
Expand All @@ -283,7 +283,7 @@ function RaidNotifier.CR.OnCombatEvent(_, result, isError, aName, aGraphic, aAct
-- end
-- data.lastOlorimeSpearMs = now
end

-- elseif result == ACTION_RESULT_DAMAGE then
-- if buffsDebuffs.voltaic_overload_progress[abilityId] == true then
-- if (settings.voltaic_overload > 0 and data.voltaic_overload and data.voltaic_overload > 0) then
Expand Down
26 changes: 13 additions & 13 deletions TrialMawOfLorkhaj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local function FindGlyph(glyphId, glyphs, knownGlyphs, allowNew)
local pX, pY = GetMapPlayerPosition("group"..p)
if (knownGlyphs[index] == nil) then --only check unknown glyphs
-- we dont care about scale/factor or how much it is in actual meters
local distance = RaidNotifier.Util.GetRawDistance(pX,pY, data.x,data.y) * 1000
local distance = RaidNotifier.Util.GetRawDistance(pX,pY, data.x,data.y) * 1000
if (distance < lowestDistance) then
lowestDistance=distance
lowestIndex=index
Expand All @@ -49,7 +49,7 @@ end
function RaidNotifier.MOL.OnBossesChanged()
local self = RaidNotifier
local raidId = RaidNotifier.raidId
local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.mawLorkhaj
local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.mawLorkhaj

local bossCount, bossAlive, bossFull = self:GetNumBosses(true)

Expand All @@ -61,9 +61,9 @@ function RaidNotifier.MOL.OnBossesChanged()
self:SetElementHidden("mawLorkhaj", "zhaj_glyph_window", false)
end
elseif (bossCount == 2 and map == "Art/maps/reapersmarch/MawLorkajSuthaySanctuary_Base_0.dds") then -- False Moon Twins, S’Kinrai and Vashai

elseif (bossCount == 1 and map == "Art/maps/reapersmarch/MawLorkajSevenRiddles_Base_0.dds") then

end
end

Expand Down Expand Up @@ -104,20 +104,20 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
tName = self.UnitIdToString(tUnitId)
end

--Zhaj'hassa the Forgotten
--Zhaj'hassa the Forgotten
-- Glyphs & Curse (UI elements only, notification code is further down below)
if settings.zhaj_glyphs then
if (abilityId == buffsDebuffs.zhajBoss_glyphability) then
local findNew = (result == ACTION_RESULT_EFFECT_FADED) --only scan for new glyph when effect/glyph is used by the player, NOT when it respawns
local glyphIndex = FindGlyph(tUnitId, buffsDebuffs.zhajBoss_glyphs, buffsDebuffs.zhajBoss_knownGlyphs, findNew)
local glyphIndex = FindGlyph(tUnitId, buffsDebuffs.zhajBoss_glyphs, buffsDebuffs.zhajBoss_knownGlyphs, findNew)
if (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
self:StopGlyphTimer(glyphIndex)
elseif (result == ACTION_RESULT_EFFECT_FADED) then
self:StartGlyphTimer(glyphIndex, buffsDebuffs.zhajBoss_glyphcooldown)
end
elseif (tType == COMBAT_UNIT_TYPE_PLAYER and abilityId == buffsDebuffs.zhajBoss_curseability) then
local glyphIndex = 7
if (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
if (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
self:StartGlyphTimer(glyphIndex, buffsDebuffs.zhajBoss_curseduration)
elseif (result == ACTION_RESULT_EFFECT_FADED) then
self:StopGlyphTimer(glyphIndex)
Expand All @@ -129,7 +129,7 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
--Sun-Eater Eclipse Field
if (abilityId == buffsDebuffs.suneater_eclipse) then
if settings.suneater_eclipse >= 1 then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_SUNEATER_ECLIPSE), "mawLorkhaj", "suneater_eclipse")
elseif (tName ~= "" and settings.suneater_eclipse >= 2) then -- removed the distance check for now
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_SUNEATER_ECLIPSE_OTHER), tName), "mawLorkhaj", "suneater_eclipse")
Expand Down Expand Up @@ -157,15 +157,15 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
end
end
elseif (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
--Grip of Lorkhaj (1st boss debuff)
if (buffsDebuffs.zhaj_gripoflorkhaj[abilityId]) then
if settings.zhaj_gripoflorkhaj then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_ZHAJ_GRIPOFLORKHAJ), "mawLorkhaj", "zhaj_gripoflorkhaj", 4)
end
end

-- False Moon Twins, S’Kinrai and Vashai
-- False Moon Twins, S’Kinrai and Vashai
if (buffsDebuffs.twinBoss_lunaraspect[abilityId]) then
if settings.twinBoss_aspects >= 2 then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_LUNAR_ASPECT), "mawLorkhaj", "twinBoss_aspects", 4)
Expand Down Expand Up @@ -206,7 +206,7 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
--Rakkhat, Fang of Lorkhaj
if (abilityId == buffsDebuffs.rakkhat_unstablevoid) then
if settings.rakkhat_unstablevoid >= 1 then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
if (settings.rakkhat_unstablevoid == 1 and settings.rakkhat_unstablevoid_countdown) then
self:StartCountdown(buffsDebuffs.rakkhat_unstablevoid_duration, GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_RAKKHAT_UNSTABLE_VOID), "mawLorkhaj", "rakkhat_unstablevoid")
else
Expand All @@ -222,7 +222,7 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
-- if (settings.rakkhat_lunarbastion1 == 1 or settings.rakkhat_lunarbastion1 == 3) then --if "Self" or "All"
-- self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_RAKKHAT_LUNARBASTION1), "mawLorkhaj", "rakkhat_lunarbastion1")
-- end
-- elseif (tName ~= "") then
-- elseif (tName ~= "") then
-- if (settings.rakkhat_lunarbastion1 == 2 or settings.rakkhat_lunarbastion1 == 3) then --if "Other" or "All"
-- self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_RAKKHAT_LUNARBASTION1_OTHER), tName), "mawLorkhaj", "rakkhat_lunarbastion1")
-- end
Expand Down Expand Up @@ -256,7 +256,7 @@ function RaidNotifier.MOL.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
-- if (settings.rakkhat_lunarbastion2 == 1 or settings.rakkhat_lunarbastion2 == 3) then --if "Self" or "All"
-- self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_RAKKHAT_LUNARBASTION2), "mawLorkhaj", "rakkhat_lunarbastion2")
-- end
-- elseif (tName ~= "") then
-- elseif (tName ~= "") then
-- if (settings.rakkhat_lunarbastion2 == 2 or settings.rakkhat_lunarbastion2 == 3) then --if "Other" or "All"
-- self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_MAWLORKHAJ_RAKKHAT_LUNARBASTION2_OTHER), tName), "mawLorkhaj", "rakkhat_lunarbastion2")
-- end
Expand Down
Loading

0 comments on commit 0c0cdee

Please sign in to comment.