Reverted collect_zone back to original... collect_hearth was based on collect_zone. Fixed the init in collect_hearth to make sure it would actually init when called.
Cette révision appartient à :
Parent
79b7c7b378
révision
cef01bc22b
|
@ -9,28 +9,6 @@ local QHCZ
|
|||
local GetLoc
|
||||
local Merger
|
||||
|
||||
local function DoZoneUpdate(label, debugverbose)
|
||||
local zname = string.format("%s@@%s@@%s", GetZoneText(), GetRealZoneText(), GetSubZoneText()) -- I don't *think* any zones will have a @@ in them :D
|
||||
if zname == "@@@@" then return end -- denied
|
||||
if not QHCZ[zname] then QHCZ[zname] = {} end
|
||||
if not QHCZ[zname][label] then QHCZ[zname][label] = {} end
|
||||
local znl = QHCZ[zname][label]
|
||||
|
||||
if debugverbose and debug_output then
|
||||
--QuestHelper:TextOut("zoneupdate " .. zname .. " type " .. label)
|
||||
end
|
||||
|
||||
QHCZ[zname].mapname = GetMapInfo()
|
||||
|
||||
local loc = GetLoc()
|
||||
if loc.delayed == 128 and loc.c == 0 and loc.z == 0 and loc.x == -128 and loc.y == -128 then return end
|
||||
--if loc == "€\000\000\000€\000\000\000€€€" then return end -- this is kind of the "null value"
|
||||
local found = false
|
||||
|
||||
-- Commented out, 'cause this module isn't really loaded anymore. I'll remove it after the next commit.
|
||||
--Merger.Add(znl, loc, true)
|
||||
end
|
||||
|
||||
local last_hearth = 0
|
||||
|
||||
local function CollectHearth()
|
||||
|
@ -46,17 +24,7 @@ local function OnEvent()
|
|||
CollectHearth()
|
||||
end
|
||||
|
||||
local lastupdate = 0
|
||||
local function OnUpdate()
|
||||
if lastupdate + 15 <= GetTime() then
|
||||
DoZoneUpdate("update")
|
||||
lastupdate = GetTime()
|
||||
end
|
||||
end
|
||||
|
||||
function QH_Collect_Zone_Init(QHCData, API)
|
||||
do return end -- we really don't need this anymore
|
||||
|
||||
function QH_Collect_Hearth_Init(QHCData, API)
|
||||
if not QHCData.hearth then QHCData.hearth = {} end
|
||||
QHCZ = QHCData.hearth
|
||||
|
||||
|
|
|
@ -9,26 +9,45 @@ local QHCZ
|
|||
local GetLoc
|
||||
local Merger
|
||||
|
||||
local last_hearth = 0
|
||||
|
||||
local function CollectHearth()
|
||||
local start, cd, _ = GetItemCooldown(6948)
|
||||
if last_hearth + 1800 < GetTime() and cd == 1800 then
|
||||
last_hearth = start
|
||||
QHCZ[GetBindLocation()] = GetLoc()
|
||||
local function DoZoneUpdate(label, debugverbose)
|
||||
local zname = string.format("%s@@%s@@%s", GetZoneText(), GetRealZoneText(), GetSubZoneText()) -- I don't *think* any zones will have a @@ in them :D
|
||||
if zname == "@@@@" then return end -- denied
|
||||
if not QHCZ[zname] then QHCZ[zname] = {} end
|
||||
if not QHCZ[zname][label] then QHCZ[zname][label] = {} end
|
||||
local znl = QHCZ[zname][label]
|
||||
|
||||
if debugverbose and debug_output then
|
||||
--QuestHelper:TextOut("zoneupdate " .. zname .. " type " .. label)
|
||||
end
|
||||
|
||||
QHCZ[zname].mapname = GetMapInfo()
|
||||
|
||||
local loc = GetLoc()
|
||||
if loc.delayed == 128 and loc.c == 0 and loc.z == 0 and loc.x == -128 and loc.y == -128 then return end
|
||||
--if loc == "€\000\000\000€\000\000\000€€€" then return end -- this is kind of the "null value"
|
||||
local found = false
|
||||
|
||||
-- Commented out, 'cause this module isn't really loaded anymore. I'll remove it after the next commit.
|
||||
--Merger.Add(znl, loc, true)
|
||||
end
|
||||
|
||||
local function OnEvent()
|
||||
-- DoZoneUpdate("border", true)
|
||||
CollectHearth()
|
||||
DoZoneUpdate("border", true)
|
||||
end
|
||||
|
||||
function QH_Collect_Hearth_Init(QHCData, API)
|
||||
local lastupdate = 0
|
||||
local function OnUpdate()
|
||||
if lastupdate + 15 <= GetTime() then
|
||||
DoZoneUpdate("update")
|
||||
lastupdate = GetTime()
|
||||
end
|
||||
end
|
||||
|
||||
function QH_Collect_Zone_Init(QHCData, API)
|
||||
do return end -- we really don't need this anymore
|
||||
|
||||
if not QHCData.hearth then QHCData.hearth = {} end
|
||||
QHCZ = QHCData.hearth
|
||||
if not QHCData.zone then QHCData.zone = {} end
|
||||
QHCZ = QHCData.zone
|
||||
|
||||
QH_Event("ZONE_CHANGED", OnEvent)
|
||||
QH_Event("ZONE_CHANGED_INDOORS", OnEvent)
|
||||
|
|
Référencer dans un nouveau ticket