Skip to content

Commit 6d023b2

Browse files
authored
Decode assault log item data (#2434)
1 parent 4ab55fc commit 6d023b2

File tree

1 file changed

+90
-1
lines changed

1 file changed

+90
-1
lines changed

addons/libs/extdata.lua

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,90 @@ function decode.Reflector(str)
19701970
return rettab
19711971
end
19721972

1973+
function decode.AssaultLog(itemid, str)
1974+
local missions = T{
1975+
[2491] = T{
1976+
-- "Leujaoam Log"
1977+
[1] = "Leujaom Cleansing",
1978+
[2] = "Orichalcum Survey",
1979+
[3] = "Escort Professor Chanoix",
1980+
[4] = "Shanarha Grass Conservation",
1981+
[5] = "Counting Sheep",
1982+
[6] = "Supplies Recovery",
1983+
[7] = "Azure Experiments",
1984+
[8] = "Imperial Code",
1985+
[9] = "Red Versus Blue",
1986+
[10] = "Bloody Rhondo"
1987+
1988+
},
1989+
[2492] = T{
1990+
-- "Mamool Ja Journal"
1991+
[1] = "Imperial Agent Rescue",
1992+
[2] = "Preemptive Strike",
1993+
[3] = "Sagelord Elimination",
1994+
[4] = "Breaking Morale",
1995+
[5] = "The Double Agent",
1996+
[6] = "Imperial Treasure Retrieval",
1997+
[7] = "Blitzkrieg",
1998+
[8] = "Marids in the Mist",
1999+
[9] = "Azure Ailments",
2000+
[10] = "The Susanoo Shuffle"
2001+
},
2002+
2003+
[2493] = T{
2004+
-- "Lebros Chronicle"
2005+
[1] = "Excavation Duty",
2006+
[2] = "Lebros Supplies",
2007+
[3] = "Troll Fugitives",
2008+
[4] = "Evade and Escape",
2009+
[5] = "Siegemaster Assassination",
2010+
[6] = "Apkallu Breeding",
2011+
[7] = "Wamoura Farm Raid",
2012+
[8] = "Egg Conservation",
2013+
[9] = "Operation: Black Pearl",
2014+
[10] = "Better than One",
2015+
},
2016+
[2494] = T{
2017+
-- "Periqia Diary"
2018+
[1] = "Seagull Grounded",
2019+
[2] = "Requiem",
2020+
[3] = "Saving Private Ryaaf",
2021+
[4] = "Shooting Down the Baron",
2022+
[5] = "Building Bridges",
2023+
[6] = "Stop the Bloodshed",
2024+
[7] = "Defuse the Threat",
2025+
[8] = "Operation: Snake Eyes",
2026+
[9] = "Wake the Puppet",
2027+
[10] = "The Price Is Right",
2028+
},
2029+
[2495] = T{
2030+
-- "Ilrusi Ledger"
2031+
[1] = "Golden Salvage",
2032+
[2] = "Lamia No.13",
2033+
[3] = "Extermination",
2034+
[4] = "Demolition Duty",
2035+
[5] = "Searat Salvation",
2036+
[6] = "Apkallu Seizure",
2037+
[7] = "Lost and Found",
2038+
[8] = "Deserter",
2039+
[9] = "Desperately Seeking Cephalopods",
2040+
[10] = "Bellerophon's Bliss",
2041+
},
2042+
}
2043+
2044+
local names = missions[itemid]
2045+
local flags = {str:unpack("<q10")}
2046+
local data = T{flags}:key_map(function(id) return names[id] end)
2047+
local rettab = {
2048+
type='Assault Log',
2049+
completed = S{data},
2050+
flags = flags,
2051+
}
2052+
return rettab
2053+
end
2054+
2055+
2056+
19732057
function decode.BonanzaMarble(str)
19742058
local event_list = {
19752059
[0x00] = 'CS Event Race',
@@ -2108,7 +2192,7 @@ typ_mapping = {
21082192
--[17] = decode.ChocoboTicket, -- Chocobo Ticket and Completion Certificate
21092193
[18] = decode.SoulPlate, -- Soul Plates
21102194
[19] = decode.Reflector, -- Soul Reflectors
2111-
--[20] = decode.SalvageLog, -- Salvage Logs for the Mythic quest
2195+
--[20] = decode.AssaultLog, -- Assault Logs for the Mythic quest
21122196
[21] = decode.BonanzaMarble, -- Mog Bonanza Marbles
21132197
--[22] = decode.MazeTabulaM, -- MMM Maze Tabula M
21142198
--[23] = decode.MazeTabulaR, -- MMM Maze Tabula R
@@ -2125,6 +2209,11 @@ id_mapping = {
21252209
[0] = decode.EmptySlot,
21262210
[4237] = decode.Hourglass,
21272211
[5414] = decode.Lamp,
2212+
[2491] = decode.AssaultLog+{2491},
2213+
[2492] = decode.AssaultLog+{2492},
2214+
[2493] = decode.AssaultLog+{2493},
2215+
[2494] = decode.AssaultLog+{2494},
2216+
[2495] = decode.AssaultLog+{2495},
21282217
}
21292218

21302219

0 commit comments

Comments
 (0)