- Changes to make the live version work with the BfA Beta.
This commit is contained in:
+35
-8
@@ -111,12 +111,26 @@
|
||||
end
|
||||
|
||||
local boss_found = function (index, name, zone, mapid, diff, encounterid)
|
||||
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
|
||||
local ejid
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
local mapID = C_Map.GetBestMapForUnit ("player")
|
||||
if (mapID) then
|
||||
ejid = EJ_GetInstanceForMap (mapID)
|
||||
end
|
||||
|
||||
if (not mapID) then
|
||||
--print ("Details! exeption handled: zone has no map")
|
||||
return
|
||||
end
|
||||
else
|
||||
ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local boss_table = {
|
||||
index = index,
|
||||
name = name,
|
||||
@@ -519,10 +533,23 @@
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = unpack (from_encounter_end)
|
||||
if (encounterID) then
|
||||
local ZoneName, InstanceType, DifficultyID, DifficultyName, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
|
||||
local ejid
|
||||
if (_detalhes.IsBFAClient) then
|
||||
local mapID = C_Map.GetBestMapForUnit ("player")
|
||||
|
||||
if (not mapID) then
|
||||
mapID = 0
|
||||
end
|
||||
|
||||
ejid = EJ_GetInstanceForMap (mapID)
|
||||
else
|
||||
ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
end
|
||||
end
|
||||
|
||||
local _, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (ZoneMapID, encounterID)
|
||||
|
||||
_detalhes.tabela_vigente.is_boss = {
|
||||
|
||||
+7
-1
@@ -9,7 +9,13 @@ local floor = floor
|
||||
|
||||
local GetNumGroupMembers = GetNumGroupMembers
|
||||
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
|
||||
local LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
|
||||
|
||||
local LibGroupInSpecT
|
||||
if (_detalhes.IsBFAClient) then
|
||||
--nop
|
||||
else
|
||||
LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
|
||||
end
|
||||
|
||||
local storageDebug = false
|
||||
local store_instances = _detalhes.InstancesToStoreData
|
||||
|
||||
+11
-6
@@ -683,13 +683,18 @@
|
||||
}
|
||||
|
||||
function _detalhes:IsInCity()
|
||||
SetMapToCurrentZone()
|
||||
local mapFileName, _, _, _, microDungeonMapName = GetMapInfo()
|
||||
if (_detalhes.IsBFAClient) then
|
||||
return false
|
||||
else
|
||||
SetMapToCurrentZone()
|
||||
local mapFileName, _, _, _, microDungeonMapName = GetMapInfo()
|
||||
|
||||
if (city_zones [mapFileName]) then
|
||||
return true
|
||||
elseif (microDungeonMapName and type (microDungeonMapName) == "string" and sub_zones [microDungeonMapName]) then
|
||||
return true
|
||||
end
|
||||
|
||||
if (city_zones [mapFileName]) then
|
||||
return true
|
||||
elseif (microDungeonMapName and type (microDungeonMapName) == "string" and sub_zones [microDungeonMapName]) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+57
-6
@@ -2586,10 +2586,22 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
AlternatePowerEnableFrame:SetScript ("OnEvent", function (self, event)
|
||||
if (event == "UNIT_POWER_BAR_SHOW") then
|
||||
AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER")
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER_UPDATE")
|
||||
else
|
||||
AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER")
|
||||
end
|
||||
|
||||
AlternatePowerEnableFrame.IsRunning = true
|
||||
elseif (AlternatePowerEnableFrame.IsRunning and (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED")) then -- and not InCombatLockdown()
|
||||
AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER")
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER_UPDATE")
|
||||
else
|
||||
AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER")
|
||||
end
|
||||
|
||||
AlternatePowerEnableFrame.IsRunning = false
|
||||
end
|
||||
end)
|
||||
@@ -3511,7 +3523,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
for i = 1, (_GetNumGroupMembers() + (unit_type == "party" and -1 or 0)) do
|
||||
for auraIndex = 1, 40 do
|
||||
--gbom
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
|
||||
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
|
||||
else
|
||||
name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
|
||||
end
|
||||
|
||||
if (name and caster and (UnitInRaid (caster) or UnitInParty (caster))) then
|
||||
if (spellId == SPELLID_SHAMAN_SLASH_AURA) then
|
||||
local source_serial = UnitGUID (caster)
|
||||
@@ -3532,7 +3552,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (unit_type == "party") then
|
||||
for auraIndex = 1, 40 do
|
||||
--gbom
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
|
||||
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
|
||||
else
|
||||
name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
|
||||
end
|
||||
|
||||
if (name and caster and (UnitInParty (caster))) then
|
||||
if (spellId == SPELLID_SHAMAN_SLASH_AURA) then
|
||||
local source_serial = UnitGUID (caster)
|
||||
@@ -3561,7 +3589,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
return unpack (real_source)
|
||||
else
|
||||
--query the player buffs if not found on cache
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
|
||||
|
||||
local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
|
||||
|
||||
if (_detalhes.IsBFAClient) then
|
||||
name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
|
||||
else
|
||||
name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
|
||||
end
|
||||
|
||||
if (name) then
|
||||
local source_serial = UnitGUID (caster)
|
||||
if (source_serial) then
|
||||
@@ -4685,6 +4721,21 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
|
||||
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
|
||||
|
||||
|
||||
-- 8.0 changed
|
||||
if (_detalhes.IsBFAClient) then
|
||||
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
|
||||
|
||||
local funcao = token_list [token]
|
||||
if (funcao) then
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local funcao = token_list [token]
|
||||
|
||||
-- if (token == "COMBATANT_INFO") then
|
||||
@@ -4694,7 +4745,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
-- if (who_name == "Ditador") then
|
||||
-- print (token, alvo_name, ...)
|
||||
-- end
|
||||
|
||||
|
||||
if (funcao) then
|
||||
--if (token ~= "SPELL_AURA_REFRESH" and token ~= "SPELL_AURA_REMOVED" and token ~= "SPELL_AURA_APPLIED") then
|
||||
-- print ("running func:", token)
|
||||
|
||||
Reference in New Issue
Block a user