- 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:
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user