Skip to content

Commit

Permalink
Update API
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Nov 14, 2024
1 parent 0beb474 commit a9084fd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/barrels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local QUESTS = {

local barrels = {}
local function onMouseOver(self)
local npcID, guid = addon:GetNPCID('mouseover')
local npcID, guid = addon:GetUnitID('mouseover')
if npcID == BARREL_ID then
-- only mark new barrels, keeping existing marks
if not barrels[guid] then
Expand Down
2 changes: 1 addition & 1 deletion modules/boggarts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local BOGGARD_ID = 170080
local BOGGARD_QUEST = 60739

local function onMouseOver()
local npcID = addon:GetNPCID('mouseover')
local npcID = addon:GetUnitID('mouseover')
if npcID == BOGGARD_ID then
if GetRaidTargetIndex('mouseover') ~= 8 then
-- the boggard is not already marked with a skull, mark it
Expand Down
2 changes: 1 addition & 1 deletion modules/chores.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ local function onMouseOver()

-- find the steward that has the correct "tool" for the closest "chore"
local closestStewardID = getClosestSteward()
if closestStewardID and closestStewardID == addon:GetNPCID('mouseover') then
if closestStewardID and closestStewardID == addon:GetUnitID('mouseover') then
if GetRaidTargetIndex('mouseover') ~= 4 then
-- the steward is not already marked with a star, mark it
SetRaidTarget('mouseover', 4)
Expand Down
2 changes: 1 addition & 1 deletion modules/flayedwing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ local function onVehicleExit(self, unit)
end

function addon:UNIT_ENTERED_VEHICLE(unit, _, _, _, vehicleGUID)
if addon:GetNPCID(vehicleGUID) == FLAYEDWING_NPC_ID then
if addon:GetUnitID(vehicleGUID) == FLAYEDWING_NPC_ID then
self:SendNotice(L['Spam %s to complete'])

addon:RegisterEvent('UNIT_EXITING_VEHICLE', onVehicleExit)
Expand Down
2 changes: 1 addition & 1 deletion modules/reflect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function addon:GOSSIP_SHOW()
end
end

local npcID = addon:GetNPCID('npc')
local npcID = addon:GetUnitID('npc')
if NPCS[npcID] then
addon:Print('Unknown option')
answered = false
Expand Down
4 changes: 2 additions & 2 deletions modules/unknown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function addon:GOSSIP_SHOW()
return
end

local npcID = self:GetNPCID('npc')
local npcID = self:GetUnitID('npc')
if npcID == VERSE_NPC then
-- the player needs to guess the correct word in a sentence, it's a fixed pattern,
-- and it can be brute-forced by always selecting option 2
Expand Down Expand Up @@ -43,7 +43,7 @@ end

-- don't really need to mark the correct version, but it's handy
local function onMouseOver()
local npcID = addon:GetNPCID('mouseover')
local npcID = addon:GetUnitID('mouseover')
if npcID == GUESS_NPC then
if GetRaidTargetIndex('mouseover') ~= 8 then
SetRaidTarget('mouseover', 8)
Expand Down

0 comments on commit a9084fd

Please sign in to comment.