Coach feature should work no on pre-made groups and instance groups
This commit is contained in:
+10
-1
@@ -10114,8 +10114,17 @@ DF.ListboxFunctions = {
|
||||
line:AlignWithHeader(listBox.header, "left")
|
||||
return line
|
||||
end,
|
||||
}
|
||||
|
||||
SetData = function(frameCanvas, newData)
|
||||
if (type(newData) ~= "table") then
|
||||
error("ListBox:SetData received an invalid newData on parameter 2.")
|
||||
return
|
||||
end
|
||||
|
||||
frameCanvas.data = newData
|
||||
frameCanvas.scrollBox:Refresh()
|
||||
end,
|
||||
}
|
||||
|
||||
local listbox_options = {
|
||||
width = 800,
|
||||
|
||||
@@ -1354,6 +1354,9 @@ function raidStatusLib.playerInfoManager.GetPlayerFullInfo()
|
||||
|
||||
playerInfo[1] = specId
|
||||
|
||||
--covenant
|
||||
|
||||
|
||||
--renown
|
||||
local renown = C_CovenantSanctumUI.GetRenownLevel() or 1
|
||||
playerInfo[2] = renown
|
||||
|
||||
@@ -717,9 +717,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:SendRaidData (type, ...)
|
||||
|
||||
local isInInstanceGroup = IsInRaid (LE_PARTY_CATEGORY_INSTANCE)
|
||||
|
||||
if (isInInstanceGroup) then
|
||||
_detalhes:SendCommMessage (DETAILS_PREFIX_NETWORK, _detalhes:Serialize (type, _UnitName("player"), _GetRealmName(), _detalhes.realversion, ...), "INSTANCE_CHAT")
|
||||
if (_detalhes.debug) then
|
||||
@@ -734,9 +732,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:SendPartyData (type, ...)
|
||||
|
||||
local isInInstanceGroup = IsInGroup (LE_PARTY_CATEGORY_INSTANCE)
|
||||
|
||||
if (isInInstanceGroup) then
|
||||
_detalhes:SendCommMessage (DETAILS_PREFIX_NETWORK, _detalhes:Serialize (type, _UnitName ("player"), _GetRealmName(), _detalhes.realversion, ...), "INSTANCE_CHAT")
|
||||
if (_detalhes.debug) then
|
||||
@@ -748,7 +744,6 @@
|
||||
_detalhes:Msg ("(debug) sent comm to LOCAL party group")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:SendRaidOrPartyData (type, ...)
|
||||
|
||||
+5
-5
@@ -32,7 +32,7 @@ Details.Coach = {
|
||||
}
|
||||
|
||||
function Details.Coach.AskRLForCoachStatus()
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CIEA"), "RAID")
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CIEA")
|
||||
if (_detalhes.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] asked the coach the coach status.")
|
||||
end
|
||||
@@ -54,7 +54,7 @@ end
|
||||
|
||||
--the coach is no more a coach
|
||||
function Details.Coach.SendRaidCoachEndNotify()
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CE"), "RAID")
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CE")
|
||||
if (_detalhes.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach end notification.")
|
||||
end
|
||||
@@ -62,7 +62,7 @@ end
|
||||
|
||||
--there's a new coach, notify players
|
||||
function Details.Coach.SendRaidCoachStartNotify()
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CS"), "RAID")
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CS")
|
||||
if (_detalhes.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach start notification.")
|
||||
end
|
||||
@@ -70,7 +70,7 @@ end
|
||||
|
||||
--player send his death to the coach
|
||||
function Details.Coach.SendDeathToRL(deathTable)
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CDD", deathTable), "RAID")
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CDD", deathTable)
|
||||
if (_detalhes.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] your death has been sent to coach.")
|
||||
end
|
||||
@@ -81,7 +81,7 @@ function Details.Coach.Client.SendDataToRL()
|
||||
if (_detalhes.debug) then
|
||||
print("Details Coach sending data to RL.")
|
||||
end
|
||||
|
||||
|
||||
local data = Details.packFunctions.GetAllData()
|
||||
if (data and Details.Coach.Client.coachName) then
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CDT", data), "WHISPER", Details.Coach.Client.coachName)
|
||||
|
||||
@@ -36,7 +36,10 @@ end
|
||||
|
||||
--cancel an ongoing ticker
|
||||
function Details.Schedules.Cancel(tickerObject)
|
||||
return tickerObject:Cancel()
|
||||
--ignore if there's no ticker object
|
||||
if (tickerObject) then
|
||||
return tickerObject:Cancel()
|
||||
end
|
||||
end
|
||||
|
||||
--schedule a task with an interval of @time
|
||||
|
||||
Reference in New Issue
Block a user