Skip to content

Commit

Permalink
Merge branch 'master-rework' into LocalizationRefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tekHudson authored Jan 6, 2020
2 parents c3b3c60 + 807f2e4 commit 23ca872
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Necrosis/Locales/Dialog-es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Necrosis:Localization_Dialog_Es()
},
["Soulstone"] = {
Text = {"Click derecho para crear","Click izquierdo para usar","Usada\nClick derecho para recrear","Esperando"},
Ritual = "|c00FFFFFFShift+Click to cast the Ritual of Summoning|r"
Ritual = "|c00FFFFFFShift+Click para empezar Ritual de invocaci\195\179n|r"
},
["Healthstone"] = {
Text = {"Click derecho para crear","Click izquierdo para usar"},
Expand All @@ -98,7 +98,7 @@ function Necrosis:Localization_Dialog_Es()
Label = "|c00FFFFFFTrance de las Sombras|r"
},
["Backlash"] = {
Label = "|c00FFFFFFBacklash|r"
Label = "|c00FFFFFFLatigazo|r"
},
["Banish"] = {
Text = "Click derecho para invocar Rango 1"
Expand Down
10 changes: 5 additions & 5 deletions Necrosis/Message.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ local _G = getfenv(0)
------------------------------------------------------------------------------------------------------
function Necrosis:Msg(msg, type)
if msg then
inInstance, _ = IsInInstance()
-- dispatch the message to the appropriate chat channel depending on the message type
if (type == "WORLD") then
local groupMembersCount = GetNumGroupMembers()

if (groupMembersCount > 5) then
-- send to all raid members
SendChatMessage(msg, "RAID")
Expand All @@ -53,18 +53,18 @@ function Necrosis:Msg(msg, type)
SendChatMessage(msg, "PARTY")
else
-- not in a group so lets use the 'say' channel
SendChatMessage(msg, "SAY")
if (inInstance) then SendChatMessage(msg, "SAY") end
end
elseif (type == "PARTY") then
SendChatMessage(msg, "PARTY")
elseif (type == "RAID") then
SendChatMessage(msg, "RAID")
elseif (type == "SAY") then
SendChatMessage(msg, "SAY")
if (inInstance) then SendChatMessage(msg, "SAY") end
elseif (type == "EMOTE") then
SendChatMessage(msg, "EMOTE")
if (inInstance) then SendChatMessage(msg, "EMOTE") end
elseif (type == "YELL") then
SendChatMessage(msg, "YELL")
if (inInstance) then SendChatMessage(msg, "YELL") end
else
-- Add some color to our message :D
msg = self:MsgAddColor(msg)
Expand Down
16 changes: 9 additions & 7 deletions Necrosis/Necrosis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2259,19 +2259,21 @@ function Necrosis:SpellSetup()

-- Update the spell durations according to their rank || On met à jour la durée de chaque sort en fonction de son rang
-- Fear || Peur
if self.Spell[13].ID then
if self.Spell[13] and self.Spell[13].ID then
local _, _, lengtH = self.Spell[13].Rank:find("(%d+)")
if lengtH then
lengtH = tonumber(lengtH)
self.Spell[13].Length = tonumber(lengtH) * 5 + 5
end
end
-- Corruption
local _, _, ranK = self.Spell[14].Rank:find("(%d+)")
if ranK then
ranK = tonumber(ranK)
if self.Spell[14].ID and ranK <= 2 then
self.Spell[14].Length = ranK * 3 + 9
if self.Spell[14] and self.Spell[14].ID then
local _, _, ranK = self.Spell[14].Rank:find("(%d+)")
if ranK then
ranK = tonumber(ranK)
if self.Spell[14].ID and ranK <= 2 then
self.Spell[14].Length = ranK * 3 + 9
end
end
end

Expand All @@ -2290,7 +2292,7 @@ function Necrosis:SpellSetup()

-- associate the mounts to the sphere button || Association du sort de monture correct au bouton

if self.Spell[1].ID or self.Spell[2].ID then
if (self.Spell[1] and self.Spell[1].ID) or (self.Spell[2] and self.Spell[2].ID) then
Local.Summon.SteedAvailable = true
else
Local.Summon.SteedAvailable = false
Expand Down
11 changes: 6 additions & 5 deletions Necrosis/XML/Attributes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function Necrosis:BuffSpellAttribute()
NecrosisBuffMenu10:SetAttribute("unit*", "target") -- associate left & right clicks with target
NecrosisBuffMenu10:SetAttribute("ctrl-unit*", "focus") -- associate CTRL+left or right clicks with focus

if self.Spell[9].Rank:find("1") then -- the warlock can only do Banish(Rank 1)
if self.Spell[9].Rank:find("1") then -- the warlock can only do Banish(Rank 1)
-- left & right click will perform the same macro
NecrosisBuffMenu10:SetAttribute("type*", "macro")
NecrosisBuffMenu10:SetAttribute("macrotext*", "/focus\n/cast "..SpellName_Rank)
Expand Down Expand Up @@ -339,18 +339,19 @@ function Necrosis:StoneAttribute(Steed)
NecrosisHealthstoneButton:SetAttribute("shift-type*", "spell")
NecrosisHealthstoneButton:SetAttribute("shift-spell*", self.Spell[50].Name)
end
-- if the 'Ritual of Summoning' spell is known, then associate it to the soulstone shift-click.
if _G["NecrosisSoulstoneButton"] and self.Spell[37].ID then
NecrosisSoulstoneButton:SetAttribute("shift-type*", "spell")
NecrosisSoulstoneButton:SetAttribute("shift-spell*", self.Spell[37].Name)
end


end

-- Association de la Connexion au bouton central si le sort est disponible
-- Connection Association to the central button if the spell is available || Association de la Connexion au bouton central si le sort est disponible
function Necrosis:MainButtonAttribute()
if not NecrosisButton then return end
-- Le clic droit ouvre le Menu des options
NecrosisButton:SetAttribute("type2", "Open")
NecrosisButton.Open = function()
Expand Down

0 comments on commit 23ca872

Please sign in to comment.