Files
Erupe/cmd/protbot/protocol/opcodes.go
Houmgaor 61d85e749f feat(achievement): add rank-up notifications (#165)
RE'd putDisplayed_achievement from ZZ client DLL via Ghidra: the packet
sends opcode + 1 zero byte with no achievement ID, acting as a blanket
"I saw everything" signal.

Server changes:
- Track per-character last-displayed levels in new displayed_levels
  column (migration 0008)
- GetAchievement compares current vs displayed levels per entry
- DisplayedAchievement snapshots current levels to clear notifications
- Repo, service, mock, and 3 new service tests

Protbot changes:
- New --action achievement: fetches achievements, shows rank-up markers,
  sends DISPLAYED_ACHIEVEMENT, re-fetches to verify notifications clear
- Packet builders for GET/ADD/DISPLAYED_ACHIEVEMENT
2026-03-18 11:35:31 +01:00

27 lines
1.0 KiB
Go

// Package protocol implements MHF network protocol message building and parsing.
package protocol
// Packet opcodes (subset from Erupe's network/packetid.go iota).
const (
MSG_SYS_ACK uint16 = 0x0012
MSG_SYS_LOGIN uint16 = 0x0014
MSG_SYS_LOGOUT uint16 = 0x0015
MSG_SYS_PING uint16 = 0x0017
MSG_SYS_CAST_BINARY uint16 = 0x0018
MSG_SYS_TIME uint16 = 0x001A
MSG_SYS_CASTED_BINARY uint16 = 0x001B
MSG_SYS_ISSUE_LOGKEY uint16 = 0x001D
MSG_SYS_ENTER_STAGE uint16 = 0x0022
MSG_SYS_ENUMERATE_STAGE uint16 = 0x002F
MSG_SYS_INSERT_USER uint16 = 0x0050
MSG_SYS_DELETE_USER uint16 = 0x0051
MSG_SYS_UPDATE_RIGHT uint16 = 0x0058
MSG_SYS_RIGHTS_RELOAD uint16 = 0x005D
MSG_MHF_LOADDATA uint16 = 0x0061
MSG_MHF_ENUMERATE_QUEST uint16 = 0x009F
MSG_MHF_GET_ACHIEVEMENT uint16 = 0x00D4
MSG_MHF_ADD_ACHIEVEMENT uint16 = 0x00D6
MSG_MHF_DISPLAYED_ACHIEVEMENT uint16 = 0x00D8
MSG_MHF_GET_WEEKLY_SCHED uint16 = 0x00E1
)