From 6f8b2de49f86657bebc0085ffd53287cff738f91 Mon Sep 17 00:00:00 2001 From: Tekkub Stoutwrithe Date: Mon, 6 Aug 2007 10:25:12 +0000 Subject: [PATCH] TourGuide - Fixed tooltip to wrap - Added 'Buy' objectives, autocompletes when you get the item git-svn-id: https://tekkub-wow.googlecode.com/svn/trunk/TourGuide@463 86fe6d9a-1522-0410-a387-bf9db416f0a0 --- 05_06_Eversong.lua | 15 ++++----------- QuestTracking.lua | 15 +++++++++++---- StatusFrame.lua | 5 +++-- TourGuide.lua | 2 ++ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/05_06_Eversong.lua b/05_06_Eversong.lua index 4154343..f6b7c78 100644 --- a/05_06_Eversong.lua +++ b/05_06_Eversong.lua @@ -100,10 +100,10 @@ C Pelt Collection R Fairbreeze Village T Pelt Collection T Situation at Sunsail Anchorage -T Ranger Sareyn A Missing in the Ghostlands +B [Bundle of Fireworks] |N|From the General goods vendor, for "The Party Never Ends"| +T Ranger Sareyn |N|To the East along the road (47,71)| A Defending Fairbreeze Village -N Stop at the General goods vendor |N|Buy [Bundle of Fireworks] for "The Party Never Ends"| C Swift Discipline |N|Meledor (44,60) and Ralen (45,56)| T Swift Discipline N You should be level 10 now |N|Time to do your class's level 10 quests!| @@ -116,7 +116,7 @@ C Defending Fairbreeze Village |N|Southern half of the Dead Scar| A Powering our Defenses |N|At the runestone (42,85)| C Powering our Defenses |N|At the East runestone (55,84)| R Silvermoon City -N Buy [Suntouched Special Reserve] |N|Vinemaster Suntouched (80,58), for "The Party Never Ends"| +B [Suntouched Special Reserve] |N|Vinemaster Suntouched (80,58), for "The Party Never Ends"| R Train (Level 10) T The Magister's Apprentice |N|Out of the city, follow the road East (67,57)| A Deactivating the Spire @@ -138,6 +138,7 @@ A Zul'Marosh |N|(70,72)| C Zul'Marosh |N|Across the lake| T Zul'Marosh R Farstrider Retreat +B [Springpaw Appetizers] |N|From Zalene Firstlight (60,63), for "The Party Never Ends"| T The Spearcrafter's Hammer T Amani Encroachment I Amani Invasion |I|23249| @@ -159,13 +160,5 @@ T Powering our Defenses ]] - ---~ 69) Then go to 34.80 and turn in "" ... accept "" ---~ 70) Go do "A somber Task". While you are doing it, make sure you kill Old Whitebark, he drops Old Whitebark's Pendant which starts "Old Whitebark's Pendant" ---~ 71) Once they are done, go turn in "A somber Task" and "Old Whitebark's Pendant" ... accept "" ---~ 72) Then go do "Whitebark's Memory" (Once he gets to a low health, just talk to him to turn it in) ---~ 73) Go turn in "" at 44.85 - - TourGuide:ParseObjectives(questsequence) diff --git a/QuestTracking.lua b/QuestTracking.lua index 942a18a..fd55b46 100644 --- a/QuestTracking.lua +++ b/QuestTracking.lua @@ -4,8 +4,8 @@ local TourGuide = TourGuide local hadquest -TourGuide.TrackEvents = {"CHAT_MSG_SYSTEM", "QUEST_COMPLETE", "UNIT_QUEST_LOG_UPDATE", "QUEST_WATCH_UPDATE", "QUEST_FINISHED", "QUEST_LOG_UPDATE", "ZONE_CHANGED", - "ZONE_CHANGED_INDOORS", "MINIMAP_ZONE_CHANGED"} +TourGuide.TrackEvents = {"CHAT_MSG_LOOT", "CHAT_MSG_SYSTEM", "QUEST_COMPLETE", "UNIT_QUEST_LOG_UPDATE", "QUEST_WATCH_UPDATE", "QUEST_FINISHED", "QUEST_LOG_UPDATE", + "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "MINIMAP_ZONE_CHANGED"} function TourGuide:ZONE_CHANGED(...) @@ -34,8 +34,6 @@ function TourGuide:CHAT_MSG_SYSTEM(event, msg) if quest == text then return self:SetTurnedIn() end ---~ self.cachedturnins[text] = true - local i = 1 repeat action, quest, note, logi, complete, hasitem, turnedin, fullquestname = self:GetObjectiveInfo(i) @@ -88,3 +86,12 @@ function TourGuide:QUEST_LOG_UPDATE(event) end +function TourGuide:CHAT_MSG_LOOT(event, msg) + local action, quest = self:GetCurrentObjectiveInfo() + + if action == "BUY" then + local _, _, name = msg:find("^You receive item: .*(%[.+%])") + if name and name == quest then return self:SetTurnedIn() end + end +end + diff --git a/StatusFrame.lua b/StatusFrame.lua index 7b37038..2dea37e 100644 --- a/StatusFrame.lua +++ b/StatusFrame.lua @@ -157,7 +157,8 @@ f:SetScript("OnEnter", function(self) local tip = TourGuide.notes[TourGuide.current] if not tip then return end - GameTooltip:SetOwner(self, "ANCHOR_LEFT") - GameTooltip:SetText(tip) + GameTooltip:SetOwner(self, "ANCHOR_NONE") + GameTooltip:SetPoint("TOPRIGHT", self, "TOPLEFT") + GameTooltip:SetText(tip, nil, nil, nil, nil, true) end) diff --git a/TourGuide.lua b/TourGuide.lua index b4507ab..2ea5a5d 100644 --- a/TourGuide.lua +++ b/TourGuide.lua @@ -14,6 +14,7 @@ TourGuide.icons = setmetatable({ NOTE = "Interface\\Icons\\INV_Misc_Note_01", GRIND = "Interface\\Icons\\INV_Stone_GrindingStone_05", ITEM = "Interface\\Icons\\INV_Misc_Bag_08", + BUY = "Interface\\Icons\\INV_Misc_Coin_01", }, {__index = function() return "Interface\\Icons\\INV_Misc_QuestionMark" end}) @@ -29,6 +30,7 @@ local actiontypes = { I = "ITEM", F = "FLY", N = "NOTE", + B = "BUY", } -- 2.11.4.GIT