Updated LibOpenRaid and DetailsFramework

This commit is contained in:
Tercio Jose
2022-10-09 19:47:56 -03:00
parent 9974a87119
commit 944178f76f
126 changed files with 15502 additions and 15495 deletions
+21 -21
View File
@@ -174,7 +174,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
end
--------------------------------------------------------------------------------------------------------------------------------
--> ~comms
--~comms
openRaidLib.commHandler = {}
function openRaidLib.commHandler.OnReceiveComm(self, event, prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID)
@@ -317,7 +317,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~schedule ~timers
--~schedule ~timers
openRaidLib.Schedules = {
registeredUniqueTimers = {}
@@ -396,7 +396,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~public ~callbacks
--~public ~callbacks
--these are the events where other addons can register and receive calls
local allPublicCallbacks = {
"CooldownListUpdate",
@@ -494,7 +494,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~internal ~callbacks
--~internal ~callbacks
--internally, each module can register events through the internal callback to be notified when something happens in the game
openRaidLib.internalCallback = {}
@@ -590,7 +590,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
openRaidLib.RequestAllData()
end
--> this part is under development
--this part is under development
if (Details) then
local detailsEventListener = Details:CreateEventListener()
@@ -733,7 +733,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~main ~control
--~main ~control
openRaidLib.mainControl = {
playerAliveStatus = {},
@@ -765,15 +765,15 @@ LIB_OPEN_RAID_CAN_LOAD = false
--called on every player_entering_world event
openRaidLib.mainControl.UpdatePlayerData = function()
local unitName = UnitName("player")
--> player data
--player data
local playerFullInfo = openRaidLib.UnitInfoManager.GetPlayerFullInfo()
openRaidLib.UnitInfoManager.AddUnitInfo(unitName, unpack(playerFullInfo))
--> gear info
--gear info
local playerGearInfo = openRaidLib.GearManager.GetPlayerFullGearInfo()
openRaidLib.GearManager.AddUnitGearList(unitName, unpack(playerGearInfo))
--> cooldowns
--cooldowns
openRaidLib.CooldownManager.UpdatePlayerCooldownsLocally()
end
@@ -871,7 +871,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~all, request data from all players
--~all, request data from all players
--send a request to all players in the group to send their data
function openRaidLib.RequestAllData()
@@ -906,9 +906,9 @@ LIB_OPEN_RAID_CAN_LOAD = false
--------------------------------------------------------------------------------------------------------------------------------
--> ~player general ~info ~unit
--~player general ~info ~unit
--> API calls
--API calls
--return a table containing all information of units
--format: [playerName-realm] = {information}
function openRaidLib.GetAllUnitsInfo()
@@ -921,7 +921,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
return openRaidLib.UnitInfoManager.GetUnitInfo(unitName)
end
--> manager constructor
--manager constructor
openRaidLib.UnitInfoManager = {
--structure:
--[playerName] = {ilevel = 100, durability = 100, weaponEnchant = 0, noGems = {}, noEnchants = {}}
@@ -1199,7 +1199,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
--------------------------------------------------------------------------------------------------------------------------------
--> ~equipment
--~equipment
openRaidLib.GearManager = {
--structure: [playerName] = {ilevel = 100, durability = 100, weaponEnchant = 0, noGems = {}, noEnchants = {}}
UnitData = {},
@@ -1397,7 +1397,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
--------------------------------------------------------------------------------------------------------------------------------
--> ~cooldowns
--~cooldowns
openRaidLib.CooldownManager = {
UnitData = {}, --stores the list of cooldowns each player has sent
UnitDataFilterCache = {}, --same as the table above but cooldowns are separated has offensive, defensive, etc. FilterCooldowns in functions.lua
@@ -1527,7 +1527,7 @@ function openRaidLib.CooldownManager.CooldownSpellUpdate(unitName, spellId, newT
unitCooldownTable[spellId] = spellIdTable
end
--> API Calls
--API Calls
--return a table with unit names as key and a table with unit cooldowns as the value
--table format: [playerName] = {[spellId] = cooldownInfo}
function openRaidLib.GetAllUnitsCooldown()
@@ -1641,7 +1641,7 @@ end
return calculatePercent(timeOffset, duration, updateTime, charges)
end
--> internals
--internals
function openRaidLib.CooldownManager.OnPlayerCast(event, spellId, isPlayerPet) --~cast
--player casted a spell, check if the spell is registered as cooldown
local playerSpec = openRaidLib.GetPlayerSpecId()
@@ -2005,10 +2005,10 @@ end
openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaidLib.CooldownManager.OnReceiveRequestForCooldownInfoUpdate)
--------------------------------------------------------------------------------------------------------------------------------
--> ~keystones
--~keystones
--public callback does not check if the keystone has changed from the previous callback
--> API calls
--API calls
--return a table containing all information of units
--format: [playerName-realm] = {information}
function openRaidLib.GetAllKeystonesInfo()
@@ -2073,7 +2073,7 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
return true
end
--> manager constructor
--manager constructor
openRaidLib.KeystoneInfoManager = {
--structure:
--[playerName] = {level = 2, mapID = 222}
@@ -2278,7 +2278,7 @@ end)
--------------------------------------------------------------------------------------------------------------------------------
--> data
--data
--vintage cooldown tracker and interrupt tracker
C_Timer.After(0.1, function()