vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1  
2 assert( oRA, "oRA not found!")
3  
4 ------------------------------
5 -- Are you local? --
6 ------------------------------
7  
8 local L = AceLibrary("AceLocale-2.2"):new("oRAPResist")
9  
10 ----------------------------
11 -- Localization --
12 ----------------------------
13  
14 L:RegisterTranslations("enUS", function() return {
15 ["resist"] = true,
16 ["resistparticipant"] = true,
17 ["Options for resistance checks."] = true,
18 ["Participant/Resist"] = true,
19 } end )
20  
21 L:RegisterTranslations("koKR", function() return {
22  
23 ["Options for resistance checks."] = "저항 확인 설정",
24 ["Participant/Resist"] = "부분/저항",
25 } end )
26  
27 L:RegisterTranslations("zhCN", function() return {
28 ["resist"] = "抗性",
29 ["resistparticipant"] = "resistparticipant",
30 ["Options for resistance checks."] = "抗性助手选项",
31 ["Participant/Resist"] = "Participant/Resist",
32 } end )
33  
34 L:RegisterTranslations("zhTW", function() return {
35 ["resist"] = "抗性",
36 ["resistparticipant"] = "resistparticipant",
37 ["Options for resistance checks."] = "抗性檢查選項",
38 ["Participant/Resist"] = "隊員/抗性",
39 } end )
40  
41 L:RegisterTranslations("frFR", function() return {
42 --["resist"] = true,
43 --["resistparticipant"] = true,
44 ["Options for resistance checks."] = "Options concernant les v\195\169rifications des r\195\169sistances.",
45 ["Participant/Resist"] = "Participant/R\195\169sistances",
46 } end )
47  
48 ----------------------------------
49 -- Module Declaration --
50 ----------------------------------
51  
52 oRAPResist = oRA:NewModule(L["resistparticipant"])
53 oRAPResist.defaults = {
54 }
55 oRAPResist.participant = true
56 oRAPResist.name = L["Participant/Resist"]
57 -- oRAPResist.consoleCmd = L["resist"]
58 -- oRAPResist.consoleOptions = {
59 -- type = "group",
60 -- desc = L["Options for resistance checks."],
61 -- args = {
62 -- }
63 -- }
64  
65 ------------------------------
66 -- Initialization --
67 ------------------------------
68  
69 function oRAPResist:OnEnable()
70 self:RegisterCheck("RSTC", "oRA_ResistanceCheck")
71 end
72  
73 function oRAPResist:OnDisable()
74 self:UnregisterAllEvents()
75 self:UnregisterCheck("RSTC")
76 end
77  
78  
79 -------------------------
80 -- Event Handlers --
81 -------------------------
82  
83 function oRAPResist:oRA_ResistanceCheck( msg, author)
84 if not self:IsValidRequest(author) then return end
85 local resiststr = ""
86 for i = 2, 6, 1 do
87 local _, res, _, _ = UnitResistance("player", i)
88 resiststr = resiststr .." " .. res
89 end
90 self:SendMessage(string.format("RST%s %s", resiststr, author))
91 end