WoWInterface SVN PhanxMod

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 47 to Rev 48
    Reverse comparison

Rev 47 → Rev 48

StableMaster.lua
1,4 → 1,4
--[[--------------------------------------------------------------------
--[[--------------------------------------------------------------------
PhanxMod
Personal addon to do miscellaneous things.
Copyright (c) 2007-2015 Phanx <addons@phanx.net>. All rights reserved.
10,8 → 10,8
local CONFIRM_TEXT = "A small fee for supplies is required."
 
if GetLocale() == "deDE" then
GOSSIP_TEXT = "Ich w�rde gern meine Kampfhaustiere heilen und wiederbeleben."
CONFIRM_TEXT = "Es wird eine kleine Geb�hr f�r die medizinische Hilfe erhoben."
GOSSIP_TEXT = "Ich würde gern meine Kampfhaustiere heilen und wiederbeleben."
CONFIRM_TEXT = "Es wird eine kleine Gebühr für die medizinische Hilfe erhoben."
end
 
local f = CreateFrame("Frame")
20,12 → 20,35
if IsShiftKeyDown() then return end
 
if event == "GOSSIP_SHOW" then
-- Don't automate if available quests
if GetNumGossipAvailableQuests() > 0 then
return
end
-- Don't automate if quests ready for turn-in
-- TODO: check repeatable quests
local numActiveQuests = GetNumGossipActiveQuests()
if numActiveQuests > 0 then
for i = 1, numActiveQuests, 5 do
local title, _, _, complete = select(i * 5 - 4, GetGossipActiveQuests())
if complete then
return
end
end
end
-- Don't automate on work order NPCs, eg. at garrison barn
local target
for i = 1, GetNumGossipOptions() do
local gossipText, gossipType = select(i * 2 - 1, GetGossipOptions())
if gossipText == GOSSIP_TEXT then
return SelectGossipOption(i, "", true)
target = i
elseif gossipType == "workorder" then
-- known types: banker, battlemaster, binder, gossip, healer, petition, tabard, taxi, trainer, unlearn, vendor, workorder
return
end
end
if target then
SelectGossipOption(target, "", true)
end
elseif message == CONFIRM_TEXT and cost == 1000 then
local dialog = StaticPopup_FindVisible(event)
if dialog then