-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvent.lua
668 lines (607 loc) · 25.2 KB
/
Event.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
local _G = _G
local L = LibStub("AceLocale-3.0"):GetLocale("APR-Recorder")
AprRC.event = AprRC:NewModule("AprRC-Event")
-- global event framePool for register
AprRC.event.framePool = {}
AprRC.event.functions = {}
local targetName, targetID
local scenarioCriteriaLogged = {}
---------------------------------------------------------------------------------------
------------------------------------- EVENTS ------------------------------------------
---------------------------------------------------------------------------------------
local events = {
load = "ADDON_LOADED",
accept = "QUEST_ACCEPTED",
remove = "QUEST_REMOVED",
done = "QUEST_TURNED_IN",
gossip = "GOSSIP_SHOW",
setHS = "HEARTHSTONE_BOUND",
spell = "UNIT_SPELLCAST_SUCCEEDED",
raidIcon = "RAID_TARGET_UPDATE",
pet = { "PET_BATTLE_CLOSE", "PET_BATTLE_OPENING_START" },
emote = "CHAT_MSG_TEXT_EMOTE",
taxi = { "TAXIMAP_OPENED", "TAXIMAP_CLOSED" },
fly = { "PLAYER_CONTROL_LOST", "PLAYER_CONTROL_GAINED" },
buy = "MERCHANT_SHOW",
qpart = "QUEST_WATCH_UPDATE",
loot = "CHAT_MSG_LOOT",
target = "PLAYER_TARGET_CHANGED",
scenario = "SCENARIO_CRITERIA_UPDATE",
portal = { "PLAYER_LEAVING_WORLD", "PLAYER_ENTERING_WORLD" }, -- test with "AREA_POIS_UPDATED"
learnProfession = "LEARNED_SPELL_IN_SKILL_LINE"
-- warMode = "WAR_MODE_STATUS_UPDATE",
-- vehicle = { "UNIT_ENTERING_VEHICLE", "UNIT_EXITING_VEHICLE" },
}
---------------------------------------------------------------------------------------
-------------------------------------- DATA -------------------------------------------
---------------------------------------------------------------------------------------
local boatsNodeID = { 2052, 2053, 2054, 2055, 2056, 2057, 2104, 2105 }
local chromieTimelineSpellID = {
[325400] = { name = "TheBurningCrusade", optionID = 6 },
[325042] = { name = "WrathOfTheLichKing", optionID = 7 },
[325537] = { name = "Cataclysm", optionID = 5 },
[325530] = { name = "MistsOfPandaria", optionID = 8 },
[325534] = { name = "WarlordsOfDraenor", optionID = 9 },
[325539] = { name = "Legion", optionID = 10 },
[420123] = { name = "BattleForAzeroth", optionID = 15 },
[397733] = { name = "Shadowlands", optionID = 14 }
-- Dragonflight
}
local controlLostTime = 0
---------------------------------------------------------------------------------------
---------------------------------- Events register ------------------------------------
---------------------------------------------------------------------------------------
function AprRC.event:MyRegisterEvent()
for tag, event in pairs(events) do
local container = self.framePool[tag] or CreateFrame("Frame")
container.tag = tag
container.callback = self.functions[tag]
if type(event) == "string" then
container:RegisterEvent(event)
container:SetScript("OnEvent", self.EventHandler)
elseif type(event) == "table" then
for _, e in ipairs(event) do
container:RegisterEvent(e)
container:SetScript("OnEvent", self.EventHandler)
end
end
end
end
function AprRC.event.EventHandler(self, event, ...)
if not AprRC.settings.profile.enableAddon or not AprRC.settings.profile.recordBarFrame.isRecording then
return
end
if self.callback and self.tag then
AprRC:Debug("Callback Event", event)
pcall(self.callback, event, ...)
else
AprRC:Debug("Unregister Event", event)
self.callback = nil
self:UnregisterEvent(event)
end
end
---------------------------------------------------------------------------------------
---------------------------------- Events always sub ----------------------------------
---------------------------------------------------------------------------------------
local eventFrame = CreateFrame("Frame")
eventFrame:RegisterEvent(events.load)
eventFrame:SetScript("OnEvent", function(self, event, ...)
if event == events.load then
local addOnName, containsBindings = ...
if addOnName == "APR-Recorder" then
if ExtraActionButton1 and not ExtraActionButton1.isHookedAprRC then
ExtraActionButton1:HookScript("OnClick", function()
if not AprRC.settings.profile.enableAddon or not AprRC.settings.profile.recordBarFrame.isRecording then
return
end
local currentStep = AprRC:GetLastStep()
currentStep.ExtraActionB = 1
end)
ExtraActionButton1.isHookedAprRC = true
end
end
end
end)
---------------------------------------------------------------------------------------
---------------------------------- Events Functions -----------------------------------
---------------------------------------------------------------------------------------
function AprRC.event.functions.accept(event, questId)
-- Pickup
local function AddQuestToStep(questId)
if AprRC:HasStepOption("DroppableQuest") then
local currentStep = AprRC:GetLastStep()
currentStep.DropQuest = questId
currentStep.DroppableQuest.Qid = questId
AprRC:saveQuestInfo()
return
end
if AprRC:HasStepOption("ChromiePick") then
local currentStep = AprRC:GetLastStep()
currentStep.PickUp = { questId }
AprRC:saveQuestInfo()
return
end
if not AprRC:IsCurrentStepFarAway() and AprRC:HasStepOption("PickUp") then
local currentStep = AprRC:GetLastStep()
tinsert(currentStep.PickUp, questId)
else
local step = { PickUp = { questId } }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
-- update saved quest
AprRC:saveQuestInfo()
end
if C_QuestLog.IsWorldQuest(questId) then
APR.questionDialog:CreateQuestionPopup(
"New world quest, do you want to add it?",
function()
AddQuestToStep(questId)
end
)
return
end
AddQuestToStep(questId)
end
function AprRC.event.functions.remove(event, questId, ...)
-- LeaveQuests
if not C_QuestLog.IsQuestFlaggedCompleted(questId) and not C_QuestLog.IsWorldQuest(questId) then
if AprRC:HasStepOption("LeaveQuests") then
local currentStep = AprRC:GetLastStep()
tinsert(currentStep.LeaveQuests, questId)
else
local step = { LeaveQuests = { questId } }
step.Zone = AprRC:getZone()
AprRC:NewStep(step)
end
--remove quest from state list
AprRC.lastQuestState[questId] = nil
end
end
function AprRC.event.functions.done(event, questId, ...)
if not AprRC:IsCurrentStepFarAway() and AprRC:HasStepOption("Done") then
local currentStep = AprRC:GetLastStep()
tinsert(currentStep.Done, questId)
else
local step = { Done = { questId } }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
--remove quest from state list
AprRC.lastQuestState[questId] = nil
end
function AprRC.event.functions.raidIcon(...)
local targetId = APR:GetTargetID()
if targetId then
local currentStep = AprRC:GetLastStep()
currentStep.RaidIcon = targetId
end
end
function AprRC.event.functions.setHS(...)
local step = { SetHS = AprRC:FindClosestIncompleteQuest() }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
function AprRC.event.functions.spell(event, unitTarget, castGUID, spellID)
local key = nil
if unitTarget == "player" then
if spellID == APR.dalaHSSpellID then
key = "UseDalaHS"
elseif spellID == APR.garrisonHSSpellID then
key = "UseGarrisonHS"
elseif tContains(APR.hearthStoneSpellID, spellID) then
key = "UseHS"
elseif spellID == 126389 then
local currentStep = AprRC:GetLastStep()
currentStep.UseGlider = 1
return
elseif chromieTimelineSpellID[spellID] then
local step = {}
step.ChromiePick = chromieTimelineSpellID[spellID].optionID
step.GossipOptionIDs = { 51901, 51902 }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
return
end
if key then
local step = {}
step[key] = AprRC:FindClosestIncompleteQuest()
step.Zone = AprRC:getZone()
AprRC:NewStep(step)
end
end
end
function AprRC.event.functions.warMode(event, warModeEnabled)
if warModeEnabled then
local step = { WarMode = AprRC:FindClosestIncompleteQuest() }
AprRC:NewStep(step)
end
end
function AprRC.event.functions.vehicle(event, ...)
if event == "UNIT_EXITING_VEHICLE" then
if not AprRC:HasStepOption("VehicleExit") then
local currentStep = AprRC:GetLastStep()
currentStep.VehicleExit = 1
end
end
end
local function SetGossipOptionID(self)
local gossipInfo = self:GetData().info
local gossipIcon = gossipInfo.icon
local gossipOptionID = gossipInfo.gossipOptionID
local npcID = APR:GetTargetID("npc")
if gossipIcon == 132053 and not tContains({ 51901, 51902 }, gossipOptionID) then -- bubble icon and not Chromie select timeline
if not AprRC:IsCurrentStepFarAway() then
local currentStep = AprRC:GetLastStep()
if AprRC:HasStepOption("GossipOptionIDs") then
if not tContains(currentStep.GossipOptionIDs, gossipOptionID) then
tinsert(currentStep.GossipOptionIDs, gossipOptionID)
end
else
currentStep.GossipOptionIDs = { gossipOptionID }
end
-- if npcID then
-- if not currentStep.NPCIDs then
-- currentStep.NPCIDs = {}
-- end
-- if not tContains(currentStep.NPCIDs, npcID) then
-- tinsert(currentStep.NPCIDs, npcID)
-- end
-- end
else
local step = { GossipOptionIDs = { gossipOptionID } } --, NPCIDs = { npcID } }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
end
end
function AprRC.event.functions.gossip(event, ...)
local childs = { GossipFrame.GreetingPanel.ScrollBox.ScrollTarget:GetChildren() }
for k, child in ipairs(childs) do
local data = child.GetData and child:GetData()
if data and data.info and data.info.gossipOptionID then
if not child.hookedGossipExtraction then
child:HookScript("OnClick", SetGossipOptionID)
child.hookedGossipExtraction = true
end
end
end
end
function AprRC.event.functions.emote(event, ...)
local message, sender = ...
if APR.Username == sender then
local function getEmoteKey()
for emoteKey, phrases in pairs(L.Emotes) do
for _, phrase in ipairs(phrases) do
local pattern = phrase:gsub("%%s", ".+") -- replace placeholders patern to lua
pattern = "^" .. pattern .. "$" -- cast as regex
if string.match(message, pattern) then
return emoteKey
end
end
end
return nil
end
local emote = getEmoteKey()
if emote then
local currentStep = AprRC:GetLastStep()
if not AprRC:IsCurrentStepFarAway() and AprRC:HasStepOption("Emote") then
currentStep.Emote = emote
else
local step = { Emote = emote }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
end
end
end
function AprRC.event.functions.taxi(event, ...)
if event == "TAXIMAP_OPENED" then
local playerMapID = C_Map.GetBestMapForUnit("player")
local taxiNodes = C_TaxiMap.GetAllTaxiNodes(playerMapID)
for _, node in ipairs(taxiNodes) do
if node.state == Enum.FlightPathState.Current then
AprRC.CurrentTaxiNode = node
end
end
elseif event == "TAXIMAP_CLOSED" then
-- Save player position for right coord on taxi step
local step = {}
AprRC:SetStepCoord(step)
C_Timer.After(2, function()
if AprRC.CurrentTaxiNode and not UnitOnTaxi("player") then
local nodeID = AprRC.CurrentTaxiNode.nodeID
if not AprRC:IsTaxiInLookup(nodeID) then
step.GetFP = nodeID
-- Save for currentRoute
AprRCData.TaxiLookup[nodeID] = true
AprRC:NewStep(step)
end
end
end)
end
end
function AprRC.event.functions.fly(event, ...)
if event == "PLAYER_CONTROL_LOST" then
-- Save player position for right coord on taxi step
local step = {}
AprRC:SetStepCoord(step)
C_Timer.After(2, function()
if UnitOnTaxi("player") then
AprRC.isOnTaxi = true
controlLostTime = GetTime()
step.UseFlightPath = AprRC:FindClosestIncompleteQuest()
AprRC:NewStep(step)
end
end)
elseif event == "PLAYER_CONTROL_GAINED" then
if AprRC.isOnTaxi then
local currentStep = AprRC:GetLastStep()
-- ETA
local controlGainTime = GetTime()
local duration = math.floor(controlGainTime - controlLostTime)
currentStep.ETA = duration
--NodeID
local posY, posX = UnitPosition("player")
local taxiNodeId, taxiName, taxiX, taxiY = APR.transport:ClosestTaxi(posX, posY)
currentStep.NodeID = taxiNodeId
--Boat
if tContains(boatsNodeID, AprRC.CurrentTaxiNode) then
currentStep.Boat = 1
end
-- reset
AprRC.isOnTaxi = false
controlLostTime = 0
AprRC.CurrentTaxiNode = nill
end
end
end
function AprRC.event.functions.buy(event, ...)
local numItems = GetMerchantNumItems()
for i = 1, numItems do
local button = _G["MerchantItem" .. i .. "ItemButton"]
if button and not button.isHooked then
button:HookScript("OnClick", function()
local itemID = GetMerchantItemID(i)
if itemID then
local currentStep = AprRC:GetLastStep()
if currentStep and currentStep.BuyMerchant then
local found = false
for _, item in ipairs(currentStep.BuyMerchant) do
if item.itemID == itemID then
item.quantity = item.quantity + 1
found = true
break
end
end
if not found then
table.insert(currentStep.BuyMerchant,
{ itemID = itemID, quantity = 1, questID = AprRC:FindClosestIncompleteQuest() })
end
return
end
local step = { BuyMerchant = { { itemID = itemID, quantity = 1, questID = AprRC:FindClosestIncompleteQuest() } } }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
end)
button.isHooked = true
end
end
end
function AprRC.event.functions.qpart(event, questID)
-- Save player position for right coord on qpart update
local step = {}
AprRC:SetStepCoord(step)
local function setButton(questID, index, step)
-- itemID
local questLogIndex = C_QuestLog.GetLogIndexForQuestID(questID)
local link = GetQuestLogSpecialItemInfo(questLogIndex)
if link then
local itemID = AprRC:GetItemIDFromLink(link)
if not step.Button then
step.Button = {}
end
step.Button[questID .. "-" .. index] = itemID
end
end
local function setQpart(lastState, objective, questID, index)
if lastState.numFulfilled < objective.numFulfilled then
local currentStep = AprRC:GetLastStep()
--
if (currentStep.Qpart and currentStep.Qpart[questID] and currentStep.Qpart[questID][index]) or AprRC:IsQuestInLookup(questID, index) then
-- update
AprRC.lastQuestState[questID][index] = { numFulfilled = objective.numFulfilled }
return
end
local range = (objective.type == "monster" or objective.type == "item") and 30 or 5
local function newStep()
step.Qpart = {}
step.Qpart[questID] = { index }
if AprRC:IsInInstanceQuest() then
step.InstanceQuest = true
end
setButton(questID, index, step)
-- step.IsCampaignQuest = AprRC:IsCampaignQuest(questID) or nil
step.Range = range
AprRC:NewStep(step)
end
if AprRC:HasStepOption("PickUp")
or AprRC:HasStepOption("Done")
or AprRC:HasStepOption("LeaveQuests")
or AprRC:HasStepOption("GetFP")
or AprRC:HasStepOption("setHS")
or AprRC:HasStepOption("Waypoint") then
newStep()
else
if not AprRC:IsCurrentStepFarAway() then
if not AprRC:HasStepOption("Qpart") then
currentStep.Qpart = {}
currentStep.Qpart[questID] = {}
if not AprRC:HasStepOption("Coord") then
currentStep.Coord = step.Coord
currentStep.Zone = step.Zone
currentStep.Range = range
end
if AprRC:IsInInstanceQuest() then
currentStep.InstanceQuest = true
end
elseif not currentStep.Qpart[questID] then
currentStep.Qpart[questID] = {}
end
tinsert(currentStep.Qpart[questID], index)
setButton(questID, index, currentStep)
else
newStep()
end
end
-- update
AprRC.lastQuestState[questID][index] = { numFulfilled = objective.numFulfilled }
AprRC:AddQuestToLookup(questID, index)
end
end
C_Timer.After(2, function()
local objectives = C_QuestLog.GetQuestObjectives(questID)
for index, objective in ipairs(objectives) do
local lastState = AprRC.lastQuestState[questID] and AprRC.lastQuestState[questID][index]
if lastState then
setQpart(lastState, objective, questID, index)
else
-- save if not existing
AprRC.lastQuestState[questID] = AprRC.lastQuestState[questID] or {}
AprRC.lastQuestState[questID][index] = { numFulfilled = objective.numFulfilled }
local lastState = AprRC.lastQuestState[questID] and AprRC.lastQuestState[questID][index]
setQpart(lastState, objective, questID, index)
end
end
end)
end
function AprRC.event.functions.loot(event, message, ...)
local itemLink = string.match(message, "|Hitem:.-|h.-|h")
if itemLink then
local itemID, _, _, _, _, classID, _ = C_Item.GetItemInfoInstant(itemLink)
if classID == 12 then -- Quest item
local tooltipScanner = CreateFrame("GameTooltip", "ItemTooltipScanner", nil, "GameTooltipTemplate")
tooltipScanner:SetOwner(WorldFrame, "ANCHOR_NONE")
tooltipScanner:SetItemByID(itemID)
local hasQuestItem = false
for i = 2, tooltipScanner:NumLines() do
local line = _G["ItemTooltipScannerTextLeft" .. i]:GetText() or ""
if line:find(L.DroppableQuestItem) then
hasQuestItem = true
break
end
end
if hasQuestItem then
local step = {}
step.DroppableQuest = { Text = targetName, MobId = tonumber(targetID) }
AprRC:SetStepCoord(step)
AprRC:NewStep(step, 5)
end
end
end
end
function AprRC.event.functions.target(event, ...)
local targetGUID = UnitGUID("target")
if not targetGUID then return end
targetName = UnitNameUnmodified("target")
targetID = select(6, strsplit("-", targetGUID))
end
function AprRC.event.functions.pet(event, ...)
AprRC.record:RefreshFrameAnchor()
end
function AprRC.event.functions.scenario(event, ...)
local criteriaID = ...
local scenarioInfo = C_ScenarioInfo.GetScenarioInfo()
if not scenarioInfo then return end
local scenarioID = scenarioInfo.scenarioID
local stepInfo = C_ScenarioInfo.GetScenarioStepInfo()
if not stepInfo then return end
for i = 1, stepInfo.numCriteria do
local criteria = C_ScenarioInfo.GetCriteriaInfoByStep(stepInfo.stepID, i)
if criteria.criteriaID == criteriaID and criteria.completed then
if not scenarioCriteriaLogged[criteriaID] then -- to avoid duplication of step
local step = { Scenario = { scenarioID = scenarioID, stepID = stepInfo.stepID, criteriaID = criteriaID, criteriaIndex = i } }
if AprRC:IsInInstanceQuest() then
step.InstanceQuest = true
end
AprRC:SetStepCoord(step, 5)
AprRC:NewStep(step)
scenarioCriteriaLogged[criteriaID] = true
end
break
end
end
end
function AprRC.event.functions.portal(event, ...)
if event == "PLAYER_LEAVING_WORLD" then
local step = {}
AprRC:SetStepCoord(step)
AprRCData.BeforePortal.lastStep = AprRC:GetLastStep()
AprRCData.BeforePortal.lastCoord = step
else
local isInitialLogin, isReloadingUi = ...
-- wait 2s si last step = saved last step alors waypoints + text prendre portal -- not skippable waypoints (new option)
-- sinon check IsCurrentStepFarAway si trop loin alors override coord + text prendre portal
-- pour les tp sans portail ni cast => LOSS_OF_CONTROL_ADDED into Zone changed indoors, waypoint update, area pois updated
-- pour les tp avec spell => spell list teleport (sans les spell de class) + unit spellcast-succeeded
if not isInitialLogin and not isReloadingUi then
C_Timer.After(3, function()
local last = AprRC:GetLastStep()
if AprRC:DeepCompare(AprRCData.BeforePortal.lastStep, last) then
APR.questionDialog:CreateQuestionPopup(
"Set a waypoint where you were before teleporting?", function()
local step = {
Waypoint = AprRC:FindClosestIncompleteQuest(),
ExtraLineText = "USE_PORTAL",
Coord = AprRCData.BeforePortal.lastStep.Coord
}
AprRC:NewStep(step)
print("|cff00bfffWaypoint|r Added")
end)
elseif AprRC:IsCurrentStepFarAway() then
local last = AprRC:GetLastStep()
last.Coord = AprRCData.BeforePortal.lastStep.Coord
last.ExtraLineText = "USE_PORTAL"
AprRCData.BeforePortal = {}
print("|cff00bfffLast Step coord updated|r Added")
end
end)
end
if isInitialLogin then
AprRCData.BeforePortal = {}
end
end
end
function AprRC.event.functions.learnProfession(event, ...)
local spellID, skillLineIndex, isGuildPerkSpell = ...
if tContains(AprRC.professionSpellIDs, spellID) then
local step = { LearnProfession = spellID }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
end
---------------------
-- V2
---------------------
-- - Treasure ["Treasure"] = 31401 (questID) (how ?)
-- sur l'action d'un DB check si y a la quest ID dans un PickUpDB et l'ajouter automatiquemejnt
-- - QpartDB
-- - DoneDB ["DoneDB"] = { questID1, questID2}
-- si on get une nouvelle quete ou actualise une quete -> info = C_QuestLog.GetInfo(questLogIndex); info.suggestedGroup
-- - Group ["Group"] = { Number = 3, QuestId = 51384},
-- - GroupTask ["GroupTask"] = 51384, (the questId from Group, step to check if player want to do the group quest)
-- - QuestLineSkip ???? (block group quest if present) ["QuestLineSkip"] = 51226,
-- MountVehicle / InVehicle (rework)
---------------------
-- V3 - maybe in command no button
---------------------
-- - DoIHaveFlight ?? check si on peut en faire quelque chose pour des waypoints (avec ajout unAutoSkipableWaypoint)
-- - NoAutoFlightMap
-- - PickedLoa
-- - SpecialETAHide ??
-- - Bloodlust
-- - DenyNPC
-- - ExitTutorial ["ExitTutorial"] = 62567 (IsOnQuest(questID)
-------------------------------
-- AprRC.EventFrame:RegisterEvent("CONFIRM_XP_LOSS") -- deathskip ??