Shaladownlands Launch

This commit is contained in:
Tercio Jose
2020-11-23 17:03:08 -03:00
parent 3d5095bd2c
commit ea9ad32a7f
18 changed files with 375 additions and 88 deletions
+51 -17
View File
@@ -41,24 +41,32 @@ end
function Details.Coach.SendRLCombatStartNotify(raidLeaderName)
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCS"), "WHISPER", raidLeaderName)
Details:Msg("sent to raid leader a combat start notification.")
if (_detalhes.debug) then
Details:Msg("sent to raid leader a combat start notification.")
end
end
function Details.Coach.SendRLCombatEndNotify(raidLeaderName)
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCE"), "WHISPER", raidLeaderName)
Details:Msg("sent to raid leader a combat end notification.")
if (_detalhes.debug) then
Details:Msg("sent to raid leader a combat end notification.")
end
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:Msg("sent to raid a coach end notification.")
if (_detalhes.debug) then
Details:Msg("sent to raid a coach end notification.")
end
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:Msg("sent to raid a coach start notification.")
if (_detalhes.debug) then
Details:Msg("sent to raid a coach start notification.")
end
end
--send data to raid leader
@@ -133,7 +141,9 @@ function Details.Coach.StartUp()
if (UnitIsGroupAssistant("player")) then
local raidLeaderName = Details.Coach.Client.GetLeaderName()
if (raidLeaderName) then
Details:Msg("i'm a raid assistant, sent combat start notification to raid leader.")
if (_detalhes.debug) then
Details:Msg("i'm a raid assistant, sent combat start notification to raid leader.")
end
Details.Coach.SendRLCombatStartNotify(raidLeaderName)
end
end
@@ -154,7 +164,9 @@ function Details.Coach.StartUp()
if (UnitIsGroupAssistant("player")) then
local raidLeaderName = Details.Coach.Client.GetLeaderName()
if (raidLeaderName) then
Details:Msg("i'm a raid assistant, sent combat end notification to raid leader.")
if (_detalhes.debug) then
Details:Msg("i'm a raid assistant, sent combat end notification to raid leader.")
end
Details.Coach.SendRLCombatEndNotify(raidLeaderName)
end
end
@@ -170,7 +182,9 @@ function Details.Coach.StartUp()
if (isInRaidZone()) then
--the raid leader entered a raid instance
Details.Coach.Disable()
Details:Msg("Coach feature stopped: you entered in a raid instance.")
if (_detalhes.debug) then
Details:Msg("Coach feature stopped: you entered in a raid instance.")
end
end
return
else
@@ -179,7 +193,9 @@ function Details.Coach.StartUp()
if (UnitIsGroupLeader("player")) then --player is the raid leader
if (not Details.Coach.Server.IsEnabled()) then --the coach feature isn't running
Details.Coach.Server.EnableCoach()
Details:Msg("Coach feature is now running, if this come as surprise, use '/details coach' to disable.")
if (_detalhes.debug) then
Details:Msg("Coach feature is now running, if this come as surprise, use '/details coach' to disable.")
end
end
end
return
@@ -193,7 +209,9 @@ function Details.Coach.StartUp()
if (not Details.Coach.Client.IsEnabled()) then
local raidLeaderName = Details:GetRaidLeader()
if (raidLeaderName) then
Details:Msg("sent ask to raid leader, is coach?")
if (_detalhes.debug) then
Details:Msg("sent ask to raid leader, is coach?")
end
Details.Coach.AskRLForCoachStatus(raidLeaderName)
return
end
@@ -248,19 +266,25 @@ end
--the player used '/details coach' or it's Details! initialization
function Details.Coach.Server.EnableCoach(fromStartup)
if (not IsInRaid()) then
Details:Msg("cannot enabled coach: not in raid.")
if (_detalhes.debug) then
Details:Msg("cannot enabled coach: not in raid.")
end
Details.coach.enabled = false
Details.Coach.Server.enabled = false
return
elseif (not UnitIsGroupLeader("player")) then
Details:Msg("cannot enabled coach: you aren't the raid leader.")
if (_detalhes.debug) then
Details:Msg("cannot enabled coach: you aren't the raid leader.")
end
Details.coach.enabled = false
Details.Coach.Server.enabled = false
return
elseif (isInRaidZone()) then
Details:Msg("cannot enabled coach: you are inside a raid zone.")
if (_detalhes.debug) then
Details:Msg("cannot enabled coach: you are inside a raid zone.")
end
Details.coach.enabled = false
Details.Coach.Server.enabled = false
return
@@ -276,7 +300,9 @@ function Details.Coach.Server.EnableCoach(fromStartup)
Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
if (fromStartup) then
Details:Msg("coach feature enabled, welcome back captain!")
if (_detalhes.debug) then
Details:Msg("coach feature enabled, welcome back captain!")
end
end
end
@@ -308,7 +334,9 @@ function Details.Coach.Client.EnableCoach(raidLeaderName)
--enable group roster to know if the raid leader has changed
Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
Details:Msg("there's a new coach: ", raidLeaderName)
if (_detalhes.debug) then
Details:Msg("there's a new coach: ", raidLeaderName)
end
end
--raid leader received a notification that a new combat has started
@@ -367,7 +395,9 @@ Details.Coach.EventFrame:SetScript("OnEvent", function(event, ...)
local unitName = UnitName("raid" .. i)
if (_G.Ambiguate(unitName .. "-" .. GetRealmName(), "none") ~= Details.Coach.Client.coachName) then
--the raid leader has changed, finish the coach feature on the client
Details:Msg("raid leader has changed, coach feature has been disabled.")
if (_detalhes.debug) then
Details:Msg("raid leader has changed, coach feature has been disabled.")
end
Details.Coach.Client.CoachEnd()
end
break
@@ -382,7 +412,9 @@ Details.Coach.EventFrame:SetScript("OnEvent", function(event, ...)
if (not Details.Coach.Server.IsEnabled()) then
if (IsInRaid()) then
if (not isInRaidZone()) then
Details:Msg("you're now the coach of the group.")
if (_detalhes.debug) then
Details:Msg("you're now the coach of the group.")
end
--delay to set the new leader to give time for SendRaidCoachEndNotify()
_G.C_Timer.After(3, Details.Coach.Server.EnableCoach)
end
@@ -393,7 +425,9 @@ Details.Coach.EventFrame:SetScript("OnEvent", function(event, ...)
--player isn't the raid leader, check if the player is the coach and disable the feature
if (Details.Coach.IsEnabled()) then
if (Details.Coach.Server.IsEnabled()) then
Details:Msg("you're not the raid leader, disabling the coach feature.")
if (_detalhes.debug) then
Details:Msg("you're not the raid leader, disabling the coach feature.")
end
Details.Coach.Disable()
end
end
+10 -3
View File
@@ -49,9 +49,16 @@ end)
--store the GUID of the npc or player and point to the coords there the icon is
local iconPath1 = [[Interface\AddOns\Details\images\special_bar_icons]]
Details.Immersion.IconDatabase = {
["167826"] = {file = iconPath1, iconId = 1, interest = true}, --lady jaina proudmoore
["167827"] = {file = iconPath1, iconId = 2, interest = true}, --Thrall
["167826"] = {file = iconPath1, iconId = 1, interest = true, class = "MAGE"}, --lady jaina proudmoore
["167827"] = {file = iconPath1, iconId = 2, interest = true, class = "SHAMAN"}, --Thrall
["157432"] = {file = iconPath1, iconId = 3, interest = true, class = "WARRIOR"}, --bloodletter phantoriax, a npc inside torghast
["166148"] = {file = iconPath1, iconId = 4, interest = true, class = "WARRIOR"}, --sawn, a npc inside torghast
["171996"] = {file = iconPath1, iconId = 5, interest = true, class = "WARRIOR"}, --kythekios, a npc inside torghast
["172007"] = {file = iconPath1, iconId = 6, interest = true, class = "WARRIOR"}, --thelia, a npc inside torghast
["172024"] = {file = iconPath1, iconId = 7, interest = true, class = "WARRIOR"}, --telethakas, a npc inside torghast
["157406"] = {file = iconPath1, iconId = 8, interest = true, class = "WARRIOR"}, --renavyth, a npc inside torghast
["166151"] = {file = iconPath1, iconId = 9, interest = true, class = "WARRIOR"}, --moriaz the red, a npc inside torghast
}
local customIconsDB = Details.Immersion.IconDatabase
@@ -75,6 +82,6 @@ end
function Details.Immersion.IsNpcInteresting(aID)
local npcImmersion = customIconsDB[aID]
if (npcImmersion and npcImmersion.interest) then
return true
return true, npcImmersion.class
end
end
+3
View File
@@ -95,6 +95,9 @@ do
function _detalhes:GetSpecIcon (spec, useAlpha)
if (spec) then
if (spec > 500) then --hack to new spec ids on new leveling zones from level 1-10
spec = 65
end
if (useAlpha) then
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack (_detalhes.class_specs_coords [spec])
else
+11
View File
@@ -1104,6 +1104,17 @@ local default_player_data = {
enabled = false,
},
--> cd tracker
cd_tracker = {
pos = {},
enabled = false,
cds_enabled = {},
show_conditions = {
only_in_group = true,
only_inside_instance = true,
}
},
--> force all fonts to have this outline
force_font_outline = "",