Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Dec 20, 2020
1 parent ec5fad4 commit 4046189
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 29 deletions.
25 changes: 13 additions & 12 deletions Libs/LibRaidStatus/ThingsToMantain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[64844] = 4, --Divine Hymn
[64901] = 4, --Symbol of Hope
[265202] = 4, --Holy Word: Salvation (talent)
[88625] = 5, --Holy Word: Chastise
[34861] = 5, --Holy Word: Sanctify
--[88625] = 5, --Holy Word: Chastise
--[34861] = 5, --Holy Word: Sanctify
[19236] = 5, --Desperate Prayer
[8122] = 5, --Psychic Scream
},
Expand All @@ -165,7 +165,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[47585] = 2, --Dispersion
[15286] = 4, --Vampiric Embrace
[19236] = 5, --Desperate Prayer
[64044] = 5, --Psychic Horror
--[64044] = 5, --Psychic Horror
[8122] = 5, --Psychic Scream
[205369] = 5, --Mind Bomb
},
Expand Down Expand Up @@ -211,8 +211,8 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[205180] = 1, --Summon Darkglare
[342601] = 1, --Ritual of Doom
[113860] = 1, --Dark Soul: Misery (talent)
[104773] = 2, --Unending Resolve
[108416] = 2, --Dark Pact (talent)
[104773] = 2, --Unending Resolve
[108416] = 2, --Dark Pact (talent)
[30283] = 5, --Shadowfury
[6789] = 5, --Mortal Coil (talent)
[333889] = 5, --Fel Domination
Expand All @@ -237,9 +237,9 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[267] = {
[1122] = 1, --Summon Infernal
[342601] = 1, --Ritual of Doom
[113858] = 1, --Dark Soul: Instability (talent)
[113858] = 1, --Dark Soul: Instability (talent)
[104773] = 2, --Unending Resolve
[108416] = 2, --Dark Pact (talent)
[108416] = 2, --Dark Pact (talent)
[6789] = 5, --Mortal Coil (talent)
[30283] = 5, --Shadowfury
[333889] = 5, --Fel Domination
Expand All @@ -248,7 +248,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
--WARRIOR
--Arms
[71] = {
[107574] = 1, --Avatar (talent)
[107574] = 1, --Avatar (talent)
[227847] = 1, --Bladestorm
[152277] = 1, --Ravager (talent)
[118038] = 2, --Die by the Sword
Expand Down Expand Up @@ -283,7 +283,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
--holy
[65] = {
[31884] = 1, --Avenging Wrath
[216331] = 1, --Avenging Crusader (talent)
[216331] = 1, --Avenging Crusader (talent)
[498] = 2, --Divine Protection
[642] = 2, --Divine Shield
[105809] = 2, --Holy Avenger (talent)
Expand Down Expand Up @@ -394,7 +394,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[221562] = 5, --Asphyxiate
[212552] = 5, --Wraith walk (talent)
},

--DRUID
--Balance
[102] = {
Expand All @@ -404,7 +404,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[108238] = 2, --Renewal (talent)
[29166] = 3, --Innervate
[77761] = 4, --Stampeding Roar
[99] = 5, --Incapacitating Roar
--[99] = 5, --Incapacitating Roar
[319454] = 5, --Heart of the Wild (talent)
[132469] = 5, --Typhoon
[78675] = 5, --Solar Beam
Expand All @@ -430,7 +430,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[108238] = 2, --Renewal (talent)
[77761] = 4, --Stampeding Roar
[132469] = 5, --Typhoon
[99] = 5, --Incapacitating Roar
--[99] = 5, --Incapacitating Roar
[319454] = 5, --Heart of the Wild (talent)
},
--Restoration
Expand Down Expand Up @@ -676,6 +676,7 @@ LIB_RAID_STATUS_COOLDOWNS_INFO = {
[186289] = {cooldown = 72, duration = 15, talent = false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle

--> druid
[77761] = {cooldown = 120, duration = 8, talent = false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar
[194223] = {cooldown = 180, duration = 20, talent = false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment
[102560] = {cooldown = 180, duration = 30, talent = 21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent)
[22812] = {cooldown = 60, duration = 12, talent = false, charges = 1, class = "DRUID", type = 2}, --Barkskin
Expand Down
13 changes: 10 additions & 3 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")

_detalhes.build_counter = 8093
_detalhes.alpha_build_counter = 8093 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 8096
_detalhes.alpha_build_counter = 8096 --if this is higher than the regular counter, use it instead
_detalhes.game_version = "v9.0.2"
_detalhes.userversion = "v9.0.2." .. _detalhes.build_counter
_detalhes.realversion = 144 --core version, this is used to check API version for scripts and plugins (see alias below)
_detalhes.APIVersion = _detalhes.realversion --core version
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players

_detalhes.BFACORE = 131 --core version on BFA launch
_detalhes.SHADOWLANDSCORE = 143 --core version on BFA launch
_detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch

Details = _detalhes

Expand Down Expand Up @@ -629,6 +629,13 @@ do

_detalhes.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --> do not localize-me


function Details.SendHighFive()
Details.users = {{UnitName("player"), GetRealmName(), (Details.userversion or "") .. " (" .. Details.APIVersion .. ")"}}
Details.sent_highfive = GetTime()
Details:SendRaidData (Details.network.ids.HIGHFIVE_REQUEST)
end

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> frames

Expand Down
3 changes: 2 additions & 1 deletion core/plugins_raid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,9 @@
end

local spells = ""
death_table = death_table[1]
local last = #death_table

for i = 1, _detalhes.announce_deaths.last_hits do
for o = last, 1, -1 do
local this_death = death_table [o]
Expand Down
80 changes: 70 additions & 10 deletions functions/coach.lua
Original file line number Diff line number Diff line change
Expand Up @@ -501,44 +501,52 @@ function Details.Coach.WelcomePanel()
welcomePanel:SetPoint ("left", UIParent, "left", 10, 0)
welcomePanel:Hide()
DetailsFramework:ApplyStandardBackdrop(welcomePanel)

local LibWindow = _G.LibStub("LibWindow-1.1")
welcomePanel:SetScript("OnMouseDown", nil)
welcomePanel:SetScript("OnMouseUp", nil)
LibWindow.RegisterConfig(welcomePanel, Details.coach.welcome_panel_pos)
LibWindow.MakeDraggable(welcomePanel)
LibWindow.RestorePosition(welcomePanel)


local imageSize = 26

local detailsLogo = DetailsFramework:CreateImage(welcomePanel, [[Interface\AddOns\Details\images\logotipo]])
detailsLogo:SetPoint("topleft", welcomePanel, "topleft", 5, -30)
detailsLogo:SetSize(200, 50)
detailsLogo:SetTexCoord(36/512, 380/512, 128/256, 227/256)

local isLeaderTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], 32, 32)
local isLeaderTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], imageSize, imageSize)
isLeaderTexture:SetTexCoord(0, 0.5, 0, 0.5)
isLeaderTexture:SetPoint("topleft", detailsLogo, "topleft", 0, -60)
local isLeaderText = DetailsFramework:CreateLabel(welcomePanel, "In raid and You're the leader of the group.")
isLeaderText:SetPoint("left", isLeaderTexture, "right", 10, 0)

local isOutsideTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], 32, 32)
local isOutsideTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], imageSize, imageSize)
isOutsideTexture:SetTexCoord(0, 0.5, 0, 0.5)
isOutsideTexture:SetPoint("topleft", isLeaderTexture, "bottomleft", 0, -5)
local isOutsideText = DetailsFramework:CreateLabel(welcomePanel, "You're outside of the instance.")
isOutsideText:SetPoint("left", isOutsideTexture, "right", 10, 0)

local hasAssistantsTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], 32, 32)
local hasAssistantsTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], imageSize, imageSize)
hasAssistantsTexture:SetTexCoord(0, 0.5, 0, 0.5)
hasAssistantsTexture:SetPoint("topleft", isOutsideTexture, "bottomleft", 0, -5)
local hasAssistantsText = DetailsFramework:CreateLabel(welcomePanel, "There's an 'raid assistant' inside the raid.")
hasAssistantsText:SetPoint("left", hasAssistantsTexture, "right", 10, 0)

local beInGroupSevenTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], 32, 32)
local beInGroupSevenTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], imageSize, imageSize)
beInGroupSevenTexture:SetTexCoord(0, 0.5, 0, 0.5)
beInGroupSevenTexture:SetPoint("topleft", hasAssistantsTexture, "bottomleft", 0, -5)
local beInGroupSevenText = DetailsFramework:CreateLabel(welcomePanel, "Stay in group 7 or 8.")
beInGroupSevenText:SetPoint("left", beInGroupSevenTexture, "right", 10, 0)

local startCoachButton = DetailsFramework:CreateButton(welcomePanel, function()
local allUpdatedTexture = DetailsFramework:CreateImage(welcomePanel, [[Interface\GLUES\LOADINGSCREENS\DynamicElements]], imageSize, imageSize)
allUpdatedTexture:SetTexCoord(0, 0.5, 0, 0.5)
allUpdatedTexture:SetPoint("topleft", beInGroupSevenTexture, "bottomleft", 0, -5)
local allUpdatedText = DetailsFramework:CreateLabel(welcomePanel, "Users with updated Details!.")
allUpdatedText:SetPoint("left", allUpdatedTexture, "right", 10, 0)

local startCoachButton = DetailsFramework:CreateButton(welcomePanel, function()
Details.coach.enabled = true
Details.Coach.Server.EnableCoach()
welcomePanel:Hide()
Expand Down Expand Up @@ -606,16 +614,68 @@ function Details.Coach.WelcomePanel()
beInGroupSevenTexture:SetTexCoord(0, 0.5, 0, 0.5)
end

if (good == 4) then
local allUsersUpdated = false

local numRaidMembers = GetNumGroupMembers()
local updatedUsers = 0
local usersChecked = {}

for i = 1, #Details.users do
local thisUser = Details.users[i]
local userName = thisUser[1]

if (not usersChecked[userName]) then
local version = thisUser[3]
local buildCounter = version:match("%w%d%.%d%.%d%.(%d+)")
buildCounter = tonumber(buildCounter)

if (buildCounter and buildCounter >= Details.build_counter) then
updatedUsers = updatedUsers + 1
end

usersChecked[userName] = true
end
end

if (updatedUsers >= numRaidMembers) then
allUsersUpdated = true
end

if (allUsersUpdated) then
allUpdatedTexture:SetTexture([[Interface\COMMON\Indicator-Green]])
allUpdatedTexture:SetTexCoord(0, 1, 0, 1)
good = good + 1
else
allUpdatedTexture:SetTexture([[Interface\GLUES\LOADINGSCREENS\DynamicElements]])
allUpdatedTexture:SetTexCoord(0, 0.5, 0, 0.5)
end

if (good == 5) then
startCoachButton:Enable()
else
startCoachButton:Disable()
end
end
end

welcomePanel:SetScript("OnUpdate", function()
welcomePanel:Update()
Details.SendHighFive()

local nextHighFive = 10
local nextUpdate = 1

welcomePanel:SetScript("OnUpdate", function(self, deltaTime)
nextHighFive = nextHighFive - deltaTime
nextUpdate = nextUpdate - deltaTime

if (nextHighFive < 0) then
Details.SendHighFive()
nextHighFive = 10
end

if (nextUpdate < 0) then
welcomePanel:Update()
nextUpdate = 1
end
end)

welcomePanel:Show()
Expand Down
4 changes: 1 addition & 3 deletions functions/slash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -865,9 +865,7 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes:ApplyProfile (profile, false)

elseif (msg == "users" or msg == "version" or msg == "versioncheck") then
_detalhes.users = {{UnitName("player"), GetRealmName(), (_detalhes.userversion or "") .. " (" .. _detalhes.APIVersion .. ")"}}
_detalhes.sent_highfive = GetTime()
_detalhes:SendRaidData (_detalhes.network.ids.HIGHFIVE_REQUEST)
Details.SendHighFive()

print (Loc ["STRING_DETAILS1"] .. "highfive sent, HI!")

Expand Down

0 comments on commit 4046189

Please sign in to comment.