# HG changeset patch # User Tercio # Date 1427050786 10800 # Node ID 070347df4822b1e77bbdb4316ced51e5b60a9186 # Parent 3a6b062ecaacfcc91516f6992b62441e7ff2b910 - Added stop casting alert for Disrupting Roar. - Added slash command /hansgar resetpos. - Unlocking the frames now make all they be shown in the screen. diff -r 3a6b062ecaac -r 070347df4822 Hansgar_And_Franzok_Assist.lua --- a/Hansgar_And_Franzok_Assist.lua Sun Mar 15 16:38:07 2015 -0300 +++ b/Hansgar_And_Franzok_Assist.lua Sun Mar 22 15:59:46 2015 -0300 @@ -9,7 +9,7 @@ local f = CreateFrame ("frame", "Hansgar_And_Franzok_Assist", UIParent) f:SetFrameStrata ("DIALOG") -f.version = "v0.9" +f.version = "v0.10" local tframe = CreateFrame ("frame", "Hansgar_And_Franzok_Assist_PTrack", UIParent) @@ -42,7 +42,7 @@ --player_bar:SetPoint ("topright", f, "bottomright", 0, -3) player_bar:SetPoint ("center", UIParent, "center", 0, 300) -player_bar:SetSize (280, 22) +player_bar:SetSize (280, 16) player_bar:SetMovable (true) player_bar:EnableMouse (true) @@ -120,8 +120,8 @@ player_pos_frame:SetPoint ("center", UIParent, "center", 0, -75) player_pos_frame:SetSize (155, 6) -player_pos_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16}) -player_pos_frame:SetBackdropColor (0, 0, 0, 0.4) +player_pos_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = -1, right = -1, top = -1, bottom = -1}}) +player_pos_frame:SetBackdropColor (0, 0, 0, 1) player_pos_frame:SetMovable (true) player_pos_frame:EnableMouse (true) player_pos_frame:SetScript ("OnMouseDown", function (self) @@ -278,6 +278,9 @@ if (db.PLAY_SOUND == nil) then db.PLAY_SOUND = false end + if (db.STOP_CAST == nil) then + db.STOP_CAST = true + end -- f:SetLockState (true) @@ -287,10 +290,17 @@ local encounterID, encounterName, difficultyID, raidSize = select (1, ...) if (encounterID == 1693) then + if (f.unlocked_frame) then + f.unlocked_frame = false + end + if (event == "ENCOUNTER_START") then f.on_encounter = true + f:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") + elseif (event == "ENCOUNTER_END") then f.on_encounter = false + f:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") end end @@ -306,17 +316,13 @@ if (encounterID == 1693 and difficultyID == 16) then if (event == "ENCOUNTER_START") then - print ("|cFFFFAA00Hansgar and Franzok Assist|r: addon enabled, good look!") if (f.StampersPhase) then f:StopTracking() end - f:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") elseif (event == "ENCOUNTER_END") then - f:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") - if (f.StampersPhase) then f:StopTracking() end @@ -345,6 +351,43 @@ print ("|cFFFFAA00Hansgar and Franzok Assist|r you aren't in a raid group.") end + elseif (command == "stopcast") then + db.STOP_CAST = not db.STOP_CAST + + if (db.STOP_CAST) then + print ("|cFFFFAA00Hansgar and Franzok Assist|r stop cast alert enabled.") + Hansgar_And_Franzok_AssistStopCasting:Show(); Hansgar_And_Franzok_Assist:ScheduleTimer ("HideStopSpellAlert", 1) + else + print ("|cFFFFAA00Hansgar and Franzok Assist|r stop cast alert disabled.") + end + + elseif (command == "resetpos") then + f:ClearAllPoints() + f:SetPoint ("center", UIParent, "center") + + player_bar:ClearAllPoints() + player_bar:SetPoint ("center", UIParent, "center") + + player_pos_frame:ClearAllPoints() + player_pos_frame:SetPoint ("center", UIParent, "center") + + if (f.StampersPhase) then + f:EndTrackPlayerPosition() + f:StopTracking() + end + + db.FRAME_LOCK = true + f:SetLockState() + + f.unlocked_frame = true + + f:StartTracking() + f:StartTrackPlayerPosition() + + print ("|cFFFFAA00Hansgar and Franzok Assist|r: position reseted.") + print ("|cFFFFAA00Hansgar and Franzok Assist|r: move between the tracks to show the other frames.") + print ("|cFFFFAA00Hansgar and Franzok Assist|r: type '/hansgar lock' to lock the frames.") + elseif (command == "delay") then local t = tonumber (rest) if (t) then @@ -373,14 +416,24 @@ db.FRAME_LOCK = true f:SetLockState() print ("|cFFFFAA00Hansgar and Franzok Assist|r frame unlocked.") + + f.unlocked_frame = true + player_pos_frame:Show() + player_bar:Show() elseif (command == "lock") then f:SetLockState() if (db.FRAME_LOCK) then print ("|cFFFFAA00Hansgar and Franzok Assist|r frame locked.") + f.unlocked_frame = false else print ("|cFFFFAA00Hansgar and Franzok Assist|r frame unlocked.") + + f.unlocked_frame = true + player_pos_frame:Show() + player_bar:Show() + end elseif (command == "facing") then @@ -429,6 +482,7 @@ else print ("|cFFFFAA00Hansgar and Franzok Assist|r |cFF00FF00" .. f.version .. "|r Commands:") + print ("|cFFFFFF00/hansgar resetpos|r: reset the position of all frames.") print ("|cFFFFFF00/hansgar lock|r: toggle lock and unlock on the frame.") print ("|cFFFFFF00/hansgar test show hide|r: active the addon on test mode or hide it.") print ("|cFFFFFF00/hansgar delay