1
0
Bifurcation 0

Added functionality to collect information regarding the location of innkeepers who can set your hearth location. Note: This version has a test built in, so will not be released.

Cette révision appartient à :
Nathanial.C.Jones 2011-01-29 01:22:27 +00:00
Parent bdb95148aa
révision e507f1bf9c
1 fichiers modifiés avec 12 ajouts et 7 suppressions

Voir le fichier

@ -11,7 +11,7 @@ local Merger
local last_hearth = 0
local function CollectHearth()
local function OnZoneChanged()
local start, cd, _ = GetItemCooldown(6948)
if last_hearth + 1800 < GetTime() and cd == 1800 then
last_hearth = start
@ -19,18 +19,23 @@ local function CollectHearth()
end
end
local function OnEvent()
-- DoZoneUpdate("border", true)
CollectHearth()
local function OnConfirmBinder(...)
local new_home = unpack(...)
if not QHCZ[new_home].Innkeeper then QHCZ[new_home].Innkeeper = {} end
QHCZ[new_home].Innkeeper.Name = UnitName("target")
if not QHCZ[new_home].Innkeeper.Loc then QHCZ[new_home].Innkeeper.Loc = {} end
table.insert(QHCZ[new_home].Innkeeper.Loc, GetLoc())
QuestHelper:TextOut(UnitName("target") .. " wants to set your hearth location to " .. new_home)
end
function QH_Collect_Hearth_Init(QHCData, API)
if not QHCData.hearth then QHCData.hearth = {} end
QHCZ = QHCData.hearth
QH_Event("ZONE_CHANGED", OnEvent)
QH_Event("ZONE_CHANGED_INDOORS", OnEvent)
QH_Event("ZONE_CHANGED_NEW_AREA", OnEvent)
QH_Event("ZONE_CHANGED", OnZoneChanged)
QH_Event("ZONE_CHANGED_INDOORS", OnZoneChanged)
QH_Event("ZONE_CHANGED_NEW_AREA", OnZoneChanged)
QH_Event("CONFIRM_BINDER", OnConfirmBinder)
--API.Registrar_OnUpdateHook(OnUpdate)