v1.6.0: Stable Map Search & Blood of Heroes Data Fix
This commit is contained in:
@@ -13,9 +13,9 @@ function QuestieWotlkObjectFixes:Load()
|
||||
return {
|
||||
[176213] = {
|
||||
[objectKeys.spawns] = {
|
||||
[zoneIDs.WESTERN_PLAGUELANDS]={{35.9,57.4},{35.9,57.5},{36.4,53.7},{36.5,53.6},{38.2,56.3},{39.7,69.4},{39.7,69.6},{40.6,73.1},{40.7,57.4},{40.8,57.5},{41.4,62.1},{41.5,62.1},{41.9,70.5},{42.2,54.9},{42.8,64.2},{43.3,68.3},{43.6,70.4},{43.7,70.5},{44.2,65},{44.4,71.6},{44.5,53.3},{44.5,71.7},{44.6,53.5},{45.8,71.5},{45.9,51.1},{45.9,71.4},{46.7,34.4},{46.8,34.5},{47,59.9},{47,67.1},{47.6,70},{47.9,53.1},{49.4,68.1},{49.8,33.3},{52.2,66.5},{52.3,55},{52.3,66.3},{53,64.2},{53.2,66.5},{53.3,65.1},{53.3,66.2},{53.4,63.4},{53.5,63.3},{53.5,63.5},{54.9,27.1},{55.2,69.4},{55.3,69.6},{56.7,34.7},{57.8,66.4},{57.8,66.5},{62,58.3},{62,58.5},{62.9,57.2},{62.9,57.9},{63.2,59.2},{63.6,75.4},{63.6,75.5},{64,48.7},{64.1,57.9},{64.9,74.4},{64.9,74.5},{65.8,76.8},{66.4,42.1},{66.5,42.2},{67,53.9},{67.8,84.6},{68,44.7},{68.3,81.4},{68.3,81.6},{68.4,77.1},{68.5,77.1},{68.7,49.2},{68.7,79.2},{68.9,73.8},{69.5,78.6},},
|
||||
[zoneIDs.EASTERN_PLAGUELANDS]={{4.3,45.2},{5.3,48.8},{11.1,58.7},{16.7,55},{17.1,60.7},{18.2,67.3},{18.7,78.3},{20.8,81.2},{22.5,68.2},{22.8,64.1},{23.2,63.2},{23.6,68.9},{23.7,58.2},{25,79},{25.5,72.1},{27,59.4},{27,59.5},{28.3,64.6},{29.7,27.7},{30.2,61.5},{30.2,73.6},{30.3,73.4},{30.7,70.2},{30.8,21.2},{31.8,66.7},{31.8,69.2},{32.7,32.9},{32.8,64.2},{33.1,59.5},{33.5,62},{34.5,26.6},{34.5,48.3},{34.6,22},{34.8,31.2},{35.9,44.4},{37.2,59.4},{37.2,59.7},{37.2,73},{38.3,69.1},{40.5,28.2},{42,58},{42,68.2},{43,35.4},{43.1,35.7},{43.5,73.3},{44.5,30.5},{45.7,40.2},{45.8,70.7},{47.2,63.8},{48.8,45},{51.4,57.6},{51.9,69.6},{52.3,75.2},{52.6,65.3},{52.7,65.6},{52.9,69.8},{53.2,72.9},{53.6,72.8},{53.7,58.7},{54.4,56},{54.4,69.6},{54.5,56.2},{54.5,69.4},{55,61.3},{56.8,63.7},{58.5,61.3},{59.5,59},{59.6,74.2},{60.8,47.3},{62.3,60.6},{62.9,64},{63,68},{63.3,71.7},{63.5,74.1},{63.7,65.1},{63.7,76.6},{65.2,74.2},{65.4,63.2},{65.8,68.4},{65.9,68.7},{66.8,71.7},{67.8,63.6},{67.8,75.4},{68.1,70.1},{68.3,45.5},{68.5,76.7},{69.1,52.8},{70,49.5},{70.2,76.4},{70.2,76.6},{70.5,45},{70.6,71.7},{71,66.3},{72.9,51.7},{73.1,60.9},{73.3,57.5},{74.6,53.9},},
|
||||
[zoneIDs.TIRISFAL_GLADES]={{82.8,72.7},{83,71.4},{83,71.5}},
|
||||
[zoneIDs.WESTERN_PLAGUELANDS]={{35.9,57.4},{35.9,57.5},{36.4,53.7},{36.5,53.6},{38.2,56.3},{39.7,69.4},{39.7,69.6},{40.6,73.1},{40.7,57.4},{40.8,57.5},{41.4,62.1},{41.5,62.1},{41.9,70.5},{42.2,54.9},{42.8,64.2},{43.3,68.3},{43.6,70.4},{43.7,70.5},{44.2,65},{44.4,71.6},{44.5,53.3},{44.5,71.7},{44.6,53.5},{45.8,71.5},{45.9,51.1},{45.9,71.4},{46.7,34.4},{46.8,34.5},{47,59.9},{47,67.1},{47.6,70},{47.9,53.1},{49.4,68.1},{49.8,33.3},{52.2,66.5},{52.3,55},{52.3,66.3},{53,64.2},{53.2,66.5},{53.3,65.1},{53.3,66.2},{53.4,63.4},{53.5,63.3},{53.5,63.5},{54.9,27.1},{55.2,69.4},{55.3,69.6},{56.7,34.7},{57.8,66.4},{57.8,66.5},{62,58.3},{62,58.5},{62.9,57.2},{62.9,57.9},{63.2,59.2},{63.6,75.4},{63.6,75.5},{64,48.7},{64.1,57.9},{64.9,74.4},{64.9,74.5},{65.8,76.8},{66.4,42.1},{66.5,42.2},{67,53.9},{67.8,84.6},{68,44.7},{68.3,81.4},{68.3,81.6},{68.4,77.1},{68.5,77.1},{68.7,49.2},{68.7,79.2},{68.9,73.8},{69.5,78.6}},
|
||||
[zoneIDs.EASTERN_PLAGUELANDS]={{4.3,45.2},{5.3,48.8},{7.1,50.7},{8,54.5},{11.1,58.7},{14.2,64.7},{16.7,55},{17.1,60.7},{18.2,67.3},{18.7,78.3},{20,61},{20.5,66.9},{20.8,81.2},{21.5,73.9},{22.1,85.1},{22.5,68.2},{22.8,64.1},{23.2,63.2},{23.6,68.9},{23.7,58.2},{24.3,88.2},{25,79},{25.5,72.1},{26,74.7},{26.3,70.5},{26.7,69.5},{27,59.4},{27,59.5},{27.1,75.6},{27.3,64},{28.3,64.6},{28.8,86},{29.2,78.8},{29.7,27.7},{30.2,61.5},{30.2,73.6},{30.3,73.4},{30.7,70.2},{30.8,21.2},{30.9,65.5},{31.8,66.7},{31.8,69.2},{32,71},{32.7,32.9},{32.8,64.2},{33.1,59.5},{33.5,62},{33.6,32.6},{34,80.2},{34.3,67.8},{34.4,76.9},{34.5,22},{34.5,25.8},{34.5,26.6},{34.5,48.3},{34.6,22},{34.8,31.2},{35.6,73.3},{35.9,44.4},{35.9,75.8},{36.7,38},{36.9,70.6},{37.1,65.7},{37.2,59.4},{37.2,59.7},{37.2,73},{37.6,68.5},{38.3,69.1},{38.4,31.1},{38.5,54},{38.8,26.7},{38.9,36.1},{40,49.9},{40.5,28.2},{41.4,79.7},{41.5,65.7},{42,58},{42,68.2},{42.4,75.8},{43,35.4},{43.1,35.7},{43.5,73.3},{44.5,30.5},{44.9,32.9},{45.7,40.2},{45.8,70.7},{46.2,70.8},{46.3,64},{46.5,74.8},{47.2,63.8},{47.5,40.8},{47.9,80},{48.8,45},{48.9,67.2},{49.1,35.5},{50.3,45.5},{50.4,77.4},{51.4,57.6},{51.8,70.3},{51.9,69.6},{52.3,75.2},{52.6,65.3},{52.7,65.6},{52.9,69.8},{53.2,72.9},{53.5,50.7},{53.6,72.8},{53.7,58.7},{54.4,56},{54.4,69.6},{54.5,56.2},{54.5,69.4},{55,61.3},{55.5,58.7},{56.2,63.9},{56.5,76.1},{56.8,63.7},{57.1,81.9},{57.4,71.9},{57.8,76.1},{58.1,79.7},{58.4,64.8},{58.5,61.3},{58.6,79.6},{59.2,62.2},{59.3,80.9},{59.5,59},{59.5,76},{59.6,74.2},{59.9,67.5},{60.8,47.3},{61.8,70.2},{62.3,60.6},{62.9,64},{63,68},{63.3,71.7},{63.6,67.7},{63.5,74.1},{63.7,65.1},{64.7,65.4},{63.7,76.6},{64.7,81},{65.2,74.2},{65.4,63.2},{65.8,68.4},{65.9,68.7},{66.2,53},{66.8,71.7},{67.6,66.8},{67.8,63.6},{67.8,75.4},{68.1,70.1},{68.2,70.6},{68.3,45.5},{68.3,74.6},{68.5,76.7},{68.6,78.4},{68.8,80.8},{68.9,52.8},{68.9,83.3},{69.1,52.8},{70,49.5},{69,71.5},{70.2,76.4},{70.2,76.6},{70.5,45},{70.6,71.7},{70.6,80.8},{70.7,69.5},{71,66.3},{71.1,75.3},{72.2,78.4},{72.9,51.7},{73.1,60.9},{73.3,57.5},{73.3,77.2},{73.4,69.8},{73.4,82.1},{73.6,76.8},{73.8,51.1},{74.1,83.8},{74.6,53.9},{74.7,58.7},{75.6,55.3},{75.9,83.5},{76.1,78.2},{76.2,50.4},{76.7,72.4},{78.4,57.5},{78.7,67.3},{78.8,63.5},{80.4,59.8}},
|
||||
[zoneIDs.TIRISFAL_GLADES]={{82.8,72.7},{82.8,72.8},{83,71.4},{83,71.5}},
|
||||
},
|
||||
},
|
||||
[179832] = {
|
||||
|
||||
+84
-46
@@ -374,15 +374,14 @@ function QuestieDB:GetObject(objectId)
|
||||
return _QuestieDB.objectCache[objectId];
|
||||
end
|
||||
|
||||
--local rawdata = QuestieDB.objectData[objectId];
|
||||
-- Try to get from compiled DB first
|
||||
local rawdata = QuestieDB.QueryObject(objectId, QuestieDB._objectAdapterQueryOrder)
|
||||
|
||||
if not rawdata and QuestieDB.objectDataOverrides then
|
||||
rawdata = QuestieDB.objectDataOverrides[objectId] or QuestieDB.objectDataOverrides[tostring(objectId)]
|
||||
end
|
||||
-- Check for overrides
|
||||
local override = QuestieDB.objectDataOverrides and (QuestieDB.objectDataOverrides[objectId] or QuestieDB.objectDataOverrides[tostring(objectId)])
|
||||
|
||||
if not rawdata then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetObject] rawdata is nil for objectID:", objectId)
|
||||
if not rawdata and not override then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetObject] data not found for objectID:", objectId)
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -391,12 +390,27 @@ function QuestieDB:GetObject(objectId)
|
||||
type = "object"
|
||||
}
|
||||
|
||||
local stringKey, intKey = next(QuestieDB.objectKeys)
|
||||
while stringKey do
|
||||
obj[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(QuestieDB.objectKeys, stringKey)
|
||||
if override then
|
||||
-- Prefer override data (corrections)
|
||||
for stringKey, _ in pairs(QuestieDB.objectKeys) do
|
||||
if override[stringKey] ~= nil then
|
||||
obj[stringKey] = override[stringKey]
|
||||
elseif rawdata then
|
||||
-- Fallback to DB if override is partial
|
||||
local intKey = QuestieDB.objectKeys[stringKey]
|
||||
obj[stringKey] = rawdata[intKey]
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Use standard DB data
|
||||
local stringKey, intKey = next(QuestieDB.objectKeys)
|
||||
while stringKey do
|
||||
obj[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(QuestieDB.objectKeys, stringKey)
|
||||
end
|
||||
end
|
||||
--_QuestieDB.objectCache[objectId] = obj;
|
||||
|
||||
_QuestieDB.objectCache[objectId] = obj;
|
||||
return obj;
|
||||
end
|
||||
|
||||
@@ -413,13 +427,10 @@ function QuestieDB:GetItem(itemId)
|
||||
end
|
||||
|
||||
local rawdata = QuestieDB.QueryItem(itemId, QuestieDB._itemAdapterQueryOrder)
|
||||
local override = QuestieDB.itemDataOverrides and (QuestieDB.itemDataOverrides[itemId] or QuestieDB.itemDataOverrides[tostring(itemId)])
|
||||
|
||||
if not rawdata and QuestieDB.itemDataOverrides then
|
||||
rawdata = QuestieDB.itemDataOverrides[itemId] or QuestieDB.itemDataOverrides[tostring(itemId)]
|
||||
end
|
||||
|
||||
if not rawdata then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetItem] rawdata is nil for itemID:", itemId)
|
||||
if not rawdata and not override then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetItem] data not found for itemID:", itemId)
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -429,44 +440,58 @@ function QuestieDB:GetItem(itemId)
|
||||
Hidden = QuestieCorrections.questItemBlacklist[itemId]
|
||||
}
|
||||
|
||||
local stringKey, intKey = next(QuestieDB.itemKeys)
|
||||
while stringKey do
|
||||
item[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(QuestieDB.itemKeys, stringKey)
|
||||
if override then
|
||||
-- Prefer override data (corrections)
|
||||
for stringKey, _ in pairs(QuestieDB.itemKeys) do
|
||||
if override[stringKey] ~= nil then
|
||||
item[stringKey] = override[stringKey]
|
||||
elseif rawdata then
|
||||
-- Fallback to DB if override is partial
|
||||
local intKey = QuestieDB.itemKeys[stringKey]
|
||||
item[stringKey] = rawdata[intKey]
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Use standard DB data
|
||||
local stringKey, intKey = next(QuestieDB.itemKeys)
|
||||
while stringKey do
|
||||
item[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(QuestieDB.itemKeys, stringKey)
|
||||
end
|
||||
end
|
||||
|
||||
local sources = item.Sources
|
||||
|
||||
if rawdata[QuestieDB.itemKeys.npcDrops] then
|
||||
local _npcId, npcId = next(rawdata[QuestieDB.itemKeys.npcDrops])
|
||||
if item.npcDrops then
|
||||
local _npcId, npcId = next(item.npcDrops)
|
||||
while _npcId do
|
||||
table.insert(sources, {
|
||||
Id = npcId,
|
||||
Type = "monster",
|
||||
})
|
||||
_npcId, npcId = next(rawdata[QuestieDB.itemKeys.npcDrops], _npcId)
|
||||
_npcId, npcId = next(item.npcDrops, _npcId)
|
||||
end
|
||||
end
|
||||
|
||||
if rawdata[QuestieDB.itemKeys.vendors] then
|
||||
local _npcId, npcId = next(rawdata[QuestieDB.itemKeys.vendors])
|
||||
if item.vendors then
|
||||
local _npcId, npcId = next(item.vendors)
|
||||
while _npcId do
|
||||
table.insert(sources, {
|
||||
Id = npcId,
|
||||
Type = "monster",
|
||||
})
|
||||
_npcId, npcId = next(rawdata[QuestieDB.itemKeys.vendors], _npcId)
|
||||
_npcId, npcId = next(item.vendors, _npcId)
|
||||
end
|
||||
end
|
||||
|
||||
if rawdata[QuestieDB.itemKeys.objectDrops] then
|
||||
local _k, v = next(rawdata[QuestieDB.itemKeys.objectDrops])
|
||||
if item.objectDrops then
|
||||
local _k, v = next(item.objectDrops)
|
||||
while _k do
|
||||
table.insert(sources, {
|
||||
Id = v,
|
||||
Type = "object",
|
||||
})
|
||||
_k, v = next(rawdata[QuestieDB.itemKeys.objectDrops], _k)
|
||||
_k, v = next(item.objectDrops, _k)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1355,10 +1380,11 @@ function QuestieDB.GetQuest(questId, ...) -- /dump QuestieDB.GetQuest(867)
|
||||
if overrideData and rawdata ~= overrideData then
|
||||
local _sKey, _iKey = next(questKeys)
|
||||
while _sKey do
|
||||
if overrideData[_iKey] then
|
||||
local overrideVal = overrideData[_iKey] or overrideData[_sKey]
|
||||
if overrideVal ~= nil then
|
||||
if _sKey == "objectives" and QO.objectives then
|
||||
-- Merge objectives (index 10)
|
||||
local _objIdx, _objList = next(overrideData[_iKey])
|
||||
-- Merge objectives
|
||||
local _objIdx, _objList = next(overrideVal)
|
||||
while _objIdx do
|
||||
if not QO.objectives[_objIdx] then
|
||||
QO.objectives[_objIdx] = _objList
|
||||
@@ -1369,10 +1395,10 @@ function QuestieDB.GetQuest(questId, ...) -- /dump QuestieDB.GetQuest(867)
|
||||
_id, _data = next(_objList, _id)
|
||||
end
|
||||
end
|
||||
_objIdx, _objList = next(overrideData[_iKey], _objIdx)
|
||||
_objIdx, _objList = next(overrideVal, _objIdx)
|
||||
end
|
||||
else
|
||||
QO[_sKey] = overrideData[_iKey]
|
||||
QO[_sKey] = overrideVal
|
||||
end
|
||||
end
|
||||
_sKey, _iKey = next(questKeys, _sKey)
|
||||
@@ -1869,13 +1895,10 @@ function QuestieDB:GetNPC(npcId)
|
||||
end
|
||||
|
||||
local rawdata = QuestieDB.QueryNPC(npcId, QuestieDB._npcAdapterQueryOrder)
|
||||
local override = QuestieDB.npcDataOverrides and (QuestieDB.npcDataOverrides[npcId] or QuestieDB.npcDataOverrides[tostring(npcId)])
|
||||
|
||||
if not rawdata and QuestieDB.npcDataOverrides then
|
||||
rawdata = QuestieDB.npcDataOverrides[npcId] or QuestieDB.npcDataOverrides[tostring(npcId)]
|
||||
end
|
||||
|
||||
if (not rawdata) then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetNPC] rawdata is nil for npcID:", npcId)
|
||||
if not rawdata and not override then
|
||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[QuestieDB:GetNPC] data not found for npcID:", npcId)
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -1884,13 +1907,28 @@ function QuestieDB:GetNPC(npcId)
|
||||
id = npcId,
|
||||
type = "monster",
|
||||
}
|
||||
local stringKey, intKey = next(npcKeys)
|
||||
while stringKey do
|
||||
npc[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(npcKeys, stringKey)
|
||||
|
||||
if override then
|
||||
-- Prefer override data (corrections)
|
||||
for stringKey, _ in pairs(npcKeys) do
|
||||
if override[stringKey] ~= nil then
|
||||
npc[stringKey] = override[stringKey]
|
||||
elseif rawdata then
|
||||
-- Fallback to DB if override is partial
|
||||
local intKey = npcKeys[stringKey]
|
||||
npc[stringKey] = rawdata[intKey]
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Use standard DB data
|
||||
local stringKey, intKey = next(npcKeys)
|
||||
while stringKey do
|
||||
npc[stringKey] = rawdata[intKey]
|
||||
stringKey, intKey = next(npcKeys, stringKey)
|
||||
end
|
||||
end
|
||||
|
||||
local friendlyToFaction = rawdata[npcKeys.friendlyToFaction]
|
||||
local friendlyToFaction = npc.friendlyToFaction
|
||||
npc.friendly = (not friendlyToFaction) and true or factionReactions[friendlyToFaction]
|
||||
|
||||
_QuestieDB.npcCache[npcId] = npc
|
||||
|
||||
Reference in New Issue
Block a user