forked from raid/VenturePlan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MissionView.lua
461 lines (451 loc) · 17.5 KB
/
MissionView.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
local _, T = ...
local EV = T.Evie
local overDesc = {
[91]="Reduces the damage dealt by the furthest enemy by 1 for 3 rounds.",
}
local GetMaskBoard do
local b, u, om = {}, {curHP=1}
function GetMaskBoard(bm)
if om == bm then
return b
end
om = bm
for i=0,12 do
b[i] = bm % 2^(i+1) >= 2^i and u or nil
end
return b
end
end
local function GetTargetMask(si, casterBoardIndex, boardMask)
local TP = T.VSim.TP
local board = GetMaskBoard(boardMask)
local tt = si.target
if #si > 0 then
for i=1,#si do
if si[i].target ~= 4 then
tt = si[i].target
break
end
end
end
if tt == nil then
return 0
end
tt = TP.forkTargetMap[tt] or tt
local r, ta = 0, TP.GetTargets(casterBoardIndex, tt, board)
for i=1,ta and #ta or 0 do
r = r + 2^ta[i]
end
return r
end
local function GenBoardMask()
local m, MP = 0, CovenantMissionFrame.MissionTab.MissionPage
for i=0,12 do
local f = MP.Board.framesByBoardIndex[i]
if f and f.name and f:IsShown() then
m = m + 2^i
end
end
return m
end
local blipMetric = UIParent:CreateFontString(nil, "BACKGROUND", "GameTooltipText")
blipMetric:SetPoint("TOPLEFT")
blipMetric:SetText("|TInterface/Minimap/PartyRaidBlipsV2:8:8|t")
blipMetric:Hide()
local function FormatTargetBlips(tm, bm, prefix, ac)
ac = ac and ac .. "|t" or "120:255:0|t"
local r, xs = "", 0
local _, sh = GetPhysicalScreenSize()
local bw = (blipMetric:GetStringWidth()+select(2,blipMetric:GetFont())*(sh*5/9000-0.7))/0.64*UIParent:GetScale()
local yd, bwc = math.floor(bw/2+0.5), math.ceil(bw)
if tm % 32 > 0 then
for i=0,4 do
local t, p = tm % 2^(i+1) >= 2^i, bm % 2^(i+1) >= 2^i
r = r .. "|TInterface/Minimap/PartyRaidBlipsV2:8:8:" .. (i < 2 and (math.ceil(bw/2) .. ":" .. -yd) or (-2*bwc .. ":" .. yd)).. ":64:32:0:20:0:20:" .. (t and ac or p and "160:160:160|t" or "40:40:40|t")
end
xs = -10
end
if tm >= 32 then
local lo, hi = xs .. ":" .. -yd, (xs-4*bwc) .. ":" .. yd
for i=5,12 do
local t, p = tm % 2^(i+1) >= 2^i, bm % 2^(i+1) >= 2^i
r = r .. "|TInterface/Minimap/PartyRaidBlipsV2:8:8:" .. (i > 8 and hi or lo).. ":64:32:0:20:0:20:" .. (t and ac or p and "160:160:160|t" or "40:40:40|t")
end
end
if prefix and r ~= "" then
r = prefix .. r
end
return r
end
local function FormatSpellPulse(si)
local t = si.type
local on, off = "|TInterface/Minimap/PartyRaidBlipsV2:8:8:0:0:64:32:0:20:0:20:255:120:0|t", "|TInterface/Minimap/PartyRaidBlipsV2:8:8:0:0:64:32:0:20:0:20:80:80:80|t"
if t == "heal" or t == "nuke" or t == "nukem" or (si.duration and si.duration <= 1 and si.echo) then
if si.echo then
return on .. (off):rep(si.echo-1) .. on
end
elseif (t == "heal" or t == "nuke") and (si.duration and si.duration > 1) then
return on .. (off):rep(si.duration-1)
elseif t == "aura" then
local r, p = (si.noFirstTick or si.period) and off or on, si.period or 1
for i=2, si.duration do
r = r .. (i % p == 0 and on or off)
end
return r
end
end
local function GetIncomingAAMask(slot, bm)
local r = 0
local f = CovenantMissionFrame.MissionTab.MissionPage.Board.framesByBoardIndex
local mid = CovenantMissionFrame.MissionTab.MissionPage.missionInfo.missionID
local TP = T.VSim.TP
local board = GetMaskBoard(bm)
if slot < 5 then
for _,v in pairs(C_Garrison.GetMissionDeploymentInfo(mid).enemies) do
local i = v.boardIndex
local fi = f[i]
local s1 = fi.autoCombatSpells and fi.autoCombatSpells[1]
local aa = T.KnownSpells[TP:GetAutoAttack(v.role, i, mid, s1 and s1.autoCombatSpellID)]
if aa and TP.GetTargets(i, aa.target, board)[1] == slot then
r = bit.bor(r, 2^i)
end
end
else
for i=slot < 5 and 5 or 0, slot < 5 and 12 or 4 do
if bm % 2^(i+1) >= 2^i then
local fi = f[i]
local v, s1 = fi.info, fi.autoCombatSpells and fi.autoCombatSpells[1]
local aa = T.KnownSpells[T.VSim.TP:GetAutoAttack(v.role, i, mid, s1 and s1.autoCombatSpellID)]
if aa and TP.GetTargets(i, aa.target, board)[1] == slot then
r = bit.bor(r, 2^i)
end
end
end
end
return r
end
local function Puck_OnEnter(self)
if self.name then
local mhp, hp, atk, role, aat
local s1 = self.autoCombatSpells and self.autoCombatSpells[1]
local mi = CovenantMissionFrame.MissionTab.MissionPage.missionInfo
local mid = mi.missionID
local fi, level
if self.boardIndex > 4 then
for _,v in pairs(C_Garrison.GetMissionDeploymentInfo(mid).enemies) do
if v.boardIndex == self.boardIndex then
mhp, hp, atk, role = v.maxHealth, v.health, v.attack, v.role
aat = T.VSim.TP:GetAutoAttack(role, self.boardIndex, mid, s1 and s1.autoCombatSpellID)
end
end
elseif self.info and self.info.autoCombatantStats then
fi = self.info
local acs = fi.autoCombatantStats
mhp, hp, atk, role = acs.maxHealth, acs.currentHealth, acs.attack, fi.role
aat = T.VSim.TP:GetAutoAttack(role, self.boardIndex, mid, s1 and s1.autoCombatSpellID)
level = "|cffa8a8a8" .. UNIT_LEVEL_TEMPLATE:format(fi.level)
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:ClearLines()
GameTooltip:AddDoubleLine(self.name, level or "")
local bm = GenBoardMask()
local atype = FormatTargetBlips(GetTargetMask(T.KnownSpells[aat], self.boardIndex, bm), bm, " ")
if atype == "" then
atype = aat == 11 and " (melee)" or aat == 15 and " (ranged)" or ""
end
GameTooltip:AddLine("|A:ui_adv_health:20:20|a" .. (hp and BreakUpLargeNumbers(hp) or "???") .. (mhp and mhp ~= hp and ("|cffa0a0a0/|r" .. BreakUpLargeNumbers(mhp)) or "").. " |A:ui_adv_atk:20:20|a" .. (atk and BreakUpLargeNumbers(atk) or "???") .. "|cffa8a8a8" .. atype, 1,1,1)
if fi and fi.isMaxLevel == false and fi.xp and fi.levelXP and fi.level and not fi.isAutoTroop then
GameTooltip:AddLine(GARRISON_FOLLOWER_TOOLTIP_XP:format(fi.levelXP-fi.xp), 0.7, 0.7, 0.7)
end
for i=1,#self.autoCombatSpells do
local s = self.autoCombatSpells[i]
GameTooltip:AddLine(" ")
local si = T.KnownSpells[s.autoCombatSpellID]
local pfx = si and "" or "|TInterface/EncounterJournal/UI-EJ-WarningTextIcon:0|t "
GameTooltip:AddDoubleLine(pfx .. "|T" .. s.icon .. ":0:0:0:0:64:64:4:60:4:60|t " .. s.name, "|cffa8a8a8[CD: " .. s.cooldown .. "T]|r")
local dc, guideLine = 0.95
if si and si.type == "nop" then
dc, guideLine = 0.60, "It does nothing."
elseif si then
local tm = GetTargetMask(si, self.boardIndex, bm)
if tm > 0 then
local b = FormatTargetBlips(tm, bm)
if b and b ~= "" then
guideLine = "Targets: " .. b
end
end
if si and (si.healATK or si.damageATK or si.healPerc or si.damagePerc) then
local p = FormatSpellPulse(si)
if p then
guideLine = "Pulse: " .. p .. (guideLine and " " .. guideLine or "")
end
end
end
if overDesc[s.autoCombatSpellID] then
dc, guideLine = 0.60, overDesc[s.autoCombatSpellID] .. (guideLine and "|n" .. guideLine or "")
end
GameTooltip:AddLine(s.description, dc, dc, dc, 1)
if guideLine then
GameTooltip:AddLine(guideLine, 0.45, 1, 0, 1)
end
end
local aa = GetIncomingAAMask(self.boardIndex, bm)
if aa and aa > 0 then
local nc = NORMAL_FONT_COLOR
GameTooltip:AddLine(" ")
GameTooltip:AddLine("Incoming attacks: " .. FormatTargetBlips(aa, bm, nil, "240:60:0"), nc.r, nc.g, nc.b)
end
GameTooltip:Show()
self:GetBoard():ShowHealthValues()
elseif GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
end
local function Puck_OnLeave(self)
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
self:GetBoard():HideHealthValues()
end
local function EnvironmentEffect_OnEnter(self)
local info = self.info
local si = T.KnownSpells[info and info.autoCombatSpellID]
local pfx = si and "" or "|TInterface/EncounterJournal/UI-EJ-WarningTextIcon:0|t "
GameTooltip:SetOwner(self, "ANCHOR_NONE")
GameTooltip:SetPoint("TOPLEFT", self, "BOTTOMLEFT", -8, 0)
GameTooltip:SetText(pfx .. "|T" .. info.icon .. ":0:0:0:0:64:64:4:60:4:60|t " .. info.name .. " |cffffffff[CD: " .. info.cooldown .. "T]|r")
local dc, guideLine = 0.95
if si and si.type == "nop" then
dc, guideLine = 0.60, "It does nothing."
end
GameTooltip:AddLine(info.description, dc, dc, dc, 1)
if guideLine then
GameTooltip:AddLine(guideLine, 0.45, 1, 0, 1)
end
GameTooltip:Show()
end
local function EnvironmentEffect_OnLeave(self)
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
end
local function EnvironmentEffect_OnNameUpdate(self_name)
local ee = self_name:GetParent()
ee:SetHitRectInsets(0, min(-100, -self_name:GetStringWidth()), 0, 0)
end
local GetSim do
local simArch, simMS, simTag
function EV:GARRISON_MISSION_NPC_CLOSED()
simArch, simMS, simTag = nil
end
function GetSim()
local f = CovenantMissionFrame.MissionTab.MissionPage.Board.framesByBoardIndex
local mi = CovenantMissionFrame.MissionTab.MissionPage.missionInfo
local mid = mi.missionID
local team = {}
local tag = mid .. ":" .. (mi.missionScalar or 0)
for i=0,4 do
local ii = f[i].info
if ii then
local stats = ii.autoCombatantStats
team[#team+1] = {
boardIndex=i, role=ii.role, stats=stats, spells=f[i].autoCombatSpells
}
tag = tag .. ":" .. i .. ":" .. stats.currentHealth .. ":" .. stats.attack .. ":" .. ii.followerID
end
end
if tag ~= simTag then
local eei = C_Garrison.GetAutoMissionEnvironmentEffect(mid)
local mdi = C_Garrison.GetMissionDeploymentInfo(mid)
local espell = eei and eei.autoCombatSpellInfo
simTag, simArch, simMS = tag, T.VSim:New(team, mdi.enemies, espell, mid, mi.missionScalar, nil, 100)
end
return simArch, simMS
end
end
local function Predictor_OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
GameTooltip:SetText(ITEM_QUALITY_COLORS[5].hex .. "Cursed Adventurer's Guide")
GameTooltip:AddLine(ITEM_UNIQUE, 1,1,1, 1)
GameTooltip:AddLine("Use: Read the guide, determining the fate of your adventuring party.", 0, 1, 0, 1)
GameTooltip:AddLine('"Do not believe its lies! Balance druids are not emergency rations."', 1, 0.835, 0.09, 1)
GameTooltip:Show()
end
local function Predictor_OnClick(self)
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
local sim, ms = GetSim()
sim:Run()
local incompleteModel = ms and next(ms) and true
local rngModel = (sim.pWin < 1 and sim.pWin > 0) or not sim.exhaustive
local hprefix = (incompleteModel and "|TInterface/EncounterJournal/UI-EJ-WarningTextIcon:0|t " or "")
if rngModel then
GameTooltip:SetText(hprefix .. "Curse of Uncertainty", 1, 0.20, 0)
else
GameTooltip:SetText(hprefix .. (sim.won and "Victorious" or "Defeated"), 1,1,1)
end
if incompleteModel then
GameTooltip:AddLine("Not all abilities have been taken into account.|n ", 0.9,0.25,0.15)
end
if rngModel then
if sim.exhaustive then
GameTooltip:AddLine("The guide shows you a number of possible futures. In some, the adventure ends in truimph; in others, a particularly horrible failure.", 1,1,1,1)
else
GameTooltip:AddLine("The guide shows you many possible futures. Too many. It is impossible to draw conclusions about your party's chances from this.", 1,1,1,1)
if (sim.pWin == 0) then
GameTooltip:AddLine("For what it is worth, everything you remember ended badly.", 1,1,1,1)
elseif sim.pLose == 0 then
GameTooltip:AddLine("For what it is worth, everything you remember ended well.", 1,1,1,1)
end
end
if not incompleteModel then
GameTooltip:AddLine('"With your luck, there is only one way this ends."', 1, 0.835, 0.09, 1)
end
else
if sim.mass == 1 then
if sim.won then
local c = NORMAL_FONT_COLOR
GameTooltip:AddLine("Turns taken: |cffffffff" .. sim.turn, c.r, c.g, c.b)
local troopCount, troopHealth, troopHealthMax = 0, 0, 0
for i=0,4 do
local e, f = sim.board[i], CovenantMissionFrame.MissionTab.MissionPage.Board.framesByBoardIndex[i]
if f and f.name and f:IsShown() and f.info and e then
if f.info.isAutoTroop then
troopCount, troopHealth, troopHealthMax = troopCount + 1, troopHealth + (e.curHP or 0), troopHealthMax + (e.maxHP or 0)
else
GameTooltip:AddDoubleLine(f.name, e.curHP .. "/" .. e.maxHP, 1,1,1, e.curHP > 0 and 0 or 1, e.curHP > 0 and 1 or 0.3, 0.15)
end
end
end
if troopCount > 0 then
GameTooltip:AddDoubleLine("Troops", troopHealth .. "/" .. troopHealthMax, 1,1,1, troopHealth > 0 and 0 or 1, troopHealth > 0 and 1 or 0.3, 0.15)
end
else
local thp, mhp = 0, 0
for i=5,12 do
local e = sim.board[i]
if e then
mhp, thp = mhp + e.maxHP, thp + e.curHP
end
end
local c = NORMAL_FONT_COLOR
GameTooltip:AddLine("Turns survived: |cffffffff" .. sim.turn, c.r, c.g, c.b)
GameTooltip:AddLine("Remaining enemy health: |cffffffff" .. thp .. " (" .. math.ceil(thp/mhp*100) .. "%)", c.r, c.g, c.b)
end
elseif sim.exhaustive and (sim.pWin == 1 or sim.pLoss == 0) and sim.forks then
local lo, hi, inf = {}, {}, math.huge
local c = NORMAL_FONT_COLOR
for i=0,#sim.forks do
local simf = sim.forks[i]
for k,v in pairs(simf.board) do
lo[k], hi[k] = math.min(lo[k] or inf, v.curHP), math.max(hi[k] or -inf, v.curHP)
end
lo[-2], hi[-2] = math.min(simf.turn, lo[-2] or inf), math.max(simf.turn, hi[-2] or -inf)
end
local turns = lo[-2] ~= hi[-2] and lo[-2] .. " - " .. hi[-2] or lo[-2]
if turns then
GameTooltip:AddLine((sim.won and "Turns taken: |cffffffff" or "Turns survived: |cffffffff") .. turns, c.r, c.g, c.b)
end
if sim.won then
local troopCount, troopHealth1, troopHealth2, troopHealthMax = 0, 0, 0, 0
for i=0,4 do
local hmin, hmax = lo[i], hi[i]
local f = CovenantMissionFrame.MissionTab.MissionPage.Board.framesByBoardIndex[i]
local e = sim.board[i]
if f and f.name and f:IsShown() and f.info and hmin and e then
if f.info.isAutoTroop then
troopCount, troopHealth1, troopHealth2, troopHealthMax = troopCount + 1, troopHealth1 + hmin, troopHealth2 + hmax, troopHealthMax + (e.maxHP or 0)
else
local chp = hmin == hmax and hmin or ((hmin == 0 and "|cffff40200|r" or hmin) .. " |cffffffff-|r " .. hmax)
GameTooltip:AddDoubleLine(f.name, chp .. "/" .. e.maxHP, 1,1,1, hmax > 0 and 0 or 1, hmax > 0 and 1 or 0.3, 0.15)
end
end
end
if troopCount > 0 then
local hmin, hmax = troopHealth1, troopHealth2
local chp = hmin == hmax and hmin or ((hmin == 0 and "|cffff40200|r" or hmin) .. " |cffffffff-|r " .. hmax)
GameTooltip:AddDoubleLine("Troops", chp .. "/" .. troopHealthMax, 1,1,1, troopHealth2 > 0 and 0 or 1, troopHealth2 > 0 and 1 or 0.3, 0.15)
end
else
local hmin, hmax, maxHP = 0, 0, 0
for i=5,12 do
local e = sim.board[i]
maxHP = maxHP + (e.maxHP or 0)
hmin, hmax = hmin + (lo[i] or 0), hmax + (hi[i] or 0)
end
local chp = hmin == hmax and hmin or (hmin .. " - " .. hmax)
hmin, hmax = math.ceil(hmin/maxHP*100), math.ceil(hmax/maxHP*100)
local cr = hmin == hmax and hmin or (hmin .. "% - " .. hmax)
GameTooltip:AddLine("Remaining enemy health: |cffffffff" .. chp .. " (" .. cr .. "%)", c.r, c.g, c.b)
end
end
if not incompleteModel then
GameTooltip:AddLine('"Was there ever any doubt?"', 1, 0.835, 0.09, 1)
end
end
GameTooltip:Show()
end
local function Predictor_OnLeave(self)
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
end
local function MissionGroup_OnUpdate()
local o = GameTooltip:IsVisible() and GameTooltip:GetOwner() or GetMouseFocus()
if o and not o:IsForbidden() and o:GetScript("OnEnter") and o:GetParent():GetParent() == CovenantMissionFrame.MissionTab.MissionPage.Board then
o:GetScript("OnEnter")(o)
end
end
local function MissionRewards_OnShow(self)
local mi = CovenantMissionFrame.MissionTab.MissionPage.missionInfo
local d = mi and mi.duration
self.Rewards:SetRewards(mi and mi.xp, mi and mi.rewards)
self.Duration:SetText(d and "Duration: |cffffffff" .. d or "")
end
function EV:I_ADVENTURES_UI_LOADED()
local MP = CovenantMissionFrame.MissionTab.MissionPage
for i=0,12 do
local f = MP.Board.framesByBoardIndex[i]
f:SetScript("OnEnter", Puck_OnEnter)
f:SetScript("OnLeave", Puck_OnLeave)
for i=1,2 do
f.AbilityButtons[i]:EnableMouse(false)
f.AbilityButtons[i]:SetMouseMotionEnabled(false)
end
end
MP.CloseButton:SetScript("OnKeyDown", function(self, key)
self:SetPropagateKeyboardInput(key ~= "ESCAPE")
if key == "ESCAPE" then
self:Click()
end
end)
local mb = CreateFrame("Button", nil, MP.Board)
mb:SetSize(64,64)
mb:SetPoint("BOTTOMLEFT", 24, 8)
mb:SetNormalTexture("Interface/Icons/INV_Misc_Book_01")
mb:SetHighlightTexture("Interface/Buttons/ButtonHilight-Square")
mb:GetHighlightTexture():SetBlendMode("ADD")
mb:SetPushedTexture("Interface/Buttons/UI-Quickslot-Depress")
mb:GetPushedTexture():SetDrawLayer("OVERLAY")
local t = mb:CreateTexture(nil, "ARTWORK")
t:SetAllPoints()
t:SetTexture("Interface/Icons/INV_Misc_Book_01")
mb:SetScript("OnEnter", Predictor_OnEnter)
mb:SetScript("OnLeave", Predictor_OnLeave)
mb:SetScript("OnClick", Predictor_OnClick)
MP.Stage.EnvironmentEffectFrame:SetScript("OnEnter", EnvironmentEffect_OnEnter)
MP.Stage.EnvironmentEffectFrame:SetScript("OnLeave", EnvironmentEffect_OnLeave)
hooksecurefunc(MP.Stage.EnvironmentEffectFrame.Name, "SetText", EnvironmentEffect_OnNameUpdate)
hooksecurefunc(CovenantMissionFrame, "AssignFollowerToMission", MissionGroup_OnUpdate)
hooksecurefunc(CovenantMissionFrame, "RemoveFollowerFromMission", MissionGroup_OnUpdate)
local s = CovenantMissionFrame.MissionTab.MissionPage.Stage
s.Title:SetPoint("LEFT", s.Header, "LEFT", 100, 9)
local ir = T.CreateObject("InlineRewardBlock", s)
ir:SetPoint("LEFT", s.Header, "LEFT", 100, -16)
ir:SetScript("OnShow", MissionRewards_OnShow)
ir.Duration = ir:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ir.Duration:SetPoint("LEFT", ir, "RIGHT", 4, 0)
hooksecurefunc(CovenantMissionFrame, "SetTitle", function()
MissionRewards_OnShow(ir)
end)
return false
end