File daybreak.lua changed (mode: 100644) (index 607ec96..5def135) |
... |
... |
local function getDefaultButtonSize() |
20 |
20 |
end |
end |
21 |
21 |
|
|
22 |
22 |
local function formatQuantity(n) |
local function formatQuantity(n) |
|
23 |
|
n = n or 0 |
23 |
24 |
local absn = math.abs(n) |
local absn = math.abs(n) |
24 |
25 |
if absn < 1000 then |
if absn < 1000 then |
25 |
26 |
return tostring(n) |
return tostring(n) |
|
... |
... |
local function formatQuantity(n) |
33 |
34 |
end |
end |
34 |
35 |
|
|
35 |
36 |
local function formatTime(n) |
local function formatTime(n) |
|
37 |
|
n = n or 0 |
36 |
38 |
local absn = math.abs(n) |
local absn = math.abs(n) |
37 |
39 |
if absn < 60 then |
if absn < 60 then |
38 |
40 |
return tostring(n) |
return tostring(n) |
|
... |
... |
local function acceptOverlayUnitAura(button, eventCategory) |
305 |
307 |
end |
end |
306 |
308 |
end |
end |
307 |
309 |
|
|
|
310 |
|
local function stripchars(str, chrs) |
|
311 |
|
local s = str:gsub("["..chrs:gsub("%W","%%%1").."]", '') |
|
312 |
|
return s |
|
313 |
|
end |
|
314 |
|
|
|
315 |
|
local function produceButtonName(parentName, localizedSpellName, unit, filter) |
|
316 |
|
assert (parentName ~= nil) |
|
317 |
|
assert ('string' == type(parentName)) |
|
318 |
|
|
|
319 |
|
assert (localizedSpellName ~= nil) |
|
320 |
|
assert ('string' == type(localizedSpellName)) |
|
321 |
|
|
|
322 |
|
if not unit then |
|
323 |
|
unit = '' |
|
324 |
|
end |
|
325 |
|
assert (unit ~= nil) |
|
326 |
|
assert ('string' == type(unit)) |
|
327 |
|
|
|
328 |
|
if not filter then |
|
329 |
|
filter = '' |
|
330 |
|
end |
|
331 |
|
assert (filter ~= nil) |
|
332 |
|
assert ('string' == type(filter)) |
|
333 |
|
|
|
334 |
|
return stripchars(parentName .. localizedSpellName .. unit .. filter, |
|
335 |
|
"!@#$%^&*()[]{}_-+='\";:\\/?.,<>| ") |
|
336 |
|
end |
|
337 |
|
|
308 |
338 |
--[[-- |
--[[-- |
309 |
339 |
Allocate button frame that represents a single aura |
Allocate button frame that represents a single aura |
310 |
340 |
New button has two custom fields: unit and spell. |
New button has two custom fields: unit and spell. |
|
... |
... |
code line sorting. |
315 |
345 |
@tparam number column horizontal position |
@tparam number column horizontal position |
316 |
346 |
@tparam number row vertical position |
@tparam number row vertical position |
317 |
347 |
@tparam string localizedSpellName aura name to track |
@tparam string localizedSpellName aura name to track |
318 |
|
@tparam string buttonName |
|
319 |
348 |
@tparam frame parentFrame |
@tparam frame parentFrame |
320 |
349 |
@tparam string filter optional filter keywords forwarded to UnitAura function |
@tparam string filter optional filter keywords forwarded to UnitAura function |
321 |
350 |
@tparam number archetypeDesignation either 1 track duration or 2 track absorption amount |
@tparam number archetypeDesignation either 1 track duration or 2 track absorption amount |
322 |
351 |
@tparam number size optional button artwork size pixels |
@tparam number size optional button artwork size pixels |
323 |
352 |
@tparam number size optional button artwork padding pixels |
@tparam number size optional button artwork padding pixels |
|
353 |
|
@tparam string unit optional unit designation |
324 |
354 |
@treturn frame newly allocated button frame instance |
@treturn frame newly allocated button frame instance |
325 |
355 |
]] |
]] |
326 |
|
local function createButton(column, row, localizedSpellName, buttonName, parentFrame, |
|
327 |
|
filter, archetypeDesignation, size, padding) |
|
328 |
|
assert (buttonName ~= nil) |
|
329 |
|
assert ('string' == type(buttonName)) |
|
330 |
|
assert (string.len(buttonName) >= 2) |
|
331 |
|
assert (string.len(buttonName) <= 256) |
|
332 |
|
|
|
|
356 |
|
local function createButton(column, row, localizedSpellName, parentFrame, archetypeDesignation, |
|
357 |
|
unit, filter, size, padding) |
333 |
358 |
assert (parentFrame ~= nil) |
assert (parentFrame ~= nil) |
334 |
359 |
|
|
335 |
360 |
assert (localizedSpellName ~= nil) |
assert (localizedSpellName ~= nil) |
|
... |
... |
local function createButton(column, row, localizedSpellName, buttonName, parentF |
337 |
362 |
assert (string.len(localizedSpellName) >= 2) |
assert (string.len(localizedSpellName) >= 2) |
338 |
363 |
assert (string.len(localizedSpellName) <= 256) |
assert (string.len(localizedSpellName) <= 256) |
339 |
364 |
|
|
|
365 |
|
unit = unit or 'player' |
|
366 |
|
assert ('string' == type(unit)) |
|
367 |
|
assert (string.len(unit) >= 2) |
|
368 |
|
assert (string.len(unit) <= 256) |
|
369 |
|
|
|
370 |
|
filter = filter or 'HELPFUL' |
|
371 |
|
assert ('string' == type(filter)) |
|
372 |
|
assert (string.len(filter) >= 2) |
|
373 |
|
assert (string.len(filter) <= 256) |
|
374 |
|
|
|
375 |
|
local buttonName = produceButtonName(parentFrame:GetName() or 'DaybreakOverlay', |
|
376 |
|
localizedSpellName, unit, filter) |
|
377 |
|
print('[Daybreak]: Create "' .. buttonName .. '".') |
|
378 |
|
assert (buttonName ~= nil) |
|
379 |
|
assert ('string' == type(buttonName)) |
|
380 |
|
assert (string.len(buttonName) >= 2) |
|
381 |
|
assert (string.len(buttonName) <= 256) |
|
382 |
|
|
340 |
383 |
if not archetypeDesignation then |
if not archetypeDesignation then |
341 |
384 |
archetypeDesignation = getArchetypeDesignationDuration() |
archetypeDesignation = getArchetypeDesignationDuration() |
342 |
385 |
end |
end |
|
... |
... |
local function createButton(column, row, localizedSpellName, buttonName, parentF |
354 |
397 |
|
|
355 |
398 |
local text = button:CreateFontString(button:GetName() .. 'Text', 'OVERLAY') |
local text = button:CreateFontString(button:GetName() .. 'Text', 'OVERLAY') |
356 |
399 |
local fontHandle = DaybreakFont or NumberFont_Outline_Large |
local fontHandle = DaybreakFont or NumberFont_Outline_Large |
|
400 |
|
assert (fontHandle ~= nil) |
357 |
401 |
text:SetFontObject(fontHandle) |
text:SetFontObject(fontHandle) |
|
402 |
|
|
358 |
403 |
text:SetPoint('TOPRIGHT', button, 'TOPRIGHT', 16, 16) |
text:SetPoint('TOPRIGHT', button, 'TOPRIGHT', 16, 16) |
359 |
404 |
text:SetPoint('BOTTOMLEfT', button, 'BOTTOMLEFT', -16, -16) |
text:SetPoint('BOTTOMLEfT', button, 'BOTTOMLEFT', -16, -16) |
360 |
405 |
|
|
|
... |
... |
local function createButton(column, row, localizedSpellName, buttonName, parentF |
362 |
407 |
button:SetText(nil) |
button:SetText(nil) |
363 |
408 |
|
|
364 |
409 |
button.spell = localizedSpellName |
button.spell = localizedSpellName |
365 |
|
button.unit = 'player' |
|
366 |
|
button.filter = filter or 'HELPFUL' |
|
|
410 |
|
button.unit = unit |
|
411 |
|
button.filter = filter |
|
412 |
|
|
367 |
413 |
button.archetypeDesignation = archetypeDesignation or 1 |
button.archetypeDesignation = archetypeDesignation or 1 |
368 |
414 |
|
|
369 |
415 |
button:RegisterEvent('UNIT_AURA') |
button:RegisterEvent('UNIT_AURA') |
|
416 |
|
--[[ Make sure that indicators are properly updated for all units ]]-- |
|
417 |
|
button:RegisterEvent('PLAYER_TARGET_CHANGED') |
370 |
418 |
button:SetScript('OnEvent', acceptOverlayUnitAura) |
button:SetScript('OnEvent', acceptOverlayUnitAura) |
371 |
419 |
|
|
372 |
420 |
button:Hide() |
button:Hide() |
|
... |
... |
local function cycloneEventProcessor(self, eventCategory) |
815 |
863 |
acceptOverlayUnitAura(self, eventCategory) |
acceptOverlayUnitAura(self, eventCategory) |
816 |
864 |
end |
end |
817 |
865 |
|
|
818 |
|
local function createCycloneButton(column, row, buttonDesignation, parentFrame, auraTable) |
|
|
866 |
|
local function createCycloneButton(column, row, parentFrame, |
|
867 |
|
unit, filter, size, padding, auraTable) |
819 |
868 |
assert (auraTable ~= nil) |
assert (auraTable ~= nil) |
820 |
869 |
assert ('table' == type(auraTable)) |
assert ('table' == type(auraTable)) |
821 |
870 |
|
|
822 |
|
local size = 40 |
|
823 |
|
local padding = 8 |
|
824 |
|
local b = createButton(column, row, 'Cyclone', buttonDesignation, parentFrame, |
|
825 |
|
'HARMFUL', 3, size, padding) |
|
|
871 |
|
if not size then |
|
872 |
|
size = 40 |
|
873 |
|
end |
|
874 |
|
assert (size ~= nil) |
|
875 |
|
assert ('number' == type(size)) |
|
876 |
|
|
|
877 |
|
if not padding then |
|
878 |
|
padding = 8 |
|
879 |
|
end |
|
880 |
|
assert (padding ~= nil) |
|
881 |
|
assert ('number' == type(padding)) |
|
882 |
|
|
|
883 |
|
if not filter then |
|
884 |
|
filter = 'HARMFUL' |
|
885 |
|
end |
|
886 |
|
assert (filter ~= nil) |
|
887 |
|
assert ('string' == type(filter)) |
|
888 |
|
|
|
889 |
|
local b = createButton(column, row, 'Cyclone', parentFrame, 3, |
|
890 |
|
unit, filter, size, padding) |
826 |
891 |
|
|
827 |
|
b.unit = 'player' |
|
828 |
892 |
b.auraTable = auraTable |
b.auraTable = auraTable |
829 |
893 |
|
|
830 |
894 |
b:SetScript('OnEvent', cycloneEventProcessor) |
b:SetScript('OnEvent', cycloneEventProcessor) |
|
... |
... |
Initialize character lose control indicators. |
840 |
904 |
@treturn frame newly allocated frame |
@treturn frame newly allocated frame |
841 |
905 |
]] |
]] |
842 |
906 |
local function initCyclone(rootFrame) |
local function initCyclone(rootFrame) |
843 |
|
local p = CreateFrame('FRAME', 'DaybreakCycloneFrame', rootFrame) |
|
|
907 |
|
local p = CreateFrame('FRAME', 'DaybreakOverlayCyclone', rootFrame) |
844 |
908 |
local size = 40 |
local size = 40 |
845 |
909 |
local padding = 8 |
local padding = 8 |
846 |
910 |
local paddedSize = size + padding |
local paddedSize = size + padding |
847 |
911 |
p:SetSize(paddedSize, paddedSize * 4) |
p:SetSize(paddedSize, paddedSize * 4) |
848 |
912 |
p:SetPoint('CENTER', 0, 0) |
p:SetPoint('CENTER', 0, 0) |
849 |
913 |
|
|
850 |
|
createCycloneButton(0, 3, 'DaybreakCycloneFrame4', p, { |
|
|
914 |
|
createCycloneButton(0, 3, p, 'player', 'HARMFUL', size, padding, { |
851 |
915 |
--[[ Magic ]]-- |
--[[ Magic ]]-- |
852 |
916 |
--[[ Disorient ]]-- |
--[[ Disorient ]]-- |
853 |
917 |
'Death Coil', |
'Death Coil', |
|
... |
... |
local function initCyclone(rootFrame) |
856 |
920 |
'Feezing Trap', |
'Feezing Trap', |
857 |
921 |
'Howl of Terror', |
'Howl of Terror', |
858 |
922 |
'Psychic Scream', |
'Psychic Scream', |
|
923 |
|
'Psychic Horror', |
859 |
924 |
'Polymorph', |
'Polymorph', |
860 |
925 |
--[[ Stun ]]-- |
--[[ Stun ]]-- |
861 |
926 |
'Deep Freeze', |
'Deep Freeze', |
862 |
927 |
'Hammer of Justice', |
'Hammer of Justice', |
863 |
928 |
'Ring of Frost', |
'Ring of Frost', |
864 |
|
'Fire Blast', |
|
|
929 |
|
'Impact', |
865 |
930 |
'Intimidation', |
'Intimidation', |
|
931 |
|
'Stun', |
|
932 |
|
'Stunned', |
866 |
933 |
--[[ Poison ]]-- |
--[[ Poison ]]-- |
867 |
934 |
'Wyvern Sting', |
'Wyvern Sting', |
868 |
935 |
--[[ Physical ]]-- |
--[[ Physical ]]-- |
|
... |
... |
local function initCyclone(rootFrame) |
889 |
956 |
'Throwdown', |
'Throwdown', |
890 |
957 |
'Bash', |
'Bash', |
891 |
958 |
'Pounce', |
'Pounce', |
892 |
|
'Maim', |
|
893 |
959 |
'Cyclone', |
'Cyclone', |
894 |
960 |
}) |
}) |
895 |
961 |
|
|
896 |
|
createCycloneButton(0, 2, 'DaybreakCycloneFrame3', p, { |
|
|
962 |
|
createCycloneButton(0, 2, p, 'player', 'HARMFUL', size, padding, { |
897 |
963 |
--[[ Magic removable ]]-- |
--[[ Magic removable ]]-- |
898 |
|
'Counterspell', |
|
|
964 |
|
'Silenced - Improved Counterspell', |
899 |
965 |
'Silence', |
'Silence', |
900 |
966 |
'Unstable Affliction - Silence', |
'Unstable Affliction - Silence', |
901 |
967 |
'Spell Lock', |
'Spell Lock', |
|
... |
... |
local function initCyclone(rootFrame) |
910 |
976 |
'Unstable Affliction', |
'Unstable Affliction', |
911 |
977 |
}) |
}) |
912 |
978 |
|
|
913 |
|
createCycloneButton(0, 1, 'DaybreakCycloneFrame2', p, { |
|
|
979 |
|
createCycloneButton(0, 1, p, 'player', 'HARMFUL', size, padding, { |
914 |
980 |
--[[ Removable unit magic root ]]-- |
--[[ Removable unit magic root ]]-- |
915 |
981 |
'Frost Nova', |
'Frost Nova', |
916 |
982 |
'Entangling Roots', |
'Entangling Roots', |
|
... |
... |
local function initCyclone(rootFrame) |
921 |
987 |
'Cone of Cold', |
'Cone of Cold', |
922 |
988 |
'Earthbind Totem', |
'Earthbind Totem', |
923 |
989 |
'Thunderstrom', |
'Thunderstrom', |
|
990 |
|
'Dazed - Avenger\'s Shield', |
924 |
991 |
--[[ Removable unit poison slow ]]-- |
--[[ Removable unit poison slow ]]-- |
925 |
992 |
'Crippling Poison', |
'Crippling Poison', |
926 |
993 |
'Infected Wounds', |
'Infected Wounds', |
|
... |
... |
local function initCyclone(rootFrame) |
938 |
1005 |
'Seal of Justice', |
'Seal of Justice', |
939 |
1006 |
}) |
}) |
940 |
1007 |
|
|
941 |
|
createCycloneButton(0, 0, 'DaybreakCycloneFrame1', p, { |
|
|
1008 |
|
createCycloneButton(0, 0, p, 'player', 'HARMFUL', size, padding, { |
942 |
1009 |
'Wound Poison', |
'Wound Poison', |
943 |
1010 |
'Necrotic Strike', |
'Necrotic Strike', |
944 |
1011 |
'Mortal Strike', |
'Mortal Strike', |
945 |
1012 |
'Aimed Shot', |
'Aimed Shot', |
|
1013 |
|
'Mind-numbing Poison', |
946 |
1014 |
'Curse of Tongues', |
'Curse of Tongues', |
947 |
1015 |
'Colossus Smash', |
'Colossus Smash', |
948 |
1016 |
'Skull Bash', |
'Skull Bash', |
|
... |
... |
local function initCyclone(rootFrame) |
951 |
1019 |
return p |
return p |
952 |
1020 |
end |
end |
953 |
1021 |
|
|
|
1022 |
|
--[[-- |
|
1023 |
|
Target aura overlay. |
|
1024 |
|
@section target |
|
1025 |
|
]] |
|
1026 |
|
|
|
1027 |
|
local function initTargetOverlay(rootFrame) |
|
1028 |
|
local size = 28 |
|
1029 |
|
local padding = 4 |
|
1030 |
|
local paddedSize = size + padding |
|
1031 |
|
local p = CreateFrame('FRAME', 'DaybreakOverlayTargetFrame', rootFrame) |
|
1032 |
|
p:SetSize(paddedSize * 2, paddedSize) |
|
1033 |
|
p:SetPoint('CENTER', 0, 256) |
|
1034 |
|
|
|
1035 |
|
createCycloneButton(0, 0, p, 'target', 'HARMFUL', size, padding, |
|
1036 |
|
{ |
|
1037 |
|
'Turn Evil', |
|
1038 |
|
'Shackle Undead', |
|
1039 |
|
'Strangulate', |
|
1040 |
|
'Spell Lock', |
|
1041 |
|
'Counterspell - Silence', |
|
1042 |
|
'Silencing Shot', |
|
1043 |
|
'Hammer of Justice', |
|
1044 |
|
'Fear', |
|
1045 |
|
'Howl of Terror', |
|
1046 |
|
'Polymorph', |
|
1047 |
|
'Cyclone', |
|
1048 |
|
'Throwdown', |
|
1049 |
|
'Concussion Blow', |
|
1050 |
|
'Sap', |
|
1051 |
|
'Blind', |
|
1052 |
|
'Gouge', |
|
1053 |
|
}) |
|
1054 |
|
createCycloneButton(1, 0, p, 'target', 'HELPFUL', size, padding, |
|
1055 |
|
{ |
|
1056 |
|
'Divine Shield', |
|
1057 |
|
'Ice Block', |
|
1058 |
|
'Spell Reflection', |
|
1059 |
|
'Tremor Totem Effect', |
|
1060 |
|
'Grounding Totem Effect', |
|
1061 |
|
'Anti-Magic Shell', |
|
1062 |
|
'Aura Mastery', |
|
1063 |
|
'Guardian of Ancient Kings', |
|
1064 |
|
'Shield Wall', |
|
1065 |
|
'Icebound Fortitude', |
|
1066 |
|
'Deterrence', |
|
1067 |
|
'Lichborne', |
|
1068 |
|
'Enraged Regeneration', |
|
1069 |
|
'Shield Block', |
|
1070 |
|
}) |
|
1071 |
|
end |
|
1072 |
|
|
954 |
1073 |
--[[-- |
--[[-- |
955 |
1074 |
Beacon of light. |
Beacon of light. |
956 |
1075 |
Add dedicated Beacon of Light indicator. |
Add dedicated Beacon of Light indicator. |
|
... |
... |
Initialize player Beacon of Light buff indicator. |
1038 |
1157 |
@treturn frame new frame that tracks the specific player buff |
@treturn frame new frame that tracks the specific player buff |
1039 |
1158 |
--]] |
--]] |
1040 |
1159 |
local function initBeacon(rootFrame) |
local function initBeacon(rootFrame) |
1041 |
|
local beacon = createButton(11, 4, 'Beacon of Light', 'DaybreakOverlayPaladinBeaconOfLight', rootFrame) |
|
|
1160 |
|
local beacon = createButton(11, 4, 'Beacon of Light', rootFrame, 4) |
1042 |
1161 |
beacon:SetNormalTexture("Interface\\Icons\\Ability_Paladin_BeaconOfLight") |
beacon:SetNormalTexture("Interface\\Icons\\Ability_Paladin_BeaconOfLight") |
1043 |
1162 |
|
|
1044 |
1163 |
beacon:UnregisterAllEvents() |
beacon:UnregisterAllEvents() |
|
... |
... |
Create an indicator for Blessed Life effect for the player character. |
1150 |
1269 |
local function initBlessedLife(rootFrame) |
local function initBlessedLife(rootFrame) |
1151 |
1270 |
assert (rootFrame ~= nil) |
assert (rootFrame ~= nil) |
1152 |
1271 |
|
|
1153 |
|
local blessedLife = createButton(2, 0, 'Blessed Life', 'DaybreakOverlayPaladinBlessedLife', rootFrame) |
|
|
1272 |
|
local blessedLife = createButton(2, 0, 'Blessed Life', rootFrame, 5) |
1154 |
1273 |
blessedLife:SetNormalTexture("Interface\\Icons\\Spell_holy_blessedlife") |
blessedLife:SetNormalTexture("Interface\\Icons\\Spell_holy_blessedlife") |
1155 |
1274 |
|
|
1156 |
1275 |
blessedLife:UnregisterAllEvents() |
blessedLife:UnregisterAllEvents() |
|
... |
... |
local function initSerendipity(rootFrame) |
1188 |
1307 |
end |
end |
1189 |
1308 |
|
|
1190 |
1309 |
--[[ Priest ]]-- |
--[[ Priest ]]-- |
1191 |
|
createButton(0, 0, 'Chakra: Chastise', 'DaybreakOverlayPriestChakraChastise', rootFrame) |
|
1192 |
|
createButton(0, 0, 'Chakra: Sanctuary', 'DaybreakOverlayPriestChakraSanctuary', rootFrame) |
|
1193 |
|
createButton(0, 0, 'Chakra: Serenity', 'DaybreakOverlayPriestChakraSerenity', rootFrame) |
|
1194 |
|
createButton(0, 1, 'Chakra', 'DaybreakOverlayPriestChakra', rootFrame) |
|
1195 |
|
createButton(0, 1, 'Blessed Resilience', 'DaybreakOverlayPriestBlessedResilience', rootFrame) |
|
|
1310 |
|
createButton(0, 0, 'Chakra: Chastise', rootFrame) |
|
1311 |
|
createButton(0, 0, 'Chakra: Sanctuary', rootFrame) |
|
1312 |
|
createButton(0, 0, 'Chakra: Serenity', rootFrame) |
|
1313 |
|
createButton(0, 1, 'Chakra', rootFrame) |
|
1314 |
|
createButton(0, 1, 'Blessed Resilience', rootFrame) |
1196 |
1315 |
--[[ Holy ]]-- |
--[[ Holy ]]-- |
1197 |
|
createButton(1, 0, 'Holy Word: Serenity', 'DaybreaksOverlayPriestHolyWordSerenity', rootFrame) |
|
1198 |
|
createButton(1, 1, 'Surge of Light', 'DaybreakOverlayPriestSurgeOfLight', rootFrame) |
|
1199 |
|
createButton(1, 2, 'Serendipity', 'DaybreakOverlayPriestSerendipity', rootFrame) |
|
1200 |
|
createButton(1, 3, 'Guardian Spirit', 'DaybreakOverlayPriestGuardianSpirit', rootFrame) |
|
1201 |
|
createButton(1, 3, 'Spirit of Redemption', 'DaybreakOverlayPriestSpiritOfRedemption', rootFrame) |
|
|
1316 |
|
createButton(1, 0, 'Holy Word: Serenity', rootFrame) |
|
1317 |
|
createButton(1, 1, 'Surge of Light', rootFrame) |
|
1318 |
|
createButton(1, 2, 'Serendipity', rootFrame) |
|
1319 |
|
createButton(1, 3, 'Guardian Spirit', rootFrame) |
|
1320 |
|
createButton(1, 3, 'Spirit of Redemption', rootFrame) |
1202 |
1321 |
|
|
1203 |
1322 |
--[[ Priest general ]]-- |
--[[ Priest general ]]-- |
1204 |
|
createButton(9, 0, 'Inspiration', 'DaybreakOverlayPriestInspiration', rootFrame) |
|
1205 |
|
createButton(9, 1, 'Renew', 'DaybreakOverlayPriestRenew', rootFrame) |
|
|
1323 |
|
createButton(9, 0, 'Inspiration', rootFrame) |
|
1324 |
|
createButton(9, 1, 'Renew', rootFrame) |
1206 |
1325 |
local arch = getArchetypeDesignationAbsorption() |
local arch = getArchetypeDesignationAbsorption() |
1207 |
|
createButton(9, 2, 'Power Word: Shield', 'DaybreakOverlayPriestPowerWordShield', rootFrame, 'HELPFUL', arch) |
|
1208 |
|
createButton(9, 3, 'Fear Ward', 'DaybreakOverlayPriestFearWard', rootFrame) |
|
1209 |
|
createButton(10, 2, 'Body and Soul', 'DaybreakOverlayPriestBodyAndSoul', rootFrame) |
|
|
1326 |
|
createButton(9, 2, 'Power Word: Shield', rootFrame, arch, 'player', 'HELPFUL') |
|
1327 |
|
createButton(9, 3, 'Fear Ward', rootFrame) |
|
1328 |
|
createButton(10, 2, 'Body and Soul', rootFrame) |
1210 |
1329 |
|
|
1211 |
1330 |
--[[ Hide native spell proc indicators that flash in the middle of the screen ]]-- |
--[[ Hide native spell proc indicators that flash in the middle of the screen ]]-- |
1212 |
1331 |
SetCVar("displaySpellActivationOverlays", false) |
SetCVar("displaySpellActivationOverlays", false) |
|
... |
... |
local function initDaybreak(rootFrame) |
1236 |
1355 |
|
|
1237 |
1356 |
--[[ Paladin ]]-- |
--[[ Paladin ]]-- |
1238 |
1357 |
--[[ General ]]-- |
--[[ General ]]-- |
1239 |
|
createButton(0, 0, 'Crusader', 'DaybreakOverlayPaladinCrusader', rootFrame) |
|
1240 |
|
createButton(0, 1, 'Divine Plea', 'DaybreakOverlayPaladinDivinePlea', rootFrame) |
|
1241 |
|
createButton(0, 2, 'Divine Protection', 'DaybreakOverlayPaladinDivineProtection', rootFrame) |
|
1242 |
|
createButton(0, 2, 'Divine Shield', 'DaybreakOverlayPaladinDivineShield', rootFrame) |
|
1243 |
|
createButton(0, 3, 'Avenging Wrath', 'DaybreakOverlayPaladinAvengingWrath', rootFrame) |
|
1244 |
|
createButton(0, 4, 'Guardian of Ancient Kings', 'DaybreakOverlayPaladinGuardianOfTheAncientKings', rootFrame) |
|
1245 |
|
|
|
1246 |
|
createButton(11, 0, 'Concentration Aura', 'DaybreakOverlayPaladinConcentrationAura', rootFrame, 'PLAYER HELPFUL') |
|
1247 |
|
createButton(11, 0, 'Crusader Aura', 'DaybreakOverlayPaladinCrusaderAura', rootFrame, 'PLAYER HELPFUL') |
|
1248 |
|
createButton(11, 0, 'Devotion Aura', 'DaybreakOverlayPaladinDevotionAura', rootFrame, 'PLAYER HELPFUL') |
|
1249 |
|
createButton(11, 0, 'Resistance Aura', 'DaybreakOverlayPaladinResistanceAura', rootFrame, 'PLAYER HELPFUL') |
|
1250 |
|
createButton(11, 0, 'Retribution Aura', 'DaybreakOverlayPaladinRetributionAura', rootFrame, 'PLAYER HELPFUL') |
|
|
1358 |
|
createButton(0, 0, 'Crusader', rootFrame) |
|
1359 |
|
createButton(0, 1, 'Divine Plea', rootFrame) |
|
1360 |
|
createButton(0, 2, 'Divine Protection', rootFrame) |
|
1361 |
|
createButton(0, 2, 'Divine Shield', rootFrame) |
|
1362 |
|
createButton(0, 3, 'Avenging Wrath', rootFrame) |
|
1363 |
|
createButton(0, 4, 'Guardian of Ancient Kings', rootFrame) |
|
1364 |
|
|
|
1365 |
|
local ar = getArchetypeDesignationDuration() |
|
1366 |
|
createButton(11, 0, 'Concentration Aura', rootFrame, ar, 'player', 'PLAYER HELPFUL') |
|
1367 |
|
createButton(11, 0, 'Crusader Aura', rootFrame, ar, 'player', 'PLAYER HELPFUL') |
|
1368 |
|
createButton(11, 0, 'Devotion Aura', rootFrame, ar, 'player', 'PLAYER HELPFUL') |
|
1369 |
|
createButton(11, 0, 'Resistance Aura', rootFrame, ar, 'player', 'PLAYER HELPFUL') |
|
1370 |
|
createButton(11, 0, 'Retribution Aura', rootFrame, ar, 'player', 'PLAYER HELPFUL') |
1251 |
1371 |
|
|
1252 |
1372 |
local auraFrame = CreateFrame('FRAME', 'DaybreakAuraHeader', rootFrame) |
local auraFrame = CreateFrame('FRAME', 'DaybreakAuraHeader', rootFrame) |
1253 |
1373 |
auraFrame:SetSize(16*5, 16*5) |
auraFrame:SetSize(16*5, 16*5) |
1254 |
1374 |
auraFrame:SetPoint('BOTTOMLEFT', 128 + 64, 0) |
auraFrame:SetPoint('BOTTOMLEFT', 128 + 64, 0) |
1255 |
|
local ar = getArchetypeDesignationDuration() |
|
1256 |
|
createButton(12, 0, 'Concentration Aura', 'DaybreakOverlayPaladinConcentrationAura2', auraFrame, 'HELPFUL', ar, 14, 2) |
|
1257 |
|
createButton(13, 0, 'Crusader Aura', 'DaybreakOverlayPaladinCrusaderAura2', auraFrame, 'HELPFUL', ar, 14, 2) |
|
1258 |
|
createButton(14, 0, 'Devotion Aura', 'DaybreakOverlayPaladinDevotionAura2', auraFrame, 'HELPFUL', ar, 14, 2) |
|
1259 |
|
createButton(12, 1, 'Resistance Aura', 'DaybreakOverlayPaladinResistanceAura2', auraFrame, 'HELPFUL', ar, 14, 2) |
|
1260 |
|
createButton(13, 1, 'Retribution Aura', 'DaybreakOverlayPaladinRetributionAura2', auraFrame, 'HELPFUL', ar, 14, 2) |
|
1261 |
|
|
|
1262 |
|
createButton(11, 1, 'Seal of Insight', 'DaybreakOverlayPaladinSealOfInsight', rootFrame, 'PLAYER HELPFUL') |
|
1263 |
|
createButton(11, 1, 'Seal of Justice', 'DaybreakOverlayPaladinSealOfJustice', rootFrame, 'PLAYER HELPFUL') |
|
1264 |
|
createButton(11, 1, 'Seal of Righteousness', 'DaybreakOverlayPaladinSealOfRighteousness', rootFrame, 'PLAYER HELPFUL') |
|
1265 |
|
createButton(11, 1, 'Seal of Truth', 'DaybreakOverlayPaladinSealOfTruth', rootFrame, 'PLAYER HELPFUL') |
|
1266 |
|
|
|
1267 |
|
createButton(11, 2, 'Blessing of Kings', 'DaybreakOverlayPaladinBlessingOfKings', rootFrame, 'HELPFUL') |
|
1268 |
|
createButton(11, 2, 'Mark of the Wild', 'DaybreakOverlayPaladinMarkOfTheWild', rootFrame, 'HELPFUL') |
|
1269 |
|
createButton(11, 3, 'Blessing of Might', 'DaybreakOverlayPaladinBlessingOfMight', rootFrame, 'HELPFUL') |
|
|
1375 |
|
createButton(12, 0, 'Concentration Aura', auraFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1376 |
|
createButton(13, 0, 'Crusader Aura', auraFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1377 |
|
createButton(14, 0, 'Devotion Aura', auraFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1378 |
|
createButton(12, 1, 'Resistance Aura', auraFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1379 |
|
createButton(13, 1, 'Retribution Aura', auraFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1380 |
|
|
|
1381 |
|
local sealFrame = CreateFrame('FRAME', 'DaybreakOverlayPaladinSealFrame', rootFrame) |
|
1382 |
|
sealFrame:SetSize(16, 16) |
|
1383 |
|
sealFrame:SetPoint('BOTTOMLEFT', 16*22, 16*2) |
|
1384 |
|
createButton(0, 0, 'Seal of Insight', sealFrame, ar, 'player', 'PLAYER HELPFUL', 14, 2) |
|
1385 |
|
createButton(0, 0, 'Seal of Justice', sealFrame, ar, 'player', 'PLAYER HELPFUL', 14, 2) |
|
1386 |
|
createButton(0, 0, 'Seal of Righteousness', sealFrame, ar, 'player', 'PLAYER HELPFUL', 14, 2) |
|
1387 |
|
createButton(0, 0, 'Seal of Truth', sealFrame, ar, 'player', 'PLAYER HELPFUL', 14, 2) |
|
1388 |
|
|
|
1389 |
|
local blessingFrame = CreateFrame('FRAME', 'DaybreakOverlayPaladinBlessingFrame', rootFrame) |
|
1390 |
|
blessingFrame:SetSize(16, 16*2) |
|
1391 |
|
blessingFrame:SetPoint('BOTTOMLEFT', 16*23, 16*2) |
|
1392 |
|
createButton(0, 0, 'Blessing of Kings', blessingFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1393 |
|
createButton(0, 0, 'Mark of the Wild', blessingFrame, ar, 'player', 'HELPFUL', 14, 2) |
|
1394 |
|
createButton(0, 1, 'Blessing of Might', blessingFrame, ar, 'player', 'HELPFUL', 14, 2) |
1270 |
1395 |
|
|
1271 |
1396 |
--[[ Effects that may be applied by other players place on the right side ]]-- |
--[[ Effects that may be applied by other players place on the right side ]]-- |
1272 |
|
createButton(9, 0, 'Hand of Freedom', 'DaybreakOverlayPaladinHandOfFreedom', rootFrame) |
|
1273 |
|
createButton(9, 1, 'Hand of Sacrifice', 'DaybreakOverlayPaladinHandOfSacrifice', rootFrame) |
|
1274 |
|
createButton(9, 2, 'Hand of Protection', 'DaybreakOverlayPaladinHandOfProtection', rootFrame) |
|
1275 |
|
createButton(9, 3, 'Divine Sacrifice', 'DaybreakOverlayPaladinDivineSacrifice', rootFrame) |
|
1276 |
|
createButton(9, 4, 'Aura Mastery', 'DaybreakOverlayPaladinAuraMastery', rootFrame) |
|
|
1397 |
|
createButton(9, 0, 'Hand of Freedom', rootFrame) |
|
1398 |
|
createButton(9, 1, 'Hand of Sacrifice', rootFrame) |
|
1399 |
|
createButton(9, 2, 'Hand of Protection', rootFrame) |
|
1400 |
|
createButton(9, 3, 'Divine Sacrifice', rootFrame) |
|
1401 |
|
createButton(9, 4, 'Aura Mastery', rootFrame) |
1277 |
1402 |
local arch = getArchetypeDesignationAbsorption() |
local arch = getArchetypeDesignationAbsorption() |
1278 |
|
createButton(10, 0, 'Illuminated Healing', 'DaybreakOverlayPaladinIlluminatedHealing', rootFrame, 'HELPFUL', arch) |
|
1279 |
|
createButton(10, 1, 'Conviction', 'DaybreakOverlayPaladinConviction', rootFrame) |
|
1280 |
|
createButton(10, 2, 'Power Torrent', 'DaybreakOverlayPaladinPowerTorrent', rootFrame) |
|
1281 |
|
createButton(10, 3, 'Surge of Dominance', 'DaybreakOverlayPaladinSurgeOfDominance', rootFrame) |
|
|
1403 |
|
createButton(10, 0, 'Illuminated Healing', rootFrame, arch, 'player', 'HELPFUL') |
|
1404 |
|
createButton(10, 1, 'Conviction', rootFrame) |
|
1405 |
|
createButton(10, 2, 'Power Torrent', rootFrame) |
|
1406 |
|
createButton(10, 3, 'Surge of Dominance', rootFrame) |
1282 |
1407 |
|
|
1283 |
1408 |
--[[ Holy ]]-- |
--[[ Holy ]]-- |
1284 |
|
createButton(1, 0, 'Judgements of the Pure', 'DaybreakOverlayPaladinJudgementsOfThePure', rootFrame) |
|
1285 |
|
createButton(1, 2, 'Daybreak', 'DaybreakOverlayPaladinDaybreak', rootFrame) |
|
1286 |
|
createButton(1, 3, 'Infusion of Light', 'DaybreakOverlayPaladinInfusionOfLight', rootFrame) |
|
1287 |
|
createButton(1, 4, 'Divine Favor', 'DaybreakOverlayPaladinDivineFavor', rootFrame) |
|
|
1409 |
|
createButton(1, 0, 'Judgements of the Pure', rootFrame) |
|
1410 |
|
createButton(1, 2, 'Daybreak', rootFrame) |
|
1411 |
|
createButton(1, 3, 'Infusion of Light', rootFrame) |
|
1412 |
|
createButton(1, 4, 'Divine Favor', rootFrame) |
1288 |
1413 |
|
|
1289 |
1414 |
--[[ Protection ]]-- |
--[[ Protection ]]-- |
1290 |
|
createButton(1, 0, 'Guarded by the Light', 'DaybreakOverlayPaladinGuardedByTheLight', rootFrame) |
|
1291 |
|
createButton(1, 1, 'Holy Shield', 'DaybreakOverlayPaladinHolyShield', rootFrame) |
|
1292 |
|
createButton(1, 2, 'Ardent Defender', 'DaybreakOverlayPaladinArdentDefender', rootFrame) |
|
1293 |
|
createButton(1, 3, 'Grand Crusader', 'DaybreakOverlayPaladinGrandCrusader', rootFrame) |
|
1294 |
|
createButton(1, 4, 'Sacred Duty', 'DaybreakOverlayPaladinSacredDuty', rootFrame) |
|
|
1415 |
|
createButton(1, 0, 'Guarded by the Light', rootFrame) |
|
1416 |
|
createButton(1, 1, 'Holy Shield', rootFrame) |
|
1417 |
|
createButton(1, 2, 'Ardent Defender', rootFrame) |
|
1418 |
|
createButton(1, 3, 'Grand Crusader', rootFrame) |
|
1419 |
|
createButton(1, 4, 'Sacred Duty', rootFrame) |
1295 |
1420 |
|
|
1296 |
1421 |
--[[ Retribution ]]-- |
--[[ Retribution ]]-- |
1297 |
|
createButton(10, 4, 'Inquisition', 'DaybreakOverlayPaladinInquisition', rootFrame) |
|
|
1422 |
|
createButton(10, 4, 'Inquisition', rootFrame) |
1298 |
1423 |
|
|
1299 |
1424 |
--[[ Hide native spell proc indicators that flash in the middle of the screen ]]-- |
--[[ Hide native spell proc indicators that flash in the middle of the screen ]]-- |
1300 |
1425 |
SetCVar("displaySpellActivationOverlays", false) |
SetCVar("displaySpellActivationOverlays", false) |
|
... |
... |
local function init(rootFrame) |
1321 |
1446 |
initPowerBar(rootFrame) |
initPowerBar(rootFrame) |
1322 |
1447 |
initRole(rootFrame) |
initRole(rootFrame) |
1323 |
1448 |
initSerendipity(rootFrame) |
initSerendipity(rootFrame) |
|
1449 |
|
initTargetOverlay(rootFrame) |
1324 |
1450 |
|
|
1325 |
1451 |
print('[Daybreak]: Addon loaded.') |
print('[Daybreak]: Addon loaded.') |
1326 |
1452 |
|
|