mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-25 09:03:10 +01:00
feat(campaign): implement Event Tent campaign system
Adds the full campaign/event-tent feature: Packet layer: - MsgMhfApplyCampaign: Unk0/Unk1/Unk2 → CampaignID/Code (null-terminated 16-byte string) - MsgMhfAcquireItem: Unk0/Length/Unk1 → RewardIDs []uint32 - MsgMhfEnumerateItem: remove Unk0/Unk1 (RE'd: zeroed + always-2, ignored) - MsgMhfStateCampaign: Unk1 → NullPadding (RE'd: always zero) - MsgMhfTransferItem: Unk0/Unk1/Unk2 → QuestID/ItemType/Quantity (RE'd) Handler layer (handlers_campaign.go): - handleMsgMhfEnumerateCampaign: reads campaigns, categories, links from DB; prefix moved into pascal string slot 3 of each event entry (RE confirmed 3-section response format — removes spurious intermediate section) - handleMsgMhfStateCampaign: returns stamp count and redeemable flag - handleMsgMhfApplyCampaign: validates and records code redemption - handleMsgMhfEnumerateItem: lists rewards gated by stamp count - handleMsgMhfAcquireItem: marks rewards as claimed - handleMsgMhfTransferItem: records campaign quest completion (item_type=9) Quest gating (handlers_quest.go): - makeEventQuest: for QuestTypeSpecialTool, check campaign stamp count and deadline before allowing the quest (WriteBool true/false) Database: - 0010_campaign.sql: 8-table schema (campaigns, categories, links, rewards, claimed, state, codes, quest) - CampaignDemo.sql: community-researched live game campaign data
This commit is contained in:
@@ -11,8 +11,6 @@ import (
|
||||
// MsgMhfEnumerateItem represents the MSG_MHF_ENUMERATE_ITEM
|
||||
type MsgMhfEnumerateItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
CampaignID uint32
|
||||
}
|
||||
|
||||
@@ -24,8 +22,8 @@ func (m *MsgMhfEnumerateItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Always 2
|
||||
m.CampaignID = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user