Mercurial > wow > hansgar_and_franzok_assist
comparison Hansgar_And_Franzok_Assist.lua @ 38:219f04e5ba55
- small bug fixes.
| author | Tercio |
|---|---|
| date | Mon, 04 Jul 2016 23:06:23 -0300 |
| parents | a061f21979d4 |
| children |
comparison
equal
deleted
inserted
replaced
| 37:a061f21979d4 | 38:219f04e5ba55 |
|---|---|
| 246 local AceComm = LibStub:GetLibrary ("AceComm-3.0") | 246 local AceComm = LibStub:GetLibrary ("AceComm-3.0") |
| 247 AceComm:Embed (f) | 247 AceComm:Embed (f) |
| 248 | 248 |
| 249 function f:CommReceived (_, data, _, source) | 249 function f:CommReceived (_, data, _, source) |
| 250 if (data == "US") then | 250 if (data == "US") then |
| 251 f:SendCommMessage ("HAFR", UnitName ("player") .. " " .. f.version, "RAID") | 251 f:SendCommMessage ("HAFR", (UnitName ("player") or "") .. " " .. f.version, "RAID") |
| 252 elseif (f.users) then | 252 elseif (f.users) then |
| 253 f.users [data] = true | 253 f.users [data] = true |
| 254 end | 254 end |
| 255 end | 255 end |
| 256 function f:ShowUsers() | 256 function f:ShowUsers() |
| 381 end | 381 end |
| 382 | 382 |
| 383 if (encounterID == 1693 and difficultyID == 16) then | 383 if (encounterID == 1693 and difficultyID == 16) then |
| 384 | 384 |
| 385 if (event == "ENCOUNTER_START") then | 385 if (event == "ENCOUNTER_START") then |
| 386 print ("|cFFFFAA00Hansgar and Franzok Assist|r: addon enabled, good look!") | 386 --print ("|cFFFFAA00Hansgar and Franzok Assist|r: addon enabled, good look!") |
| 387 | 387 |
| 388 if (f.StampersPhase) then | 388 if (f.StampersPhase) then |
| 389 f:StopTracking() | 389 f:StopTracking() |
| 390 end | 390 end |
| 391 | 391 |
| 834 f:ScheduleTimer ("HideStopSpellAlert2", 0.3) | 834 f:ScheduleTimer ("HideStopSpellAlert2", 0.3) |
| 835 end | 835 end |
| 836 | 836 |
| 837 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) | 837 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 | 838 |
| 839 if (token == "SPELL_AURA_APPLIED" and spellid == 162124 and not f.StampersPhase) then | 839 if (spellid) then |
| 840 f:StartTracking() | 840 if (token == "SPELL_AURA_APPLIED" and spellid == 162124 and not f.StampersPhase) then |
| 841 f:EndTrackPlayerPosition() | 841 f:StartTracking() |
| 842 | 842 f:EndTrackPlayerPosition() |
| 843 elseif (token == "SPELL_AURA_REMOVED" and spellid == 162124 and f.StampersPhase) then | 843 |
| 844 f:StopTracking() | 844 elseif (token == "SPELL_AURA_REMOVED" and spellid == 162124 and f.StampersPhase) then |
| 845 if (db.SHOW_DANCE) then | 845 f:StopTracking() |
| 846 f:StartTrackPlayerPosition() | 846 if (db.SHOW_DANCE) then |
| 847 end | 847 f:StartTrackPlayerPosition() |
| 848 | 848 end |
| 849 elseif (token == "SPELL_CAST_START" and spellid == 160838 and db.STOP_CAST) then --Disrupting Roar | 849 |
| 850 f.stop_casting_frame:Show() | 850 elseif (token == "SPELL_CAST_START" and spellid == 160838 and db.STOP_CAST) then --Disrupting Roar |
| 851 f.stop_casting_frame.alert.animOut:Stop() | 851 f.stop_casting_frame:Show() |
| 852 f.stop_casting_frame.alert.animIn:Play() | 852 f.stop_casting_frame.alert.animOut:Stop() |
| 853 f:ScheduleTimer ("HideStopSpellAlert", 1.2) | 853 f.stop_casting_frame.alert.animIn:Play() |
| 854 | 854 f:ScheduleTimer ("HideStopSpellAlert", 1.2) |
| 855 end | 855 |
| 856 | 856 end |
| 857 if (token == "SPELL_INTERRUPT" and spellid == 160838 and db.STOP_CAST) then | 857 |
| 858 local link = GetSpellLink (buff_type) | 858 if (token == "SPELL_INTERRUPT" and spellid == 160838 and db.STOP_CAST) then |
| 859 print ("Stop Cast Fail:", target_name, link) | 859 local link = GetSpellLink (buff_type) |
| 860 print ("Stop Cast Fail:", target_name, link) | |
| 861 end | |
| 860 end | 862 end |
| 861 | 863 |
| 862 end) | 864 end) |
| 863 -- /run Hansgar_And_Franzok_AssistStopCastingAlert.animIn:Play() | 865 -- /run Hansgar_And_Franzok_AssistStopCastingAlert.animIn:Play() |
| 864 | 866 |
| 914 end | 916 end |
| 915 end | 917 end |
| 916 end | 918 end |
| 917 | 919 |
| 918 function f:StartTracking() | 920 function f:StartTracking() |
| 919 | 921 -- print ("|cFFFFAA00Hansgar and Franzok Assist|r: Smart Stampers phase started.") |
| 920 print ("|cFFFFAA00Hansgar and Franzok Assist|r: Smart Stampers phase started.") | |
| 921 | 922 |
| 922 f.StampersPhase = true | 923 f.StampersPhase = true |
| 923 | 924 |
| 924 if (not f.frames_built) then | 925 if (not f.frames_built) then |
| 925 f:CreateWindow() | 926 f:CreateWindow() |
| 938 f.player_bar:Show() | 939 f.player_bar:Show() |
| 939 | 940 |
| 940 end | 941 end |
| 941 | 942 |
| 942 function f:StopTracking() | 943 function f:StopTracking() |
| 943 print ("|cFFFFAA00Hansgar and Franzok Assist|r: Smart Stampers phase ended.") | 944 -- print ("|cFFFFAA00Hansgar and Franzok Assist|r: Smart Stampers phase ended.") |
| 944 | 945 |
| 945 f.StampersPhase = false | 946 f.StampersPhase = false |
| 946 frame_tracker:SetScript ("OnUpdate", nil) | 947 frame_tracker:SetScript ("OnUpdate", nil) |
| 947 table.wipe (f.block_tracker) | 948 table.wipe (f.block_tracker) |
| 948 f.player_loc_box:Hide() | 949 f.player_loc_box:Hide() |
