- Fixed an issue with Alliance or Horde icons showing at random in player bars.

- Fixed the Death Recap window not showing data during battlegrounds.
- Fixed new segment creation when the option to use only one segment while in a battleground is disabled.
- Fixed east asian number format on several strings.
- 'Smart Score' option renamed to "Unique Segment" under the PvP options for battlegrounds.
This commit is contained in:
Tercio
2018-08-13 17:01:58 -03:00
parent 1fe339f168
commit 9af2eabb13
23 changed files with 516 additions and 130 deletions
+25 -1
View File
@@ -1,5 +1,5 @@
local dversion = 94
local dversion = 96
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -263,6 +263,19 @@ elseif (GetLocale() == "zhTW") then
symbol_1K, symbol_10K, symbol_1B = "", "", ""
end
function DF:GetAsianNumberSymbols()
if (GetLocale() == "koKR") then
return "", "", ""
elseif (GetLocale() == "zhCN") then
return "", "", "亿"
elseif (GetLocale() == "zhTW") then
return "", "", ""
else
--> return korean as default (if the language is western)
return "", "", ""
end
end
if (symbol_1K) then
function DF.FormatNumber (numero)
if (numero > 99999999) then
@@ -1206,6 +1219,17 @@ end
DF.ClientLanguage = clientLanguage
--> returns which region the language the client is running, return "western", "russia" or "asia"
function DF:GetClientRegion()
if (clientLanguage == "zhCN" or clientLanguage == "koKR" or clientLanguage == "zhTW") then
return "asia"
elseif (clientLanguage == "ruRU") then
return "russia"
else
return "western"
end
end
--> return the best font to use for the client language
function DF:GetBestFontForLanguage (language, western, cyrillic, china, korean, taiwan)
if (not language) then
+11 -1
View File
@@ -121,6 +121,10 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
local gmember_textcolor = function (_object)
return _object.textleft:GetTextColor()
end
--> alpha
local gmember_alpha= function (_object)
return _object:GetAlpha()
end
BarMetaFunctions.GetMembers = BarMetaFunctions.GetMembers or {}
BarMetaFunctions.GetMembers ["tooltip"] = gmember_tooltip
@@ -139,6 +143,7 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
BarMetaFunctions.GetMembers ["textsize"] = gmember_textsize --alias
BarMetaFunctions.GetMembers ["textfont"] = gmember_textfont --alias
BarMetaFunctions.GetMembers ["textcolor"] = gmember_textcolor --alias
BarMetaFunctions.GetMembers ["alpha"] = gmember_alpha
BarMetaFunctions.__index = function (_table, _member_requested)
@@ -295,7 +300,11 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
DF:SetFontOutline (_object.textleft, _value)
return DF:SetFontOutline (_object.textright, _value)
end
--> alpha
local smember_alpha= function (_object, _value)
return _object:SetAlpha (_value)
end
BarMetaFunctions.SetMembers = BarMetaFunctions.SetMembers or {}
BarMetaFunctions.SetMembers["tooltip"] = smember_tooltip
BarMetaFunctions.SetMembers["shown"] = smember_shown
@@ -317,6 +326,7 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
BarMetaFunctions.SetMembers["textcolor"] = smember_textcolor --alias
BarMetaFunctions.SetMembers["shadow"] = smember_outline
BarMetaFunctions.SetMembers["outline"] = smember_outline --alias
BarMetaFunctions.SetMembers["alpha"] = smember_alpha
BarMetaFunctions.__newindex = function (_table, _key, _value)
+6 -12
View File
@@ -1,18 +1,12 @@
tag 5876ed6c59ef3d2568d88b9bba9ec77682e6074e Release-70200-28
tag 74a4893b4dd1008c1702a98bebcf0080dd1231b3 Release-80000-30
Author: Alar of Runetotem <alar@aspide.it>
Date: Tue Mar 28 12:21:53 2017 +0200
Date: Thu Jul 19 22:46:27 2018 +0200
Toc updated to 70200
BFA
commit 7c5485ab35700b2e38a008feb84e4af34b7396f0
commit bb6dcff130a8f4298c177ef5eb5c055c905eca34
Author: Alar of Runetotem <alar@aspide.it>
Date: Tue Mar 28 12:07:53 2017 +0200
Date: Thu Jul 19 22:39:53 2018 +0200
Updated TOC to 70200
commit c4ed50190aad123c1297705da7f38c86f7ab1d10
Author: Alar of Runetotem <alar@aspide.it>
Date: Tue Mar 28 11:30:56 2017 +0200
toc update
TOC bump
+118 -32
View File
@@ -1,5 +1,6 @@
local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 27
local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 30
local type,tonumber,select,strsplit,GetItemInfoFromHyperlink=type,tonumber,select,strsplit,GetItemInfoFromHyperlink
local unpack,GetDetailedItemLevelInfo=unpack,GetDetailedItemLevelInfo
local library,previous = _G.LibStub:NewLibrary(MAJOR, MINOR)
local lib=library --#lib Needed to keep Eclipse LDT happy
if not lib then return end
@@ -19,18 +20,18 @@ Caching system
3 itemRarity Number The quality of the item. The value is 0 to 7, which represents Poor to Heirloom. This appears to include gains from upgrades/bonuses.
4 itemLevel Number The item level of this item, not including item levels gained from upgrades. There is currently no API to get the item level including upgrades/bonuses.
5 itemMinLevel Number The minimum level required to use the item, 0 meaning no level requirement.
6 itemType String The type of the item: Armor, Weapon, Quest, Key, etc. (localized)
7 itemSubType String The sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType. (localized)
6 itemType String The type of the item: Armor, Weapon, Quest, Key, etc.
7 itemSubType String The sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType.
8 itemStackCount Number How many of the item per stack: 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
9 itemEquipLoc String The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be the localized, displayable name of the location.
10 iconFileDataID Number The FileDataID for the icon texture for the item.
11 itemSellPrice Number The price, in copper, a vendor is willing to pay for this item, 0 for items that cannot be sold.
12 itemClassID Number This is the numerical value that determines the string to display for 'itemType'.
13 itemSubClassID Number This is the numerical value that determines the string to display for 'itemSubType'
14 ? number
15 ? number
16 ? ?
17 ? boolean
14 bindType Number Item binding type: 0 - none; 1 - on pickup; 2 - on equip; 3 - on use; 4 - quest.
15 expacID Number
16 itemSetID Number
17 isCraftingReagent bool
--]]
-- ItemLink Constants
local i_Name=1
@@ -46,7 +47,7 @@ local i_EquipLoc=9
local i_TextureId=10
local i_SellPrice=11
local i_ClassID=12
local i_SubCkass_ID=13
local i_SubClass_ID=13
local i_unk1=14
local i_unk2=15
local i_unk3=16
@@ -66,19 +67,26 @@ lib.itemcache=lib.itemcache or
local itemLink=cached[2]
if not itemLink then return nil end
local itemID=lib:GetItemID(itemLink)
local name=cached[1]
local quality=cached[3]
local cacheIt=true
if quality==LE_ITEM_QUALITY_ARTIFACT then
local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
if relic1 and relic1 ~= '' and not oGetItemInfo(relic1) then cacheIt = false end
if relic2 and relic2 ~= '' and not oGetItemInfo(relic2) then cacheIt = false end
if relic3 and relic3 ~= '' and not oGetItemInfo(relic3) then cacheIt = false end
end
cached.englishClass=GetItemClassInfo(cached[12])
cached.englishSubClass=GetItemSubClassInfo(cached[12],cached[13])
rawset(table,itemLink,cached)
rawset(table,itemID,cached)
rawset(table,name,cached)
if cacheIt then
rawset(table,key,cached)
end
table.miss=table.miss+1
return cached
end
})
end
local cache,select,unpack=lib.itemcache,select,unpack
local cache=lib.itemcache
local function CachedGetItemInfo(key,index)
if not key then return nil end
index=index or 1
@@ -159,10 +167,18 @@ local boePattern=_G.ITEM_BIND_ON_EQUIP
local bopPattern=_G.ITEM_BIND_ON_PICKUP
local boaPattern1=_G.ITEM_BIND_TO_BNETACCOUNT
local boaPattern2=_G.ITEM_BNETACCOUNTBOUND
local patterns={
[soulboundPattern]="soulbound",
[boePattern]="boe",
[bopPattern]="bop",
[boaPattern1]="boa",
[boaPattern2]="boa",
}
local scanningTooltip
local anchor
local tipCache = lib.tipCache or setmetatable({},{__index=function(table,key) return {} end})
lib.tipCache = lib.tipCache or setmetatable({},{__index=function(table,key) return {} end})
local tipCache = lib.tipCache
local emptytable={}
local function ScanTip(itemLink,itemLevel,show)
@@ -170,7 +186,8 @@ local function ScanTip(itemLink,itemLevel,show)
itemLink=CachedGetItemInfo(itemLink,2)
if not itemLink then return emptytable end
end
if true or type(tipCache[itemLink].ilevel)=="nil" then
if type(tipCache[itemLink].ilevel)=="nil"then -- or not tipCache[itemLink].cached then
local cacheIt=true
if not scanningTooltip then
anchor=CreateFrame("Frame")
anchor:Hide()
@@ -190,34 +207,57 @@ local function ScanTip(itemLink,itemLevel,show)
-- line 2 may be the item level, or it may be a modifier like "Heroic"
-- check up to line 6 just in case
local ilevel,soulbound,bop,boe,boa,heirloom
if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then ilevel=itemLevel end
if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then
local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
if relic1 and relic1 ~= '' and not CachedGetItemInfo(relic1) then cacheIt = false end
if relic2 and relic2 ~= '' and not CachedGetItemInfo(relic2) then cacheIt = false end
if relic3 and relic3 ~= '' and not CachedGetItemInfo(relic3) then cacheIt = false end
ilevel=itemLevel
end
if show then
for i=1,12 do
local l, ltext = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
local r, rtext = _G["LibItemUpgradeInfoTooltipTextRight"..i], nil
ltext=l:GetText()
rtext=r:GetText()
pp(i,ltext,' - ',rtext)
if l then
ltext=l:GetText()
rtext=r:GetText()
_G.print(i,ltext,' - ',rtext)
end
end
end
tipCache[itemLink]={
ilevel=nil,
soulbound=nil,
bop=nil,
boe=nil,
boa=nil,
cached=cacheIt
}
local c=tipCache[itemLink]
for i = 2, 6 do
local label, text = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
if label then text=label:GetText() end
if text then
if ilevel==nil then ilevel = tonumber(text:match(itemLevelPattern)) end
if soulbound==nil then soulbound = text:find(soulboundPattern) end
if bop==nil then bop = text:find(bopPattern) end
if boe==nil then boe = text:find(boePattern) end
if boa==nil then boa = text:find(boaPattern1) end
if boa==nil then boa = text:find(boaPattern2) end
if show then _G.print("|cFFFFFF00".. text .. "|r") end
if c.ilevel==nil then c.ilevel = tonumber(text:match(itemLevelPattern)) end
for pattern,key in pairs(patterns) do
if type(c[key])=="nil" then
if text:find(pattern) then
if show then _G.print(text , "matched",pattern) end
c[key]=true
end
end
end
end
end
tipCache[itemLink]={
ilevel=ilevel or itemLevel,
soulbound=soulbound,
bop=bop,
boe=boe
}
c.ilevel=c.ilevel or itemLevel
itemLevel=GetDetailedItemLevelInfo(itemLink)
if type(c.ilevel)=="number" then
c.ilevel=math.max(c.ilevel,itemLevel)
else
c.ilevel=itemLevel
end
scanningTooltip:Hide()
end
return tipCache[itemLink]
@@ -480,8 +520,54 @@ end
-- #function The new function
--@do-not-package--
local slots={
INVSLOT_AMMO = INVSLOT_AMMO,
INVSLOT_HEAD = INVSLOT_HEAD,
INVSLOT_NECK = INVSLOT_NECK,
INVSLOT_SHOULDER = INVSLOT_SHOULDER,
INVSLOT_BODY = INVSLOT_BODY,
INVSLOT_CHEST = INVSLOT_CHEST,
INVSLOT_WAIST = INVSLOT_WAIST,
INVSLOT_LEGS = INVSLOT_LEGS,
INVSLOT_FEET = INVSLOT_FEET,
INVSLOT_WRIST = INVSLOT_WRIST,
INVSLOT_HAND = INVSLOT_HAND,
INVSLOT_FINGER1 = INVSLOT_FINGER1,
INVSLOT_FINGER2 = INVSLOT_FINGER2,
INVSLOT_TRINKET1 = INVSLOT_TRINKET1,
INVSLOT_TRINKET2 = INVSLOT_TRINKET2,
INVSLOT_BACK = INVSLOT_BACK,
INVSLOT_MAINHAND = INVSLOT_MAINHAND,
INVSLOT_OFFHAND = INVSLOT_OFFHAND,
INVSLOT_RANGED = INVSLOT_RANGED,
INVSLOT_TABARD = INVSLOT_TABARD,
}
local INVSLOT_FIRST_EQUIPPED = INVSLOT_FIRST_EQUIPPED;
local INVSLOT_LAST_EQUIPPED = INVSLOT_LAST_EQUIPPED
_G.SLASH_CHECKSLOT1="/checkslot"
SlashCmdList['CHECKSLOT'] = function(args,chatframe)
_G.print(args)
local slot=strsplit(' ',args)
if not slot or slot=="" then
DevTools_Dump(slots)
return
end
slot=tonumber(slot)
local itemlink=GetInventoryItemLink("player",slot)
if itemlink then
for k,v in pairs(slots) do
if slot==v then _G.print("Item in " , k) break end
end
_G.print(itemlink)
DevTools_Dump({GetDetailedItemLevelInfo(itemlink)})
print(itemlink)
_G.print(lib:ScanTip(itemlink))
end
end
function lib:ScanTip(itemLink)
local GameTooltip=LibItemUpgradeInfoTooltip
--self.itemcache[itemLink]=nil
self.tipCache[itemLink]=nil
local GameTooltip=_G.LibItemUpgradeInfoTooltip
if GameTooltip then
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
GameTooltip:SetHyperlink(itemLink)
@@ -1,13 +1,9 @@
## Interface: 70100
## Interface: 80000
## Title: Lib: ItemUpgradeInfo-1.0
## Notes: Database of item upgrade IDs
## Author: eridius
## Version: Release-70100-27 7.1.0
## X-Revision: 5c48ff2
## Version: Release-80000-30 70200
## X-Revision: bb6dcff
## X-Category: Library
## X-Curse-Packaged-Version: Release-70100-27
## X-Curse-Project-Name: LibItemUpgradeInfo-1.0
## X-Curse-Project-ID: libitemupgradeinfo-1-0
## X-Curse-Repository-ID: wow/libitemupgradeinfo-1-0/mainline
LibItemUpgradeInfo-1.0.xml
@@ -1,13 +1,9 @@
## Interface: 50001
## Interface: 70200
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library
## X-License: Public Domain
## X-Curse-Packaged-Version: Release-70100-27
## X-Curse-Project-Name: LibItemUpgradeInfo-1.0
## X-Curse-Project-ID: libitemupgradeinfo-1-0
## X-Curse-Repository-ID: wow/libitemupgradeinfo-1-0/mainline
LibStub.lua
+10 -12
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -1562,7 +1562,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
--> no h barras para mostrar -- not have something to show
if (#showing._ActorTable < 1) then
if (_detalhes.debug) then
if (_detalhes.debug and false) then
_detalhes.showing_ActorTable_Timer = _detalhes.showing_ActorTable_Timer or 0
if (time() > _detalhes.showing_ActorTable_Timer) then
_detalhes:Msg ("(debug) nothing to show -> #showing._ActorTable < 1")
@@ -2014,7 +2015,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (#conteudo < 1) then
if (_detalhes.debug) then
if (_detalhes.debug and false) then
_detalhes.showing_ActorTable_Timer2 = _detalhes.showing_ActorTable_Timer2 or 0
if (time() > _detalhes.showing_ActorTable_Timer2) then
_detalhes:Msg ("(debug) nothing to show -> #conteudo < 1 (using cache)")
@@ -2086,7 +2087,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
instancia:EsconderScrollBar() --> precisaria esconder a scroll bar
if (_detalhes.debug) then
if (_detalhes.debug and false) then
_detalhes.showing_ActorTable_Timer2 = _detalhes.showing_ActorTable_Timer2 or 0
if (time() > _detalhes.showing_ActorTable_Timer2) then
_detalhes:Msg ("(debug) nothing to show -> amount < 1")
+1
View File
@@ -264,6 +264,7 @@
novo_objeto.arena_ally = true
novo_objeto.arena_team = my_team_color
else --> is enemy
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
novo_objeto.arena_team = 1 - my_team_color
end
+7
View File
@@ -572,6 +572,13 @@
end
end
--> send item level after a combat if is in raid or party group
if (IsInGroup() or IsInRaid()) then
C_Timer.After (1, function()
_detalhes:SentMyItemLevel()
end)
end
if (not _detalhes.tabela_vigente.is_boss) then
if (_detalhes.tabela_vigente.is_pvp or _detalhes.tabela_vigente.is_arena) then
+39 -7
View File
@@ -1704,16 +1704,48 @@ local offhand_ismain = {
["128867"] = true, --paladin prot / oathseeker
}
function _detalhes:IlvlFromNetwork (player, realm, core, ilvl)
local guid = UnitGUID (player .. "-" .. realm)
if (not guid) then
guid = UnitGUID (player)
if (not guid) then
return
function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel, talentsSelected, currentSpec)
if (_detalhes.debug) then
local talents = "Invalid Talents"
if (type (talentsSelected) == "table") then
talents = ""
for i = 1, #talentsSelected do
talents = talents .. talentsSelected [i] .. ","
end
end
_detalhes:Msg ("(debug) Received PlayerInfo Data: " .. (player or "Invalid Player Name") .. " | " .. (itemLevel or "Invalid Item Level") .. " | " .. (currentSpec or "Invalid Spec") .. " | " .. talents .. " | " .. (serialNumber or "Invalid Serial"))
end
if (not player) then
return
end
--> older versions of details wont send serial nor talents nor spec
if (not serialNumber or not itemLevel or not talentsSelected or not currentSpec) then
--if any data is invalid, abort
return
end
if (type (serialNumber) ~= "string") then
return
end
--store the item level
if (type (itemLevel) == "number") then
_detalhes.item_level_pool [serialNumber] = {name = player, ilvl = itemLevel, time = time()}
end
--store talents
if (type (talentsSelected) == "table") then
if (talentsSelected [1]) then
_detalhes.cached_talents [serialNumber] = talentsSelected
end
end
_detalhes.item_level_pool [guid] = {name = player, ilvl = ilvl, time = time()}
--store the spec the player is playing
if (type (currentSpec) == "number") then
_detalhes.cached_specs [serialNumber] = currentSpec
end
end
--> test
+61 -12
View File
@@ -74,6 +74,66 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> comm functions
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> item level
function _detalhes:SentMyItemLevel()
--> only send if in group
if (not IsInGroup() and not IsInRaid()) then
return
end
--> check the player level
local playerLevel = UnitLevel ("player")
if (not playerLevel) then
return
elseif (playerLevel < 60) then
return
end
--> delay to sent information again
if (_detalhes.LastPlayerInfoSync and _detalhes.LastPlayerInfoSync+10 > GetTime()) then
--do not send info if recently sent
return
end
--> get player item level
local overall, equipped = GetAverageItemLevel()
--> get player talents
local talents = {}
for i = 1, 7 do
for o = 1, 3 do
local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1)
if (selected) then
tinsert (talents, talentID)
break
end
end
end
--> get the spec ID
local spec = GetSpecialization()
local currentSpec
if (spec) then
local specID = GetSpecializationInfo (spec)
if (specID and specID ~= 0) then
currentSpec = specID
end
end
--> get the character serial number
local serial = UnitGUID ("player")
_detalhes:SendRaidData (CONST_ITEMLEVEL_DATA, serial, equipped, talents, currentSpec)
_detalhes.LastPlayerInfoSync = GetTime()
end
function _detalhes.network.ItemLevel_Received (player, realm, core_version, serial, itemlevel, talents, spec)
_detalhes:IlvlFromNetwork (player, realm, core_version, serial, itemlevel, talents, spec)
end
--high five
function _detalhes.network.HighFive_Request()
return _detalhes:SendRaidData (CONST_HIGHFIVE_DATA, _detalhes.userversion)
end
@@ -412,7 +472,7 @@
local prefix, player, realm, dversion, arg6, arg7, arg8, arg9 = _select (2, _detalhes:Deserialize (data))
if (_detalhes.debug) then
_detalhes:Msg ("(debug) network received:", prefix, "length:",string.len (data))
_detalhes:Msg ("(debug) network received:", prefix, "length:", string.len (data))
end
--event
@@ -633,17 +693,6 @@
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> item level
function _detalhes:SentMyItemLevel()
local overall, equipped = GetAverageItemLevel()
_detalhes:SendRaidData (CONST_ITEMLEVEL_DATA, equipped)
end
function _detalhes.network.ItemLevel_Received (player, realm, core_version, itemlevel)
_detalhes:IlvlFromNetwork (player, realm, core_version, itemlevel)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> update
+38 -1
View File
@@ -518,7 +518,8 @@
amount = absorbed + (amount or 0)
end
if (este_jogador.grupo and not este_jogador.arena_enemy) then --> source = friendly player
if (este_jogador.grupo and not este_jogador.arena_enemy and not este_jogador.enemy) then --> source = friendly player and not an enemy player
--dano to adversario estava caindo aqui por nao estar checando .enemy
_current_gtotal [1] = _current_gtotal [1]+amount
elseif (jogador_alvo.grupo) then --> source = arena enemy or friendly player
@@ -4209,6 +4210,13 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
function _detalhes.parser_functions:PLAYER_REGEN_DISABLED (...)
if (_detalhes.zone_type == "pvp" and not _detalhes.use_battleground_server_parser) then
if (_in_combat) then
_detalhes:SairDoCombate()
end
_detalhes:EntrarEmCombate()
end
if (not _detalhes:CaptureGet ("damage")) then
_detalhes:EntrarEmCombate()
end
@@ -4347,8 +4355,37 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:DispatchAutoRunCode ("on_leavecombat")
end
function _detalhes.parser_functions:PLAYER_TALENT_UPDATE()
if (IsInGroup() or IsInRaid()) then
if (_detalhes.SendTalentTimer and not _detalhes.SendTalentTimer._cancelled) then
_detalhes.SendTalentTimer:Cancel()
end
_detalhes.SendTalentTimer = C_Timer.NewTimer (11, function()
_detalhes:SentMyItemLevel()
end)
end
end
function _detalhes.parser_functions:PLAYER_SPECIALIZATION_CHANGED()
if (IsInGroup() or IsInRaid()) then
if (_detalhes.SendTalentTimer and not _detalhes.SendTalentTimer._cancelled) then
_detalhes.SendTalentTimer:Cancel()
end
_detalhes.SendTalentTimer = C_Timer.NewTimer (11, function()
_detalhes:SentMyItemLevel()
end)
end
end
--> this is mostly triggered when the player enters in a dual against another player
function _detalhes.parser_functions:UNIT_FACTION (unit)
if (true) then
--> disable until figure out how to make this work properlly
--> at the moment this event is firing at bgs, arenas, etc making horde icons to show at random
return
end
--> check if outdoors
--unit was nil, nameplate might bug here, it should track after the event
if (_detalhes.zone_type == "none" and unit) then
+7 -2
View File
@@ -807,17 +807,20 @@ end
_detalhes:TimeDataTick()
_detalhes:BrokerTick()
if (_detalhes.zone_type == "pvp" or _detalhes.zone_type == "arena" or _InCombatLockdown()) then
if ((_detalhes.zone_type == "pvp" and _detalhes.use_battleground_server_parser) or _detalhes.zone_type == "arena" or _InCombatLockdown()) then
return true
elseif (_UnitAffectingCombat("player")) then
return true
elseif (_IsInRaid()) then
for i = 1, _GetNumGroupMembers(), 1 do
if (_UnitAffectingCombat ("raid"..i)) then
return true
end
end
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1, 1 do
if (_UnitAffectingCombat ("party"..i)) then
@@ -827,12 +830,14 @@ end
end
--> don't leave the combat if is in the argus encounter ~REMOVE on 8.0
--[=[
if (_detalhes.encounter_table and _detalhes.encounter_table.id == 2092) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) in argus encounter, cannot leave the combat.")
end
return true
end
--]=]
--mythic dungeon test
if (_detalhes.MythicPlus.Started and _detalhes.mythic_plus.always_in_combat) then
+54 -5
View File
@@ -4061,6 +4061,8 @@ local create_deathrecap_line = function (parent, n)
_detalhes.gump:SetFontColor (amount, "red")
_detalhes.gump:SetFontColor (timeAt, "gray")
_detalhes.gump:SetFontColor (sourceName, "yellow")
_detalhes.gump:SetFontSize (sourceName, 10)
--text alpha
timeAt:SetAlpha (textAlpha)
@@ -4299,6 +4301,8 @@ function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
DeathRecapFrame.Unavailable:Show()
return
end
--get the death events from the blizzard's recap
ArtificialDeathLog = _detalhes.BuildDeathTableFromRecap (RecapID)
end
@@ -4360,9 +4364,11 @@ function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
end
end
--tem menos que 10 eventos com grande dano dentro dos ultimos 5 segundos
--precisa preencher com danos pequenos
--print ("1 BiggestDamageHits:", #BiggestDamageHits)
if (#BiggestDamageHits < 10) then
for i = #events, 1, -1 do
local event = events [i]
@@ -4393,7 +4399,7 @@ function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
table.sort (BiggestDamageHits, function (t1, t2)
return t1[4] > t2[4]
end)
local events = BiggestDamageHits
local maxHP = t [5]
@@ -4411,18 +4417,61 @@ function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
local source = event [6]
local overkill = event [10] or 0
--print ("3 loop", i, type (evType), evType)
if (type (evType) == "boolean" and evType) then
local line = Details.DeathRecap.Lines [lineIndex]
--print ("4 loop", i, line)
if (line) then
line.timeAt:SetText (format ("%.1f", eventTime - timeOfDeath) .. "s")
line.spellIcon:SetTexture (spellIcon)
line.TopFader:Hide()
--line.spellIcon:SetTexCoord (.1, .9, .1, .9)
--line.sourceName:SetText ("|cFFC6B0D9" .. source .. "|r")
line.sourceName:SetText (spellName)
--parse source and cut the length of the string after setting the spellname and source
local sourceClass = _detalhes:GetClass (source)
local sourceSpec = _detalhes:GetSpec (source)
if (not sourceClass) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor (1, source)
if (sourceActor) then
sourceClass = sourceActor.classe
end
end
end
if (not sourceSpec) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor (1, source)
if (sourceActor) then
sourceSpec = sourceActor.spec
end
end
end
--> remove real name or owner name
source = _detalhes:GetOnlyName (source)
--> remove owner name
source = source:gsub ((" <.*"), "")
--> if a player?
if (_detalhes.player_class [sourceClass]) then
source = _detalhes:AddClassOrSpecIcon (source, sourceClass, sourceSpec, 16, true)
elseif (sourceClass == "PET") then
source = _detalhes:AddClassOrSpecIcon (source, sourceClass)
end
--> remove the dot signal from the spell name
spellName = spellName:gsub (L["STRING_DOT"], "")
line.sourceName:SetText (spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
if (amount > 1000) then
--line.amount:SetText ("-" .. _detalhes:ToK (amount))
+34
View File
@@ -506,3 +506,37 @@ function _detalhes:AddRoleIcon (player_name, role, size)
return player_name
end
function _detalhes:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlphaIcons)
local size = iconSize or 16
if (spec) then
local specString = ""
local L, R, T, B = unpack (_detalhes.class_specs_coords [spec])
if (L) then
if (useAlphaIcons) then
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal_alpha:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
else
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
end
return specString .. " " .. playerName
end
end
if (class) then
local classString = ""
local L, R, T, B = unpack (_detalhes.class_coords [class])
if (L) then
local imageSize = 128
if (useAlphaIcons) then
classString = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:" .. size .. ":" .. size .. ":0:0:" .. imageSize .. ":" .. imageSize .. ":" .. (L * imageSize) .. ":" .. (R * imageSize) .. ":" .. (T * imageSize) .. ":" .. (B * imageSize) .. "|t"
else
classString = "|TInterface\\AddOns\\Details\\images\\classes_small:" .. size .. ":" .. size .. ":0:0:" .. imageSize .. ":" .. imageSize .. ":" .. (L * imageSize) .. ":" .. (R * imageSize) .. ":" .. (T * imageSize) .. ":" .. (B * imageSize) .. "|t"
end
return classString .. " " .. playerName
end
end
return playerName
end
+32
View File
@@ -1428,6 +1428,38 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
instance:InstanceAlert ("Boss Defeated! Show Ranking", icon, 10, func, true)
elseif (msg == "spec") then
local spec = GetSpecialization()
if (spec) then
local specID = GetSpecializationInfo (spec)
if (specID and specID ~= 0) then
print ("Current SpecID: ", specID)
end
end
elseif (msg == "senditemlevel") then
_detalhes:SentMyItemLevel()
print ("Item level dispatched.")
elseif (msg == "talents") then
local talents = {}
for i = 1, 7 do
for o = 1, 3 do
local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1)
if (selected) then
tinsert (talents, talentID)
break
end
end
end
print ("talentID", "name", "texture", "selected", "available", "spellID", "unknown", "row", "column", "unknown", "unknown")
for i = 1, #talents do
print (GetTalentInfoByID (talents [i]))
end
elseif (msg == "merge") then
--> at this point, details! should not be in combat
+23 -1
View File
@@ -87,7 +87,29 @@ do
[49184] = {name = GetSpellInfo (49184) .. " (Main Target)"}, --DK Howling Blast
[237680] = {name = GetSpellInfo (237680) .. " (AoE)"}, --DK Howling Blast
--> bfa trinkets
[278155] = {name = GetSpellInfo (278155) .. " (Trinket)"}, --[Twitching Tentacle of Xalzaix]
[279664] = {name = GetSpellInfo (279664) .. " (Trinket)"}, --[Vanquished Tendril of G'huun]
[278227] = {name = GetSpellInfo (278227) .. " (Trinket)"}, --[T'zane's Barkspines]
[278383] = {name = GetSpellInfo (278383) .. " (Trinket)"}, --[Azurethos' Singed Plumage]
[278862] = {name = GetSpellInfo (278862) .. " (Trinket)"}, --[Drust-Runed Icicle]
[278359] = {name = GetSpellInfo (278359) .. " (Trinket)"}, --[Doom's Hatred]
[278812] = {name = GetSpellInfo (278812) .. " (Trinket)"}, --[Lion's Grace]
[270827] = {name = GetSpellInfo (270827) .. " (Trinket)"}, --[Vessel of Skittering Shadows]
[271071] = {name = GetSpellInfo (271071) .. " (Trinket)"}, --[Conch of Dark Whispers]
[270925] = {name = GetSpellInfo (270925) .. " (Trinket)"}, --[Hadal's Nautilus]
[271115] = {name = GetSpellInfo (271115) .. " (Trinket)"}, --[Ignition Mage's Fuse]
[271462] = {name = GetSpellInfo (271462) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[271465] = {name = GetSpellInfo (271465) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[268998] = {name = GetSpellInfo (268998) .. " (Trinket)"}, --[Balefire Branch]
[271671] = {name = GetSpellInfo (271671) .. " (Trinket)"}, --[Lady Waycrest's Music Box]
[277179] = {name = GetSpellInfo (277179) .. " (Trinket)"}, --[Dread Gladiator's Medallion]
[277187] = {name = GetSpellInfo (277187) .. " (Trinket)"}, --[Dread Gladiator's Emblem]
[277181] = {name = GetSpellInfo (277181) .. " (Trinket)"}, --[Dread Gladiator's Insignia]
[277185] = {name = GetSpellInfo (277185) .. " (Trinket)"}, --[Dread Gladiator's Badge]
[278057] = {name = GetSpellInfo (278057) .. " (Trinket)"}, --[Vigilant's Bloodshaper]
}
function _detalhes:UserCustomSpellUpdate (index, name, icon)
+9 -21
View File
@@ -103,25 +103,22 @@ do
[56222] = 250, -- Dark Command
-- Balance Druid:
[152221] = 102, -- Stellar Flare
[88747] = 102, -- Wild Mushroom
[33605] = 102, -- Astral Showers
[48505] = 102, -- Starfall
[112071] = 102, -- Celestial Alignment
[78675] = 102, -- Solar Beam
[93399] = 102, -- Shooting Stars
[78674] = 102, -- Starsurge
[2912] = 102, -- Starfire
--[78674] = 102, -- Starsurge
-- Feral Druid:
[171746] = 103, -- Claws of Shirvallah
[22570] = 103, -- Maim
[16974] = 103, -- Predatory Swiftness
--[106785] = 103, -- Swipe
--[1079] = 103, -- Rip
[52610] = 103, -- Savage Roar
[5217] = 103, -- Tiger's Fury
--[1822] = 103, -- Rake
--[106785] = 103, -- Swipe
--[1079] = 103, -- Rip
-- Guardian Druid:
[155835] = 104, -- Bristling Fur
@@ -134,15 +131,15 @@ do
[62606] = 104, -- Savage Defense
-- Restoration Druid:
[145518] = 105, -- Genesis --no exists
[145205] = 105, -- Wild Mushroom
[48438] = 105, -- Wild Growth
[740] = 105, -- Tranquility
[102342] = 105, -- Ironbark
[33763] = 105, -- Lifebloom
[88423] = 105, -- Nature's Cure
[18562] = 105, -- Swiftmend
[145205] = 105, --Efflorescence
--[145518] = 105, -- Genesis --removed
--[48438] = 105, -- Wild Growth --talent for other specs
--[18562] = 105, -- Swiftmend --talent for other specs
-- Beast Mastery Hunter:
[19574] = 253, -- Bestial Wrath
@@ -269,9 +266,6 @@ do
[184575] = 70, --Blade of Justice
-- Discipline Priest:
--[109964] = 256, -- Spirit Shell
--[47753] = 256, -- Divine Aegis
--[132157] = 256, -- Holy Nova
[152118] = 256, -- Clarity of Will
[62618] = 256, -- Power Word: Barrier
[194509] = 256, -- Power Word: Radiance
@@ -284,7 +278,6 @@ do
[200829] = 256, -- Plea
[47536] = 256, -- Rapture
[204197] = 256, -- Purge the Wicked
-- Holy Priest:
[155245] = 257, -- Clarity of Purpose
@@ -296,21 +289,16 @@ do
[2050] = 257, -- Holy Word: Serenity
[34861] = 257, -- Holy Word: Sanctify
[47788] = 257, -- Guardian Spirit
[132157] = 257, -- Holy Nova
--[126135] = 257, -- Lightwell
[139] = 257, -- Renew
[2061] = 257, --Flash Heal
[2060] = 257, --Heal
-- Shadow Priest:
--[127632] = 258, -- Cascade
--[122121] = 258, -- Divine Star
--[120644] = 258, -- Halo
[15286] = 258, -- Vampiric Embrace
[32379] = 258, -- Shadow Word: Death
[73510] = 258, -- Mind Spike
[78203] = 258, -- Shadowy Apparitions
[34914] = 258, -- Vampiric Touch
--[2944] = 258, -- Devouring Plague
[8092] = 258, -- Mind Blast
[15407] = 258, -- Mind Flay
[228266] = 258, -- Void Bolt
+11 -5
View File
@@ -4301,12 +4301,18 @@ function window:CreateFrame1()
_detalhes:SelectNumericalSystem (systemNumber)
end
local asian1K, asian10K, asian1B = _detalhes.gump:GetAsianNumberSymbols()
local asianNumerals = {value = 2, label = Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"], desc = "1" .. asian1K .. " = 1.000 \n1" .. asian10K .. " = 10.000 \n10" .. asian10K .. " = 100.000 \n100" .. asian10K .. " = 1.000.000", onclick = onSelectNumeralSystem, icon = icon, iconcolor = iconcolor, iconsize = iconsize}
--> if region is western it'll be using Korean symbols, set a font on the dropdown so it won't show ?????
local clientRegion = _detalhes.gump:GetClientRegion()
if (clientRegion == "western" or clientRegion == "russia") then
asianNumerals.descfont = _detalhes.gump:GetBestFontForLanguage ("koKR")
end
local numeralSystems = {
{value = 1, label = Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN"], desc = "1K = 1.000 \n10K = 10.000 \n100K = 100.000 \n1M = 1.000.000", onclick = onSelectNumeralSystem, icon = icon, iconcolor = iconcolor, iconsize = iconsize},
{value = 2, label = Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"], desc = "1천 = 1.000 \n1만 = 10.000 \n10만 = 100.000 \n100만 = 1.000.000", onclick = onSelectNumeralSystem, icon = icon, iconcolor = iconcolor, iconsize = iconsize},
asianNumerals
}
local buildNumeralSystemsMenu = function()
@@ -4842,14 +4848,14 @@ function window:CreateFrame2()
--> battleground
--> remote parser
g:NewLabel (frame2, _, "$parentRemoteParserLabel", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_REMOTE_PARSER"], "GameFontHighlightLeft")
g:NewLabel (frame2, _, "$parentRemoteParserLabel", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT"], "GameFontHighlightLeft")
g:NewSwitch (frame2, _, "$parentRemoteParserSlider", "RemoteParserSlider", 60, 20, _, _, _detalhes.use_battleground_server_parser, nil, nil, nil, nil, options_switch_template)
frame2.RemoteParserSlider:SetPoint ("left", frame2.RemoteParserLabel, "right", 2)
frame2.RemoteParserSlider:SetAsCheckBox()
frame2.RemoteParserSlider.OnSwitch = function (self, _, value)
_detalhes.use_battleground_server_parser = value
end
window:CreateLineBackground2 (frame2, "RemoteParserSlider", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_REMOTE_PARSER_DESC"])
window:CreateLineBackground2 (frame2, "RemoteParserSlider", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT_DESC"])
--> show all
g:NewLabel (frame2, _, "$parentShowAllLabel", "ShowAllLabel", Loc ["STRING_OPTIONS_BG_ALL_ALLY"], "GameFontHighlightLeft")
+1
View File
@@ -7236,6 +7236,7 @@ function _detalhes:RefreshAttributeTextSize()
end
end
-- ~encounter ~timer
function _detalhes:CheckForTextTimeCounter (combat_start)
if (combat_start) then
if (_detalhes.tabela_vigente.is_boss) then
+19 -3
View File
@@ -4,7 +4,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local g = _detalhes.gump
local _
function _detalhes:OpenWelcomeWindow ()
function _detalhes:OpenWelcomeWindow()
GameCooltip:Close()
local window = _G.DetailsWelcomeWindow
@@ -759,9 +759,25 @@ local window_openned_at = time()
NumeralType1_text:SetPoint ("topleft", window, "topleft", 40, -150)
local NumeralType2_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
NumeralType2_text:SetText ("1천 = 1.000 |cFFFFCC00| |r1만 = 10.000 |cFFFFCC00| |r10만 = 100.000 |cFFFFCC00| |r100만 = 1.000.000")
local asian1K, asian10K, asian1B = _detalhes.gump:GetAsianNumberSymbols()
local asianNumerals = "1" .. asian1K .. " = 1.000 \n1" .. asian10K .. " = 10.000 \n10" .. asian10K .. " = 100.000 \n100" .. asian10K .. " = 1.000.000"
--> if region is western it'll be using Korean symbols, set a font on the dropdown so it won't show ?????
local clientRegion = _detalhes.gump:GetClientRegion()
if (clientRegion == "western" or clientRegion == "russia") then
_detalhes.gump:SetFontFace (NumeralType2_text, _detalhes.gump:GetBestFontForLanguage ("koKR"))
else
_detalhes.gump:SetFontFace (NumeralType2_text, _detalhes.gump:GetBestFontForLanguage())
end
--> set the text
NumeralType2_text:SetText (asianNumerals)
NumeralType2_text:SetWidth (500)
NumeralType2_text:SetHeight (40)
NumeralType2_text:SetHeight (80)
NumeralType2_text:SetJustifyH ("left")
NumeralType2_text:SetJustifyV ("top")
NumeralType2_text:SetTextColor (.8, .8, .8, 1)
+2
View File
@@ -279,6 +279,8 @@ function _G._detalhes:Start()
self.listener:RegisterEvent ("ROLE_CHANGED_INFORM")
self.listener:RegisterEvent ("UNIT_FACTION")
self.listener:RegisterEvent ("PLAYER_SPECIALIZATION_CHANGED")
self.listener:RegisterEvent ("PLAYER_TALENT_UPDATE")
self.listener:RegisterEvent ("PLAYER_SPECIALIZATION_CHANGED")