Commit df7d567c authored by Shagu's avatar Shagu

import clique

parents
This diff is collapsed.
## Interface: 11200
## Title: Clique
## Author: Cladhaire
## Notes: Simply powerful click-casting interface
## SavedVariables: CliqueDB
## OptionalDeps: Ace2, DewdropLib
libs\FAIAP.lua
libs\AceLibrary\AceLibrary.lua
libs\AceOO\AceOO-2.0.lua
libs\AceHook\AceHook-2.0.lua
libs\AceAddon\AceAddon-2.0.lua
libs\AceDB\AceDB-2.0.lua
libs\AceDebug\AceDebug-2.0.lua
libs\AceEvent\AceEvent-2.0.lua
libs\AceConsole\AceConsole-2.0.lua
libs\AceLocale\AceLocale-2.0.lua
libs\AceModuleCore\AceModuleCore-2.0.lua
libs\Dewdrop\Dewdrop-2.0.lua
Clique.lua
Localization.en.lua
Localization.fr.lua
Localization.de.lua
Localization.zh.lua
Localization.kr.lua
CliqueOptions.lua
CliqueUtils.lua
Clique.xml
Plugins\Plugins.xml
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--[[---------------------------------------------------------------------------------
Localisation for German
----------------------------------------------------------------------------------]]
local L = AceLibrary("AceLocale-2.0"):new("Clique")
L:RegisterTranslations("deDE", function()
return {
RANK = "Rang",
RANK_PATTERN = "Rang (%d+)",
MANA_PATTERN = "(%d+) Mana",
HEALTH_PATTERN = "(%d+) .+ (%d+)",
RANK_FORMAT = "Rang %d",
SPELL_FORMAT = "%s(Rang %d)",
["Lesser Heal"] = "Geringes Heilen",
["Heal"] = "Heilen",
["Greater Heal"] = "Gro\195\159e Heilung",
["Flash Heal"] = "Blitzheilung",
["Healing Touch"] = "Heilende Ber\195\188hrung",
["Regrowth"] = "Nachwachsen",
["Healing Wave"] = "Welle der Heilung",
["Lesser Healing Wave"] = "Geringe Welle der Heilung",
["Holy Light"] = "Heiliges Licht",
["Flash of Light"] = "Lichtblitz",
DUAL_HOLY_SHOCK = "Heiliger Schock",
DUAL_MIND_VISION = "Gedankensicht",
CURE_CURE_DISEASE = "Krankheit heilen",
CURE_ABOLISH_DISEASE = "Krankheit neutralisieren",
CURE_PURIFY = "L\195\164utern",
CURE_CLEANSE = "Reinigen",
CURE_DISPEL_MAGIC = "Magiebannung",
CURE_CURE_POISON = "Vergiftung heilen",
CURE_ABOLISH_POISON = "Vergiftung aufheben",
CURE_REMOVE_LESSER_CURSE = "Geringen Fluch entfernen",
CURE_REMOVE_CURSE = "Fluch aufheben",
BUFF_PWF = "Machtwort: Seelenst\195\164rke",
BUFF_PWS = "Machtwort: Schild",
BUFF_SP = "Schattenschutz",
BUFF_DS = "Inneres Feuer",
BUFF_RENEW = "Erneuerung",
BUFF_MOTW = "Mal der Wildnis",
BUFF_THORNS = "Dornen",
BUFF_REJUVENATION = "Verj\195\188ngung",
BUFF_REGROWTH = "Nachwachsen",
BUFF_AI = "Arkaner Intellekt",
BUFF_DM = "Magied\195\164mpfer",
BUFF_AM = "Magie verst\195\164rken",
BUFF_BOM = "Segen der Macht",
BUFF_BOP = "Segen des Schutzes",
BUFF_BOW = "Segen der Weisheit",
BUFF_BOS = "Segen des Refugiums",
BUFF_BOL = "Segen des Lichts",
BUFF_BOSFC = "Segen der Opferung",
}
end)
\ No newline at end of file
--[[---------------------------------------------------------------------------------
Localisation for English
----------------------------------------------------------------------------------]]
local L = AceLibrary("AceLocale-2.0"):new("Clique")
L:RegisterTranslations("enUS", function()
return {
RANK = "Rank",
RANK_PATTERN = "Rank (%d+)",
MANA_PATTERN = "(%d+) Mana",
HEALTH_PATTERN = "(%d+) .+ (%d+)",
RANK_FORMAT = "Rank %d",
SPELL_FORMAT = "%s(Rank %d)",
["Lesser Heal"] = "Lesser Heal",
["Heal"] = "Heal",
["Greater Heal"] = "Greater Heal",
["Flash Heal"] = "Flash Heal",
["Healing Touch"] = "Healing Touch",
["Regrowth"] = "Regrowth",
["Healing Wave"] = "Healing Wave",
["Lesser Healing Wave"] = "Lesser Healing Wave",
["Holy Light"] = "Holy Light",
["Flash of Light"] = "Flash of Light",
DUAL_HOLY_SHOCK = "Holy Shock",
DUAL_MIND_VISION = "Mind Vision",
FREE_INNER_FIRE = "Inner Fire",
CURE_CURE_DISEASE = "Cure Disease",
CURE_ABOLISH_DISEASE = "Abolish Disease",
CURE_PURIFY = "Purify",
CURE_CLEANSE = "Cleanse",
CURE_DISPEL_MAGIC = "Dispel Magic",
CURE_CURE_POISON = "Cure Poison",
CURE_ABOLISH_POISON = "Abolish Poison",
CURE_REMOVE_LESSER_CURSE = "Remove Lesser Curse",
CURE_REMOVE_CURSE = "Remove Curse",
BUFF_PWF = "Power Word: Fortitude",
BUFF_PWS = "Power Word: Shield",
BUFF_SP = "Shadow Protection",
BUFF_DS = "Divine Spirit",
BUFF_RENEW = "Renew",
BUFF_MOTW = "Mark of the Wild",
BUFF_THORNS = "Thorns",
BUFF_REJUVENATION = "Rejuvenation",
BUFF_REGROWTH = "Regrowth",
BUFF_AI = "Arcane Intellect",
BUFF_DM = "Dampen Magic",
BUFF_AM = "Amplify Magic",
BUFF_BOM = "Blessing of Might",
BUFF_BOP = "Blessing of Protection",
BUFF_BOW = "Blessing of Wisdom",
BUFF_BOS = "Blessing of Sanctuary",
BUFF_BOL = "Blessing of Light",
BUFF_BOSFC = "Blessing of Sacrifice",
DEFAULT_FRIENDLY = "Default Friendly",
DEFAULT_HOSTILE = "Default Hostile",
BINDING_NOT_DEFINED = "Binding not defined",
COULD_NOT_FIND_MODULE = "Could not find module named \"%s\"",
COULD_NOT_FIND_FRAME = "Could not find frame \"%s\" when enabling module \"%s\"",
PLUGIN_NOT_PROPER = "The plugin for \"%s\" doesn't appear to have a framelist or an enable function.",
NO_UNIT_FRAME = "Could not determine which unit corresponds to frame \"%s\"",
CUSTOM_SCRIPT = "Custom Script",
ERROR_SCRIPT = "|cff00ff33Clique: There was an |cffff3333error|r |cff00ff33compiling your script:|r %s",
ENABLED_MODULE = "|cff00ff33Clique: Enabled a module for|r %s" ,
TT_DROPDOWN = "Selects which clickcasting \"set\" you are currently editing",
TT_LIST_ENTRY = "Double-click to edit, or single-click to select",
TT_DEL_BUTTON = "Click to delete the selected entry",
TT_MAX_BUTTON = "Click to change this spell to always cast the MAX RANK",
TT_NEW_BUTTON = "Create a new custom script",
TT_EDIT_BUTTON = "Edit a click-cast entry",
TT_OK_BUTTON = "Exit the Clique config screen",
TT_EDIT_BINDING = "Perform a click-cast here to change the binding",
TT_NAME_EDITBOX = "The name of the custom script",
TT_SAVE_BUTTON = "Save your changes",
TT_CANCEL_BUTTON = "Cancel your changes",
TT_TEXT_EDITBOX = "Type custom LUA code here",
TT_PULLOUT_TAB = "Click to open/close the Clique configuration screen" ,
}
end)
\ No newline at end of file
--[[---------------------------------------------------------------------------------
Localisation for French
----------------------------------------------------------------------------------]]
local L = AceLibrary("AceLocale-2.0"):new("Clique")
L:RegisterTranslations("frFR", function()
return {
RANK = "Rang",
RANK_PATTERN = "Rang (%d+)",
MANA_PATTERN = "Mana : (%d+)",
HEALTH_PATTERN = "(%d+) .+ (%d+)",
RANK_FORMAT = "Rang %d",
SPELL_FORMAT = "%s(Rang %d)",
["Lesser Heal"] = "Soins inf\195\169rieurs",
["Heal"] = "Soins",
["Greater Heal"] = "Soins sup\195\169rieurs",
["Flash Heal"] = "Soins rapides",
["Healing Touch"] = "Toucher gu\195\169risseur",
["Regrowth"] = "R\195\169tablissement",
["Healing Wave"] = "Vague de soins",
["Lesser Healing Wave"] = "Vague de soins inf\195\169rieurs",
["Holy Light"] = "Lumi\195\168re sacr\195\169e",
["Flash of Light"] = "Eclair lumineux",
DUAL_HOLY_SHOCK = "Holy Shock",
DUAL_MIND_VISION = "Vision t\195\169l\195\169pathique",
CURE_CURE_DISEASE = "Gu\195\169rison des Maladies",
CURE_ABOLISH_DISEASE = "Abolir Maladie",
CURE_PURIFY = "Purification",
CURE_CLEANSE = "Epuration",
CURE_DISPEL_MAGIC = "Dissiper Magie",
CURE_CURE_POISON = "Gu\195\169rison du Poison",
CURE_ABOLISH_POISON = "Abolir le Poison",
CURE_REMOVE_LESSER_CURSE = "D\195\169livrance de la Mal\195\169diction Mineure",
CURE_REMOVE_CURSE = "D\195\169livrance de la Mal\195\169diction",
BUFF_PWF = "Mot de pouvoir : Robustesse",
BUFF_PWS = "Mot de pouvoir : Bouclier",
BUFF_SP = "Protection contre l\'ombre",
BUFF_DS = "Feu Int\195\169rieur",
BUFF_RENEW = "R\195\169novation",
BUFF_MOTW = "Marque du fauve",
BUFF_THORNS = "Epines",
BUFF_REJUVENATION = "R\195\169cup\195\169ration",
BUFF_REGROWTH = "R\195\169tablissement",
BUFF_AI = "Intelligence des arcanes",
BUFF_DM = "Att\195\169nuer la Magie",
BUFF_AM = "Amplifier la Magie",
BUFF_BOM = "B\195\169n\195\169diction de puissance",
BUFF_BOP = "B\195\169n\195\169diction de protection",
BUFF_BOW = "B\195\169n\195\169diction de sagesse",
BUFF_BOS = "B\195\169n\195\169diction du Sanctuaire",
BUFF_BOL = "B\195\169n\195\169diction de lumi\195\168re",
BUFF_BOSFC = "B\195\169n\195\169diction de Sacrifice",
}
end)
\ No newline at end of file
--[[---------------------------------------------------------------------------------
Localisation for Korean
----------------------------------------------------------------------------------]]
local L = AceLibrary("AceLocale-2.0"):new("Clique")
L:RegisterTranslations("koKR", function()
return {
RANK = "레벨",
RANK_PATTERN = "(%d+) 레벨",
MANA_PATTERN = "마나 (%d+)",
HEALTH_PATTERN = "(%d+).+(%d+)",
RANK_FORMAT = "%d 레벨",
SPELL_FORMAT = "%s(%d 레벨)",
["Lesser Heal"] = "하급 치유",
["Heal"] = "치유",
["Greater Heal"] = "상급 치유",
["Flash Heal"] = "순간 치유",
["Healing Touch"] = "치유의 손길",
["Regrowth"] = "재생",
["Healing Wave"] = "치유의 물결",
["Lesser Healing Wave"] = "하급 치유의 물결",
["Holy Light"] = "성스러운 빛",
["Flash of Light"] = "빛의 섬광",
DUAL_HOLY_SHOCK = "신성 충격",
DUAL_MIND_VISION = "마음의 눈",
FREE_INNER_FIRE = "내면의 열정",
CURE_CURE_DISEASE = "질병 치료",
CURE_ABOLISH_DISEASE = "질병 해제",
CURE_PURIFY = "순화",
CURE_CLEANSE = "정화",
CURE_DISPEL_MAGIC = "마법 무효화",
CURE_CURE_POISON = "해독",
CURE_ABOLISH_POISON = "독 해제",
CURE_REMOVE_LESSER_CURSE = "하급 저주 해제",
CURE_REMOVE_CURSE = "저주 해제",
BUFF_PWF = "신의 권능: 인내 연마",
BUFF_PWS = "신의 권능: 보호막 연마",
BUFF_SP = "어둠의 보호",
BUFF_DS = "천상의 정신",
BUFF_RENEW = "소생",
BUFF_MOTW = "야생의 징표",
BUFF_THORNS = "가시",
BUFF_REJUVENATION = "회복",
BUFF_REGROWTH = "재생",
BUFF_AI = "신비한 지능",
BUFF_DM = "마법 감쇠",
BUFF_AM = "마법 증폭",
BUFF_BOM = "힘의 축복",
BUFF_BOP = "보호의 축복",
BUFF_BOW = "지혜의 축복",
BUFF_BOS = "성역의 축복",
BUFF_BOL = "빛의 축복",
BUFF_BOSFC = "희생의 축복",
DEFAULT_FRIENDLY = "기본 우호적",
DEFAULT_HOSTILE = "기본 적대적",
BINDING_NOT_DEFINED = "단축키가 지정되지 않았습니다.",
COULD_NOT_FIND_MODULE = "모듈을 찾을 수 없습니다. - \"%s\"",
COULD_NOT_FIND_FRAME = "프레임 \"%s\"를 찾을 수 없음 - 모듈 \"%s\"를 활성화 시",
PLUGIN_NOT_PROPER = "이 \"%s\" 를 위해 플러그인은 프레임리스트나 가능한 기능을 가지고 있지 않습니다.",
NO_UNIT_FRAME = "유닉트는 \"%s\" 만들기 위해 어울림을 결정하지 않을 수 있습니다.",
CUSTOM_SCRIPT = "사용자 스크립트",
ERROR_SCRIPT = "|cff00ff33Clique: 다음과 같은 |cff00ff33스크립트|r |cffff3333오류:|r %s",
ENABLED_MODULE = "|cff00ff33Clique: 다음을 위해 모듈을 가능케 함|r %s" ,
TT_DROPDOWN = "당신이 현재 \"set\" 에 대한 편집을 하고 있습니다.",
TT_LIST_ENTRY = "더블클릭 : 수정, 클릭 : 선택",
TT_DEL_BUTTON = "선택된 요소 제거",
TT_MAX_BUTTON = "항상 최고레벨 주문 시전 변경",
TT_NEW_BUTTON = "새로운 사용자 스크립트 생성",
TT_EDIT_BUTTON = "클릭 시전 요소 수정",
TT_OK_BUTTON = "Clique 설정 화면 종료",
TT_EDIT_BINDING = "키설정을 바꾸기 위해 이곳을 클릭하십시요.",
TT_NAME_EDITBOX = "사용자 스크립트명",
TT_SAVE_BUTTON = "변경 내용 저장",
TT_CANCEL_BUTTON = "변경 내용 취소",
TT_TEXT_EDITBOX = "사용자 LUA 코드 입력",
TT_PULLOUT_TAB = "Clique 설정 화면 열고 닫기" ,
}
end)
--[[---------------------------------------------------------------------------------
Localisation for zhCN
----------------------------------------------------------------------------------]]
local L = AceLibrary("AceLocale-2.0"):new("Clique")
L:RegisterTranslations("zhCN", function()
return {
RANK = "等级",
RANK_PATTERN = "等级 (%d+)",
MANA_PATTERN = "(%d+)法力值",
HEALTH_PATTERN = "(%d+)到(%d+)",
RANK_FORMAT = "等级 %d",
SPELL_FORMAT = "%s(等级 %d)",
["Lesser Heal"] = "次级治疗术",
["Heal"] = "治疗术",
["Greater Heal"] = "强效治疗术",
["Flash Heal"] = "快速治疗",
["Healing Touch"] = "治疗之触",
["Regrowth"] = "愈合",
["Healing Wave"] = "治疗波",
["Lesser Healing Wave"] = "次级治疗波",
["Holy Light"] = "圣光术",
["Flash of Light"] = "圣光闪现",
DUAL_HOLY_SHOCK = "\231\165\158\229\156\163\233\156\135\229\135\187",
DUAL_MIND_VISION = "\229\191\131\231\191\181\232\167\134\231\149\140",
CURE_CURE_DISEASE = "\231\165\155\231\151\133\230\156\175",
CURE_ABOLISH_DISEASE = "\233\169\177\233\153\164\231\150\190\231\151\133",
CURE_PURIFY = "\231\186\175\229\135\128\230\156\175",
CURE_CLEANSE = "\230\184\133\230\180\191\230\156\175",
CURE_DISPEL_MAGIC = "\233\169\177\230\149\163\233\173\148\230\179\149",
CURE_CURE_POISON = "\230\182\136\230\175\146\230\156\175",
CURE_ABOLISH_POISON = "\233\169\177\230\175\146\230\156\175",
CURE_REMOVE_LESSER_CURSE = "\232\167\163\233\153\164\230\172\161\231\186\167\232\175\133\229\146\146",
CURE_REMOVE_CURSE = "\232\167\163\233\153\164\232\175\133\229\146\146",
BUFF_PWF = "\231\156\159\232\168\128\230\156\175\239\188\154\233\159\167",
BUFF_PWS = "\231\156\159\232\168\128\230\156\175\239\188\154\231\155\190",
BUFF_SP = "\233\152\178\230\138\164\230\154\151\229\189\177",
BUFF_DS = "\231\165\158\229\156\163\228\185\139\231\191\181",
BUFF_RENEW = "\230\191\162\229\164\191",
BUFF_MOTW = "\233\135\142\230\128\167\229\191\176\232\174\176",
BUFF_THORNS = "\232\191\134\230\163\152\230\156\175",
BUFF_REJUVENATION = "\229\155\158\230\152\165\230\156\175",
BUFF_REGROWTH = "\230\132\136\229\191\136",
BUFF_AI = "\229\165\165\230\156\175\230\153\186\230\133\167",
BUFF_DM = "\233\173\148\230\179\149\230\138\145\229\136\182",
BUFF_AM = "\233\173\148\230\179\149\229\162\158\230\149\136",
BUFF_BOM = "\229\138\155\233\135\191\231\165\191\231\166\191",
BUFF_BOP = "\228\191\191\230\138\164\231\165\191\231\166\191",
BUFF_BOW = "\230\153\186\230\133\167\231\165\191\231\166\191",
BUFF_BOS = "\230\139\175\230\149\145\231\165\191\231\166\191",
BUFF_BOL = "\229\133\137\230\152\142\231\165\191\231\166\191",
BUFF_BOSFC = "\231\137\186\231\137\178\231\165\191\231\166\191",
}
end)
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("aofhclique")
Plugin.fullname = "AofHeal_Cliqueplugin"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
function Plugin:Test()
return aofhfb1
end
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
aofhFu_CustomClick = self.OnClick
end
-- Plugin:OnDisable() is called if the mod is enabled and its being explicitly disabled.
-- This function is optional. If it doesn't exist, Plugin:UnregisterAllEvents() and
-- Plugin:UnregisterAllHooks().
function Plugin:Disable()
aofhFu_CustomClick = nil
end
function Plugin.OnClick(button, unit)
if not Clique:OnClick(button, unit) then
if button == "LeftButton" then
aofhFu:aofh_Function_CastOnTarget(UnitName(this.nickname))
end
end
end
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("archud")
Plugin.fullname = "ArcHUD"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
function Plugin:Test()
return ArcHUD
end
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
ArcHUD_CustomClick = function(button, unit)
if not Clique:OnClick(button, unit) then
if(button == "LeftButton") then
TargetUnit(unit)
elseif(button == "RightButton") then
Clique:UnitMenu(unit)
end
end
end
end
-- Plugin:OnDisable() is called if the mod is enabled and its being explicitly disabled.
-- This function is optional. If it doesn't exist, Plugin:UnregisterAllEvents() and
-- Plugin:UnregisterAllHooks().
function Plugin:OnDisable()
ArcHUD_CustomClick = nil
end
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("blizzraid")
Plugin.fullname = "Blizzard Raid Frames"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
function Plugin:Test()
return RaidPullout_Update and not IsAddOnLoaded("EasyRaid")
end
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
self:Hook("RaidPullout_Update", "SetClicks")
self:Hook("RaidPulloutButton_OnClick", "OnClick")
end
function Plugin:SetClicks(frame)
self.hooks.RaidPullout_Update.orig(frame)
if not frame then frame = this end
for i=1,NUM_RAID_PULLOUT_FRAMES do
--ChatFrame1:AddMessage(string.format("Setting clicks on %d frames within %s", frame.numPulloutButtons, frame:GetName()))
for j=1, frame.numPulloutButtons do
local button = getglobal(frame:GetName().."Button"..j.."ClearButton");
--ChatFrame1:AddMessage(string.format("Registering clicks on %s", button:GetName()))
button:RegisterForClicks("LeftButtonUp", "RightButtonUp", "MiddleButtonUp", "Button4Up", "Button5Up")
end
end
end
function Plugin:OnClick()
local button = arg1
local unit = this.unit
if not Clique:OnClick(button, unit) then
self.hooks.RaidPulloutButton_OnClick.orig(this)
end
end
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("blizzuf")
Plugin.fullname = "Blizzard Unit Frames"
local frames = {
["PlayerFrame"] = "player",
["PetFrame"] = "pet",
["TargetFrame"] = "target",
["TargetofTargetFrame"] = "targettarget",
["PartyMemberFrame1"] = "party1",
["PartyMemberFrame2"] = "party2",
["PartyMemberFrame3"] = "party3",
["PartyMemberFrame4"] = "party4",
["PartyMemberFrame1PetFrame"] = "party1",
["PartyMemberFrame2PetFrame"] = "party2",
["PartyMemberFrame3PetFrame"] = "party3",
["PartyMemberFrame4PetFrame"] = "party4",
}
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
for frame,unit in pairs(frames) do
local button = getglobal(frame)
button.unit = unit
button:RegisterForClicks("LeftButtonUp", "RightButtonUp", "MiddleButtonUp", "Button4Up", "Button5Up")
self:HookScript(button, "OnClick")
end
end
function Plugin:OnClick()
local button = arg1
local unit = this.healthbar.unit
if not Clique:OnClick(button, unit) then
self.hooks[this].OnClick.orig(this)
end
end
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("ctra")
Plugin.fullname = "CT_RaidAssist"
Plugin.url = "http://ctmod.net"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
function Plugin:Test()
return CT_RA_Cache
end
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
CT_RA_CustomOnClickFunction = self.OnClick
end
-- Plugin:OnDisable() is called if the mod is enabled and its being explicitly disabled.
-- This function is optional. If it doesn't exist, Plugin:UnregisterAllEvents() and
-- Plugin:UnregisterAllHooks().
function Plugin:OnDisable()
CT_RA_CustomOnClickFunction = nil
end
function Plugin.OnClick(button, unit)
return Clique:OnClick(button, unit)
end
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("resurrection")
Plugin.fullname = "Click-to-resurrect"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
local DEAD_UNIT = "Click on Dead Unit"
function Plugin:Test()
local _,class = UnitClass("player")
return class == "SHAMAN" or class == "PALADIN" or class == "DRUID" or class == "PRIEST"
end
function Plugin:OnEnable()
Clique.db.char[DEAD_UNIT] = Clique.db.char[DEAD_UNIT] or {}
end
function Plugin:_OnClick(button, unit)
self:LevelDebug(3, "_OnClick hook being called")
if UnitIsDead(unit) then
self:LevelDebug(3, "Found that unit %s is dead.", unit)
Clique.set = DEAD_UNIT
return true
end
end
\ No newline at end of file
--[[---------------------------------------------------------------------------------
This is a template for the plugin/module system for Clique.
Plugins are typically used to tie Clique to a specific set of unit frames, but
can also be used to add functionality to the system through a manner of hooks.
Plugins are registered with Clique with a shortname that is used for all slash
commands. In addition they are required to have a fullname parameter that is
used in all display messages
----------------------------------------------------------------------------------]]
-- Create a new plugin for Clique, with the shortname "test"
local Plugin = Clique:NewModule("duf")
Plugin.fullname = "Discord Unit Frames"
Plugin.url = "http://www.wowinterface.com/downloads/info4177-Discord_Unit_Frames.html"
-- Plugin:Test() is called anytime the mod tries to enable. It is optional
-- but it will be checked if it exists. Will typically be based off some global
-- or the state of the addon itself.
function Plugin:Test()
return DUF_UnitFrame_OnClick
end
-- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
-- disabled. This is where you should handle all your hooks, etc.
function Plugin:OnEnable()
self:Hook("DUF_UnitFrame_OnClick", "DUFClick")
self:Hook("DUF_Element_OnClick", "DUFEClick")
end
function Plugin:DUFClick(button)
if not Clique:OnClick(button, this.unit) then
return self.hooks.DUF_UnitFrame_OnClick.orig(button)
end
end
function Plugin:DUFEClick(button)
if not Clique:OnClick(button, this.unit) then
return self.hooks.DUF_Element_OnClick.orig(button)
end
end
\ No newline at end of file