- Added Cyclone to crowd control.

- Added new Auto Run script: on enter or leave group.
This commit is contained in:
Tercio
2018-07-20 18:23:25 -03:00
parent dae28af236
commit 2526d8802d
7 changed files with 22 additions and 5 deletions
+11 -4
View File
@@ -1,5 +1,5 @@
local dversion = 83
local dversion = 85
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -1542,7 +1542,8 @@ local frameshake_update_all = function (parent, deltaTime)
end
end
local frameshake_play = function (parent, shakeObject, scaleX, scaleY)
--> scale direction scales the X and Y coordinates, scale strength scales the amplitude and frequency
local frameshake_play = function (parent, shakeObject, scaleDirection, scaleAmplitude, scaleFrequency, scaleDuration)
--> check if is already playing
if (shakeObject.TimeLeft > 0) then
@@ -1585,8 +1586,11 @@ local frameshake_play = function (parent, shakeObject, scaleX, scaleY)
shakeObject.IsFadingOutTime = 0
--> apply custom scale
shakeObject.ScaleX = scaleX or shakeObject.OriginalScaleX
shakeObject.ScaleY = scaleY or shakeObject.OriginalScaleY
shakeObject.ScaleX = (scaleDirection or 1) * shakeObject.OriginalScaleX
shakeObject.ScaleY = (scaleDirection or 1) * shakeObject.OriginalScaleY
shakeObject.Frequency = (scaleFrequency or 1) * shakeObject.OriginalFrequency
shakeObject.Amplitude = (scaleAmplitude or 1) * shakeObject.OriginalAmplitude
shakeObject.Duration = (scaleDuration or 1) * shakeObject.OriginalDuration
--> update the time left
shakeObject.TimeLeft = shakeObject.Duration
@@ -1629,6 +1633,9 @@ function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSi
frameShake.OriginalScaleX = frameShake.ScaleX
frameShake.OriginalScaleY = frameShake.ScaleY
frameShake.OriginalFrequency = frameShake.Frequency
frameShake.OriginalAmplitude = frameShake.Amplitude
frameShake.OriginalDuration = frameShake.Duration
if (type (anchorPoints) ~= "table") then
frameShake.IsDynamicAnchor = true
+1
View File
@@ -473,6 +473,7 @@ DF.CrowdControlSpells = {
[45334] = "DRUID", --Immobilized
[203123] = "DRUID", --Maim
[50259] = "DRUID", --Dazed (from Wild Charge)
[209753] = "DRUID", --Cyclone (from pvp talent)
[3355] = "HUNTER", --Freezing Trap
[19577] = "HUNTER", --Intimidation
+2 -1
View File
@@ -3,7 +3,7 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.build_counter = 5985
_detalhes.build_counter = 5986
_detalhes.userversion = "v8.0.1." .. _detalhes.build_counter
_detalhes.realversion = 131 --core version
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")"
@@ -171,6 +171,7 @@ do
{Name = "On Enter Combat", Desc = "Run code when the player enters in combat.", Value = 3, ProfileKey = "on_entercombat"},
{Name = "On Leave Combat", Desc = "Run code when the player left combat.", Value = 4, ProfileKey = "on_leavecombat"},
{Name = "On Spec Change", Desc = "Run code when the player has changed its specialization.", Value = 5, ProfileKey = "on_specchanged"},
{Name = "On Enter/Leave Group", Desc = "Run code when the player has entered or left a party or raid group.", Value = 6, ProfileKey = "on_groupchange"},
}
--> tooltip
+4
View File
@@ -4462,6 +4462,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:CheckSwitchOnLogon()
_detalhes:CheckVersion()
_detalhes:SendEvent ("GROUP_ONENTER")
_detalhes:DispatchAutoRunCode ("on_groupchange")
end
else
_detalhes.in_group = IsInGroup() or IsInRaid()
@@ -4474,6 +4476,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
_detalhes:CheckSwitchOnLogon()
_detalhes:SendEvent ("GROUP_ONLEAVE")
_detalhes:DispatchAutoRunCode ("on_groupchange")
else
_detalhes:SchedulePetUpdate (2)
end
+1
View File
@@ -1342,6 +1342,7 @@ local default_global_data = {
["on_init"] = "\n-- code to run when Details! initializes, put here code which only will run once\n-- this also will run then the profile is changed\n\n--size of the death log tooltip in the Deaths display (default 350)\nDetails.death_tooltip_width = 350;\n\n--when in arena or battleground, details! silently switch to activity time (goes back to the old setting on leaving, default true)\nDetails.force_activity_time_pvp = true;\n\n--speed of the bar animations (default 33)\nDetails.animation_speed = 33;\n\n--threshold to trigger slow or fast speed (default 0.45)\nDetails.animation_speed_mintravel = 0.45;\n\n--call to update animations\nDetails:RefreshAnimationFunctions();\n\n--max window size, does require a /reload to work (default 480 x 450)\nDetails.max_window_size.width = 480;\nDetails.max_window_size.height = 450;\n\n--use the arena team color as the class color (default true)\nDetails.color_by_arena_team = true;\n\n--use the role icon in the player bar when inside an arena (default false)\nDetails.show_arena_role_icon = false;\n\n--how much time the update warning is shown (default 10)\nDetails.update_warning_timeout = 10;",
["on_leavecombat"] = "\n-- this code runs when the player leave combat",
["on_entercombat"] = "\n-- this code runs when the player enters in combat",
["on_groupchange"] = "\n-- this code runs when the player enter or leave a group",
},
--> plater integration
+1
View File
@@ -5133,6 +5133,7 @@ function _detalhes:InstanceColor (red, green, blue, alpha, no_save, change_statu
self:StatusBarColor (nil, nil, nil, alpha, true)
end
-- print (self.skin, self.meu_id)
local skin = _detalhes.skins [self.skin]
--[[
+2
View File
@@ -1817,6 +1817,8 @@ function _G._detalhes:Start()
else
_detalhes:DispatchAutoRunCode ("on_leavecombat")
end
_detalhes:DispatchAutoRunCode ("on_groupchange")
end)
--> Plater integration