mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 01:23:13 +01:00
refactor(channelserver): migrate inline queries to helpers and define named constants
Migrate 6 character data handlers to use the existing loadCharacterData and saveCharacterData helpers, eliminating duplicate inline SQL: - LoadFavoriteQuest, SaveFavoriteQuest, LoadDecoMyset, LoadMezfesData, LoadHunterNavi, GetEquipSkinHist Define named constants replacing magic numbers across handlers: - Achievement trophy tiers, broadcast/message types, diva phase durations, RP accrual rates, kill log layout, semaphore bases, quest stage/loading screen IDs Update anti-patterns doc with accurate line counts, evidence-based softlock analysis, and revised refactoring priorities.
This commit is contained in:
62
server/channelserver/constants_quest.go
Normal file
62
server/channelserver/constants_quest.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package channelserver
|
||||
|
||||
// Raviente quest type codes
|
||||
const (
|
||||
QuestTypeSpecialTool = uint8(9)
|
||||
QuestTypeRegularRaviente = uint8(16)
|
||||
QuestTypeViolentRaviente = uint8(22)
|
||||
QuestTypeBerserkRaviente = uint8(40)
|
||||
QuestTypeExtremeRaviente = uint8(50)
|
||||
QuestTypeSmallBerserkRavi = uint8(51)
|
||||
)
|
||||
|
||||
// Event quest binary frame offsets
|
||||
const (
|
||||
questFrameTimeFlagOffset = 25
|
||||
questFrameVariant3Offset = 175
|
||||
)
|
||||
|
||||
// Quest body lengths per game version
|
||||
const (
|
||||
questBodyLenS6 = 160
|
||||
questBodyLenF5 = 168
|
||||
questBodyLenG101 = 192
|
||||
questBodyLenZ1 = 224
|
||||
questBodyLenZZ = 320
|
||||
)
|
||||
|
||||
// BackportQuest constants
|
||||
const (
|
||||
questRewardTableBase = uint32(96)
|
||||
questStringPointerOff = 40
|
||||
questStringTablePadding = 32
|
||||
questStringCount = 8
|
||||
)
|
||||
|
||||
// BackportQuest fill lengths per version
|
||||
const (
|
||||
questBackportFillS6 = uint32(44)
|
||||
questBackportFillF5 = uint32(52)
|
||||
questBackportFillG101 = uint32(76)
|
||||
questBackportFillZZ = uint32(108)
|
||||
)
|
||||
|
||||
// Tune value count limits per game version
|
||||
const (
|
||||
tuneLimitG1 = 256
|
||||
tuneLimitG3 = 283
|
||||
tuneLimitGG = 315
|
||||
tuneLimitG61 = 332
|
||||
tuneLimitG7 = 339
|
||||
tuneLimitG81 = 396
|
||||
tuneLimitG91 = 694
|
||||
tuneLimitG101 = 704
|
||||
tuneLimitZ2 = 750
|
||||
tuneLimitZZ = 770
|
||||
)
|
||||
|
||||
// Event quest data size bounds
|
||||
const (
|
||||
questDataMaxLen = 896
|
||||
questDataMinLen = 352
|
||||
)
|
||||
Reference in New Issue
Block a user