vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 -- ********************************************************
2 -- * This is AtlasQuest v 3.15.33! enjoy ;) *
3 -- ********************************************************
4 -- * *
5 -- * Author: Asurn *
6 -- * *
7 -- * Translation: *
8 -- * EN: Asurn *
9 -- * DE: Asurn *
10 -- * FR: *
11 -- ********************************************************
12 -- *What does AtlasQuest? *
13 -- *++++++++++++++++++++++++++++++++++++++++++++++++++++++*
14 -- * *
15 -- *AtlasQuest shows you information about *
16 -- *Quests in every Instances. *
17 -- *+ The official Story (taken from www.wow.europe.com) *
18 -- * *
19 -- * - Shown Information: *
20 -- * *
21 -- * Questname, Questlevel, Attainded level to get *
22 -- * the Quest, Where you get the Quest, Questrewards, *
23 -- * a note about the Quest, the Quest aftert his quest *
24 -- * and the prequest *
25 -- * *
26 -- * *
27 -- * *
28 -- * *
29 -- ********************************************************
30  
31  
32 --Vesiontext festlegen (als variable)
33 local VERSION_CORE = "|cffff00003";
34 local VERSION_INSTANZEN = "15";
35 local VERSION_REST = "33|r"
36 ATLASQUEST_VERSION = "|cff1eff00AtlasQuest Version: |r"..VERSION_CORE.."."..VERSION_INSTANZEN.."."..VERSION_REST.."";
37  
38  
39 -- Farben
40 local PURPLE = "|cff999999"; -- grey atm -- removed/useless atm
41 local RED = "|cffff0000";
42 local REDA = "|cffcc6666";
43 local WHITE = "|cffFFFFFF";
44 local GREEN = "|cff1eff00";
45 local GREY = "|cff9F3FFF"; --purple now ^^
46 local BLUE = "|cff0070dd";
47 local ORANGE = "|cffff6090"; -- it is rosa now
48 local YELLOW = "|cffffff00";
49 local BLACK = "|c0000000f";
50 local DARKGREEN = "|cff008000";
51 local BLUB = "|cffd45e19";
52  
53 -- Quest Color
54 local Grau = "|cff9d9d9d"
55 local Gruen = "|cff1eff00"
56 local Orange = "|cffFF8000"
57 local Rot = "|cffFF0000"
58 local Gelb = "|cffFFd200"
59 local Blau = "|cff0070dd"
60  
61 --Variablen -> need explaination / register TO DO!
62  
63 local Initialized = nil; -- Die Variablen sind noch nicht geladen
64  
65 Allianceorhorde = 1; --variable um festzulegen ob horde oder allianz angezeigt wird
66  
67 local EnglishFraction = ""; --nötig um festzustellen welcher fraktion man angehört
68  
69 local LocalizedFraction = ""; -- nötig um festzustellen welcher fraktion man angehört
70  
71 AQINSTANZ = ""; -- momentan angezeigtes Instanzbild (siehe AtlasQuest_Instanzen.lua)
72  
73 AQINSTATM = ""; -- variable um zu sehn ob sich AQINSTANZ verändert hat (siehe function AtlasQuestSetTextandButtons())
74  
75 --AQ_ShownSide = "Left" -- Legt die seite fest auf der das AQ Panle angezeigt wird
76  
77 --AQAtlasAuto (option beim atlas öffnen AQpanel automatisch anzeigen 1=Ja 2=Nein)
78  
79  
80 local AQ_ShownSide = "Left"
81 local AQAtlasAuto = 1;
82 Debug = 0;
83 AtlasQuestHelp = {};
84 AtlasQuestHelp[1] = "[/aq + availeable command: help, left/right, show/hide, autoshow\ndownload adress:\nhttp://ui.worldofwar.net/ui.php?id=3069, http://www.curse-gaming.com/de/wow/addons-4714-1-atlasquest.html]";
85  
86 local AtlasQuest_Defaults = {
87 [UnitName("player")] = {
88 ["ShownSide"] = "Left",
89 ["AtlasAutoShow"] = 1,
90 },
91 };
92  
93 -------------------------------------------------------------------------
94 ---------------------------------- FUNKTIONEN ---------------------------
95 -------------------------------------------------------------------------
96  
97 --******************************************
98 ------------------/////Events: OnEvent//////
99 --******************************************
100  
101 --------------------------------
102 -- called when the player starts the game loads the variables
103 --------------------------------
104 function AtlasQuest_OnEvent()
105 if (event == "VARIABLES_LOADED") then
106 VariablesLoaded = 1; -- Daten sind vollständig geladen
107 else
108 AtlasQuest_Initialize(); -- Spieler betritt die Welt / Initialisiere die Daten
109 end
110 end
111  
112 --------------------------------
113 -- Stellt fest ob die Variablen geladen werden müssen
114 -- oder legt sie neu fest
115 --------------------------------
116 function AtlasQuest_Initialize()
117 if (Initialized or (not VariablesLoaded)) then
118 return;
119 end
120 if (not AtlasQuest_Options) then
121 AtlasQuest_Options = AtlasQuest_Defaults;
122 DEFAULT_CHAT_FRAME:AddMessage("AtlasQuest Options database not found. Generating...");
123 elseif (not AtlasQuest_Options[UnitName("player")]) then
124 DEFAULT_CHAT_FRAME:AddMessage("Generate default database for this character");
125 AtlasQuest_Options[UnitName("player")] = AtlasQuest_Defaults[UnitName("player")]
126 end
127 if (type(AtlasQuest_Options[UnitName("player")]) == "table") then
128 AtlasQuest_LoadData();
129 end
130 Initialized = 1;
131 end
132 --------------------------------
133 -- Lädt die Variablen
134 --------------------------------
135 function AtlasQuest_LoadData()
136 -- Which side
137 if(AtlasQuest_Options[UnitName("player")]["ShownSide"] ~= nil) then
138 AQ_ShownSide = AtlasQuest_Options[UnitName("player")]["ShownSide"];
139 end
140 -- atlas autoshow
141 if(AtlasQuest_Options[UnitName("player")]["AtlasAutoShow"] ~= nil) then
142 AQAtlasAuto = AtlasQuest_Options[UnitName("player")]["AtlasAutoShow"];
143 end
144 end
145  
146 --------------------------------
147 -- Speichert die Variablen
148 --------------------------------
149 function AtlasQuest_SaveData()
150 AtlasQuest_Options[UnitName("player")]["ShownSide"] = AQ_ShownSide; -- side
151 AtlasQuest_Options[UnitName("player")]["AtlasAutoShow"] = AQAtlasAuto;
152 end
153  
154 ------------------ Events: OnEvent -> end
155  
156 --******************************************
157 ------------------/////Events: Onload//////
158 --******************************************
159  
160 --------------------------------
161 -- Call OnLoad set Variables and hides the panel
162 --------------------------------
163 function AQ_OnLoad()
164 this:RegisterEvent("PLAYER_ENTERING_WORLD");
165 this:RegisterEvent("VARIABLES_LOADED");
166 --AQSetFont();
167 AQFraktionCheck();
168 AQSetButtontext();
169 AQTEXTonload();
170 AtlasQuestUeberschrift:SetText(ATLASQUEST_VERSION)
171 if ( AtlasFrame ) then
172 AQATLASMAP = AtlasMap:GetTexture()
173 else
174 AQATLASMAP = 36;
175 end
176 this:RegisterForDrag("LeftButton");
177 AQSlashCommandfunction();
178 --ersmal nicht anzeigen
179 HideUIPanel(AtlasQuestFrame);
180 HideUIPanel(AtlasQuestInsideFrame);
181 --AQAtlasVersionCheck();
182 AQUpdateNOW = true;
183 end
184  
185  
186 --------------------------------
187 -- Possible Font Function
188 ------------------------------
189 AQ_Font = "Fonts\FRIZQT__.TTF"
190 function AQSetFont()
191 AQFont:SetFont(getglobal(AQ_Font),13,"OUTLINE, MONOCHROME")
192 end
193  
194 --------------------------------
195 -- Slahs command added
196 ------------------------------
197 function AQSlashCommandfunction()
198 SlashCmdList["ATLASQ"]=atlasquest_command;
199 SLASH_ATLASQ1="/aq";
200 SLASH_ATLASQ2="/atlasquest";
201 end
202  
203 -------------------------------
204 -- Atlas Version Check (deaktiviert)
205 -------------------------------
206 function AQAtlasVersionCheck()
207 -- if (ATLAS_VERSION == "1.8") then
208 -- --do nothing
209 -- else
210 -- ChatFrame1:AddMessage(ATLAS_VERSIONWARNINGTEXT);
211 -- end -- momentan nutzlos und fehleranfällig vll spätere wieder einführung
212 end
213  
214 ------------------------------
215 -- check the fraction and set the check button
216 -------------------------------
217 function AQFraktionCheck()
218 EnglishFraction, LocalizedFraction = UnitFactionGroup("player");
219 if ( EnglishFraction == "Horde") then
220 Allianceorhorde = 2;
221 AQHCB:SetChecked(true);
222 AQACB:SetChecked(false);
223 end
224 end
225  
226 ---------------------------------
227 -- set the button text
228 ---------------------------------
229 function AQSetButtontext()
230 STORYbutton:SetText(AQStoryB);
231 OPTIONbutton:SetText(AQOptionB);
232 end
233  
234 ---------------------------------
235 -- show the loaded text
236 ---------------------------------
237 function AQTEXTonload()
238 ChatFrame1:AddMessage(ATLASQUEST_VERSION..GREY.." = loaded, by ASURN");
239 ChatFrame1:AddMessage(GREY.."type /aq or /atlasquest show the version number");
240 ChatFrame1:AddMessage(RED.."Attention:"..GREY.."You need Atlas or AlphaMap to use AtlasQuest");
241 end
242  
243 ---------------------------------
244 -- Slashcommand!! show/hide panel + Version Message
245 ---------------------------------
246 function atlasquest_command(param)
247  
248 -- Version text (AQ and Atlas(if there) and Alphamap (if there))
249 ChatFrame1:AddMessage(ATLASQUEST_VERSION);
250 if (AtlasFrame ~= nil) then
251 ChatFrame1:AddMessage("Atlasversion: "..ATLAS_VERSION);
252 end
253 if (AlphaMapFrame ~= nil) then
254 ChatFrame1:AddMessage("AlphaMapversion: "..ALPHA_MAP_VERSION);
255 end
256  
257 --help text
258 if (param == "help") then
259 ChatFrame1:AddMessage(RED..AQHelpText);
260 end
261 -- hide show function
262 if (param == "show") then
263 ShowUIPanel(AtlasQuestFrame);
264 ChatFrame1:AddMessage("Shows AtlasQuest");
265 end
266 if (param == "hide") then
267 HideUIPanel(AtlasQuestFrame);
268 HideUIPanel(AtlasQuestInsideFrame);
269 ChatFrame1:AddMessage("Hides AtlasQuest");
270 end
271 -- right/left show function
272 if (param == "right") then
273 AQ_SetPanelRight();
274 end
275 if (param == "left") then
276 AQ_SetPanelLeft();
277 end
278 -- Options
279 if ((param == "option") or (param == "config")) then
280 ChatFrame1:AddMessage("Here will the option menu appear. Pls wait until i releas the next version");
281 --AQ_OptionPanel();
282 end
283 --test messages
284 if (param == "test") then
285 AQTestmessages();
286 end
287 if (param == "autoshow") then
288 if (AQAtlasAuto == 1) then
289 AQAtlasAuto = 2;
290 AtlasQuest_SaveData();
291 ChatFrame1:AddMessage(AQAtlasAutoOFF);
292 else
293 AQAtlasAuto = 1;
294 AtlasQuest_SaveData();
295 ChatFrame1:AddMessage(AQAtlasAutoON);
296 end
297 end
298 end
299  
300 ---------------------------------
301 -- testmessages
302 ---------------------------------
303 function AQTestmessages()
304 ChatFrame1:AddMessage("TEST/DEBUG");
305 XXX = GamAlphaMapMap.filename;
306 ChatFrame1:AddMessage(XXX);
307 end
308  
309 ---------------------------------
310 -- Right side shown /command
311 ---------------------------------
312 function AQ_SetPanelRight()
313 if ((AtlasFrame ~= nil) and (AtlasORAlphaMap == "Atlas")) then
314 AtlasQuestFrame:ClearAllPoints();
315 AtlasQuestFrame:SetPoint("TOP","AtlasFrame", 511, -80);
316 elseif (AtlasORAlphaMap == "AlphaMap") then
317 AtlasQuestFrame:ClearAllPoints();
318 AtlasQuestFrame:SetPoint("TOP","AlphaMapFrame", 400, -107);
319 end
320 AQ_ShownSide = "Right";
321 AtlasQuest_SaveData();
322 ChatFrame1:AddMessage(AQShowRight);
323 end
324  
325 ---------------------------------
326 -- Left side shown /command
327 ---------------------------------
328 function AQ_SetPanelLeft()
329 if ((AtlasFrame ~= nil) and (AtlasORAlphaMap == "Atlas") and ( AQ_ShownSide == "Right") ) then
330 AtlasQuestFrame:ClearAllPoints();
331 AtlasQuestFrame:SetPoint("TOP","AtlasFrame", -503, -80);
332 elseif ((AtlasORAlphaMap == "AlphaMap") and ( AQ_ShownSide == "Right") ) then
333 AtlasQuestFrame:ClearAllPoints();
334 AtlasQuestFrame:SetPoint("TOPLEFT","AlphaMapFrame", -195, -107);
335 end
336 AQ_ShownSide = "Left";
337 AtlasQuest_SaveData();
338 ChatFrame1:AddMessage(AQShowLeft);
339 end
340  
341 ------------------ Events: Onload -> end
342  
343  
344  
345  
346  
347 --******************************************
348 ------------------////// Events: OnUpdate//////
349 --******************************************
350  
351 ---------------------------------
352 -- On Update function
353 -- check which programm is used( atlas or am)
354 -- hide panel if instanze is 36(=nothing)
355 ---------------------------------
356 function AQ_OnUpdate(arg1)
357 local previousValue = AQINSTANZ;
358  
359 AQ_AtlasOrAMVISCheck(); -- Show whether atlas or am is shown atm
360  
361 ------- SEE AtlasQuest_Instanzen.lua
362 if (AtlasORAlphaMap == "Atlas") then
363 AtlasQuest_Instanzenchecken();
364 elseif (AtlasORAlphaMap == "AlphaMap") then
365 AtlasQuest_InstanzencheckAM();
366 end
367  
368 -- Hides the panel if the map which is shown no quests have (map = 36)
369 if ( AQINSTANZ == 36) then
370 HideUIPanel(AtlasQuestFrame);
371 HideUIPanel(AtlasQuestInsideFrame);
372 elseif (( AQINSTANZ ~= previousValue ) or (AQUpdateNOW ~= nil)) then
373 AtlasQuestSetTextandButtons();
374 AQUpdateNOW = nil
375 AQ_SetCaption();
376 elseif ((AtlasORAlphaMap == "AlphaMap") and (AlphaMapAlphaMapFrame:IsVisible() == nil)) then
377 HideUIPanel(AtlasQuestFrame);
378 HideUIPanel(AtlasQuestInsideFrame);
379 end
380 end
381  
382 ---------------------------------
383 -- Show whether atlas or am is shown atm
384 ---------------------------------
385 function AQ_AtlasOrAMVISCheck()
386 if ((AtlasFrame ~= nil) and (AtlasFrame:IsVisible())) then
387 AtlasORAlphaMap = "Atlas";
388 elseif (AlphaMapFrame:IsVisible()) then
389 AtlasORAlphaMap = "AlphaMap";
390 end
391 end
392 ---------------------------------
393 -- AlphaMap parent change
394 ---------------------------------
395 function AQ_AtlasOrAlphamap()
396 if ((AtlasFrame ~= nil) and (AtlasFrame:IsVisible())) then
397 AtlasORAlphaMap = "Atlas";
398 --
399 AtlasQuestFrame:SetParent(AtlasFrame);
400 if (AQ_ShownSide == "Right" ) then
401 AtlasQuestFrame:ClearAllPoints();
402 AtlasQuestFrame:SetPoint("TOP","AtlasFrame", 511, -80);
403 else
404 AtlasQuestFrame:ClearAllPoints();
405 AtlasQuestFrame:SetPoint("TOP","AtlasFrame", -503, -80);
406 end
407 AtlasQuestInsideFrame:SetParent(AtlasFrame);
408 AtlasQuestInsideFrame:ClearAllPoints();
409 AtlasQuestInsideFrame:SetPoint("TOPLEFT","AtlasFrame", 18, -84);
410 elseif ((AlphaMapFrame ~= nil) and (AlphaMapFrame:IsVisible())) then
411 AtlasORAlphaMap = "AlphaMap";
412 --
413 AtlasQuestFrame:SetParent(AlphaMapFrame);
414 if (AQ_ShownSide == "Right" ) then
415 AtlasQuestFrame:ClearAllPoints();
416 AtlasQuestFrame:SetPoint("TOP","AlphaMapFrame", 400, -107);
417 else
418 AtlasQuestFrame:ClearAllPoints();
419 AtlasQuestFrame:SetPoint("TOPLEFT","AlphaMapFrame", -195, -107);
420 end
421 AtlasQuestInsideFrame:SetParent(AlphaMapFrame);
422 AtlasQuestInsideFrame:ClearAllPoints();
423 AtlasQuestInsideFrame:SetPoint("TOPLEFT","AlphaMapFrame", 1, -108);
424 end
425 end
426  
427 ---------------------------------
428 -- Set the ZoneName
429 ---------------------------------
430 function AQ_SetCaption()
431 for i=1, 36 do
432 if ( AQINSTANZ == i) then
433 Ueberschriftborder:SetText(getglobal("Inst"..i.."Caption"))
434 end
435 if ( AQINSTANZ == 36) then
436 Ueberschriftborder:SetText();
437 end
438 end
439 end
440  
441 ---------------------------------
442 -- Set the Buttontext and the buttons if availeable
443 -- and check whether its a other inst or not -> works fine
444 -- added: Check vor Questline arrows
445 -- Questline arrows are shown if InstXQuestYFQuest = "true"
446 -- QuestStart icon are shown if InstXQuestYPreQuest = "true"
447 ---------------------------------
448 function AtlasQuestSetTextandButtons()
449 local AQQuestlevelf
450 local AQQuestfarbe
451 local AQQuestfarbe2
452 if (AQINSTATM ~= AQINSTANZ) then
453 HideUIPanel(AtlasQuestInsideFrame);
454 end
455 for i=1, 36 do
456 if (Allianceorhorde == 1 and AQINSTANZ == i) then
457 AQINSTATM = AQINSTANZ;
458 if (getglobal("Inst"..i.."QAA") ~= nil) then
459 AtlasQuestAnzahl:SetText(getglobal("Inst"..i.."QAA"));
460 else
461 AtlasQuestAnzahl:SetText("");
462 end
463 for b=1, 18 do
464 if (getglobal("Inst"..i.."Quest"..b.."FQuest")) then
465 ShowUIPanel(getglobal("AQQuestlineArrow_"..b));
466 else
467 HideUIPanel(getglobal("AQQuestlineArrow_"..b));
468 end
469 if (getglobal("Inst"..i.."Quest"..b.."PreQuest")) then
470 ShowUIPanel(getglobal("AQQuesstart_"..b));
471 else
472 HideUIPanel(getglobal("AQQuesstart_"..b));
473 end
474 AQQuestlevelf = tonumber(getglobal("Inst"..i.."Quest"..b.."_Level"));
475 if (getglobal("Inst"..i.."Quest"..b) ~= nil) then
476 if ( AQQuestlevelf ~= nil or AQQuestlevelf ~= 0 or AQQuestlevelf ~= "") then
477 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
478 AQQuestfarbe = Gelb;
479 elseif ( AQQuestlevelf > UnitLevel("player") + 2 and AQQuestlevelf <= UnitLevel("player") + 4) then
480 AQQuestfarbe = Orange;
481 elseif ( AQQuestlevelf >= UnitLevel("player") + 5 and AQQuestlevelf ~= 100) then
482 AQQuestfarbe = Rot;
483 elseif ( AQQuestlevelf < UnitLevel("player") - 7) then
484 AQQuestfarbe = Grau;
485 elseif ( AQQuestlevelf >= UnitLevel("player") - 7 and AQQuestlevelf < UnitLevel("player") - 2) then
486 AQQuestfarbe = Gruen;
487 elseif ( AQQuestlevelf == 100) then
488 AQQuestfarbe = Blau;
489 end
490 end
491 getglobal("AQQuestbutton"..b):Enable();
492 getglobal("AQBUTTONTEXT"..b):SetText(AQQuestfarbe..getglobal("Inst"..i.."Quest"..b));
493 else
494 getglobal("AQQuestbutton"..b):Disable();
495 getglobal("AQBUTTONTEXT"..b):SetText();
496 end
497 end
498 end
499 if (Allianceorhorde == 2 and AQINSTANZ == i) then
500 AQINSTATM = AQINSTANZ;
501 if (getglobal("Inst"..i.."QAH") ~= nil) then
502 AtlasQuestAnzahl:SetText(getglobal("Inst"..i.."QAH"));
503 else
504 AtlasQuestAnzahl:SetText("");
505 end
506 for b=1, 18 do
507 if (getglobal("Inst"..i.."Quest"..b.."FQuest_HORDE")) then
508 ShowUIPanel(getglobal("AQQuestlineArrow_"..b));
509 else
510 HideUIPanel(getglobal("AQQuestlineArrow_"..b));
511 end
512 if (getglobal("Inst"..i.."Quest"..b.."PreQuest_HORDE")) then
513 ShowUIPanel(getglobal("AQQuesstart_"..b));
514 else
515 HideUIPanel(getglobal("AQQuesstart_"..b));
516 end
517 if (getglobal("Inst"..i.."Quest"..b.."_HORDE") ~= nil) then
518 AQQuestlevelf = tonumber(getglobal("Inst"..i.."Quest"..b.."_HORDE_Level"));
519 if ( AQQuestlevelf ~= nil or AQQuestlevelf ~= 0 or AQQuestlevelf ~= "") then
520 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
521 AQQuestfarbe = Gelb;
522 elseif ( AQQuestlevelf > UnitLevel("player") + 2 and AQQuestlevelf <= UnitLevel("player") + 4) then
523 AQQuestfarbe = Orange;
524 elseif ( AQQuestlevelf >= UnitLevel("player") + 5 and AQQuestlevelf ~= 100) then
525 AQQuestfarbe = Rot;
526 elseif ( AQQuestlevelf < UnitLevel("player") - 7) then
527 AQQuestfarbe = Grau;
528 elseif ( AQQuestlevelf >= UnitLevel("player") - 7 and AQQuestlevelf < UnitLevel("player") - 2) then
529 AQQuestfarbe = Gruen;
530 elseif ( AQQuestlevelf == 100) then
531 AQQuestfarbe = Blau;
532 end
533 end
534 getglobal("AQQuestbutton"..b):Enable();
535 getglobal("AQBUTTONTEXT"..b):SetText(AQQuestfarbe..getglobal("Inst"..i.."Quest"..b.."_HORDE"));
536 else
537 getglobal("AQQuestbutton"..b):Disable();
538 getglobal("AQBUTTONTEXT"..b):SetText();
539 end
540 end
541 end
542 -------Special case: ZG
543 if (AQINSTANZ == 28) then
544 AQQuestfarbe2 = Blau;
545 AQQuestbutton1:Enable();
546 AQBUTTONTEXT1:SetText(AQQuestfarbe2..Inst28Caption1);
547 end
548 -------Special case: BWl
549 if (AQINSTANZ == 6) then
550 AQQuestfarbe2 = Blau;
551 AQQuestbutton1:Enable();
552 AQBUTTONTEXT1:SetText(AQQuestfarbe2..Inst6Caption1);
553 AQQuestbutton2:Enable();
554 AQBUTTONTEXT2:SetText(AQQuestfarbe2..Inst6Caption2);
555 end
556 -------Special case: DRAGONS
557 if (AQINSTANZ == 30) then
558 AQQuestfarbe2 = Blau;
559 AQQuestbutton1:Enable();
560 AQBUTTONTEXT1:SetText(AQQuestfarbe2..Inst30Caption1);
561 AQQuestbutton2:Enable();
562 AQBUTTONTEXT2:SetText(AQQuestfarbe2..Inst30Caption2);
563 AQQuestbutton3:Enable();
564 AQBUTTONTEXT3:SetText(AQQuestfarbe2..Inst30Caption3);
565 AQQuestbutton4:Enable();
566 AQBUTTONTEXT4:SetText(AQQuestfarbe2..Inst30Caption4);
567 end
568 end
569 end
570  
571  
572 ------------------ Events: OnUpdate -> End
573  
574 --******************************************
575 ------------------ /////Events: Atlas_OnShow //////
576 --******************************************
577  
578 ---------------------------------
579 -- Shows the AQ panel with atlas (option adden!)
580 ---------------------------------
581 function Atlas_OnShow()
582 if ( AQAtlasAuto == 1) then
583 ShowUIPanel(AtlasQuestFrame);
584 else
585 HideUIPanel(AtlasQuestFrame);
586 end
587 HideUIPanel(AtlasQuestInsideFrame);
588 -- AQ_AtlasOrAlphamap();
589 if (AQ_ShownSide == "Right") then
590 AtlasQuestFrame:ClearAllPoints();
591 AtlasQuestFrame:SetPoint("TOP","AtlasFrame", 511, -80);
592 end
593 end
594  
595 ------------------ Events: Atlas_OnShow -> End
596  
597 --******************************************
598 ------------------//// OnEnter/OnLeave ITEM ANZEIGEN ///////
599 --******************************************
600  
601 ---------------------------------
602 -- hide tooltip
603 ---------------------------------
604 function AtlasQuestItem_OnLeave()
605 if(GameTooltip:IsVisible()) then
606 GameTooltip:Hide();
607 end
608 if(AtlasQuestTooltip:IsVisible()) then
609 AtlasQuestTooltip:Hide();
610 end
611 end
612  
613 ---------------------------------
614 -- show tooltip
615 -- update: function added to check whether there is a ID or not
616 -- update perhaps useless if hide function works -> but will stay
617 ---------------------------------
618 function AtlasQuestItem_OnEnter()
619 for i=1, 36 do
620 if ( Allianceorhorde == 1) then
621 if (AQINSTANZ == i) then
622 if (getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN) ~= nil) then
623 SHOWNID = getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN);
624 if (getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN) ~= nil) then
625 if(GetItemInfo(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN)) ~= nil) then
626 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
627 AtlasQuestTooltip:SetHyperlink("item:"..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN)..":0:0:0");
628 AtlasQuestTooltip:Show();
629 else
630 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
631 AtlasQuestTooltip:ClearLines();
632 AtlasQuestTooltip:AddLine(RED..AQERRORNOTSHOWN);
633 AtlasQuestTooltip:AddLine(AQERRORASKSERVER);
634 AtlasQuestTooltip:Show();
635 end
636 end
637 end
638 end
639 else
640 if (AQINSTANZ == i) then
641 if (getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN.."_HORDE") ~= nil) then
642 SHOWNID = getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN.."_HORDE");
643 if (getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN.."_HORDE") ~= nil) then
644 if(GetItemInfo(getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN.."_HORDE")) ~= nil) then
645 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
646 AtlasQuestTooltip:SetHyperlink("item:"..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ID"..AQTHISISSHOWN.."_HORDE")..":0:0:0");
647 AtlasQuestTooltip:Show();
648 else
649 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
650 AtlasQuestTooltip:ClearLines();
651 AtlasQuestTooltip:AddLine(RED..AQERRORNOTSHOWN);
652 AtlasQuestTooltip:AddLine(AQERRORASKSERVER);
653 AtlasQuestTooltip:Show();
654 end
655 end
656 end
657 end
658 end
659 end
660 end
661  
662 ---------------------------------
663 -- ask Server right-click
664 ---------------------------------
665 function AtlasQuestItem_OnClick(arg1)
666 if(arg1=="RightButton") then
667 for i=1, 36 do
668 if ( Allianceorhorde == 1) then
669 if (AQINSTANZ == i) then
670 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
671 AtlasQuestTooltip:SetHyperlink("item:"..SHOWNID..":0:0:0");
672 AtlasQuestTooltip:Show(); DEFAULT_CHAT_FRAME:AddMessage(AQSERVERASK.."["..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ITC"..AQTHISISSHOWN)..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..AQTHISISSHOWN)..WHITE.."]"..AQSERVERASKInformation);
673 end
674 else
675 if (AQINSTANZ == i) then
676 AtlasQuestTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
677 AtlasQuestTooltip:SetHyperlink("item:"..SHOWNID..":0:0:0");
678 AtlasQuestTooltip:Show(); DEFAULT_CHAT_FRAME:AddMessage(AQSERVERASK.."["..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."ITC"..AQTHISISSHOWN.."_HORDE")..getglobal("Inst"..i.."Quest"..AQSHOWNQUEST.."name"..AQTHISISSHOWN.."_HORDE")..WHITE.."]"..AQSERVERASKInformation);
679 end
680 end
681 end
682 end
683 end
684  
685 ------------------ OnEnter/OnLeave ITEM ANZEIGEN -> END
686  
687 -------------------------------------------------------------------------------------------------------------------
688  
689 --|cffff0000 - Spieler 1 (Rot)
690 --|cff0000ff - Spieler 2 (Blau)
691 --|cff00ffff - Spieler 3 (Blaugrau)
692 --|cff6f2583 - Spieler 4 (Lila)
693 --|cffffff00 - Spieler 5 (Gelb)
694 --|cffd45e19 - Spieler 6 (Orange)
695 --|cff00ff00 - Spieler 7 (Grün)
696 --|cffff8080 - Spieler 8 (Rosa)
697 --|cff808080 - Spieler 9 (Grau)
698 --|cff8080ff - Spieler 10 (Hellblau)
699 --|cff008000 - Spieler 11 (Dunkelgrün)
700 --|cff4d2903 - Spieler 12 (Braun)
701  
702  
703  
704  
705 --Chatframe1:AddMessage("text") fügt eine nachricht ins allgemeine chatfenster ein
706 --message("Text") gibt eine fehelrmeldung mit dem text wieder