User:Infernix/Patching Necrosis

I wanted to patch Necrosis LdC so that right-clicking on the mount-sphere would use my flying mount rather than my Felsteed.


 * This patch is verified as working with Necrosis 2.6.3-beta
 * Both code blocks begin at line 352 of XML\\Attributes.lua
 * Be sure to replace Ebon Gryphon with the name of your flying mount

Stock XML\\Attributes.lua
-- Pour la monture if Steed and _G["NecrosisMountButton"] then NecrosisMountButton:SetAttribute("type1", "spell") NecrosisMountButton:SetAttribute("type2", "spell") -- Si le démoniste possède une monture épique, on associe la monture classique au clic droit if Necrosis.Spell[2].ID then NecrosisMountButton:SetAttribute("spell1", Necrosis.Spell[2].Name) NecrosisMountButton:SetAttribute("spell2", Necrosis.Spell[1].Name)

else NecrosisMountButton:SetAttribute("spell*", Necrosis.Spell[1].Name) end if not Necrosis.AlreadyBind["NecrosisMountButton"] then Necrosis.AlreadyBind["NecrosisMountButton"] = true Necrosis.Binding:insert({Necrosis.Spell[2].Name, "CLICK NecrosisMountButton:LeftButton"}) end end

Patched XML\\Attributes.lua
-- Pour la monture if Steed and _G["NecrosisMountButton"] then NecrosisMountButton:SetAttribute("type1", "spell") NecrosisMountButton:SetAttribute("type2", "item") NecrosisMountButton:SetAttribute("item", "Ebon Gryphon"); -- Si le démoniste possède une monture épique, on associe la monture classique au clic droit if Necrosis.Spell[2].ID then NecrosisMountButton:SetAttribute("spell*", Necrosis.Spell[2].Name) else NecrosisMountButton:SetAttribute("spell*", Necrosis.Spell[1].Name) end if not Necrosis.AlreadyBind["NecrosisMountButton"] then Necrosis.AlreadyBind["NecrosisMountButton"] = true Necrosis.Binding:insert({Necrosis.Spell[2].Name, "CLICK NecrosisMountButton:LeftButton"}) end end