Split out goliath addon for distribution (#23)

This commit is contained in:
Andrew Tomaka 2021-03-10 03:58:50 +00:00 committed by Gitea
parent 74a9232d94
commit c639ec142d
7 changed files with 74 additions and 34 deletions

View file

@ -9,18 +9,6 @@ StaticPopupDialogs["REPAIR_ALERT"] = {
preferredIndex = 3
}
StaticPopupDialogs["GOLIATH_MISSING"] = {
text = "Option to repair goliath not found; move closer",
button1 = "Ok",
OnAccept = function()
C_GossipInfo.CloseGossip()
end,
timeout = 5,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3
}
SLASH_ATME1 = "/ta"
ATMe.keyItemID = 180653
@ -84,13 +72,6 @@ function events:INSPECT_READY(guid)
end
end
function events:GOSSIP_SHOW()
local isNecroticWake = GetZoneText() == 'The Necrotic Wake'
local isSteward = GetUnitName('npc') == 'Steward'
if isNecroticWake and isSteward then ATMe.activateGoliath() end
end
function events:CHAT_MSG_PARTY_LEADER(message, ...)
if message == '!keys' then
ATMe.announceKey()
@ -213,21 +194,6 @@ function ATMe.announceTaunts(...)
print(message)
end
function ATMe.activateGoliath()
options = C_GossipInfo.GetOptions()
found = false
for k, v in pairs(options) do
if v['name'] == 'Can you reactivate this goliath?' then
found = true
C_GossipInfo.SelectOption(k)
break
end
end
if not found then StaticPopup_Show("GOLIATH_MISSING") end
end
function ATMe.needsRepair()
for slot = 1, #ATMe.slots do
local id = GetInventorySlotInfo(ATMe.slots[slot])