21 lines
816 B
Go
21 lines
816 B
Go
package parser
|
|
|
|
import "eq2emu/internal/common"
|
|
|
|
// PacketDef defines a complete packet structure with versioned field ordering
|
|
type PacketDef struct {
|
|
Fields map[string]FieldDesc // Field definitions by name
|
|
Orders map[uint32][]string // Field order by version number
|
|
}
|
|
|
|
// FieldDesc describes a single packet field
|
|
type FieldDesc struct {
|
|
Type common.EQ2DataType // Primary data type
|
|
Condition string // Conditional parsing expression
|
|
Length int // Array length or size for fixed-size fields
|
|
SubDef *PacketDef // Nested packet definition for arrays
|
|
Type2 common.EQ2DataType // Alternative data type for conditional parsing
|
|
Type2Cond string // Condition for using Type2
|
|
Oversized int // Threshold for oversized field handling
|
|
}
|