View Single Post
11/16/21, 04:33 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,990
Are you sure it was ONLY GetDigSpotAntiquityId() you have removed or did you after that call to the function do any further checks with the return value?
ZOs always checks this e.g.

Lua Code:
  1. local antiquityId = GetDigSpotAntiquityId()
  2. if antiquityId ~= 0 then

before it hands in the antiquityId to the antiquity data manager, e.g. to get the current dig data:

Lua Code:
  1. ANTIQUITY_DATA_MANAGER:GetAntiquityData(antiquityId)

Else check the original ZOs handler for that event, it does check the "RESULT" parameter of the evet before it uses GetDigSpotAntiquityId, or further more it does not use that function but another one called "GetScryingCurrentAntiquityId()"!


https://github.com/esoui/esoui/blob/...lers.lua#L1162
Lua Code:
  1. CENTER_SCREEN_EVENT_HANDLERS[EVENT_ANTIQUITY_SCRYING_RESULT] = function(result)
  2.     --The map handles the case where you improved and unlocked more goals than before
  3.     if result == ANTIQUITY_SCRYING_RESULT_NO_PROGRESS or result == ANTIQUITY_SCRYING_RESULT_NO_ADDITIONAL_PROGRESS then
  4.         local antiquityId = GetScryingCurrentAntiquityId()
  5.         local antiquityData = ANTIQUITY_DATA_MANAGER:GetAntiquityData(antiquityId)
  6.         if antiquityData then
  7.             local numGoalsAchieved = antiquityData:GetNumGoalsAchieved()
  8.             local messageParams = CENTER_SCREEN_ANNOUNCE:CreateMessageParams(CSA_CATEGORY_SCRYING_PROGRESS_TEXT)
  9.             messageParams:SetText(GetString("SI_ANTIQUITYSCRYINGRESULT", result))
  10.             messageParams:SetCSAType(CENTER_SCREEN_ANNOUNCE_TYPE_ANTIQUITY_SCRYING_RESULT)
  11.             messageParams:SetScryingProgressData(numGoalsAchieved, numGoalsAchieved, antiquityData:GetTotalNumGoals())
  12.             return messageParams
  13.         end
  14.     end
  15. end

Last edited by Baertram : 11/16/21 at 04:36 PM.
  Reply With Quote