forked from kyoma/ESO-RaidNotifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrialDragonStarArena.lua
84 lines (77 loc) · 3.6 KB
/
TrialDragonStarArena.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
RaidNotifier = RaidNotifier or {}
RaidNotifier.DSA = {}
local RaidNotifier = RaidNotifier
local function p() end
local function dbg() end
function RaidNotifier.DSA.Initialize()
p = RaidNotifier.p
dbg = RaidNotifier.dbg
end
function RaidNotifier.DSA.OnCombatEvent(_, result, isError, aName, aGraphic, aActionSlotType, sName, sType, tName, tType, hitValue, pType, dType, log, sUnitId, tUnitId, abilityId)
local raidId = RaidNotifier.raidId
local self = RaidNotifier
local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.dragonstar
if (tName == nil or tName == "") then
tName = self.UnitIdToString(tUnitId)
end
if (result == ACTION_RESULT_BEGIN) then
-- General: Taking Aim
if (abilityId == buffsDebuffs.general_taking_aim) then
if (settings.general_taking_aim) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_GENERAL_TAKING_AIM), "dragonstar", "general_taking_aim")
end
end
-- General: Crystal Blast
elseif (abilityId == buffsDebuffs.general_crystal_blast) then
if (settings.general_crystal_blast) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_GENERAL_CRYSTAL_BLAST), "dragonstar", "general_crystal_blast")
end
end
-- Arena 2: Crushing Shock
elseif (abilityId == buffsDebuffs.arena2_crushing_shock) then
if (settings.arena2_crushing_shock) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA2_CRUSHING_SHOCK), "dragonstar", "arena2_crushing_shock")
end
end
-- Arena 6: Drain Resource
elseif (abilityId == buffsDebuffs.arena6_drain_resource) then
if (settings.arena6_drain_resource >= 1) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA6_DRAIN_RESOURCE), "dragonstar", "arena6_drain_resource")
elseif (tName ~= "" and settings.arena6_drain_resource >= 2) then
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA6_DRAIN_RESOURCE_OTHER), tName), "dragonstar", "arena6_drain_resource")
end
end
-- Arena 8: Ice Charge
elseif (abilityId == buffsDebuffs.arena8_ice_charge) then
if (settings.arena8_ice_charge >= 1) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA8_ICE_CHARGE), "dragonstar", "arena8_ice_charge")
elseif (tName ~= "" and settings.arena8_ice_charge >= 2) then
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA8_ICE_CHARGE_OTHER), tName), "dragonstar", "arena8_ice_charge")
end
end
-- Arena 8: Fire Charge
elseif (abilityId == buffsDebuffs.arena8_fire_charge) then
if (settings.arena8_fire_charge >= 1) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA8_FIRE_CHARGE), "dragonstar", "arena8_fire_charge")
elseif (tName ~= "" and settings.arena8_fire_charge >= 2) then
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA8_FIRE_CHARGE_OTHER), tName), "dragonstar", "arena8_fire_charge")
end
end
end
elseif (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
-- Arena 7: Unstable Core (Eclipse)
if (abilityId == buffsDebuffs.arena7_unstable_core) then
if (settings.arena7_unstable_core) then
if (tType == COMBAT_UNIT_TYPE_PLAYER) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_DRAGONSTAR_ARENA7_UNSTABLE_CORE), "dragonstar", "arena7_unstable_core")
end
end
end
end
end