vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 -- Farben
2 local PURPLE = "|cff999999"; -- grey atm -- removed
3 local RED = "|cffff0000";
4 local REDA = "|cffcc6666";
5 local WHITE = "|cffFFFFFF";
6 local GREEN = "|cff1eff00";
7 local GREY = "|cff9F3FFF"; --purple now ^^
8 local BLUE = "|cff0070dd";
9 local ORANGE = "|cffff6090"; -- it is rosa now
10 local YELLOW = "|cffffff00";
11 local BLACK = "|c0000000f";
12 local DARKGREEN = "|cff008000";
13 local BLUB = "|cffd45e19";
14  
15 -- Quest Color
16 local Grau = "|cff9d9d9d"
17 local Gruen = "|cff1eff00"
18 local Orange = "|cffFF8000"
19 local Rot = "|cffFF0000"
20 local Gelb = "|cffFFd200"
21 local Blau = "|cff0070dd"
22 -------------------------------------------------------------------------------------
23 --------------------------- Buttons ----------------------------------------------
24 -------------------------------------------------------------------------------------
25  
26 ---------------------------------
27 -- Option button (useless atm)
28 ---------------------------------
29 function AQOPTION1_OnClick()
30 --blub
31 end
32  
33  
34 ---------------------------------
35 -- Oben rechts der button /zum panel show/close
36 ---------------------------------
37 function AQCLOSE_OnClick()
38 AQ_AtlasOrAlphamap();
39 if(AtlasQuestFrame:IsVisible()) then
40 HideUIPanel(AtlasQuestFrame);
41 HideUIPanel(AtlasQuestInsideFrame);
42 else
43 ShowUIPanel(AtlasQuestFrame);
44 end
45 end
46  
47 ---------------------------------
48 -- oben links am panel der button zum schließen
49 ---------------------------------
50 function AQCLOSE1_OnClick()
51 HideUIPanel(AtlasQuestFrame);
52 end
53  
54 ---------------------------------
55 -- der button inside für schließen der q anzeige
56 ---------------------------------
57 function AQCLOSE2_OnClick()
58 HideUIPanel(AtlasQuestInsideFrame);
59 WHICHBUTTON = 0;
60 end
61  
62 ---------------------------------
63 -- Checkbox für Allianz
64 ---------------------------------
65 function Alliance_OnClick()
66 Allianceorhorde = 1
67 AQHCB:SetChecked(false);
68 AQACB:SetChecked(true);
69 HideUIPanel(AtlasQuestInsideFrame);
70 AQUpdateNOW = true;
71 end
72  
73 ---------------------------------
74 -- Checkbox für Horde
75 ---------------------------------
76 function Horde_OnClick()
77 Allianceorhorde = 2
78 AQHCB:SetChecked(true);
79 AQACB:SetChecked(false);
80 HideUIPanel(AtlasQuestInsideFrame);
81 AQUpdateNOW = true;
82 end
83  
84 --------------------------- Buttons -> END
85  
86 --------------------- /////// QUESTBUTTON /////////////
87  
88 ---------------------------------
89 -- Hide the AL Frame if avaiable
90 ---------------------------------
91 function AQHideAL()
92 if ( AtlasLootItemsFrame ~= nil) then
93 AtlasLootItemsFrame:Hide(); -- hide atlasloot
94 end
95 end
96  
97 ---------------------------------
98 -- Story Button
99 ---------------------------------
100 function AQSTORY1_OnClick()
101 AQHideAL();
102 if (AtlasQuestInsideFrame:IsVisible() == nil) then
103 ShowUIPanel(AtlasQuestInsideFrame);
104 WHICHBUTTON = STORY;
105 elseif ( WHICHBUTTON == STORY) then
106 HideUIPanel(AtlasQuestInsideFrame);
107 else
108 WHICHBUTTON = STORY;
109 end
110 AQButtonSTORY_SetText();
111 end
112  
113 ---------------------------------
114 -- Button
115 ---------------------------------
116 function Quest_OnClick()
117 AQHideAL();
118 StoryTEXT:SetText("");
119 if (AtlasQuestInsideFrame:IsVisible() == nil) then
120 ShowUIPanel(AtlasQuestInsideFrame);
121 WHICHBUTTON = AQSHOWNQUEST;
122 elseif ( WHICHBUTTON == AQSHOWNQUEST) then
123 HideUIPanel(AtlasQuestInsideFrame);
124 WHICHBUTTON = 0;
125 else
126 WHICHBUTTON = AQSHOWNQUEST;
127 end
128 AQButton_SetText();
129 end
130  
131  
132 -----------------------QUESTBUTTON -> END
133  
134 -----------------//////// QUESTBUTTON SET TEXT /////////////
135  
136 ---------------------------------
137 -- set the Quest text
138 ---------------------------------
139 function AQButton_SetText()
140 local AQQuestlevelf
141 local AQQuestfarbe
142 for i=1, 36 do
143 if ( Allianceorhorde == 1 and AQINSTANZ == i) then
144 AQQuestlevelf = tonumber(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Level"));
145 if ( AQQuestlevelf ~= nil or AQQuestlevelf ~= 0 or AQQuestlevelf ~= "") then
146 if ( AQQuestlevelf == UnitLevel("player") or AQQuestlevelf == UnitLevel("player") + 2 or AQQuestlevelf == UnitLevel("player") - 2 or AQQuestlevelf == UnitLevel("player") + 1 or AQQuestlevelf == UnitLevel("player") - 1) then
147 AQQuestfarbe = Gelb;
148 elseif ( AQQuestlevelf > UnitLevel("player") + 2 and AQQuestlevelf <= UnitLevel("player") + 4) then
149 AQQuestfarbe = Orange;
150 elseif ( AQQuestlevelf >= UnitLevel("player") + 5 and AQQuestlevelf ~= 100) then
151 AQQuestfarbe = Rot;
152 elseif ( AQQuestlevelf < UnitLevel("player") - 7) then
153 AQQuestfarbe = Grau;
154 elseif ( AQQuestlevelf >= UnitLevel("player") - 7 and AQQuestlevelf < UnitLevel("player") - 2) then
155 AQQuestfarbe = Gruen;
156 elseif ( AQQuestlevelf == 100) then
157 AQQuestfarbe = Blau;
158 end
159 end
160 Questueberschrift:SetText(AQQuestfarbe..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST));
161 QuestLeveltext:SetText(GREEN..AQDiscription_LEVEL..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Level"));
162 QuestAttainLeveltext:SetText(DARKGREEN..AQDiscription_ATTAIN..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Attain")); Prequesttext:SetText(RED..AQDiscription_PREQUEST..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Prequest").."\n \n"..BLUB..AQDiscription_FOLGEQUEST..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Folgequest").."\n \n"..BLUE..AQDiscription_START..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Location").."\n \n"..ORANGE..AQDiscription_AIM..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Aim").."\n \n"..GREY..AQDiscription_NOTE..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_Note"));
163 for b=1, 6 do
164 REWARDstext:SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."Rewardtext"))
165 if ( getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..b) ~= nil) then
166 getglobal("AtlasQuestItemframe"..b.."_Icon"):SetTexture("Interface\\Icons\\"..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."textur"..b));
167 getglobal("AtlasQuestItemframe"..b.."_Name"):SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ITC"..b)..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..b));
168 getglobal("AtlasQuestItemframe"..b.."_Extra"):SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."description"..b));
169 getglobal("AtlasQuestItemframe"..b):Enable();
170 else
171 getglobal("AtlasQuestItemframe"..b.."_Icon"):SetTexture();
172 getglobal("AtlasQuestItemframe"..b.."_Name"):SetText();
173 getglobal("AtlasQuestItemframe"..b.."_Extra"):SetText();
174 getglobal("AtlasQuestItemframe"..b):Disable();
175 end
176 end
177 end
178 ------------------------------------------------------------------------------
179 -- + + + +++ ++ +++
180 -- +++ + + + + + + ++
181 -- + + + + + ++ +++
182 ------------------------------------------------------------------------------
183 if ( Allianceorhorde == 2 and AQINSTANZ == i) then
184 AQQuestlevelf = tonumber(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Level"));
185 if ( AQQuestlevelf ~= nil or AQQuestlevelf ~= 0 or AQQuestlevelf ~= "") then
186 if ( AQQuestlevelf == UnitLevel("player") or AQQuestlevelf == UnitLevel("player") + 2 or AQQuestlevelf == UnitLevel("player") - 2 or AQQuestlevelf == UnitLevel("player") + 1 or AQQuestlevelf == UnitLevel("player") - 1) then
187 AQQuestfarbe = Gelb;
188 elseif ( AQQuestlevelf > UnitLevel("player") + 2 and AQQuestlevelf <= UnitLevel("player") + 4) then
189 AQQuestfarbe = Orange;
190 elseif ( AQQuestlevelf >= UnitLevel("player") + 5 and AQQuestlevelf ~= 100) then
191 AQQuestfarbe = Rot;
192 elseif ( AQQuestlevelf < UnitLevel("player") - 7) then
193 AQQuestfarbe = Grau;
194 elseif ( AQQuestlevelf >= UnitLevel("player") - 7 and AQQuestlevelf < UnitLevel("player") - 2) then
195 AQQuestfarbe = Gruen;
196 elseif ( AQQuestlevelf == 100) then
197 AQQuestfarbe = Blau;
198 end
199 end
200 Questueberschrift:SetText(AQQuestfarbe..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE"));
201 QuestLeveltext:SetText(GREEN..AQDiscription_LEVEL..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Level"));
202 QuestAttainLeveltext:SetText(DARKGREEN..AQDiscription_ATTAIN..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Attain")); Prequesttext:SetText(RED..AQDiscription_PREQUEST..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Prequest").."\n \n"..BLUB..AQDiscription_FOLGEQUEST..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Folgequest").."\n \n"..BLUE..AQDiscription_START..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Location").."\n \n"..ORANGE..AQDiscription_AIM..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Aim").."\n \n"..GREY..AQDiscription_NOTE..WHITE..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."_HORDE_Note"));
203 for b=1, 6 do
204 REWARDstext:SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."Rewardtext_HORDE"))
205 if ( getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..b.."_HORDE") ~= nil) then
206 getglobal("AtlasQuestItemframe"..b.."_Icon"):SetTexture("Interface\\Icons\\"..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."textur"..b.."_HORDE"));
207 getglobal("AtlasQuestItemframe"..b.."_Name"):SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ITC"..b.."_HORDE")..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..b.."_HORDE"));
208 getglobal("AtlasQuestItemframe"..b.."_Extra"):SetText(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."description"..b.."_HORDE"));
209 getglobal("AtlasQuestItemframe"..b):Enable();
210 else
211 getglobal("AtlasQuestItemframe"..b.."_Icon"):SetTexture();
212 getglobal("AtlasQuestItemframe"..b.."_Name"):SetText();
213 getglobal("AtlasQuestItemframe"..b.."_Extra"):SetText();
214 getglobal("AtlasQuestItemframe"..b):Disable();
215 end
216 end
217 end
218 -------Special case: ZG
219 if ( AQINSTANZ == 28 and AQSHOWNQUEST <= 1) then
220 StoryTEXT:SetText(WHITE..getglobal("Inst28Story"..AQSHOWNQUEST));
221 Questueberschrift:SetText(BLUE..getglobal("Inst28Caption"..AQSHOWNQUEST));
222 Prequesttext:SetText();
223 QuestAttainLeveltext:SetText();
224 QuestLeveltext:SetText();
225 end
226 -------Special case: BWL
227 if ( AQINSTANZ == 6 and AQSHOWNQUEST <= 2) then
228 StoryTEXT:SetText(WHITE..getglobal("Inst6Story"..AQSHOWNQUEST));
229 Questueberschrift:SetText(BLUE..getglobal("Inst6Caption"..AQSHOWNQUEST));
230 Prequesttext:SetText();
231 QuestAttainLeveltext:SetText();
232 QuestLeveltext:SetText();
233 end
234 -------Special case: DRAGONS
235 if ( AQINSTANZ == 30 and AQSHOWNQUEST <= 4) then
236 StoryTEXT:SetText(WHITE..getglobal("Inst30Story"..AQSHOWNQUEST));
237 Questueberschrift:SetText(BLUE..getglobal("Inst30Caption"..AQSHOWNQUEST));
238 Prequesttext:SetText();
239 QuestAttainLeveltext:SetText();
240 QuestLeveltext:SetText();
241 end
242 -------Special case: VC PALA Q
243 if ( AQINSTANZ == 1 and AQSHOWNQUEST == 7) then
244 StoryTEXT:SetText(WHITE..getglobal("Inst1Quest"..AQSHOWNQUEST.."TEXT"));
245 Questueberschrift:SetText(BLUE..getglobal("Inst1Quest"..AQSHOWNQUEST));
246 Prequesttext:SetText();
247 QuestAttainLeveltext:SetText();
248 QuestLeveltext:SetText();
249 end
250 -------Special case: BSF PALA Q
251 if ( AQINSTANZ == 21 and AQSHOWNQUEST == 2 and Allianceorhorde == 1) then
252 StoryTEXT:SetText(WHITE..getglobal("Inst21Quest"..AQSHOWNQUEST.."TEXT"));
253 Questueberschrift:SetText(BLUE..getglobal("Inst21Quest"..AQSHOWNQUEST));
254 Prequesttext:SetText();
255 QuestAttainLeveltext:SetText();
256 QuestLeveltext:SetText();
257 end
258 end
259 end
260  
261  
262 ---------------------------------
263 -- Set Story Text
264 ---------------------------------
265 function AQButtonSTORY_SetText()
266 Questueberschrift:SetText("");
267 QuestLeveltext:SetText("");
268 Prequesttext:SetText("");
269 QuestAttainLeveltext:SetText("");
270 for b=1, 6 do
271 getglobal("AtlasQuestItemframe"..b.."_Icon"):SetTexture();
272 getglobal("AtlasQuestItemframe"..b.."_Name"):SetText();
273 getglobal("AtlasQuestItemframe"..b.."_Extra"):SetText();
274 getglobal("AtlasQuestItemframe"..b):Disable();
275 REWARDstext:SetText()
276 end
277 for i=1, 36 do
278 if (AQINSTANZ == i) then
279 StoryTEXT:SetText(WHITE..getglobal("Inst"..i.."Story"));
280 Questueberschrift:SetText(BLUE..getglobal("Inst"..i.."Caption"));
281 end
282 end
283 end