From b45bd2cb5ce42762c202a04c3cd1ac2191fb9f21 Mon Sep 17 00:00:00 2001 From: woopydalan <29320668+woopydalan@users.noreply.github.com> Date: Sun, 5 Jan 2020 13:23:39 +0000 Subject: [PATCH 1/5] Update Dialog-es.lua --- Necrosis/Locales/Dialog-es.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Necrosis/Locales/Dialog-es.lua b/Necrosis/Locales/Dialog-es.lua index b59c581..212d495 100644 --- a/Necrosis/Locales/Dialog-es.lua +++ b/Necrosis/Locales/Dialog-es.lua @@ -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"}, @@ -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" From 1f5d4c15f2c647f929460b932f9bad53f4f24708 Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Sun, 5 Jan 2020 16:15:53 -0800 Subject: [PATCH 2/5] Update Msg function to account for change to the SendChatMessage API for classic --- Necrosis/Message.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Necrosis/Message.lua b/Necrosis/Message.lua index 0b9d4f3..de6da26 100644 --- a/Necrosis/Message.lua +++ b/Necrosis/Message.lua @@ -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") @@ -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) From fd6af88265b3848131ee2b0baa37433dbefedef9 Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Sun, 5 Jan 2020 17:45:10 -0800 Subject: [PATCH 3/5] Quickfix for loading errors --- Necrosis/Necrosis.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Necrosis/Necrosis.lua b/Necrosis/Necrosis.lua index e7191e0..e204505 100644 --- a/Necrosis/Necrosis.lua +++ b/Necrosis/Necrosis.lua @@ -1650,21 +1650,21 @@ function Necrosis:UpdateMana() -- Coloring the button in gray if not enough mana || Coloration du bouton en grisé si pas assez de mana if self.Spell[3].ID then - if self.Spells[3].Mana > mana then + if self.Spell[3].Mana > mana then for i = 1, 7, 1 do ManaPet[i] = false end elseif self.Spell[4].ID then - if self.Spells[4].Mana > mana then + if self.Spell[4].Mana > mana then for i = 2, 7, 1 do ManaPet[i] = false end elseif self.Spell[8].ID then - if self.Spells[8].Mana > mana then + if self.Spell[8].Mana > mana then ManaPet[7] = false ManaPet[8] = false elseif self.Spell[30].ID then - if self.Spells[30].Mana > mana then + if self.Spell[30].Mana > mana then ManaPet[8] = false end end @@ -2379,7 +2379,7 @@ 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) From 6f264da5fb7e659810eed495ba350d7e7c3a177e Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Sun, 5 Jan 2020 17:49:57 -0800 Subject: [PATCH 4/5] Quickfix for loading errors, part 2 --- Necrosis/Necrosis.lua | 12 +++++++----- Necrosis/XML/Attributes.lua | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Necrosis/Necrosis.lua b/Necrosis/Necrosis.lua index e204505..3703436 100644 --- a/Necrosis/Necrosis.lua +++ b/Necrosis/Necrosis.lua @@ -2387,11 +2387,13 @@ function Necrosis:SpellSetup() 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 diff --git a/Necrosis/XML/Attributes.lua b/Necrosis/XML/Attributes.lua index f58b8aa..674beab 100644 --- a/Necrosis/XML/Attributes.lua +++ b/Necrosis/XML/Attributes.lua @@ -176,12 +176,12 @@ function Necrosis:BuffSpellAttribute() -- Cas particulier : Bouton de Banish if _G["NecrosisBuffMenu10"] then - local SpellName_Rank = self.Spells[9].Name.."("..self.Spells[9].Rank..")" + local SpellName_Rank = self.Spell[9].Name.."("..self.Spells[9].Rank..")" 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.Spells[9].Rank:find("1") then -- the warlock can only do Banish(Rank 1) + if self.Spells[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) From 8d07b9bf56395efae528b4d165f54793a22f65ea Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Sun, 5 Jan 2020 18:11:11 -0800 Subject: [PATCH 5/5] Quickfix for loading errors, part 3 --- Necrosis/Necrosis.lua | 2 +- Necrosis/XML/Attributes.lua | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Necrosis/Necrosis.lua b/Necrosis/Necrosis.lua index 3703436..3088be7 100644 --- a/Necrosis/Necrosis.lua +++ b/Necrosis/Necrosis.lua @@ -2412,7 +2412,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 diff --git a/Necrosis/XML/Attributes.lua b/Necrosis/XML/Attributes.lua index 674beab..7384b33 100644 --- a/Necrosis/XML/Attributes.lua +++ b/Necrosis/XML/Attributes.lua @@ -176,12 +176,12 @@ function Necrosis:BuffSpellAttribute() -- Cas particulier : Bouton de Banish if _G["NecrosisBuffMenu10"] then - local SpellName_Rank = self.Spell[9].Name.."("..self.Spells[9].Rank..")" + local SpellName_Rank = self.Spell[9].Name.."("..self.Spell[9].Rank..")" 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.Spells[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) @@ -192,7 +192,7 @@ function Necrosis:BuffSpellAttribute() NecrosisBuffMenu10:SetAttribute("ctrl-spell*", SpellName_Rank) end - if self.Spells[9].Rank:find("2") then -- the warlock has Banish(rank 2) + if self.Spell[9].Rank:find("2") then -- the warlock has Banish(rank 2) local Rank1 = SpellName_Rank:gsub("2", "1") -- so lets use the "harmbutton" special attribute! @@ -312,18 +312,19 @@ function Necrosis:StoneAttribute(Steed) NecrosisSpellTimerButton:SetAttribute("macrotext", "/focus") NecrosisSpellTimerButton:SetAttribute("type2", "item") NecrosisSpellTimerButton:SetAttribute("item", self.Translation.Item.Hearthstone) - + -- if the 'Ritual of Summoning' spell is known, then associate it to the soulstone shift-click. if _G["NecrosisSoulstoneButton"] and self.Spells[37].spellId then NecrosisSoulstoneButton:SetAttribute("shift-type*", "spell") NecrosisSoulstoneButton:SetAttribute("shift-spell*", self.Spells[37].spellId) 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()