Mercurial > wow > hansgar_and_franzok_assist
comparison Hansgar_And_Franzok_Assist.lua @ 33:c0271922346e
- small fixes, frame strata is now on lower strata.
| author | Tercio |
|---|---|
| date | Mon, 14 Mar 2016 13:49:25 -0300 |
| parents | 8368036a4abf |
| children | cbcab210624f |
comparison
equal
deleted
inserted
replaced
| 32:8368036a4abf | 33:c0271922346e |
|---|---|
| 16 local db | 16 local db |
| 17 local _ | 17 local _ |
| 18 | 18 |
| 19 --local f = CreateFrame ("frame", "Hansgar_And_Franzok_Assist", UIParent) | 19 --local f = CreateFrame ("frame", "Hansgar_And_Franzok_Assist", UIParent) |
| 20 local f = DF:Create1PxPanel (_, 155, 166, "Hans & Franz Assist", "Hansgar_And_Franzok_Assist", nil, "top", true) | 20 local f = DF:Create1PxPanel (_, 155, 166, "Hans & Franz Assist", "Hansgar_And_Franzok_Assist", nil, "top", true) |
| 21 f:SetFrameStrata ("DIALOG") | 21 f:SetFrameStrata ("LOW") |
| 22 f.version = "v0.16e" | 22 f.version = "v0.17" |
| 23 | 23 |
| 24 f.Close:SetScript ("OnClick", function (self) | 24 f.Close:SetScript ("OnClick", function (self) |
| 25 if (f.StampersPhase) then | 25 if (f.StampersPhase) then |
| 26 return f:StopTracking() | 26 return f:StopTracking() |
| 27 end | 27 end |
| 56 f:SetMovable (true) | 56 f:SetMovable (true) |
| 57 f:EnableMouse (true) | 57 f:EnableMouse (true) |
| 58 f.all_blocks = {} | 58 f.all_blocks = {} |
| 59 f:Hide() | 59 f:Hide() |
| 60 | 60 |
| 61 --local title = f:CreateFontString (nil, "overlay", "GameFontNormal") | |
| 62 --title:SetText ("Hansgar & Franzok Assist") | |
| 63 --title:SetPoint ("center", f, "center") | |
| 64 --title:SetPoint ("bottom", f, "top", 0, 2) | |
| 65 | |
| 66 -- | 61 -- |
| 67 local frame_event = CreateFrame ("frame", "Hansgar_And_Franzok_AssistEvents", f) | 62 local frame_event = CreateFrame ("frame", "Hansgar_And_Franzok_AssistEvents", f) |
| 68 frame_event:RegisterEvent ("ENCOUNTER_START") | 63 frame_event:RegisterEvent ("ENCOUNTER_START") |
| 69 frame_event:RegisterEvent ("ENCOUNTER_END") | 64 frame_event:RegisterEvent ("ENCOUNTER_END") |
| 70 frame_event:RegisterEvent ("ADDON_LOADED") | 65 frame_event:RegisterEvent ("ADDON_LOADED") |
| 71 | 66 |
| 72 -- | 67 -- |
| 73 local player_bar = CreateFrame ("statusbar", "Hansgar_And_Franzok_PlayerAssistBar", UIParent) | 68 local player_bar = CreateFrame ("statusbar", "Hansgar_And_Franzok_PlayerAssistBar", UIParent) |
| 74 | |
| 75 --player_bar:SetPoint ("topleft", f, "bottomleft", 0, -3) | |
| 76 --player_bar:SetPoint ("topright", f, "bottomright", 0, -3) | |
| 77 | 69 |
| 78 player_bar:SetPoint ("center", UIParent, "center", 0, 300) | 70 player_bar:SetPoint ("center", UIParent, "center", 0, 300) |
| 79 player_bar:SetSize (280, 16) | 71 player_bar:SetSize (280, 16) |
| 80 | 72 |
| 81 player_bar:SetMovable (true) | 73 player_bar:SetMovable (true) |
| 317 frame_event:SetFrameStrata ("FULLSCREEN") | 309 frame_event:SetFrameStrata ("FULLSCREEN") |
| 318 | 310 |
| 319 frame_event:SetScript ("OnEvent", function (self, event, ...) | 311 frame_event:SetScript ("OnEvent", function (self, event, ...) |
| 320 | 312 |
| 321 if (event == "ADDON_LOADED" and select (1, ...) == "Hansgar_And_Franzok_Assist") then | 313 if (event == "ADDON_LOADED" and select (1, ...) == "Hansgar_And_Franzok_Assist") then |
| 322 --/dump Hansgar_And_Franzok_DB.STAMPERS_DELAY | 314 |
| 323 db = Hansgar_And_Franzok_DB | 315 db = Hansgar_And_Franzok_DB |
| 324 if (not db) then | 316 if (not db) then |
| 325 db = {} | 317 db = {} |
| 326 Hansgar_And_Franzok_DB = db | 318 Hansgar_And_Franzok_DB = db |
| 327 end | 319 end |
| 829 local text = stop_casting_frame:CreateFontString (nil, "overlay", "GameFontNormal") | 821 local text = stop_casting_frame:CreateFontString (nil, "overlay", "GameFontNormal") |
| 830 text:SetText ("STOP CASTING!") | 822 text:SetText ("STOP CASTING!") |
| 831 text:SetPoint ("center", stop_casting_frame, "center") | 823 text:SetPoint ("center", stop_casting_frame, "center") |
| 832 | 824 |
| 833 stop_casting_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16}) | 825 stop_casting_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16}) |
| 834 stop_casting_frame:SetBackdropColor (0, 0, 0, 0.3) | 826 stop_casting_frame:SetBackdropColor (0, 0, 0, 0.5) |
| 835 | 827 |
| 836 function f:HideStopSpellAlert2() | 828 function f:HideStopSpellAlert2() |
| 837 stop_casting_frame.alert.animOut:Stop() | 829 stop_casting_frame.alert.animOut:Stop() |
| 838 stop_casting_frame:Hide() | 830 stop_casting_frame:Hide() |
| 839 end | 831 end |
| 840 function f:HideStopSpellAlert() | 832 function f:HideStopSpellAlert() |
| 841 stop_casting_frame.alert.animIn:Stop() | 833 stop_casting_frame.alert.animIn:Stop() |
| 842 stop_casting_frame.alert.animOut:Play() | 834 stop_casting_frame.alert.animOut:Play() |
| 843 f:ScheduleTimer ("HideStopSpellAlert2", 0.3) | 835 f:ScheduleTimer ("HideStopSpellAlert2", 0.3) |
| 844 end | 836 end |
| 845 | |
| 846 --3/22 13:44:48.995 SPELL_INTERRUPT,Vehicle-0-3132-1205-24243-76974-00000EF077,"Franzok",0x10a48,0x0,Player-00-063,"Grubdruid",0x514,0x0,160838,"Disrupting Roar",0x1,5185,"Healing Touch",8 | |
| 847 | 837 |
| 848 f:SetScript ("OnEvent", function (self, event, time, token, _, who_serial, who_name, who_flags, _, target_serial, target_name, target_flags, _, spellid, spellname, spellschool, buff_type, buff_name) | 838 f:SetScript ("OnEvent", function (self, event, time, token, _, who_serial, who_name, who_flags, _, target_serial, target_name, target_flags, _, spellid, spellname, spellschool, buff_type, buff_name) |
| 849 | 839 |
| 850 if (token == "SPELL_AURA_APPLIED" and spellid == 162124 and not f.StampersPhase) then | 840 if (token == "SPELL_AURA_APPLIED" and spellid == 162124 and not f.StampersPhase) then |
| 851 f:StartTracking() | 841 f:StartTracking() |
| 867 | 857 |
| 868 if (token == "SPELL_INTERRUPT" and spellid == 160838 and db.STOP_CAST) then | 858 if (token == "SPELL_INTERRUPT" and spellid == 160838 and db.STOP_CAST) then |
| 869 local link = GetSpellLink (buff_type) | 859 local link = GetSpellLink (buff_type) |
| 870 print ("Stop Cast Fail:", target_name, link) | 860 print ("Stop Cast Fail:", target_name, link) |
| 871 end | 861 end |
| 872 | |
| 873 --if (spellid == 160838) then | |
| 874 -- print ("event:", token, 160838, db.STOP_CAST) | |
| 875 --end | |
| 876 | 862 |
| 877 end) | 863 end) |
| 878 -- /run Hansgar_And_Franzok_AssistStopCastingAlert.animIn:Play() | 864 -- /run Hansgar_And_Franzok_AssistStopCastingAlert.animIn:Play() |
| 879 | 865 |
| 880 --Hansgar_And_Franzok_AssistStopCasting:Show(); Hansgar_And_Franzok_Assist:ScheduleTimer ("HideStopSpellAlert", 1) | 866 --Hansgar_And_Franzok_AssistStopCasting:Show(); Hansgar_And_Franzok_Assist:ScheduleTimer ("HideStopSpellAlert", 1) |
