- testing the mercurial repo packpager.

This commit is contained in:
Tercio
2017-09-19 12:56:32 -03:00
parent 1b07ba9276
commit 7df507bd46
48 changed files with 2860 additions and 532 deletions
+57 -9
View File
@@ -18,6 +18,28 @@ do
end
end
--> return the full table with all data for the instance
function _detalhes:GetRaidInfoFromEncounterID (encounterID, encounterEJID)
for id, raidTable in pairs (_detalhes.EncounterInformation) do
if (encounterID) then
local ids = raidTable.encounter_ids2 --combatlog
if (ids) then
if (ids [encounterID]) then
return raidTable
end
end
end
if (encounterEJID) then
local ejids = raidTable.encounter_ids --encounter journal
if (ejids) then
if (ejids [encounterEJID]) then
return raidTable
end
end
end
end
end
--> return the ids of trash mobs in the instance
function _detalhes:GetInstanceTrashInfo (mapid)
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids
@@ -213,8 +235,24 @@ do
end
end
--> return the icon for the raid instance
function _detalhes:GetRaidIcon (mapid)
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
function _detalhes:GetRaidIcon (mapid, ejID, instanceType)
local raidIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
if (raidIcon) then
return raidIcon
end
if (ejID and ejID ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ejID)
if (name) then
if (instanceType == "party") then
return loreImage --bgImage
elseif (instanceType == "raid") then
return loreImage
end
end
end
return nil
end
--> return the boss icon
@@ -227,15 +265,25 @@ do
end
--> return the boss portrit
function _detalhes:GetBossPortrait (mapid, bossindex)
function _detalhes:GetBossPortrait (mapid, bossindex, encounterName, ejID)
if (mapid and bossindex) then
--print (_detalhes.EncounterInformation [mapid])
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters)
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters and _detalhes.EncounterInformation [mapid].encounters [bossindex])
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
else
return false
local haveIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
if (haveIcon) then
return haveIcon
end
end
if (encounterName and ejID and ejID ~= 0) then
local index, name, description, encounterID, rootSectionID, link = _detalhes:GetEncounterInfoFromEncounterName (ejID, encounterName)
if (index and name and encounterID) then
local id, name, description, displayInfo, iconImage = EJ_GetCreatureInfo (1, encounterID)
if (iconImage) then
return iconImage
end
end
end
return nil
end
--> return a list with names of adds and bosses