- more fixes for dungeon trash being tag as a dungeon boss.

- more fixes for item level discovery.
- more spells added to spell customization.
This commit is contained in:
Tercio
2016-09-25 18:18:07 -03:00
parent 4da2839aa7
commit ab0d4c1f24
8 changed files with 112 additions and 44 deletions
+39 -1
View File
@@ -1,5 +1,5 @@
local dversion = 45
local dversion = 46
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -115,6 +115,7 @@ local embed_functions = {
"CreateAnimation",
"CreateScrollBox",
"CreateBorder",
"FormatNumber",
}
DF.table = {}
@@ -217,6 +218,43 @@ DF.www_icons = {
mmoc = {0, 0.7890625, 80/123, 123/128},
}
local symbol_1K, symbol_10K, symbol_1B
if (GetLocale() == "koKR") then
symbol_1K, symbol_10K, symbol_1B = "", "", ""
elseif (GetLocale() == "zhCN") then
symbol_1K, symbol_10K, symbol_1B = "", "", "亿"
elseif (GetLocale() == "zhTW") then
symbol_1K, symbol_10K, symbol_1B = "", "", ""
end
if (symbol_1K) then
function DF.FormatNumber (numero)
if (numero > 99999999) then
return format ("%.2f", numero/100000000) .. symbol_1B
elseif (numero > 999999) then
return format ("%.2f", numero/10000) .. symbol_10K
elseif (numero > 99999) then
return floor (numero/10000) .. symbol_10K
elseif (numero > 9999) then
return format ("%.1f", (numero/10000)) .. symbol_10K
elseif (numero > 999) then
return format ("%.1f", (numero/1000)) .. symbol_1K
end
return format ("%.1f", numero)
end
else
function DF.FormatNumber (numero)
if (numero > 999999) then
return format ("%.2f", numero/1000000) .. "M"
elseif (numero > 99999) then
return floor (numero/1000) .. "K"
elseif (numero > 999) then
return format ("%.1f", (numero/1000)) .. "K"
end
return format ("%.1f", numero)
end
end
function DF:IntegerToTimer (value)
return "" .. floor (value/60) .. ":" .. format ("%02.f", value%60)
end
+4 -2
View File
File diff suppressed because one or more lines are too long
+10 -11
View File
@@ -180,7 +180,8 @@ function historico:adicionar (tabela)
_detalhes:Msg ("(debug) overall data flag match with the current combat.")
end
if (InCombatLockdown()) then
_detalhes.schedule_add_to_overall = true
_detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {}
tinsert (_detalhes.schedule_add_to_overall, tabela)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) player is in combat, scheduling overall addition.")
end
@@ -351,6 +352,10 @@ function historico:resetar_overall()
instancia:ReajustaGump()
end
end
if (_detalhes.schedule_add_to_overall) then
wipe (_detalhes.schedule_add_to_overall)
end
end
_detalhes:ClockPluginTickOnSegment()
@@ -381,6 +386,10 @@ function historico:resetar()
_table_wipe (_detalhes.tabela_overall)
_table_wipe (_detalhes.spellcache)
if (_detalhes.schedule_add_to_overall) then
wipe (_detalhes.schedule_add_to_overall)
end
_detalhes:LimparPets()
_detalhes:ResetSpecCache (true) --> forçar
@@ -428,16 +437,6 @@ function historico:resetar()
_detalhes:SendEvent ("DETAILS_DATA_RESET", nil, nil)
--if (InCombatLockdown() and UnitAffectingCombat ("player")) then
-- _detalhes:ScheduleTimer ("DelayCheckCombat", 1)
--end
end
function _detalhes:DelayCheckCombat()
if (InCombatLockdown() and UnitAffectingCombat ("player") and not _detalhes.in_combat) then
_detalhes:EntrarEmCombate()
end
end
function _detalhes.refresh:r_historico (este_historico)
+15 -14
View File
@@ -296,9 +296,10 @@
-- ~start ~inicio ~novo ñovo
function _detalhes:EntrarEmCombate (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) started a new combat.")
_detalhes:Msg ("(debug) |cFFFFFF00started a new combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "")
local from = debugstack (2, 1, 0)
print (from)
end
if (not _detalhes.tabela_historico.tabelas[1]) then
@@ -375,19 +376,19 @@
if (_detalhes:IsInInstance() or _detalhes.debug) then
if (not _detalhes:CaptureIsAllEnabled()) then
_detalhes:ScheduleSendCloudRequest()
if (_detalhes.debug) then
_detalhes:Msg ("(debug) requesting a cloud server.")
end
--if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) requesting a cloud server.")
--end
end
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) isn't inside a registred instance", _detalhes:IsInInstance())
end
--if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) isn't inside a registred instance", _detalhes:IsInInstance())
--end
end
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture)
end
--if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture)
--end
end
--> hide / alpha / switch in combat
@@ -429,7 +430,7 @@
function _detalhes:SairDoCombate (bossKilled, from_encounter_end)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) ended a combat.")
_detalhes:Msg ("(debug) |cFFFFFF00ended a combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "")
end
--> in case of something somehow someway call to close the same combat a second time.
@@ -573,8 +574,8 @@
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) forcing equalize actors behavior.")
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
-- _detalhes:Msg ("(debug) forcing equalize actors behavior.")
-- _detalhes:EqualizeActorsSchedule (_detalhes.host_of)
end
--> verifica memoria
+24 -4
View File
@@ -1070,6 +1070,7 @@ 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
@@ -1078,7 +1079,6 @@ local artifact_offhands = {
["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
@@ -1086,8 +1086,13 @@ local artifact_offhands = {
["128936"] = true, --shaman elemental
["128873"] = true, --shaman en
["128934"] = true, --shaman resto
["137246"] = true, --warlock demo
["128289"] = true, --warrior prot
}
--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, ilvl)
@@ -1132,7 +1137,22 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
--> upgrades handle by LibItemUpgradeInfo-1.0
--> http://www.wowace.com/addons/libitemupgradeinfo-1-0/
if (equip_id == 17) then
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)
+17 -8
View File
@@ -3513,7 +3513,7 @@ SPELL_POWER_OBSOLETE2 = 15;
function _detalhes.parser_functions:ENCOUNTER_START (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) ENCOUNTER_START event triggered.")
_detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.")
end
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
@@ -3585,7 +3585,14 @@ SPELL_POWER_OBSOLETE2 = 15;
function _detalhes.parser_functions:ENCOUNTER_END (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) ENCOUNTER_END event triggered.")
_detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_END|r event triggered.")
end
if (_detalhes.zone_type == "party") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) the zone type is 'party', ignoring ENCOUNTER_END.")
end
return
end
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
@@ -3677,19 +3684,21 @@ SPELL_POWER_OBSOLETE2 = 15;
if (_detalhes.schedule_remove_overall) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data deletion.")
_detalhes:Msg ("(debug) found schedule overall data clean up.")
end
_detalhes.schedule_remove_overall = false
_detalhes.tabela_historico:resetar_overall()
end
if (_detalhes.schedule_add_to_overall) then
if (_detalhes.schedule_add_to_overall and _detalhes.schedule_add_to_overall [1]) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data addition.")
_detalhes:Msg ("(debug) adding ", #_detalhes.schedule_add_to_overall, "combats in queue to overall data.")
end
for i = #_detalhes.schedule_add_to_overall, 1, -1 do
local CombatToAdd = tremove (_detalhes.schedule_add_to_overall, i)
_detalhes.historico:adicionar_overall (CombatToAdd)
end
_detalhes.schedule_add_to_overall = false
_detalhes.historico:adicionar_overall (_detalhes.tabela_vigente)
end
if (_detalhes.schedule_store_boss_encounter) then
+1 -1
View File
@@ -145,7 +145,7 @@
timeMachine.tabelas [tipo] = t
if (_detalhes.debug) then
_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo)
--_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo)
end
end
end
+2 -3
View File
@@ -79,9 +79,6 @@ do
[158417] = {name = GetSpellInfo (158417) .. " (" .. Loc ["STRING_WAVE"] .. " #2)"}, --> Twins Ogron Pulverize waves.
[158420] = {name = GetSpellInfo (158420) .. " (" .. Loc ["STRING_WAVE"] .. " #3)"}, --> Twins Ogron Pulverize waves.
[158159] = {name = GetSpellInfo (158159) .. ""}, --> Twins Ogron Charge.
[177608] = {name = GetSpellInfo (177608) .. " (copies)"}, --> Twins Ogron Charge.
[59638] = {name = GetSpellInfo (59638) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo (88082) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Fireball (mage)
@@ -94,6 +91,8 @@ do
[213786] = {name = GetSpellInfo (213786) .. " (trinket)"},
[214350] = {name = GetSpellInfo (214350) .. " (trinket)"},
[224078] = {name = GetSpellInfo (224078) .. " (trinket)"},
}
function _detalhes:UserCustomSpellUpdate (index, name, icon)