kozukata-toa/src/servers/aimedb/types/campaign.ts

48 lines
1.3 KiB
TypeScript

import Struct from "typed-struct";
/**
* Retrieve information regarding currently active campaigns.
*/
export const OldCampaignRequestStruct = new Struct("OldCampaignRequest")
.UInt32LE("campaignId")
.UInt8Array("padding", 12)
.compile();
export const OldCampaignResponseStruct = new Struct("OldCampaignResponse")
.Int32LE("info0")
.Int32LE("info1")
.Int32LE("info2")
.Int32LE("info3")
.compile();
const CampaignStruct = new Struct("Campaign")
.UInt32LE("campaignId")
.String("campaignName", 128)
.UInt32LE("announceDate")
.UInt32LE("startDate")
.UInt32LE("endDate")
.UInt32LE("distributionStartDate")
.UInt32LE("distributionEndDate")
.UInt8Array("padding", 8)
.compile();
export const CampaignResponseStruct = new Struct("CampaignResponse")
.StructArray("campaigns", CampaignStruct, 3)
.compile();
export const CampaignClearInfoRequestStruct = new Struct("CampaignClearInfoRequest")
.UInt32LE("aimeId")
.UInt8Array("padding", 12)
.compile();
export const CampaignClearInfoStruct = new Struct("CampaignClearInfo")
.UInt32LE("campaignId")
.UInt32LE("entryFlag")
.UInt32LE("clearFlag")
.UInt8Array("padding", 4)
.compile();
export const CampaignClearInfoResponseStruct = new Struct("CampaignClearInfoResponse")
.StructArray("clearInfos", CampaignClearInfoStruct, 3)
.compile();