mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
refactor(channelserver): replace magic numbers with named protocol constants
Extract numeric literals into named constants across quest handling, save data parsing, rengoku skill layout, diva event timing, guild info, achievement trophies, RP accrual rates, and semaphore IDs. Adds constants_quest.go for quest-related constants shared across functions. Pure rename/extract with zero behavior change.
This commit is contained in:
@@ -500,12 +500,12 @@ func handleMsgMhfTransitMessage(s *Session, p mhfpacket.MHFPacket) {
|
||||
case 1, 2, 3: // usersearchidx, usersearchname, lobbysearchname
|
||||
// Snapshot matching sessions under lock, then build response outside locks.
|
||||
type sessionResult struct {
|
||||
charID uint32
|
||||
name []byte
|
||||
stageID []byte
|
||||
ip net.IP
|
||||
port uint16
|
||||
userBin3 []byte
|
||||
charID uint32
|
||||
name []byte
|
||||
stageID []byte
|
||||
ip net.IP
|
||||
port uint16
|
||||
userBin3 []byte
|
||||
}
|
||||
var results []sessionResult
|
||||
|
||||
@@ -656,15 +656,15 @@ func handleMsgMhfTransitMessage(s *Session, p mhfpacket.MHFPacket) {
|
||||
}
|
||||
// Snapshot matching stages under lock, then build response outside locks.
|
||||
type stageResult struct {
|
||||
ip net.IP
|
||||
port uint16
|
||||
clientCount int
|
||||
reserved int
|
||||
maxPlayers uint16
|
||||
stageID string
|
||||
stageData []int16
|
||||
rawBinData0 []byte
|
||||
rawBinData1 []byte
|
||||
ip net.IP
|
||||
port uint16
|
||||
clientCount int
|
||||
reserved int
|
||||
maxPlayers uint16
|
||||
stageID string
|
||||
stageData []int16
|
||||
rawBinData0 []byte
|
||||
rawBinData1 []byte
|
||||
}
|
||||
var stageResults []stageResult
|
||||
|
||||
|
||||
Reference in New Issue
Block a user