- Cleanup on the item level tracker.
- Revamp on the Avoidance tab. - Increased the font size of the bookmark window. - Added Hunter's Intimidation as crowd control. - More update on the RaidCheck plugin.
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local dversion = 99
|
||||
local dversion = 100
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
|
||||
@@ -648,6 +648,7 @@ DF.CrowdControlSpells = {
|
||||
[19577] = "HUNTER", --Intimidation
|
||||
[190927] = "HUNTER", --Harpoon
|
||||
[162480] = "HUNTER", --Steel Trap
|
||||
[24394] = "HUNTER", --Intimidation
|
||||
|
||||
[119381] = "MONK", --Leg Sweep
|
||||
[115078] = "MONK", --Paralysis
|
||||
|
||||
+4
-75
@@ -9,8 +9,8 @@ local floor = floor
|
||||
|
||||
local GetNumGroupMembers = GetNumGroupMembers
|
||||
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
|
||||
--local LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
|
||||
local LibGroupInSpecT = false
|
||||
local LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
|
||||
--local LibGroupInSpecT = false
|
||||
|
||||
local storageDebug = false
|
||||
local store_instances = _detalhes.InstancesToStoreData
|
||||
@@ -1679,31 +1679,6 @@ local MAX_INSPECT_AMOUNT = 1
|
||||
local MIN_ILEVEL_TO_STORE = 50
|
||||
local LOOP_TIME = 7
|
||||
|
||||
--if the item is an artifact off-hand, get the item level of the main hand
|
||||
local artifact_offhands = {
|
||||
["133959"] = true, --mage fire
|
||||
["128293"] = true, --dk frost
|
||||
["127830"] = true, --dh havoc
|
||||
["128831"] = true, --dh vengeance
|
||||
["128859"] = true, --druid feral
|
||||
["128822"] = true, --druid guardian
|
||||
["133948"] = true, --monk ww
|
||||
["133958"] = true, --priest shadow
|
||||
["128869"] = true, --rogue assassination
|
||||
["134552"] = true, --rogue outlaw
|
||||
["128479"] = true, --rogue subtlety
|
||||
["128936"] = true, --shaman elemental
|
||||
["128873"] = true, --shaman en
|
||||
["128934"] = true, --shaman resto
|
||||
}
|
||||
|
||||
--if the artifact has its main piece as the offhand, when scaning the main hand get the ilevel of the off-hand.
|
||||
local offhand_ismain = {
|
||||
["137246"] = true, --warlock demo / spine of thalkiel
|
||||
["128288"] = true, --warrior prot / scaleshard
|
||||
["128867"] = true, --paladin prot / oathseeker
|
||||
}
|
||||
|
||||
function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel, talentsSelected, currentSpec)
|
||||
if (_detalhes.debug) then
|
||||
local talents = "Invalid Talents"
|
||||
@@ -1754,6 +1729,7 @@ end
|
||||
--> test
|
||||
--/run _detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
|
||||
--/run wipe (_detalhes.item_level_pool)
|
||||
|
||||
function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
|
||||
if (type (unitid) == "table") then
|
||||
@@ -1770,64 +1746,17 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
local failed = 0
|
||||
|
||||
for equip_id = 1, 17 do
|
||||
|
||||
if (equip_id ~= 4) then --shirt slot
|
||||
local item = GetInventoryItemLink (unitid, equip_id)
|
||||
if (item) then
|
||||
local _, _, itemRarity, iLevel, _, _, _, _, equipSlot = GetItemInfo (item)
|
||||
if (iLevel) then
|
||||
|
||||
--local _, _, _, _, _, _, _, _, _, _, _, upgradeTypeID, _, numBonusIDs, bonusID1, bonusID2 = strsplit (":", item)
|
||||
--> upgrades handle by LibItemUpgradeInfo-1.0
|
||||
--> http://www.wowace.com/addons/libitemupgradeinfo-1-0/
|
||||
|
||||
if (equip_id == 16) then --main hand
|
||||
local itemId = select (2, strsplit (":", item))
|
||||
--print (itemId, offhand_ismain [itemId], UnitName (unitid))
|
||||
--128867 nil Lithedora EmeraldDream
|
||||
if (offhand_ismain [itemId]) then
|
||||
local offHand = GetInventoryItemLink (unitid, 17)
|
||||
if (offHand) then
|
||||
local iName, _, itemRarity, offHandILevel, _, _, _, _, equipSlot = GetItemInfo (offHand)
|
||||
if (offHandILevel) then
|
||||
item = offHand
|
||||
iLevel = offHandILevel
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (equip_id == 17) then --off-hand
|
||||
local itemId = select (2, strsplit (":", item))
|
||||
if (artifact_offhands [itemId]) then
|
||||
local mainHand = GetInventoryItemLink (unitid, 16)
|
||||
if (mainHand) then
|
||||
local iName, _, itemRarity, mainHandILevel, _, _, _, _, equipSlot = GetItemInfo (mainHand)
|
||||
if (iLevel) then
|
||||
item = mainHand
|
||||
iLevel = mainHandILevel
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (ItemUpgradeInfo) then
|
||||
local ilvl = ItemUpgradeInfo:GetUpgradedItemLevel (item)
|
||||
item_level = item_level + (ilvl or iLevel)
|
||||
else
|
||||
item_level = item_level + iLevel
|
||||
end
|
||||
|
||||
--> timewarped
|
||||
--[[
|
||||
if (upgradeTypeID == "512" and bonusID1 == "615") then
|
||||
item_level = item_level + 660
|
||||
if (bonusID2 == "656") then
|
||||
item_level = item_level + 15
|
||||
end
|
||||
else
|
||||
item_level = item_level + iLevel
|
||||
end
|
||||
--]]
|
||||
|
||||
--> 16 = main hand 17 = off hand
|
||||
--> if using a two-hand, ignore the off hand slot
|
||||
@@ -1851,7 +1780,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
--> register
|
||||
if (average > 0) then
|
||||
if (shout) then
|
||||
_detalhes:Msg (name .. " item level: " .. average)
|
||||
_detalhes:Msg (UnitName(unitid) .. " item level: " .. average)
|
||||
end
|
||||
|
||||
if (average > MIN_ILEVEL_TO_STORE) then
|
||||
|
||||
@@ -1011,6 +1011,9 @@ local default_profile = {
|
||||
["aura"] = true,
|
||||
["spellcast"] = true,
|
||||
},
|
||||
|
||||
--> bookmark
|
||||
bookmark_text_size = 11,
|
||||
|
||||
--> cloud capture
|
||||
cloud_capture = true,
|
||||
|
||||
+19
-124
@@ -412,51 +412,6 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print ("GetTime()", GetTime())
|
||||
print ("time()", time())
|
||||
|
||||
elseif (msg == "buffs") then
|
||||
|
||||
for buffIndex = 1, 41 do
|
||||
|
||||
--local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
--if (name) then
|
||||
-- print (name, unitCaster, spellid)
|
||||
--end
|
||||
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitAura ("raid1", buffIndex, nil, "HELPFUL")
|
||||
if (name) then
|
||||
print (name, unitCaster, spellid)
|
||||
end
|
||||
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitAura ("raid2", buffIndex, nil, "HELPFUL")
|
||||
if (name) then
|
||||
print (name, unitCaster, spellid)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
elseif (msg == "malkorok") then
|
||||
|
||||
print ("nome | count | unitCaster | spellId | isBossDebuff | value1 | value2 | value3")
|
||||
|
||||
do
|
||||
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff ("player", 1)
|
||||
if (name) then
|
||||
print (name, " | ", count, " | ", unitCaster, " | ",spellId, " | ", isBossDebuff, " | ", value1, " | ", value2, " | ", value3)
|
||||
end
|
||||
end
|
||||
do
|
||||
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff ("player", 2)
|
||||
if (name) then
|
||||
print (name, " | ", count, " | ", unitCaster, " | ",spellId, " | ", isBossDebuff, " | ", value1, " | ", value2, " | ", value3)
|
||||
end
|
||||
end
|
||||
do
|
||||
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff ("player", 3)
|
||||
if (name) then
|
||||
print (name, " | ", count, " | ", unitCaster, " | ",spellId, " | ", isBossDebuff, " | ", value1, " | ", value2, " | ", value3)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msg == "copy") then
|
||||
_G.DetailsCopy:Show()
|
||||
_G.DetailsCopy.MyObject.text:HighlightText()
|
||||
@@ -914,6 +869,15 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print ("running... this is a debug command, details wont work until next /reload.")
|
||||
_detalhes:PrepareTablesForSave()
|
||||
|
||||
elseif (msg == "buffs") then
|
||||
for i = 1, 40 do
|
||||
local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellid = UnitBuff ("player", i)
|
||||
if (not name) then
|
||||
return
|
||||
end
|
||||
print (spellid, name)
|
||||
end
|
||||
|
||||
elseif (msg == "id") then
|
||||
local one, two = rest:match("^(%S*)%s*(.-)$")
|
||||
if (one ~= "") then
|
||||
@@ -1185,7 +1149,7 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
|
||||
print ("total loot", total)
|
||||
_detalhes_global.ALOOT = r
|
||||
|
||||
elseif (msg == "ilvl2") then
|
||||
elseif (msg == "ilvl" or msg == "itemlevel" or msg == "ilevel") then
|
||||
|
||||
local item_amount = 16
|
||||
local item_level = 0
|
||||
@@ -1197,60 +1161,23 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
|
||||
["INVTYPE_RANGEDRIGHT"] = true,
|
||||
}
|
||||
|
||||
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
|
||||
|
||||
_detalhes:Msg ("======== Item Level Debug ========")
|
||||
|
||||
for equip_id = 1, 17 do
|
||||
|
||||
if (equip_id ~= 4) then --shirt slot
|
||||
local item = GetInventoryItemLink (unitid, equip_id)
|
||||
if (item) then
|
||||
local iName, _, itemRarity, iLevel, _, _, _, _, equipSlot = GetItemInfo (item)
|
||||
local _, _, itemRarity, iLevel, _, _, _, _, equipSlot = GetItemInfo (item)
|
||||
if (iLevel) then
|
||||
|
||||
--local _, _, _, _, _, _, _, _, _, _, _, upgradeTypeID, _, numBonusIDs, bonusID1, bonusID2 = strsplit (":", item)
|
||||
--> upgrades handle by LibItemUpgradeInfo-1.0
|
||||
--> http://www.wowace.com/addons/libitemupgradeinfo-1-0/
|
||||
|
||||
local artifact_offhands = {
|
||||
["133959"] = true, --mage fire
|
||||
["128293"] = true, --dk frost
|
||||
["127830"] = true, --dh havoc
|
||||
["128831"] = true, --dh vengeance
|
||||
["128859"] = true, --druid feral
|
||||
["128822"] = true, --druid guardian
|
||||
["133948"] = true, --monk ww
|
||||
["128866"] = true, --paladin prot
|
||||
["133958"] = true, --priest shadow
|
||||
["128869"] = true, --rogue assassination
|
||||
["134552"] = true, --rogue outlaw
|
||||
["128479"] = true, --rogue subtlety
|
||||
["128936"] = true, --shaman elemental
|
||||
["128873"] = true, --shaman en
|
||||
["128934"] = true, --shaman resto
|
||||
["137246"] = true, --warlock demo
|
||||
["128289"] = true, --warrior prot
|
||||
}
|
||||
|
||||
if (equip_id == 17) then -- and false
|
||||
local itemId = select (2, strsplit (":", item))
|
||||
if (artifact_offhands [itemId]) then
|
||||
local mainHand = GetInventoryItemLink (unitid, 16)
|
||||
if (mainHand) then
|
||||
local iName, _, itemRarity, mainHandILevel, _, _, _, _, equipSlot = GetItemInfo (mainHand)
|
||||
if (iLevel) then
|
||||
item = mainHand
|
||||
iLevel = mainHandILevel
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
|
||||
if (ItemUpgradeInfo) then
|
||||
local ilvl = ItemUpgradeInfo:GetUpgradedItemLevel (item)
|
||||
item_level = item_level + (ilvl or iLevel)
|
||||
print (item, ilvl, iLevel)
|
||||
print (ilvl, item)
|
||||
else
|
||||
item_level = item_level + iLevel
|
||||
print (iName, iLevel, "-|cFFFF0000lib not found|r-")
|
||||
print (iLevel, item)
|
||||
end
|
||||
|
||||
--> 16 = main hand 17 = off hand
|
||||
@@ -1270,41 +1197,9 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
|
||||
end
|
||||
|
||||
local average = item_level / item_amount
|
||||
print ("gear score:", item_level, "item amount:", item_amount, "ilvl:", average)
|
||||
|
||||
elseif (msg == "ilvl") then
|
||||
|
||||
--
|
||||
local ilvl_frame = CreateFrame ("GameTooltip", "details_ilvl_tooltip", UIParent, "GameTooltipTemplate");
|
||||
local get_ilvl = function (itemLink)
|
||||
ilvl_frame:SetOwner (UIParent, "ANCHOR_NONE")
|
||||
ilvl_frame:ClearLines()
|
||||
ilvl_frame:SetHyperlink (itemLink)
|
||||
|
||||
for i = 1, 13 do
|
||||
local text = _G ["details_ilvl_tooltipTextLeft" .. i] and _G ["details_ilvl_tooltipTextLeft" .. i]:GetText()
|
||||
if (text and text:find (ITEM_UPGRADE_STAT_AVERAGE_ITEM_LEVEL)) then
|
||||
print ("ItemLevel:", text:gsub (ITEM_UPGRADE_STAT_AVERAGE_ITEM_LEVEL, ""))
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local item = GetInventoryItemLink ("player", 14)
|
||||
get_ilvl (item)
|
||||
_detalhes:Msg ("gear score: " .. item_level, "| item amount:", item_amount, "| ilvl:", average)
|
||||
|
||||
print (item)
|
||||
local ItemUpgradeInfo = LibStub("LibItemUpgradeInfo-1.0")
|
||||
local SlotNames = "Trinket1"
|
||||
local Slot = GetInventoryItemLink ("player", GetInventorySlotInfo (("%sSlot"):format (SlotNames)))
|
||||
print (Slot)
|
||||
--local upgrade, max, delta = ItemUpgradeInfo:GetItemUpgradeInfo (item)
|
||||
local upgrade, max, delta = ItemUpgradeInfo:GetItemUpgradeInfo (item)
|
||||
local ilvl = ItemUpgradeInfo:GetUpgradedItemLevel (item)
|
||||
|
||||
print (ilvl, upgrade, max, delta)
|
||||
|
||||
print (GetItemInfo (item))
|
||||
_detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
|
||||
|
||||
elseif (msg == "score") then
|
||||
|
||||
|
||||
+178
-175
@@ -1794,23 +1794,12 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
end,
|
||||
nil --[5] oncreate
|
||||
)
|
||||
)
|
||||
|
||||
--> search key: ~avoidance
|
||||
--> search key: ~avoidance --> begining of avoidance tab
|
||||
|
||||
local avoidance_create = function (tab, frame)
|
||||
|
||||
--> MAIN ICON
|
||||
local mainicon = frame:CreateTexture (nil, "artwork")
|
||||
mainicon:SetPoint ("topright", frame, "topright", -12, -12)
|
||||
mainicon:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-ACHIEVEMENT-SHIELDS]])
|
||||
mainicon:SetTexCoord (0, .5, .5, 1)
|
||||
mainicon:SetSize (64, 64)
|
||||
|
||||
local tankname = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
tankname:SetPoint ("right", mainicon, "left", -2, 2)
|
||||
tab.tankname = tankname
|
||||
|
||||
|
||||
--> Percent Desc
|
||||
local percent_desc = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
percent_desc:SetText ("Percent values are comparisons with the previous try.")
|
||||
@@ -1818,120 +1807,156 @@ function gump:CriaJanelaInfo()
|
||||
percent_desc:SetTextColor (.5, .5, .5, 1)
|
||||
|
||||
--> SUMMARY
|
||||
local summary_texture = frame:CreateTexture (nil, "artwork")
|
||||
summary_texture:SetPoint ("topleft", frame, "topleft", 10, -15)
|
||||
summary_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
summary_texture:SetSize (128, 16)
|
||||
local summary_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
|
||||
local summaryBox = CreateFrame ("frame", nil, frame)
|
||||
_detalhes.gump:ApplyStandardBackdrop (summaryBox)
|
||||
summaryBox:SetPoint ("topleft", frame, "topleft", 10, -15)
|
||||
summaryBox:SetSize (200, 160)
|
||||
|
||||
local y = -5
|
||||
local padding = 16
|
||||
|
||||
local summary_text = summaryBox:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
summary_text:SetText ("Summary")
|
||||
summary_text :SetPoint ("left", summary_texture, "left", 2, 0)
|
||||
summary_text :SetPoint ("topleft", summaryBox, "topleft", 5, y)
|
||||
|
||||
y = y - padding
|
||||
|
||||
--total damage received
|
||||
local damagereceived = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagereceived:SetPoint ("topleft", frame, "topleft", 15, -35)
|
||||
local damagereceived = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagereceived:SetPoint ("topleft", summaryBox, "topleft", 15, y)
|
||||
damagereceived:SetText ("Total Damage Taken:") --> localize-me
|
||||
damagereceived:SetTextColor (.8, .8, .8, 1)
|
||||
local damagereceived_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local damagereceived_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagereceived_amt:SetPoint ("left", damagereceived, "right", 2, 0)
|
||||
damagereceived_amt:SetText ("0")
|
||||
tab.damagereceived = damagereceived_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--per second
|
||||
local damagepersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagepersecond:SetPoint ("topleft", frame, "topleft", 20, -50)
|
||||
local damagepersecond = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagepersecond:SetPoint ("topleft", summaryBox, "topleft", 20, y)
|
||||
damagepersecond:SetText ("Per Second:") --> localize-me
|
||||
local damagepersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local damagepersecond_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagepersecond_amt:SetPoint ("left", damagepersecond, "right", 2, 0)
|
||||
damagepersecond_amt:SetText ("0")
|
||||
tab.damagepersecond = damagepersecond_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--total absorbs
|
||||
local absorbstotal = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotal:SetPoint ("topleft", frame, "topleft", 15, -65)
|
||||
local absorbstotal = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotal:SetPoint ("topleft", summaryBox, "topleft", 15, y)
|
||||
absorbstotal:SetText ("Total Absorbs:") --> localize-me
|
||||
absorbstotal:SetTextColor (.8, .8, .8, 1)
|
||||
local absorbstotal_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local absorbstotal_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotal_amt:SetPoint ("left", absorbstotal, "right", 2, 0)
|
||||
absorbstotal_amt:SetText ("0")
|
||||
tab.absorbstotal = absorbstotal_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--per second
|
||||
local absorbstotalpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotalpersecond:SetPoint ("topleft", frame, "topleft", 20, -80)
|
||||
local absorbstotalpersecond = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotalpersecond:SetPoint ("topleft", summaryBox, "topleft", 20, y)
|
||||
absorbstotalpersecond:SetText ("Per Second:") --> localize-me
|
||||
local absorbstotalpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local absorbstotalpersecond_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotalpersecond_amt:SetPoint ("left", absorbstotalpersecond, "right", 2, 0)
|
||||
absorbstotalpersecond_amt:SetText ("0")
|
||||
tab.absorbstotalpersecond = absorbstotalpersecond_amt
|
||||
|
||||
|
||||
--> MELEE
|
||||
|
||||
local melee_texture = frame:CreateTexture (nil, "artwork")
|
||||
melee_texture:SetPoint ("topleft", frame, "topleft", 10, -100)
|
||||
melee_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
melee_texture:SetSize (128, 16)
|
||||
local melee_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
y = -5
|
||||
|
||||
local meleeBox = CreateFrame ("frame", nil, frame)
|
||||
_detalhes.gump:ApplyStandardBackdrop (meleeBox)
|
||||
meleeBox:SetPoint ("topleft", summaryBox, "bottomleft", 0, -5)
|
||||
meleeBox:SetSize (200, 160)
|
||||
|
||||
local melee_text = meleeBox:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
melee_text:SetText ("Melee")
|
||||
melee_text :SetPoint ("left", melee_texture, "left", 2, 0)
|
||||
melee_text :SetPoint ("topleft", meleeBox, "topleft", 5, y)
|
||||
|
||||
y = y - padding
|
||||
|
||||
--dodge
|
||||
local dodge = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodge:SetPoint ("topleft", frame, "topleft", 15, -120)
|
||||
local dodge = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodge:SetPoint ("topleft", meleeBox, "topleft", 15, y)
|
||||
dodge:SetText ("Dodge:") --> localize-me
|
||||
dodge:SetTextColor (.8, .8, .8, 1)
|
||||
local dodge_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local dodge_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodge_amt:SetPoint ("left", dodge, "right", 2, 0)
|
||||
dodge_amt:SetText ("0")
|
||||
tab.dodge = dodge_amt
|
||||
|
||||
local dodgepersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodgepersecond:SetPoint ("topleft", frame, "topleft", 20, -135)
|
||||
|
||||
y = y - padding
|
||||
|
||||
local dodgepersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodgepersecond:SetPoint ("topleft", meleeBox, "topleft", 20, y)
|
||||
dodgepersecond:SetText ("Per Second:") --> localize-me
|
||||
local dodgepersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local dodgepersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodgepersecond_amt:SetPoint ("left", dodgepersecond, "right", 2, 0)
|
||||
dodgepersecond_amt:SetText ("0")
|
||||
tab.dodgepersecond = dodgepersecond_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
-- parry
|
||||
local parry = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parry:SetPoint ("topleft", frame, "topleft", 15, -150)
|
||||
local parry = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parry:SetPoint ("topleft", meleeBox, "topleft", 15, y)
|
||||
parry:SetText ("Parry:") --> localize-me
|
||||
parry:SetTextColor (.8, .8, .8, 1)
|
||||
local parry_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local parry_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parry_amt:SetPoint ("left", parry, "right", 2, 0)
|
||||
parry_amt:SetText ("0")
|
||||
tab.parry = parry_amt
|
||||
|
||||
local parrypersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parrypersecond:SetPoint ("topleft", frame, "topleft", 20, -165)
|
||||
y = y - padding
|
||||
|
||||
local parrypersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parrypersecond:SetPoint ("topleft", meleeBox, "topleft", 20, y)
|
||||
parrypersecond:SetText ("Per Second:") --> localize-me
|
||||
local parrypersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local parrypersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parrypersecond_amt:SetPoint ("left", parrypersecond, "right", 2, 0)
|
||||
parrypersecond_amt:SetText ("0")
|
||||
tab.parrypersecond = parrypersecond_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
-- block
|
||||
local block = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
block:SetPoint ("topleft", frame, "topleft", 15, -180)
|
||||
local block = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
block:SetPoint ("topleft", meleeBox, "topleft", 15, y)
|
||||
block:SetText ("Block:") --> localize-me
|
||||
block:SetTextColor (.8, .8, .8, 1)
|
||||
local block_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local block_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
block_amt:SetPoint ("left", block, "right", 2, 0)
|
||||
block_amt:SetText ("0")
|
||||
tab.block = block_amt
|
||||
|
||||
local blockpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockpersecond:SetPoint ("topleft", frame, "topleft", 20, -195)
|
||||
y = y - padding
|
||||
|
||||
local blockpersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockpersecond:SetPoint ("topleft", meleeBox, "topleft", 20, y)
|
||||
blockpersecond:SetText ("Per Second:") --> localize-me
|
||||
local blockpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local blockpersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockpersecond_amt:SetPoint ("left", blockpersecond, "right", 2, 0)
|
||||
blockpersecond_amt:SetText ("0")
|
||||
tab.blockpersecond = blockpersecond_amt
|
||||
|
||||
local blockeddamage = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockeddamage:SetPoint ("topleft", frame, "topleft", 20, -210)
|
||||
y = y - padding
|
||||
|
||||
local blockeddamage = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockeddamage:SetPoint ("topleft", meleeBox, "topleft", 20, y)
|
||||
blockeddamage:SetText ("Damage Blocked:") --> localize-me
|
||||
local blockeddamage_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local blockeddamage_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
blockeddamage_amt:SetPoint ("left", blockeddamage, "right", 2, 0)
|
||||
blockeddamage_amt:SetText ("0")
|
||||
tab.blockeddamage_amt = blockeddamage_amt
|
||||
@@ -1939,105 +1964,133 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
--> ABSORBS
|
||||
|
||||
local absorb_texture = frame:CreateTexture (nil, "artwork")
|
||||
absorb_texture:SetPoint ("topleft", frame, "topleft", 200, -15)
|
||||
absorb_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
absorb_texture:SetSize (128, 16)
|
||||
local absorb_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
y = -5
|
||||
|
||||
local absorbsBox = CreateFrame ("frame", nil, frame)
|
||||
_detalhes.gump:ApplyStandardBackdrop (absorbsBox)
|
||||
absorbsBox:SetPoint ("topleft", summaryBox, "topright", 10, 0)
|
||||
absorbsBox:SetSize (200, 160)
|
||||
|
||||
local absorb_text = absorbsBox:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
absorb_text:SetText ("Absorb")
|
||||
absorb_text :SetPoint ("left", absorb_texture, "left", 2, 0)
|
||||
absorb_text :SetPoint ("topleft", absorbsBox, "topleft", 5, y)
|
||||
|
||||
y = y - padding
|
||||
|
||||
--full absorbs
|
||||
local fullsbsorbed = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
fullsbsorbed:SetPoint ("topleft", frame, "topleft", 205, -35)
|
||||
local fullsbsorbed = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
fullsbsorbed:SetPoint ("topleft", absorbsBox, "topleft", 20, y)
|
||||
fullsbsorbed:SetText ("Full Absorbs:") --> localize-me
|
||||
fullsbsorbed:SetTextColor (.8, .8, .8, 1)
|
||||
local fullsbsorbed_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local fullsbsorbed_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
fullsbsorbed_amt:SetPoint ("left", fullsbsorbed, "right", 2, 0)
|
||||
fullsbsorbed_amt:SetText ("0")
|
||||
tab.fullsbsorbed = fullsbsorbed_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--partially absorbs
|
||||
local partiallyabsorbed = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbed:SetPoint ("topleft", frame, "topleft", 205, -50)
|
||||
local partiallyabsorbed = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbed:SetPoint ("topleft", absorbsBox, "topleft", 20, y)
|
||||
partiallyabsorbed:SetText ("Partially Absorbed:") --> localize-me
|
||||
partiallyabsorbed:SetTextColor (.8, .8, .8, 1)
|
||||
local partiallyabsorbed_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local partiallyabsorbed_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbed_amt:SetPoint ("left", partiallyabsorbed, "right", 2, 0)
|
||||
partiallyabsorbed_amt:SetText ("0")
|
||||
tab.partiallyabsorbed = partiallyabsorbed_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--partially absorbs per second
|
||||
local partiallyabsorbedpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbedpersecond:SetPoint ("topleft", frame, "topleft", 210, -65)
|
||||
local partiallyabsorbedpersecond = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbedpersecond:SetPoint ("topleft", absorbsBox, "topleft", 25, y)
|
||||
partiallyabsorbedpersecond:SetText ("Average:") --> localize-me
|
||||
local partiallyabsorbedpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local partiallyabsorbedpersecond_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbedpersecond_amt:SetPoint ("left", partiallyabsorbedpersecond, "right", 2, 0)
|
||||
partiallyabsorbedpersecond_amt:SetText ("0")
|
||||
tab.partiallyabsorbedpersecond = partiallyabsorbedpersecond_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--no absorbs
|
||||
local noabsorbs = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
noabsorbs:SetPoint ("topleft", frame, "topleft", 205, -80)
|
||||
local noabsorbs = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
noabsorbs:SetPoint ("topleft", absorbsBox, "topleft", 20, y)
|
||||
noabsorbs:SetText ("No Absorption:") --> localize-me
|
||||
noabsorbs:SetTextColor (.8, .8, .8, 1)
|
||||
local noabsorbs_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local noabsorbs_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
noabsorbs_amt:SetPoint ("left", noabsorbs, "right", 2, 0)
|
||||
noabsorbs_amt:SetText ("0")
|
||||
tab.noabsorbs = noabsorbs_amt
|
||||
|
||||
|
||||
--> HEALING
|
||||
|
||||
local healing_texture = frame:CreateTexture (nil, "artwork")
|
||||
healing_texture:SetPoint ("topleft", frame, "topleft", 200, -100)
|
||||
healing_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
healing_texture:SetSize (128, 16)
|
||||
local healing_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
y = -5
|
||||
|
||||
local healingBox = CreateFrame ("frame", nil, frame)
|
||||
_detalhes.gump:ApplyStandardBackdrop (healingBox)
|
||||
healingBox:SetPoint ("topleft", absorbsBox, "bottomleft", 0, -5)
|
||||
healingBox:SetSize (200, 160)
|
||||
|
||||
local healing_text = healingBox:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
healing_text:SetText ("Healing")
|
||||
healing_text :SetPoint ("left", healing_texture, "left", 2, 0)
|
||||
healing_text :SetPoint ("topleft", healingBox, "topleft", 5, y)
|
||||
|
||||
y = y - padding
|
||||
|
||||
--self healing
|
||||
local selfhealing = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealing:SetPoint ("topleft", frame, "topleft", 205, -120)
|
||||
local selfhealing = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealing:SetPoint ("topleft", healingBox, "topleft", 20, y)
|
||||
selfhealing:SetText ("Self Healing:") --> localize-me
|
||||
selfhealing:SetTextColor (.8, .8, .8, 1)
|
||||
local selfhealing_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local selfhealing_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealing_amt:SetPoint ("left", selfhealing, "right", 2, 0)
|
||||
selfhealing_amt:SetText ("0")
|
||||
tab.selfhealing = selfhealing_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
--self healing per second
|
||||
local selfhealingpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealingpersecond:SetPoint ("topleft", frame, "topleft", 210, -135)
|
||||
local selfhealingpersecond = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealingpersecond:SetPoint ("topleft", healingBox, "topleft", 25, y)
|
||||
selfhealingpersecond:SetText ("Per Second:") --> localize-me
|
||||
local selfhealingpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local selfhealingpersecond_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealingpersecond_amt:SetPoint ("left", selfhealingpersecond, "right", 2, 0)
|
||||
selfhealingpersecond_amt:SetText ("0")
|
||||
tab.selfhealingpersecond = selfhealingpersecond_amt
|
||||
|
||||
y = y - padding
|
||||
|
||||
for i = 1, 5 do
|
||||
local healer = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
healer:SetPoint ("topleft", frame, "topleft", 205, -160 + ((i-1)*15)*-1)
|
||||
local healer = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
healer:SetPoint ("topleft", healingBox, "topleft", 20, y + ((i-1)*15)*-1)
|
||||
healer:SetText ("healer name:") --> localize-me
|
||||
healer:SetTextColor (.8, .8, .8, 1)
|
||||
local healer_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
local healer_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
healer_amt:SetPoint ("left", healer, "right", 2, 0)
|
||||
healer_amt:SetText ("0")
|
||||
tab ["healer" .. i] = {healer, healer_amt}
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--SPELLS
|
||||
local spells_texture = frame:CreateTexture (nil, "artwork")
|
||||
spells_texture:SetPoint ("topleft", frame, "topleft", 400, -80)
|
||||
spells_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
spells_texture:SetSize (128, 16)
|
||||
local spells_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
|
||||
y = -5
|
||||
|
||||
local spellsBox = CreateFrame ("frame", nil, frame)
|
||||
_detalhes.gump:ApplyStandardBackdrop (spellsBox)
|
||||
spellsBox:SetPoint ("topleft", absorbsBox, "topright", 10, 0)
|
||||
spellsBox:SetSize (300, 160 * 2 + 5)
|
||||
|
||||
local spells_text = spellsBox:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
spells_text:SetText ("Spells")
|
||||
spells_text :SetPoint ("left", spells_texture, "left", 2, 0)
|
||||
spells_text :SetPoint ("topleft", spellsBox, "topleft", 5, y)
|
||||
|
||||
local frame_tooltip_onenter = function (self)
|
||||
if (self.spellid) then
|
||||
self:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 512, edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 8})
|
||||
--self:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 512, edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 8})
|
||||
self:SetBackdropColor (.5, .5, .5, .5)
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
_detalhes:GameTooltipSetSpellByID (self.spellid)
|
||||
@@ -2046,18 +2099,22 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
local frame_tooltip_onleave = function (self)
|
||||
if (self.spellid) then
|
||||
self:SetBackdrop (nil)
|
||||
self:SetBackdropColor (.5, .5, .5, .1)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 10 do
|
||||
local frame_tooltip = CreateFrame ("frame", nil, frame)
|
||||
frame_tooltip:SetPoint ("topleft", frame, "topleft", 405, -100 + ((i-1)*15)*-1)
|
||||
y = y - padding
|
||||
|
||||
for i = 1, 18 do
|
||||
local frame_tooltip = CreateFrame ("frame", nil, spellsBox)
|
||||
frame_tooltip:SetPoint ("topleft", spellsBox, "topleft", 20, y + ((i-1)*16)*-1)
|
||||
frame_tooltip:SetSize (150, 14)
|
||||
frame_tooltip:SetScript ("OnEnter", frame_tooltip_onenter)
|
||||
frame_tooltip:SetScript ("OnLeave", frame_tooltip_onleave)
|
||||
|
||||
frame_tooltip:SetBackdropColor (.5, .5, .5, .1)
|
||||
|
||||
local icon = frame_tooltip:CreateTexture (nil, "artwork")
|
||||
icon:SetSize (14, 14)
|
||||
icon:SetPoint ("left", frame_tooltip, "left")
|
||||
@@ -2117,44 +2174,6 @@ function gump:CriaJanelaInfo()
|
||||
return ps, diff
|
||||
end
|
||||
|
||||
-- ~buff
|
||||
local spells_by_class = { --buffss uptime
|
||||
["DRUID"] = {
|
||||
[132402] = true, --savage defense
|
||||
[135286] = true, -- tooth and claw
|
||||
},
|
||||
["DEATHKNIGHT"] = {
|
||||
[145677] = true, --riposte
|
||||
[77535] = true, --blood shield
|
||||
--[49222] = true, --bone shield
|
||||
[51460] = true, --runic corruption
|
||||
},
|
||||
["MONK"] = {
|
||||
[115295] = true, --guard
|
||||
[115307] = true, --shuffle
|
||||
[115308] = true, --elusive brew
|
||||
--[128939] = true, --elusive brew
|
||||
[125359] = true, --tiger power
|
||||
},
|
||||
["PALADIN"] = {
|
||||
[132403] = true, --shield of the righteous
|
||||
[114163] = true, --eternal-flame
|
||||
[20925] = true, --sacred shield
|
||||
},
|
||||
["WARRIOR"] = {
|
||||
[145672] = true, --riposte
|
||||
[2565] = true, -- shield Block
|
||||
[871] = true, --shield wall
|
||||
[112048] = true, --shield barrier
|
||||
},
|
||||
["DEMONHUNTER"] = {
|
||||
[178740] = true, --immolation aura --178741
|
||||
[203819] = true, --Demon Spikes
|
||||
[187827] = true, --Metamorphosis
|
||||
[218256] = true, --Empower Wards
|
||||
},
|
||||
}
|
||||
|
||||
local avoidance_fill = function (tab, player, combat)
|
||||
|
||||
local elapsed_time = combat:GetCombatTime()
|
||||
@@ -2168,7 +2187,6 @@ function gump:CriaJanelaInfo()
|
||||
if (n:find ("-")) then
|
||||
n = n:gsub (("-.*"), "")
|
||||
end
|
||||
tab.tankname:SetText ("Avoidance of\n" .. n) --> localize-me
|
||||
|
||||
--> damage taken
|
||||
local playerdamage = combat (1, player.nome)
|
||||
@@ -2358,22 +2376,25 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
--> Spells
|
||||
--> cooldowns
|
||||
|
||||
local index_used = 1
|
||||
|
||||
local misc_player = combat (4, player.nome)
|
||||
|
||||
if (misc_player) then
|
||||
if (misc_player.cooldowns_defensive_spells) then
|
||||
local minha_tabela = misc_player.cooldowns_defensive_spells._ActorTable
|
||||
local buffUpdateSpells = misc_player.buff_uptime_spells -- ._ActorTable
|
||||
local encounter_time = combat:GetCombatTime()
|
||||
|
||||
local cooldowns_usados = {}
|
||||
|
||||
for _spellid, _tabela in pairs (minha_tabela) do
|
||||
cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter}
|
||||
end
|
||||
table.sort (cooldowns_usados, _detalhes.Sort2)
|
||||
|
||||
|
||||
if (#cooldowns_usados > 1) then
|
||||
|
||||
table.sort (cooldowns_usados, _detalhes.Sort2)
|
||||
|
||||
for i = 1, #cooldowns_usados do
|
||||
local esta_habilidade = cooldowns_usados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
@@ -2381,35 +2402,17 @@ function gump:CriaJanelaInfo()
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. i])
|
||||
framebg.spellid = esta_habilidade[1]
|
||||
|
||||
--> attempt to get the buff update
|
||||
local spellInfo = buffUpdateSpells:GetSpell (framebg.spellid)
|
||||
if (spellInfo) then
|
||||
label2:SetText (esta_habilidade[2] .. " (" .. floor (spellInfo.uptime / encounter_time * 100) .. "% uptime)")
|
||||
else
|
||||
label2:SetText (esta_habilidade[2])
|
||||
end
|
||||
|
||||
--> update the line
|
||||
label1:SetText (nome_magia .. ":")
|
||||
label2:SetText (esta_habilidade[2])
|
||||
icon1:SetTexture (icone_magia)
|
||||
icon1:SetTexCoord (0.0625, 0.953125, 0.0625, 0.953125)
|
||||
|
||||
index_used = index_used + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> buffs uptime
|
||||
if (index_used < 11) then
|
||||
if (misc_player.buff_uptime_spells) then
|
||||
local minha_tabela = misc_player.buff_uptime_spells._ActorTable
|
||||
|
||||
local encounter_time = combat:GetCombatTime()
|
||||
|
||||
for _spellid, _tabela in pairs (minha_tabela) do
|
||||
if (spells_by_class [player.classe] [_spellid] and index_used <= 10) then
|
||||
local nome_magia, _, icone_magia = GetSpellInfo (_spellid)
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. index_used])
|
||||
|
||||
framebg.spellid = _spellid
|
||||
|
||||
local t = _tabela.uptime / encounter_time * 100
|
||||
label1:SetText (nome_magia .. ":")
|
||||
local minutos, segundos = _math_floor (_tabela.uptime / 60), _math_floor (_tabela.uptime % 60)
|
||||
label2:SetText (minutos .. "m " .. segundos .. "s" .. " (" .. _math_floor (t) .. "%)")
|
||||
icon1:SetTexture (icone_magia)
|
||||
icon1:SetTexCoord (0.0625, 0.953125, 0.0625, 0.953125)
|
||||
|
||||
@@ -2419,7 +2422,7 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
end
|
||||
|
||||
for i = index_used, 10 do
|
||||
for i = index_used, 18 do
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. i])
|
||||
|
||||
framebg.spellid = nil
|
||||
|
||||
+31
-11
@@ -542,10 +542,32 @@ do
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
window_color:Hide()
|
||||
options_button:Hide()
|
||||
forge_button:Hide()
|
||||
history_button:Hide()
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--show animation
|
||||
local animHub = _detalhes.gump:CreateAnimationHub (frame, function() frame:Show() end)
|
||||
_detalhes.gump:CreateAnimation (animHub, "scale", 1, 0.04, 0, 1, 1, 1, "LEFT", 0, 0)
|
||||
_detalhes.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 0, 1)
|
||||
frame.ShowAnimation = animHub
|
||||
|
||||
--hide animation
|
||||
local animHub = _detalhes.gump:CreateAnimationHub (frame, function() frame:Show() end, function() frame:Hide() end)
|
||||
_detalhes.gump:CreateAnimation (animHub, "scale", 1, 0.04, 1, 1, 0, 1, "RIGHT", 0, 0)
|
||||
_detalhes.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 1, 0)
|
||||
frame.HideAnimation = animHub
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes.switch:CloseMe()
|
||||
_detalhes.switch.frame:Hide()
|
||||
--_detalhes.switch.frame:Hide()
|
||||
|
||||
_detalhes.switch.frame.HideAnimation:Play()
|
||||
|
||||
GameCooltip:Hide()
|
||||
_detalhes.switch.frame:SetBackdropColor (0, 0, 0, .7)
|
||||
_detalhes.switch.current_instancia:StatusBarAlert (nil)
|
||||
@@ -560,7 +582,7 @@ do
|
||||
frame:Hide()
|
||||
|
||||
_detalhes.switch.frame = frame
|
||||
_detalhes.switch.button_height = 20
|
||||
_detalhes.switch.button_height = 24
|
||||
end
|
||||
|
||||
_detalhes.switch.buttons = {}
|
||||
@@ -890,7 +912,8 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
_detalhes.switch:Update()
|
||||
|
||||
_detalhes.switch.frame:SetScale (instancia.window_scale)
|
||||
_detalhes.switch.frame:Show()
|
||||
--_detalhes.switch.frame:Show()
|
||||
_detalhes.switch.frame.ShowAnimation:Play()
|
||||
|
||||
if (not _detalhes.tutorial.bookmark_tutorial) then
|
||||
|
||||
@@ -1224,7 +1247,7 @@ function _detalhes.switch:Update()
|
||||
button.button2.texto:SetText (name)
|
||||
local text_width = button.button2.texto:GetStringWidth()
|
||||
while (text_width > _detalhes.switch.text_size) do
|
||||
_detalhes:SetFontSize (button.button2.texto, 9)
|
||||
_detalhes:SetFontSize (button.button2.texto, _detalhes.bookmark_text_size)
|
||||
local text = button.button2.texto:GetText()
|
||||
text = strsub (text, 1, #text-1)
|
||||
button.button2.texto:SetText (text)
|
||||
@@ -1267,7 +1290,7 @@ function _detalhes.switch:Update()
|
||||
y = y + _detalhes.switch.button_height
|
||||
jump = false
|
||||
else
|
||||
x = x + 125
|
||||
x = x + 1254
|
||||
jump = true
|
||||
end
|
||||
|
||||
@@ -1349,7 +1372,7 @@ function _detalhes.switch:Resize (precisa_mostrar)
|
||||
break
|
||||
end
|
||||
end
|
||||
y = y + y_increment
|
||||
y = y + y_increment + 2
|
||||
end
|
||||
|
||||
_detalhes.switch.slots = i-1
|
||||
@@ -1524,7 +1547,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
--botao dentro da caixa
|
||||
local button = CreateFrame ("button", "DetailsSwitchPanelButton_1_"..index, frame) --botao com o icone
|
||||
button:SetSize (15, 15)
|
||||
button:SetSize (15, 24)
|
||||
button:SetPoint ("topleft", frame, "topleft", x, -y)
|
||||
button:SetScript ("OnMouseDown", left_box_on_click)
|
||||
button:SetScript ("OnEnter", oniconenter)
|
||||
@@ -1534,7 +1557,6 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
--borda
|
||||
button.fundo = button:CreateTexture (nil, "overlay")
|
||||
--button.fundo:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
button.fundo:SetTexCoord (0.00390625, 0.27734375, 0.44140625,0.69531250)
|
||||
button.fundo:SetWidth (26)
|
||||
button.fundo:SetHeight (24)
|
||||
@@ -1544,7 +1566,6 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
local fundo_x = -3
|
||||
local fundo_y = -5
|
||||
button.line = button:CreateTexture (nil, "background")
|
||||
-- button.line:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
button.line:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
button.line:SetWidth (85)
|
||||
button.line:SetPoint ("topleft", button, "topright", fundo_x-14, 0)
|
||||
@@ -1553,7 +1574,6 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
--fundo marrom 2
|
||||
button.line2 = button:CreateTexture (nil, "background")
|
||||
-- button.line2:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
button.line2:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
button.line2:SetWidth (85)
|
||||
button.line2:SetPoint ("topleft", button, "topright", fundo_x, 0)
|
||||
@@ -1588,7 +1608,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
button2.texto:SetPoint ("left", button, "right", 5, -1)
|
||||
button2.texto:SetTextColor (.9, .9, .9, .9)
|
||||
|
||||
_detalhes:SetFontSize (button2.texto, 10)
|
||||
_detalhes:SetFontSize (button2.texto, _detalhes.bookmark_text_size)
|
||||
|
||||
button.texto = button2.texto
|
||||
|
||||
|
||||
Binary file not shown.
@@ -12,6 +12,9 @@ local DF = DetailsFramework
|
||||
--> build the list of buffs to track
|
||||
local flask_list = DetailsFramework.FlaskIDs
|
||||
|
||||
local is_drinking = 257428
|
||||
local localizedFoodDrink
|
||||
|
||||
local food_list = {
|
||||
tier1 = {},
|
||||
tier2 = {},
|
||||
@@ -63,7 +66,7 @@ end
|
||||
tinsert (UISpecialFrames, "DetailsRaidCheck")
|
||||
DetailsRaidCheck:SetPluginDescription (Loc ["STRING_RAIDCHECK_PLUGIN_DESC"])
|
||||
|
||||
local version = "v0.6"
|
||||
local version = "v2.0"
|
||||
|
||||
local debugmode = false
|
||||
--local debugmode = true
|
||||
@@ -78,6 +81,7 @@ end
|
||||
DetailsRaidCheck.focusaug_table = {}
|
||||
DetailsRaidCheck.haveflask_table = {}
|
||||
DetailsRaidCheck.havefood_table = {}
|
||||
DetailsRaidCheck.iseating_table = {}
|
||||
DetailsRaidCheck.havefocusaug_table = {}
|
||||
|
||||
DetailsRaidCheck.on_raid = false
|
||||
@@ -86,7 +90,7 @@ end
|
||||
local empty_table = {}
|
||||
|
||||
local PlayerData = {}
|
||||
local UpdateSpeed = .3
|
||||
local UpdateSpeed = 0.5
|
||||
|
||||
function DetailsRaidCheck:OnDetailsEvent (event, ...)
|
||||
|
||||
@@ -99,19 +103,12 @@ end
|
||||
DetailsRaidCheck.usedprepot_table, DetailsRaidCheck.focusaug_table = select (1, ...)
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then
|
||||
|
||||
if (DetailsRaidCheck.on_raid) then
|
||||
DetailsRaidCheck:StartTrackBuffs()
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then
|
||||
|
||||
if (DetailsRaidCheck.on_raid) then
|
||||
DetailsRaidCheck:StopTrackBuffs()
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
|
||||
localizedFoodDrink = GetSpellInfo (is_drinking)
|
||||
DetailsRaidCheck:CheckZone()
|
||||
|
||||
elseif (event == "PLUGIN_DISABLED") then
|
||||
@@ -247,14 +244,14 @@ end
|
||||
local scroll_width = 722
|
||||
local scroll_lines = 30
|
||||
local scroll_line_height = 16
|
||||
local scroll_height = scroll_lines * scroll_line_height
|
||||
local scroll_height = (scroll_lines * scroll_line_height) + scroll_lines + 2
|
||||
local backdrop_color = {.2, .2, .2, 0.2}
|
||||
local backdrop_color_on_enter = {.8, .8, .8, 0.4}
|
||||
local y = -10
|
||||
local headerY = y - 2
|
||||
local scrollY = headerY - 20
|
||||
|
||||
show_panel:SetSize (722 + 20, 540)
|
||||
show_panel:SetSize (722 + 20, 580)
|
||||
|
||||
--create line for the scroll
|
||||
local scroll_createline = function (self, index)
|
||||
@@ -287,6 +284,7 @@ end
|
||||
icon_height = 16,
|
||||
texcoord = {.1, .9, .1, .9},
|
||||
show_text = false,
|
||||
icon_padding = 2,
|
||||
}
|
||||
local talentsRow = DF:CreateIconRow (line, "$parentTalentIconsRow", talent_row_options)
|
||||
|
||||
@@ -294,21 +292,21 @@ end
|
||||
local itemLevel = DF:CreateLabel (line)
|
||||
|
||||
--no food
|
||||
local noFood = DF:CreateLabel (line)
|
||||
local FoodIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--no flask
|
||||
local noFlask = DF:CreateLabel (line)
|
||||
local FlaskIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--no rune
|
||||
local noRune = DF:CreateLabel (line)
|
||||
local RuneIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--no pre pot
|
||||
local noPrePot = DF:CreateLabel (line)
|
||||
local PrePotIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
|
||||
line:AddFrameToHeaderAlignment (roleIcon)
|
||||
line:AddFrameToHeaderAlignment (talentsRow)
|
||||
line:AddFrameToHeaderAlignment (itemLevel)
|
||||
line:AddFrameToHeaderAlignment (noFood)
|
||||
line:AddFrameToHeaderAlignment (noFlask)
|
||||
line:AddFrameToHeaderAlignment (noRune)
|
||||
line:AddFrameToHeaderAlignment (noPrePot)
|
||||
line:AddFrameToHeaderAlignment (FoodIndicator)
|
||||
line:AddFrameToHeaderAlignment (FlaskIndicator)
|
||||
line:AddFrameToHeaderAlignment (RuneIndicator)
|
||||
line:AddFrameToHeaderAlignment (PrePotIndicator)
|
||||
|
||||
line:AlignWithHeader (DetailsRaidCheck.Header, "left")
|
||||
|
||||
@@ -317,17 +315,18 @@ end
|
||||
line.PlayerName = playerName
|
||||
line.TalentsRow = talentsRow
|
||||
line.ItemLevel = itemLevel
|
||||
line.NoFood = noFood
|
||||
line.NoFlask = noFlask
|
||||
line.NoRune = noRune
|
||||
line.NoPrePot = noPrePot
|
||||
line.FoodIndicator = FoodIndicator
|
||||
line.FlaskIndicator = FlaskIndicator
|
||||
line.RuneIndicator = RuneIndicator
|
||||
line.PrePotIndicator = PrePotIndicator
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
local noFoodText = "|cFFFF2222X|r"
|
||||
|
||||
--refresh scroll
|
||||
local has_food_icon = {texture = [[Interface\Scenarios\ScenarioIcon-Check]], coords = {0, 1, 0, 1}}
|
||||
local eating_food_icon = {texture = [[Interface\AddOns\Details\images\icons]], coords = {225/512, 249/512, 35/512, 63/512}}
|
||||
|
||||
local scroll_refresh = function (self, data, offset, total_lines)
|
||||
|
||||
local dataInOrder = {}
|
||||
@@ -336,7 +335,8 @@ end
|
||||
dataInOrder [#dataInOrder+1] = data [i]
|
||||
end
|
||||
|
||||
table.sort (dataInOrder, DF.SortOrder1R)
|
||||
table.sort (dataInOrder, DF.SortOrder2)
|
||||
--table.sort (dataInOrder, DF.SortOrder1R) --alphabetical
|
||||
data = dataInOrder
|
||||
|
||||
for i = 1, total_lines do
|
||||
@@ -371,28 +371,32 @@ end
|
||||
line.TalentsRow:SetIcon (false, false, false, false, texture)
|
||||
end
|
||||
end
|
||||
|
||||
-- line.TalentsRow = talentsRow
|
||||
|
||||
local classColor = Details.class_colors [playerTable.Class]
|
||||
if (classColor) then
|
||||
line:SetBackdropColor (unpack (classColor))
|
||||
else
|
||||
line:SetBackdropColor (unpack (backdrop_color))
|
||||
end
|
||||
|
||||
line.PlayerName.text = playerTable.Name
|
||||
line.ItemLevel.text = floor (playerTable.ILevel.ilvl or 0)
|
||||
line.NoFood.text = playerTable.Food and noFoodText or ""
|
||||
line.NoFlask.text = playerTable.Flask and noFoodText or ""
|
||||
line.NoRune.text = playerTable.Rune and noFoodText or ""
|
||||
line.NoPrePot.text = playerTable.PrePot and noFoodText or ""
|
||||
line.ItemLevel.text = floor (playerTable.ILevel and playerTable.ILevel.ilvl or 0)
|
||||
|
||||
--[=[
|
||||
Name = unitName,
|
||||
Class = unitClass,
|
||||
Role = unitRole,
|
||||
Spec = unitSpec,
|
||||
ILevel = itemLevelTable,
|
||||
Talents = talentsTable,
|
||||
Food = DetailsRaidCheck.havefood_table [unitName],
|
||||
Flask = DetailsRaidCheck.haveflask_table [unitName],
|
||||
PrePot = DetailsRaidCheck.usedprepot_table [cleuName],
|
||||
Rune = DetailsRaidCheck.havefocusaug_table [unitName],
|
||||
--]=]
|
||||
if (playerTable.Food) then
|
||||
line.FoodIndicator.texture = has_food_icon.texture
|
||||
line.FoodIndicator.texcoord = has_food_icon.coords
|
||||
|
||||
elseif (playerTable.Eating) then
|
||||
line.FoodIndicator.texture = eating_food_icon.texture
|
||||
line.FoodIndicator.texcoord = eating_food_icon.coords
|
||||
|
||||
else
|
||||
line.FoodIndicator.texture = ""
|
||||
end
|
||||
|
||||
line.FlaskIndicator.texture = playerTable.Flask and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
line.RuneIndicator.texture = playerTable.Rune and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
line.PrePotIndicator.texture = playerTable.PrePot and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -404,6 +408,7 @@ end
|
||||
DF:ReskinSlider (mainScroll)
|
||||
mainScroll.HideScrollBar = true
|
||||
mainScroll:SetPoint ("topleft", show_panel, "topleft", 10, scrollY)
|
||||
mainScroll:Refresh()
|
||||
|
||||
--create lines
|
||||
for i = 1, scroll_lines do
|
||||
@@ -440,12 +445,14 @@ end
|
||||
local unitID = get_unit_id (i)
|
||||
|
||||
local name = UnitName (unitID)
|
||||
if (not DetailsRaidCheck.havefood_table [name]) then
|
||||
added [name] = true
|
||||
local unitSerial = UnitGUID (unitID)
|
||||
|
||||
if (not DetailsRaidCheck.havefood_table [unitSerial]) then
|
||||
added [unitSerial] = true
|
||||
s = s .. DetailsRaidCheck:GetOnlyName (name) .. " "
|
||||
end
|
||||
|
||||
if (not DetailsRaidCheck.haveflask_table [name] and not added [name]) then
|
||||
if (not DetailsRaidCheck.haveflask_table [unitSerial] and not added [unitSerial]) then
|
||||
s = s .. DetailsRaidCheck:GetOnlyName (name) .. " "
|
||||
end
|
||||
end
|
||||
@@ -514,8 +521,11 @@ end
|
||||
|
||||
for i = 1, amt do
|
||||
local unitID = get_unit_id (i)
|
||||
|
||||
local name = UnitName (unitID)
|
||||
if (not DetailsRaidCheck.havefocusaug_table [name]) then
|
||||
local unitSerial = UnitGUID (unitID)
|
||||
|
||||
if (not DetailsRaidCheck.havefocusaug_table [unitSerial]) then
|
||||
s = s .. DetailsRaidCheck:GetOnlyName (name) .. " "
|
||||
end
|
||||
end
|
||||
@@ -534,9 +544,7 @@ end
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
local update_panel = function (self, elapsed)
|
||||
show_panel.NextUpdate = show_panel.NextUpdate - elapsed
|
||||
|
||||
@@ -561,23 +569,28 @@ end
|
||||
local unitName = UnitName (unitID)
|
||||
local cleuName = _detalhes:GetCLName (unitID)
|
||||
local unitSerial = UnitGUID (unitID)
|
||||
local _, unitClass = UnitClass (unitID)
|
||||
local _, unitClass, unitClassID = UnitClass (unitID)
|
||||
local unitRole = UnitGroupRolesAssigned (unitID)
|
||||
local unitSpec = _detalhes:GetSpecFromSerial (unitSerial) or _detalhes:GetSpec (cleuName)
|
||||
local itemLevelTable = _detalhes.ilevel:GetIlvl (unitSerial)
|
||||
local talentsTable = _detalhes:GetTalents (unitSerial)
|
||||
|
||||
--> order by class > alphabetically by the unit name
|
||||
unitClassID = ((unitClassID + 128) ^ 3) + tonumber (string.byte (unitName, 1) .. "" .. string.byte (unitName, 2))
|
||||
|
||||
tinsert (PlayerData, {unitName,
|
||||
tinsert (PlayerData, {unitName, unitClassID,
|
||||
Name = unitName,
|
||||
Class = unitClass,
|
||||
Serial = unitSerial,
|
||||
Role = unitRole,
|
||||
Spec = unitSpec,
|
||||
ILevel = itemLevelTable,
|
||||
Talents = talentsTable,
|
||||
Food = DetailsRaidCheck.havefood_table [unitName],
|
||||
Flask = DetailsRaidCheck.haveflask_table [unitName],
|
||||
Food = DetailsRaidCheck.havefood_table [unitSerial],
|
||||
Flask = DetailsRaidCheck.haveflask_table [unitSerial],
|
||||
PrePot = DetailsRaidCheck.usedprepot_table [cleuName],
|
||||
Rune = DetailsRaidCheck.havefocusaug_table [unitName],
|
||||
Rune = DetailsRaidCheck.havefocusaug_table [unitSerial],
|
||||
Eating = DetailsRaidCheck.iseating_table [unitSerial],
|
||||
})
|
||||
end
|
||||
|
||||
@@ -588,23 +601,27 @@ end
|
||||
local unitName = UnitName (unitID)
|
||||
local cleuName = _detalhes:GetCLName (unitID)
|
||||
local unitSerial = UnitGUID (unitID)
|
||||
local _, unitClass = UnitClass (unitID)
|
||||
local _, unitClass, unitClassID = UnitClass (unitID)
|
||||
local unitRole = UnitGroupRolesAssigned (unitID)
|
||||
local unitSpec = _detalhes:GetSpecFromSerial (unitSerial) or _detalhes:GetSpec (cleuName)
|
||||
local itemLevelTable = _detalhes.ilevel:GetIlvl (unitSerial)
|
||||
local talentsTable = _detalhes:GetTalents (unitSerial)
|
||||
|
||||
unitClassID = ((unitClassID + 128) ^ 3) + tonumber (string.byte (unitName, 1) .. "" .. string.byte (unitName, 2))
|
||||
|
||||
tinsert (PlayerData, {unitName,
|
||||
tinsert (PlayerData, {unitName, unitClassID,
|
||||
Name = unitName,
|
||||
Class = unitClass,
|
||||
Serial = unitSerial,
|
||||
Role = unitRole,
|
||||
Spec = unitSpec,
|
||||
ILevel = itemLevelTable,
|
||||
Talents = talentsTable,
|
||||
Food = DetailsRaidCheck.havefood_table [unitName],
|
||||
Flask = DetailsRaidCheck.haveflask_table [unitName],
|
||||
Food = DetailsRaidCheck.havefood_table [unitSerial],
|
||||
Flask = DetailsRaidCheck.haveflask_table [unitSerial],
|
||||
PrePot = DetailsRaidCheck.usedprepot_table [cleuName],
|
||||
Rune = DetailsRaidCheck.havefocusaug_table [unitName],
|
||||
Rune = DetailsRaidCheck.havefocusaug_table [unitSerial],
|
||||
Eating = DetailsRaidCheck.iseating_table [unitSerial],
|
||||
})
|
||||
end
|
||||
|
||||
@@ -618,27 +635,16 @@ end
|
||||
show_panel.NextUpdate = UpdateSpeed
|
||||
update_panel (show_panel, 1)
|
||||
show_panel:SetScript ("OnUpdate", update_panel)
|
||||
DetailsRaidCheck:StartTrackBuffs()
|
||||
end)
|
||||
|
||||
DetailsRaidCheck.ToolbarButton:SetScript ("OnLeave", function (self)
|
||||
show_panel:SetScript ("OnUpdate", nil)
|
||||
show_panel:Hide()
|
||||
DetailsRaidCheck:StopTrackBuffs()
|
||||
end)
|
||||
|
||||
function DetailsRaidCheck:CheckZone (...)
|
||||
|
||||
if (debugmode) then
|
||||
DetailsRaidCheck:ShowToolbarIcon (DetailsRaidCheck.ToolbarButton, "star")
|
||||
|
||||
DetailsRaidCheck.on_raid = true
|
||||
|
||||
if (not DetailsRaidCheck.in_combat) then
|
||||
DetailsRaidCheck:StartTrackBuffs()
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
zone_type = select (1, ...)
|
||||
|
||||
if (not zone_type) then
|
||||
@@ -647,118 +653,111 @@ end
|
||||
|
||||
if (zone_type == "raid" or zone_type == "party") then
|
||||
DetailsRaidCheck:ShowToolbarIcon (DetailsRaidCheck.ToolbarButton, "star")
|
||||
|
||||
DetailsRaidCheck.on_raid = true
|
||||
|
||||
if (not DetailsRaidCheck.in_combat) then
|
||||
DetailsRaidCheck:StartTrackBuffs()
|
||||
end
|
||||
else
|
||||
DetailsRaidCheck:HideToolbarIcon (DetailsRaidCheck.ToolbarButton)
|
||||
|
||||
DetailsRaidCheck.on_raid = false
|
||||
end
|
||||
end
|
||||
|
||||
function DetailsRaidCheck:CheckUnitBuffs (unitID, consumableTable)
|
||||
local name = UnitName (unitID)
|
||||
local unitSerial = UnitGUID (unitID)
|
||||
|
||||
for buffIndex = 1, 40 do
|
||||
local bname, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellid = UnitBuff (unitID, buffIndex)
|
||||
|
||||
if (DetailsRaidCheck.tracking_buffs) then
|
||||
DetailsRaidCheck:StopTrackBuffs()
|
||||
if (bname) then
|
||||
if (flask_list [spellid]) then
|
||||
DetailsRaidCheck.haveflask_table [unitSerial] = spellid
|
||||
consumableTable.Flask = consumableTable.Flask + 1
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier1) then
|
||||
if (food_list.tier1 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [unitSerial] = 1
|
||||
consumableTable.Food = consumableTable.Food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier2) then
|
||||
if (food_list.tier2 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [unitSerial] = 2
|
||||
consumableTable.Food = consumableTable.Food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier3) then
|
||||
if (food_list.tier3 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [unitSerial] = 3
|
||||
consumableTable.Food = consumableTable.Food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (runes_id [spellid]) then
|
||||
DetailsRaidCheck.havefocusaug_table [unitSerial] = spellid
|
||||
end
|
||||
|
||||
if (bname == localizedFoodDrink) then
|
||||
DetailsRaidCheck.iseating_table [unitSerial] = true
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function DetailsRaidCheck:BuffTrackTick()
|
||||
|
||||
wipe (DetailsRaidCheck.haveflask_table)
|
||||
wipe (DetailsRaidCheck.havefood_table)
|
||||
wipe (DetailsRaidCheck.havefocusaug_table)
|
||||
wipe (DetailsRaidCheck.iseating_table)
|
||||
|
||||
local playerAmount = DetailsRaidCheck.GetPlayerAmount()
|
||||
local with_flask, with_food = 0, 0
|
||||
|
||||
local hasConsumables = {
|
||||
Flask = 0,
|
||||
Food = 0,
|
||||
}
|
||||
|
||||
for i = 1, playerAmount do
|
||||
|
||||
local unitID = get_unit_id (i)
|
||||
local name = UnitName (unitID)
|
||||
|
||||
for buffIndex = 1, 40 do
|
||||
local bname, _, _, _, _, _, _, _, _, _, spellid = UnitBuff (unitID, buffIndex)
|
||||
|
||||
if (bname) then
|
||||
if (flask_list [spellid]) then
|
||||
DetailsRaidCheck.haveflask_table [name] = spellid
|
||||
with_flask = with_flask + 1
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier1) then
|
||||
if (food_list.tier1 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [name] = 1
|
||||
with_food = with_food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier2) then
|
||||
if (food_list.tier2 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [name] = 2
|
||||
with_food = with_food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsRaidCheck.db.food_tier3) then
|
||||
if (food_list.tier3 [spellid]) then
|
||||
DetailsRaidCheck.havefood_table [name] = 3
|
||||
with_food = with_food + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (runes_id [spellid]) then
|
||||
DetailsRaidCheck.havefocusaug_table [name] = spellid
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
DetailsRaidCheck:CheckUnitBuffs (unitID, hasConsumables)
|
||||
end
|
||||
|
||||
if (with_food == playerAmount and with_flask == playerAmount) then
|
||||
if (not IsInRaid()) then
|
||||
--> track buffs on the player it self
|
||||
DetailsRaidCheck:CheckUnitBuffs ("player", hasConsumables)
|
||||
|
||||
--> increase the amount of players in 1 since DetailsRaidCheck.GetPlayerAmount() returns total - 1
|
||||
playerAmount = playerAmount + 1
|
||||
end
|
||||
|
||||
if (hasConsumables.Food == playerAmount and hasConsumables.Flask == playerAmount) then
|
||||
DetailsRaidCheck:SetGreenIcon()
|
||||
else
|
||||
DetailsRaidCheck:SetRedIcon()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- DETAILS_PLUGIN_RAIDCHECK
|
||||
-- /run vardump (DETAILS_PLUGIN_RAIDCHECK.havefood_table)
|
||||
-- DETAILS_PLUGIN_RAIDCHECK.tracking_buffs
|
||||
-- /run DETAILS_PLUGIN_RAIDCHECK:StartTrackBuffs()
|
||||
-- /run DETAILS_PLUGIN_RAIDCHECK:StopTrackBuffs()
|
||||
|
||||
function DetailsRaidCheck:StartTrackBuffs()
|
||||
|
||||
if (not DetailsRaidCheck.tracking_buffs) then
|
||||
DetailsRaidCheck.tracking_buffs = true
|
||||
|
||||
table.wipe (DetailsRaidCheck.haveflask_table)
|
||||
table.wipe (DetailsRaidCheck.havefood_table)
|
||||
DetailsRaidCheck:BuffTrackTick()
|
||||
|
||||
if (DetailsRaidCheck.tracking_buffs_process) then
|
||||
DetailsRaidCheck:CancelTimer (DetailsRaidCheck.tracking_buffs_process)
|
||||
if (DetailsRaidCheck.UpdateBuffsTick and not DetailsRaidCheck.UpdateBuffsTick._cancelled) then
|
||||
DetailsRaidCheck.UpdateBuffsTick:Cancel()
|
||||
end
|
||||
|
||||
DetailsRaidCheck.tracking_buffs_process = DetailsRaidCheck:ScheduleRepeatingTimer ("BuffTrackTick", 1)
|
||||
DetailsRaidCheck.UpdateBuffsTick = C_Timer.NewTicker (UpdateSpeed-0.01, DetailsRaidCheck.BuffTrackTick)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function DetailsRaidCheck:StopTrackBuffs()
|
||||
if (DetailsRaidCheck.tracking_buffs) then
|
||||
DetailsRaidCheck.tracking_buffs = false
|
||||
|
||||
if (DetailsRaidCheck.tracking_buffs_process) then
|
||||
DetailsRaidCheck:CancelTimer (DetailsRaidCheck.tracking_buffs_process)
|
||||
end
|
||||
else
|
||||
if (DetailsRaidCheck.tracking_buffs_process) then
|
||||
DetailsRaidCheck:CancelTimer (DetailsRaidCheck.tracking_buffs_process)
|
||||
end
|
||||
DetailsRaidCheck.tracking_buffs = false
|
||||
if (DetailsRaidCheck.UpdateBuffsTick and not DetailsRaidCheck.UpdateBuffsTick._cancelled) then
|
||||
DetailsRaidCheck.UpdateBuffsTick:Cancel()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -766,9 +765,11 @@ end
|
||||
|
||||
local build_options_panel = function()
|
||||
|
||||
local options_frame = DetailsRaidCheck:CreatePluginOptionsFrame ("DetailsRaidCheckOptionsWindow", "Details Raid Check Options", 1)
|
||||
local options_frame = DetailsRaidCheck:CreatePluginOptionsFrame ("DetailsRaidCheckOptionsWindow", "Details! Raid Check Options", 1)
|
||||
|
||||
local menu = {
|
||||
|
||||
{type = "label", get = function() return "General Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return DetailsRaidCheck.db.pre_pot_healers end,
|
||||
@@ -787,9 +788,11 @@ local build_options_panel = function()
|
||||
type = "toggle",
|
||||
get = function() return DetailsRaidCheck.db.mythic_1_4 end,
|
||||
set = function (self, fixedparam, value) DetailsRaidCheck.db.mythic_1_4 = value end,
|
||||
desc = "When raiding on Mythic difficult, only tracks the first 4 groups.",
|
||||
name = "Mythic Special Tracker"
|
||||
desc = "When raiding on Mythic difficult, only check the first 4 groups.",
|
||||
name = "Mythic 1-4 Group Only"
|
||||
},
|
||||
|
||||
--[=[
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return DetailsRaidCheck.db.use_report_panel end,
|
||||
@@ -797,7 +800,11 @@ local build_options_panel = function()
|
||||
desc = "If enabled, clicking to report open the report panel instead (to be able to choose where to send the report).",
|
||||
name = "Use Report Panel"
|
||||
},
|
||||
--]=]
|
||||
|
||||
{type = "breakline"},
|
||||
|
||||
{type = "label", get = function() return "Food Level Tracking:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return DetailsRaidCheck.db.food_tier1 end,
|
||||
@@ -821,7 +828,13 @@ local build_options_panel = function()
|
||||
},
|
||||
}
|
||||
|
||||
_detalhes.gump:BuildMenu (options_frame, menu, 15, -65, 180)
|
||||
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
_detalhes.gump:BuildMenu (options_frame, menu, 15, -45, 180, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -1851,6 +1851,15 @@ function _G._detalhes:Start()
|
||||
--> override the overall data flag on this release only (remove on the release)
|
||||
Details.overall_flag = 0x10
|
||||
|
||||
local _, playerClass = UnitClass ("player")
|
||||
if (playerClass == "HUNTER") then
|
||||
if (time() < (1535035367 + 1296000)) then --show until setember 6th
|
||||
if (math.random(1, 3) == 3) then
|
||||
Details:Msg ("Hunter, Incendiary Ammunition is bugged and won't show in the damage meter outside dungeons and raids. Blizzard is aware of the issue, hold on for a fix.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[=[
|
||||
--> suppress warnings for the first few seconds
|
||||
CLOSE_SCRIPTERRORWINDOW = function()
|
||||
|
||||
Reference in New Issue
Block a user