vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | ------------------------------ |
2 | -- Are you local? -- |
||
3 | ------------------------------ |
||
4 | |||
5 | local boss = AceLibrary("Babble-Boss-2.2")["Ayamiss the Hunter"] |
||
6 | local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss) |
||
7 | |||
8 | ---------------------------- |
||
9 | -- Localization -- |
||
10 | ---------------------------- |
||
11 | |||
12 | L:RegisterTranslations("enUS", function() return { |
||
13 | cmd = "Ayamiss", |
||
14 | sacrifice_cmd = "sacrifice", |
||
15 | sacrifice_name = "Sacrifice Alert", |
||
16 | sacrifice_desc = "Warn for Sacrifice", |
||
17 | |||
18 | sacrificetrigger = "^([^%s]+) ([^%s]+) afflicted by Paralyze", |
||
19 | sacrificewarn = " is being Sacrificed!", |
||
20 | you = "You", |
||
21 | are = "are", |
||
22 | } end ) |
||
23 | |||
24 | L:RegisterTranslations("frFR", function() return { |
||
25 | sacrifice_name = "Alerte Sacrifice", |
||
26 | sacrifice_desc = "Pr\195\169viens lorsqu'un joueur est sacrifi\195\169.", |
||
27 | |||
28 | sacrificetrigger = "^([^%s]+) ([^%s]+) les effets de Paralysie%.$", |
||
29 | sacrificewarn = " est sacrifi\195\169 !", |
||
30 | you = "Vous", |
||
31 | are = "subissez", |
||
32 | } end ) |
||
33 | |||
34 | L:RegisterTranslations("deDE", function() return { |
||
35 | sacrifice_name = "Opferung", |
||
36 | sacrifice_desc = "Warnung, wenn ein Spieler geopfert wird.", |
||
37 | |||
38 | sacrificetrigger = "^([^%s]+) ([^%s]+) von Paralisieren betroffen.", |
||
39 | sacrificewarn = " wird geopfert!", |
||
40 | you = "Ihr", |
||
41 | are = "seid", |
||
42 | } end ) |
||
43 | |||
44 | L:RegisterTranslations("zhCN", function() return { |
||
45 | sacrifice_name = "祭品警报", |
||
46 | sacrifice_desc = "玩家成为祭品时发出警报", |
||
47 | |||
48 | sacrificetrigger = "^(.+)受(.+)了麻痹效果的影响。", |
||
49 | sacrificewarn = "成为祭品了!", |
||
50 | you = "你", |
||
51 | are = "到", |
||
52 | } end ) |
||
53 | |||
54 | L:RegisterTranslations("zhTW", function() return { |
||
55 | -- Ayamiss the Hunter 狩獵者阿亞米斯 |
||
56 | sacrifice_name = "祭品警報", |
||
57 | sacrifice_desc = "玩家成為祭品時發出警報", |
||
58 | |||
59 | sacrificetrigger = "^(.+)受到(.*)麻痹", |
||
60 | sacrificewarn = "變成祭品了,快殺 札拉幼蟲!", |
||
61 | you = "你", |
||
62 | are = "了", |
||
63 | } end ) |
||
64 | |||
65 | L:RegisterTranslations("koKR", function() return { |
||
66 | sacrifice_name = "마비 경고", |
||
67 | sacrifice_desc = "마비에 대한 경고", |
||
68 | |||
69 | sacrificetrigger = "^([^|;%s]*)(.*)마비에 걸렸습니다%.$", |
||
70 | sacrificewarn = "님이 마비에 걸렸습니다!", |
||
71 | you = "", |
||
72 | are = "", |
||
73 | } end ) |
||
74 | |||
75 | ---------------------------------- |
||
76 | -- Module Declaration -- |
||
77 | ---------------------------------- |
||
78 | |||
79 | BigWigsAyamiss = BigWigs:NewModule(boss) |
||
80 | BigWigsAyamiss.zonename = AceLibrary("Babble-Zone-2.2")["Ruins of Ahn'Qiraj"] |
||
81 | BigWigsAyamiss.enabletrigger = boss |
||
82 | BigWigsAyamiss.toggleoptions = {"sacrifice", "bosskill"} |
||
83 | BigWigsAyamiss.revision = tonumber(string.sub("$Revision: 16639 $", 12, -3)) |
||
84 | |||
85 | ------------------------------ |
||
86 | -- Initialization -- |
||
87 | ------------------------------ |
||
88 | |||
89 | function BigWigsAyamiss:OnEnable() |
||
90 | self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH", "GenericBossDeath" ) |
||
91 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "CheckSacrifice") |
||
92 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "CheckSacrifice") |
||
93 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "CheckSacrifice") |
||
94 | end |
||
95 | |||
96 | function BigWigsAyamiss:CheckSacrifice( msg ) |
||
97 | local _, _, player, type = string.find(msg, L["sacrificetrigger"]) |
||
98 | if (player and type) then |
||
99 | if (player == L["you"] and type == L["are"]) then |
||
100 | player = UnitName("player") |
||
101 | end |
||
102 | if self.db.profile.sacrifice then self:TriggerEvent("BigWigs_Message", player .. L["sacrificewarn"], "Important") end |
||
103 | end |
||
104 | end |
||
105 |