Skip to content

Commit

Permalink
Fixed world bosses not poping up the group finder window
Browse files Browse the repository at this point in the history
- Framework update to latest version v170.
- Some comment translation to english.
- Fixed errors where the 8.3 invasions was trigering before the Player_Entering_World event.
  • Loading branch information
Tercioo committed Feb 13, 2020
1 parent 3258fbb commit 404ab85
Show file tree
Hide file tree
Showing 11 changed files with 623 additions and 127 deletions.
2 changes: 1 addition & 1 deletion WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ WorldQuestTracker.OnMapHasChanged = function (self)
end

C_Timer.After (0.05, function()
if (C_QuestLog.HasActiveThreats()) then
if (C_QuestLog.HasActiveThreats() and WorldQuestTracker.DoubleTapFrame) then
local eyeFrame = WorldQuestTracker.GetOverlay ("Eye") --REMOVE ON 9.0
if (WorldQuestTracker.DoubleTapFrame:IsShown()) then
eyeFrame:Refresh()
Expand Down
29 changes: 25 additions & 4 deletions WorldQuestTracker_GroupFinder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ff.PlayersInvited = {}

local GameCooltip = GameCooltip2

local C_TaskQuest = _G.C_TaskQuest

local _
local QuestMapFrame_IsQuestWorldQuest = QuestMapFrame_IsQuestWorldQuest or QuestUtils_IsQuestWorldQuest
local GetNumQuestLogRewardCurrencies = GetNumQuestLogRewardCurrencies
Expand Down Expand Up @@ -574,6 +576,7 @@ ff:RegisterEvent ("GROUP_ROSTER_UPDATE")
ff:RegisterEvent ("GROUP_INVITE_CONFIRMATION")
ff:RegisterEvent ("LFG_LIST_APPLICANT_LIST_UPDATED")
ff:RegisterEvent ("ZONE_CHANGED_NEW_AREA")
ff:RegisterEvent ("PLAYER_ENTERING_WORLD")

ChatFrame_AddMessageEventFilter ("CHAT_MSG_WHISPER", function (_, _, msg)
if (not WorldQuestTracker.db.profile.groupfinder.send_whispers) then
Expand Down Expand Up @@ -922,16 +925,17 @@ ff:SetScript ("OnEvent", function (self, event, arg1, questID, arg3)

--> do the regular checks
if ((isInArea or isOnMap) and HaveQuestData (questID)) then

--get all quests from 8.3 assault stuff
local allAssaultQuests = {}
for _, questId in ipairs(C_TaskQuest.GetThreatQuests()) do
--put all into a table where the hash is the key and true is the value
allAssaultQuests [questId] = true
end

--if the quest is a worldquest OR the quest is listed as an 8.3 assault quest
if ((isWorldQuest and isInArea) or allAssaultQuests[questID]) then
local tagID, tagName, worldQuestType, rarity, isElite = GetQuestTagInfo (questID)

if ((isWorldQuest and isInArea) or allAssaultQuests[questID] or tagID == 112 or (isElite and rarity == LE_WORLD_QUEST_QUALITY_EPIC)) then
print (2)
--FlashClientIcon()
--WorldQuestTracker.FindGroupForQuest (questID)

Expand Down Expand Up @@ -1019,7 +1023,24 @@ ff:SetScript ("OnEvent", function (self, event, arg1, questID, arg3)
StaticPopup_Hide ("LFG_LIST_AUTO_ACCEPT_CONVERT_TO_RAID")
StaticPopup_Hide ("GROUP_INVITE_CONFIRMATION")
end


elseif (event == "PLAYER_ENTERING_WORLD") then

--> check if the player is in a quest location (big quests like invasions)
if (not IsInGroup()) then
--get invasion quests
for _, questId in ipairs(C_TaskQuest.GetThreatQuests()) do
--this invasion is active?
if (C_TaskQuest.IsActive(questId)) then
local isInArea, isOnMap = GetTaskInfo (questId)
--the player is inside the zone of this invasion?
if (isInArea and isOnMap) then
ff.CurrentWorldQuest = questId
ff:PlayerEnteredWorldQuestZone (questId)
end
end
end
end
end
end)

Expand Down
11 changes: 3 additions & 8 deletions WorldQuestTracker_MapAPI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ local GetQuestLogRewardCurrencyInfo = GetQuestLogRewardCurrencyInfo
local GetQuestLogRewardMoney = GetQuestLogRewardMoney
local GetQuestTagInfo = GetQuestTagInfo
local GetNumQuestLogRewards = GetNumQuestLogRewards
local GetQuestInfoByQuestID = C_TaskQuest.GetQuestInfoByQuestID

local MapRangeClamped = DF.MapRangeClamped
local FindLookAtRotation = DF.FindLookAtRotation
local GetDistance_Point = DF.GetDistance_Point

local triggerScheduledWidgetUpdate = function (timerObject)
local widget = timerObject.widget
Expand Down Expand Up @@ -453,7 +448,7 @@ function WorldQuestTracker.RewardRealItemLevel (questID)
return itemLevel or 1
end

--try to guess the amount of artifact power the item can give ãrtifact ~artifact
--try to guess the amount of artifact power the item can give �rtifact ~artifact

--asia
function WorldQuestTracker.RewardIsArtifactPowerAsian (itemLink) -- thanks @yuk6196 on curseforge
Expand Down Expand Up @@ -793,11 +788,11 @@ end
return itemName, itemTexture, itemLevel, quantity, quality, isUsable, itemID, false, 0, itemStackCount > 1, itemStackCount
end
else
--ainda não possui info do item
--ainda n�o possui info do item
return
end
else
--ainda não possui info do item
--ainda n�o possui info do item
return
end
end
Expand Down
12 changes: 6 additions & 6 deletions WorldQuestTracker_WorldMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function WorldQuestTracker.HideWorldQuestsOnWorldMap()
widget.questID = nil
end
--faction lines (deprecated)
for _, widget in ipairs (extra_widgets) do --linhas e bolas de facções
for _, widget in ipairs (extra_widgets) do --hide lines and indicators for factions
widget:Hide()
end

Expand Down Expand Up @@ -829,7 +829,7 @@ function WorldQuestTracker.InitializeWorldWidgets()
zoneWidget:Hide()
end

--cria o primeiro widget no sumário e depois cria os demais lentamente
--cria o primeiro widget no sum�rio e depois cria os demais lentamente
local i = 1
local button = create_worldmap_square ("WorldQuestTrackerWorldSummarySquare", i, WorldQuestTracker.WorldSummary)
tinsert (all_widgets, button)
Expand All @@ -840,7 +840,7 @@ function WorldQuestTracker.InitializeWorldWidgets()
WorldQuestTracker.WorldWidgetsCreationTask = C_Timer.NewTicker (.03, lazyCreateWorldWidget)
end

--agenda uma atualização nos widgets do world map caso os dados das quests estejam indisponíveis
--agenda uma atualiza��o nos widgets do world map caso os dados das quests estejam indispon�veis
local do_worldmap_update = function (newTimer)
if (WorldQuestTracker.IsWorldQuestHub (WorldQuestTracker.GetCurrentMapAreaID())) then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap (true, false, false, false, newTimer.QuestList) --no cache true
Expand Down Expand Up @@ -1302,7 +1302,7 @@ function WorldQuestTracker.UpdateWorldQuestsOnWorldMap (noCache, showFade, isQue
if (sortByTimeLeft) then
order = abs (timeLeft - 10000)

elseif (timePriority) then --timePriority multiplicado por 60
elseif (timePriority) then --timePriority j� multiplicado por 60
if (timeLeft < timePriority) then
order = abs (timeLeft - 1000)
end
Expand Down Expand Up @@ -1747,7 +1747,7 @@ if (WorldMapFrame.BorderFrame.MaximizeMinimizeFrame.MinimizeButton) then
end)
end

--quando clicar no botão de por o world map em fullscreen ou window mode, reajustar a posição dos widgets
--quando clicar no bot�o de por o world map em fullscreen ou window mode, reajustar a posi��o dos widgets
if (WorldMapFrameSizeDownButton) then
WorldMapFrameSizeDownButton:HookScript ("OnClick", function() --window mode
if (WorldQuestTracker.UpdateWorldQuestsOnWorldMap) then
Expand Down Expand Up @@ -1792,7 +1792,7 @@ elseif (MaximizeButton) then
end)
end

--atualiza a quantidade de alpha nos widgets que mostram quantas quests ha para a facção
--atualiza a quantidade de alpha nos widgets que mostram quantas quests ha para a fac��o
--deprecated?
function WorldQuestTracker.UpdateFactionAlpha()
for _, factionFrame in ipairs (faction_frames) do
Expand Down
2 changes: 1 addition & 1 deletion libs/DF/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local GetSpellInfo = GetSpellInfo
local lower = string.lower
local GetSpellBookItemInfo = GetSpellBookItemInfo

local CONST_MAX_SPELLS = 300000
local CONST_MAX_SPELLS = 400000

function DF:GetAuraByName (unit, spellName, isDebuff)
isDebuff = isDebuff and "HARMFUL|PLAYER"
Expand Down
Loading

0 comments on commit 404ab85

Please sign in to comment.