---------------- -- BubbleHenge -- ---------------- local BubbleHenge = Henge:NewModule("BubbleHenge") BubbleHenge.fullname = "BubbleHenge" BubbleHenge.icon = "icon" local ML, SL = nil, nil function BubbleHenge:Test() local _, pClass = UnitClass("player") return pClass == "PALADIN" end function BubbleHenge:Load() ML = HengeLocale:LoadBubbleHenge() SL = AceLibrary("Babble-Spell-2.2") self.db = Henge:AcquireDBNamespace("BubbleHenge") -- Set up defaults self.defaultsPC = {} self.defaults = {} Henge:RegisterDefaults("BubbleHenge", "profile", self.defaults) Henge:RegisterDefaults("BubbleHenge", "char", self.defaultsPC) HengeSphere:AddData({ ["id"] = "mana", ["name"] = ML["Mana"], ["func"] = function() return UnitMana("player"), UnitManaMax("player") end, ["event"] = "UNIT_MANA", ["arg1"] = "player" }) local spell = { --seals ["sowisdom"] = SL["Seal of Wisdom"], ["solight"] = SL["Seal of Light"], ["sojustice"] = SL["Seal of Justice"], ["socrusader"] = SL["Seal of the Crusader"], ["sorighteousness"] = SL["Seal of Righteousness"], ["socommand"] = SL["Seal of Command"], ["judgement"] = SL["Judgement"], --blessings ["bosalvation"] = SL["Blessing of Salvation"], ["bowisdom"] = SL["Blessing of Wisdom"], ["bomight"] = SL["Blessing of Might"], ["bolight"] = SL["Blessing of Light"], ["bosacrifice"] = SL["Blessing of Sacrifice"], ["bofreedom"] = SL["Blessing of Freedom"], ["boprotection"] = SL["Blessing of Protection"], ["bokings"] = SL["Blessing of Kings"], -- greater blessings ["gbosalvation"] = SL["Greater Blessing of Salvation"], ["gbowisdom"] = SL["Greater Blessing of Wisdom"], ["gbomight"] = SL["Greater Blessing of Might"], ["gbolight"] = SL["Greater Blessing of Light"], ["gbokings"] = SL["Greater Blessing of Kings"], --miscellaneous ["holylight"] = SL["Holy Light"], ["flashoflight"] = SL["Flash of Light"], ["layonhands"] = SL["Lay on Hands"], ["crusaderstrike"] = SL["Crusader Strike"], --Auren ["sanctity"] = SL["Sanctity Aura"], ["devotion"] = SL["Devotion Aura"], ["retribution"] = SL["Retribution Aura"], ["concentration"] = SL["Concentration Aura"], ["shadowr"] = SL["Shadow Resistance Aura"], ["frostr"] = SL["Frost Resistance Aura"], ["firer"] = SL["Fire Resistance Aura"], ["crusader"] = SL["Crusader Aura"] } for k, v in pairs(spell) do HengeAction:Add({ ["id"] = k, ["name"] = v, ["type"] = 'spell', ["spell"] = v }) end local data = { { ["id"] = "seals", ["name"] = ML["Seals"], ["pos"] = 315, ["desc"] = ML["Casting Seals"], ["icon"] = "action", ["menu"] = { [1] = "sowisdom", [2] = "solight", [3] = "sojustice", [4] = "socrusader", [5] = "sorighteousness", [6] = "socommand" } }, { ["id"] = "gblessings", ["name"] = ML["Greater Blessings"], ["pos"] = 160, ["desc"] = ML["Greater Blessing Castmenu"], ["icon"] = "action", ["menu"] = { [1] = "gbosalvation", [2] = "gbowisdom", [3] = "gbomight", [4] = "gbolight", [5] = "gbokings" } }, { ["id"] = "blessings", ["name"] = ML["Blessings"], ["pos"] = 140, ["desc"] = ML["Blessing Castmenu"], ["icon"] = "action", ["menu"] = { [1] = "bosalvation", [2] = "bowisdom", [3] = "bomight", [4] = "bolight", [5] = "bosacrifice", [6] = "bofreedom", [7] = "boprotection", [8] = "bokings" } }, { ["id"] = "auren", ["name"] = ML["Auras"], ["pos"] = 105, ["desc"] = ML["Changing your Aura"], ["icon"] = "action", ["menu"] = { [1] = "sanctity", [2] = "devotion", [3] = "retribution", [4] = "concentration", [5] = "shadowr", [6] = "frostr", [7] = "firer", [8] = "crusader" } }, } for k, v in ipairs(data) do local bdata = { ["id"] = v.id, ["type"] = "menu", ["name"] = v.name, ["desc"] = v.desc, ["icon"] = v.icon, ["ltype"] = "spell", ["lval"] = v.menu[1], ["children"] = {}, ["options"] = { ["action"] = v.menu[1], ["anchor"] = "sphere:Main", ["xpos"] = 0, ["ypos"] = 0, ["angle"] = v.pos } } for num, id in ipairs(v.menu) do local action = HengeAction:Get(id) local name, desc, icon = action:ActionInfo() bdata.children[num] = { ["type"] = "child", ["id"] = id, ["name"] = name, ["icon"] = "action", ["action"] = id, ["options"] = { } } end HengeButton:Add(bdata) end HengeButton:Add({ ["id"] = "healing", ["type"] = "action", ["name"] = ML["Healing Spells"], ["desc"] = nil, ["actions"] = { ["LeftButton"] = "holylight", ["RightButton"] = "flashoflight", ["Shift-LeftButton"] = "layonhands" }, ["options"] = { ["anchor"] = "sphere:Main", ["xpos"] = 0, ["ypos"] = 0, ["angle"] = 105, ["texture"] = "action:LeftButton" } }) HengeButton:Add({ ["id"] = "judgement", ["type"] = "action", ["name"] = ML["Judgement"], ["desc"] = nil, ["actions"] = { ["LeftButton"] = "judgement", ["RightButton"] = "crusaderstrike", }, ["options"] = { ["anchor"] = "sphere:Main", ["xpos"] = 0, ["ypos"] = 0, ["angle"] = 270, ["texture"] = "action:LeftButton" } }) end