noxnet

package
v0.0.0-...-63dc931 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MSG_SERVER_DISCOVER = Op(12) // 0x0C
	MSG_SERVER_INFO     = Op(13) // 0x0D
	MSG_SERVER_JOIN     = Op(14) // 0x0E
	MSG_SERVER_ERROR    = Op(19) // 0x13
	MSG_SERVER_JOIN_OK  = Op(20) // 0x14
	MSG_ACCEPTED        = Op(31) // 0x1F

	MSG_XXX_STOP                       = Op(33)  // 0x21
	MSG_PING                           = Op(36)  // 0x24
	MSG_TIMESTAMP                      = Op(39)  // 0x27
	MSG_FULL_TIMESTAMP                 = Op(40)  // 0x28
	MSG_NEED_TIMESTAMP                 = Op(41)  // 0x29
	MSG_SIMULATED_TIMESTAMP            = Op(42)  // 0x2A
	MSG_USE_MAP                        = Op(43)  // 0x2B
	MSG_JOIN_DATA                      = Op(44)  // 0x2C
	MSG_NEW_PLAYER                     = Op(45)  // 0x2D
	MSG_PLAYER_QUIT                    = Op(46)  // 0x2E
	MSG_SIMPLE_OBJ                     = Op(47)  // 0x2F
	MSG_COMPLEX_OBJ                    = Op(48)  // 0x30
	MSG_DESTROY_OBJECT                 = Op(49)  // 0x31
	MSG_OBJECT_OUT_OF_SIGHT            = Op(50)  // 0x32
	MSG_OBJECT_IN_SHADOWS              = Op(51)  // 0x33
	MSG_OBJECT_FRIEND_ADD              = Op(52)  // 0x34
	MSG_OBJECT_FRIEND_REMOVE           = Op(53)  // 0x35
	MSG_RESET_FRIENDS                  = Op(54)  // 0x36
	MSG_ENABLE_OBJECT                  = Op(55)  // 0x37
	MSG_DISABLE_OBJECT                 = Op(56)  // 0x38
	MSG_DRAW_FRAME                     = Op(57)  // 0x39
	MSG_DESTROY_WALL                   = Op(58)  // 0x3A
	MSG_OPEN_WALL                      = Op(59)  // 0x3B
	MSG_CLOSE_WALL                     = Op(60)  // 0x3C
	MSG_CHANGE_OR_ADD_WALL_MAGIC       = Op(61)  // 0x3D
	MSG_REMOVE_WALL_MAGIC              = Op(62)  // 0x3E
	MSG_PLAYER_INPUT                   = Op(63)  // 0x3F
	MSG_PLAYER_SET_WAYPOINT            = Op(64)  // 0x40
	MSG_REPORT_HEALTH                  = Op(65)  // 0x41
	MSG_REPORT_HEALTH_DELTA            = Op(66)  // 0x42
	MSG_REPORT_PLAYER_HEALTH           = Op(67)  // 0x43
	MSG_REPORT_ITEM_HEALTH             = Op(68)  // 0x44
	MSG_REPORT_MANA                    = Op(69)  // 0x45
	MSG_REPORT_POISON                  = Op(70)  // 0x46
	MSG_REPORT_STAMINA                 = Op(71)  // 0x47
	MSG_REPORT_STATS                   = Op(72)  // 0x48
	MSG_REPORT_ARMOR_VALUE             = Op(73)  // 0x49
	MSG_REPORT_GOLD                    = Op(74)  // 0x4A
	MSG_REPORT_PICKUP                  = Op(75)  // 0x4B
	MSG_REPORT_MODIFIABLE_PICKUP       = Op(76)  // 0x4C
	MSG_REPORT_DROP                    = Op(77)  // 0x4D
	MSG_REPORT_LESSON                  = Op(78)  // 0x4E
	MSG_REPORT_MUNDANE_ARMOR_EQUIP     = Op(79)  // 0x4F
	MSG_REPORT_MUNDANE_WEAPON_EQUIP    = Op(80)  // 0x50
	MSG_REPORT_MODIFIABLE_WEAPON_EQUIP = Op(81)  // 0x51
	MSG_REPORT_MODIFIABLE_ARMOR_EQUIP  = Op(82)  // 0x52
	MSG_REPORT_ARMOR_DEQUIP            = Op(83)  // 0x53
	MSG_REPORT_WEAPON_DEQUIP           = Op(84)  // 0x54
	MSG_REPORT_TREASURE_COUNT          = Op(85)  // 0x55
	MSG_REPORT_FLAG_BALL_WINNER        = Op(86)  // 0x56
	MSG_REPORT_FLAG_WINNER             = Op(87)  // 0x57
	MSG_REPORT_DEATHMATCH_WINNER       = Op(88)  // 0x58
	MSG_REPORT_DEATHMATCH_TEAM_WINNER  = Op(89)  // 0x59
	MSG_REPORT_ENCHANTMENT             = Op(90)  // 0x5A
	MSG_REPORT_ITEM_ENCHANTMENT        = Op(91)  // 0x5B
	MSG_REPORT_LIGHT_COLOR             = Op(92)  // 0x5C
	MSG_REPORT_LIGHT_INTENSITY         = Op(93)  // 0x5D
	MSG_REPORT_Z_PLUS                  = Op(94)  // 0x5E
	MSG_REPORT_Z_MINUS                 = Op(95)  // 0x5F
	MSG_REPORT_EQUIP                   = Op(96)  // 0x60
	MSG_REPORT_DEQUIP                  = Op(97)  // 0x61
	MSG_REPORT_ACQUIRE_SPELL           = Op(98)  // 0x62
	MSG_REPORT_TARGET                  = Op(99)  // 0x63
	MSG_REPORT_CHARGES                 = Op(100) // 0x64
	MSG_REPORT_X_STATUS                = Op(101) // 0x65
	MSG_REPORT_PLAYER_STATUS           = Op(102) // 0x66
	MSG_REPORT_MODIFIER                = Op(103) // 0x67
	MSG_REPORT_STAT_MODIFIER           = Op(104) // 0x68
	MSG_REPORT_NPC                     = Op(105) // 0x69
	MSG_REPORT_CLIENT_STATUS           = Op(106) // 0x6A
	MSG_REPORT_ANIMATION_FRAME         = Op(107) // 0x6B
	MSG_REPORT_ACQUIRE_CREATURE        = Op(108) // 0x6C
	MSG_REPORT_LOSE_CREATURE           = Op(109) // 0x6D
	MSG_REPORT_EXPERIENCE              = Op(110) // 0x6E
	MSG_REPORT_SPELL_AWARD             = Op(111) // 0x6F
	MSG_REPORT_SPELL_START             = Op(112) // 0x70
	MSG_REPORT_INVENTORY_LOADED        = Op(113) // 0x71
	MSG_TRY_DROP                       = Op(114) // 0x72
	MSG_TRY_GET                        = Op(115) // 0x73
	MSG_TRY_USE                        = Op(116) // 0x74
	MSG_TRY_EQUIP                      = Op(117) // 0x75
	MSG_TRY_DEQUIP                     = Op(118) // 0x76
	MSG_TRY_TARGET                     = Op(119) // 0x77
	MSG_TRY_CREATURE_COMMAND           = Op(120) // 0x78
	MSG_TRY_SPELL                      = Op(121) // 0x79
	MSG_TRY_ABILITY                    = Op(122) // 0x7A
	MSG_TRY_COLLIDE                    = Op(123) // 0x7B
	MSG_FX_PARTICLEFX                  = Op(124) // 0x7C
	MSG_FX_PLASMA                      = Op(125) // 0x7D
	MSG_FX_SUMMON                      = Op(126) // 0x7E
	MSG_FX_SUMMON_CANCEL               = Op(127) // 0x7F
	MSG_FX_SHIELD                      = Op(128) // 0x80
	MSG_FX_BLUE_SPARKS                 = Op(129) // 0x81
	MSG_FX_YELLOW_SPARKS               = Op(130) // 0x82
	MSG_FX_CYAN_SPARKS                 = Op(131) // 0x83
	MSG_FX_VIOLET_SPARKS               = Op(132) // 0x84
	MSG_FX_EXPLOSION                   = Op(133) // 0x85
	MSG_FX_LESSER_EXPLOSION            = Op(134) // 0x86
	MSG_FX_COUNTERSPELL_EXPLOSION      = Op(135) // 0x87
	MSG_FX_THIN_EXPLOSION              = Op(136) // 0x88
	MSG_FX_TELEPORT                    = Op(137) // 0x89
	MSG_FX_SMOKE_BLAST                 = Op(138) // 0x8A
	MSG_FX_DAMAGE_POOF                 = Op(139) // 0x8B
	MSG_FX_LIGHTNING                   = Op(140) // 0x8C
	MSG_FX_ENERGY_BOLT                 = Op(141) // 0x8D
	MSG_FX_CHAIN_LIGHTNING_BOLT        = Op(142) // 0x8E
	MSG_FX_DRAIN_MANA                  = Op(143) // 0x8F
	MSG_FX_CHARM                       = Op(144) // 0x90
	MSG_FX_GREATER_HEAL                = Op(145) // 0x91
	MSG_FX_MAGIC                       = Op(146) // 0x92
	MSG_FX_SPARK_EXPLOSION             = Op(147) // 0x93
	MSG_FX_DEATH_RAY                   = Op(148) // 0x94
	MSG_FX_SENTRY_RAY                  = Op(149) // 0x95
	MSG_FX_RICOCHET                    = Op(150) // 0x96
	MSG_FX_JIGGLE                      = Op(151) // 0x97
	MSG_FX_GREEN_BOLT                  = Op(152) // 0x98
	MSG_FX_GREEN_EXPLOSION             = Op(153) // 0x99
	MSG_FX_WHITE_FLASH                 = Op(154) // 0x9A
	MSG_FX_GENERATING_MAP              = Op(155) // 0x9B
	MSG_FX_ASSEMBLING_MAP              = Op(156) // 0x9C
	MSG_FX_POPULATING_MAP              = Op(157) // 0x9D
	MSG_FX_DURATION_SPELL              = Op(158) // 0x9E
	MSG_FX_DELTAZ_SPELL_START          = Op(159) // 0x9F
	MSG_FX_TURN_UNDEAD                 = Op(160) // 0xA0
	MSG_FX_ARROW_TRAP                  = Op(161) // 0xA1
	MSG_FX_VAMPIRISM                   = Op(162) // 0xA2
	MSG_FX_MANA_BOMB_CANCEL            = Op(163) // 0xA3
	MSG_UPDATE_STREAM                  = Op(164) // 0xA4
	MSG_NEW_ALIAS                      = Op(165) // 0xA5
	MSG_AUDIO_EVENT                    = Op(166) // 0xA6
	MSG_AUDIO_PLAYER_EVENT             = Op(167) // 0xA7
	MSG_TEXT_MESSAGE                   = Op(168) // 0xA8
	MSG_INFORM                         = Op(169) // 0xA9
	MSG_IMPORTANT                      = Op(170) // 0xAA
	MSG_IMPORTANT_ACK                  = Op(171) // 0xAB
	MSG_MOUSE                          = Op(172) // 0xAC
	MSG_INCOMING_CLIENT                = Op(173) // 0xAD
	MSG_OUTGOING_CLIENT                = Op(174) // 0xAE
	MSG_GAME_SETTINGS                  = Op(175) // 0xAF
	MSG_GAME_SETTINGS_2                = Op(176) // 0xB0
	MSG_UPDATE_GUI_GAME_SETTINGS       = Op(177) // 0xB1
	MSG_DOOR_ANGLE                     = Op(178) // 0xB2
	MSG_OBELISK_CHARGE                 = Op(179) // 0xB3
	MSG_PENTAGRAM_ACTIVATE             = Op(180) // 0xB4
	MSG_CLIENT_PREDICT_LINEAR          = Op(181) // 0xB5
	MSG_REQUEST_MAP                    = Op(182) // 0xB6
	MSG_CANCEL_MAP                     = Op(183) // 0xB7
	MSG_MAP_SEND_START                 = Op(184) // 0xB8
	MSG_MAP_SEND_PACKET                = Op(185) // 0xB9
	MSG_MAP_SEND_ABORT                 = Op(186) // 0xBA
	MSG_SERVER_CMD                     = Op(187) // 0xBB
	MSG_SYSOP_PW                       = Op(188) // 0xBC
	MSG_SYSOP_RESULT                   = Op(189) // 0xBD
	MSG_KEEP_ALIVE                     = Op(190) // 0xBE
	MSG_RECEIVED_MAP                   = Op(191) // 0xBF
	MSG_CLIENT_READY                   = Op(192) // 0xC0
	MSG_REQUEST_SAVE_PLAYER            = Op(193) // 0xC1
	MSG_XFER_MSG                       = Op(194) // 0xC2
	MSG_PLAYER_OBJ                     = Op(195) // 0xC3
	MSG_TEAM_MSG                       = Op(196) // 0xC4
	MSG_KICK_NOTIFICATION              = Op(197) // 0xC5
	MSG_TIMEOUT_NOTIFICATION           = Op(198) // 0xC6
	MSG_SERVER_QUIT                    = Op(199) // 0xC7
	MSG_SERVER_QUIT_ACK                = Op(200) // 0xC8
	MSG_TRADE                          = Op(201) // 0xC9
	MSG_CHAT_KILL                      = Op(202) // 0xCA
	MSG_MESSAGES_KILL                  = Op(203) // 0xCB
	MSG_SEQ_IMPORTANT                  = Op(204) // 0xCC
	MSG_REPORT_ABILITY_AWARD           = Op(205) // 0xCD
	MSG_REPORT_ABILITY_STATE           = Op(206) // 0xCE
	MSG_REPORT_ACTIVE_ABILITIES        = Op(207) // 0xCF
	MSG_DIALOG                         = Op(208) // 0xD0
	MSG_REPORT_GUIDE_AWARD             = Op(209) // 0xD1
	MSG_INTERESTING_ID                 = Op(210) // 0xD2
	MSG_TIMER_STATUS                   = Op(211) // 0xD3
	MSG_REQUEST_TIMER_STATUS           = Op(212) // 0xD4
	MSG_JOURNAL_MSG                    = Op(213) // 0xD5
	MSG_CHAPTER_END                    = Op(214) // 0xD6
	MSG_REPORT_ALL_LATENCY             = Op(215) // 0xD7
	MSG_REPORT_FLAG_STATUS             = Op(216) // 0xD8
	MSG_REPORT_BALL_STATUS             = Op(217) // 0xD9
	MSG_REPORT_OBJECT_POISON           = Op(218) // 0xDA
	MSG_REPORT_MONITOR_CREATURE        = Op(219) // 0xDB
	MSG_REPORT_UNMONITOR_CREATURE      = Op(220) // 0xDC
	MSG_REPORT_TOTAL_HEALTH            = Op(221) // 0xDD
	MSG_REPORT_TOTAL_MANA              = Op(222) // 0xDE
	MSG_REPORT_SPELL_STAT              = Op(223) // 0xDF
	MSG_REPORT_SECONDARY_WEAPON        = Op(224) // 0xE0
	MSG_REPORT_LAST_QUIVER             = Op(225) // 0xE1
	MSG_INFO_BOOK_DATA                 = Op(226) // 0xE2
	MSG_SOCIAL                         = Op(227) // 0xE3
	MSG_FADE_BEGIN                     = Op(228) // 0xE4
	MSG_MUSIC_EVENT                    = Op(229) // 0xE5
	MSG_MUSIC_PUSH_EVENT               = Op(230) // 0xE6
	MSG_MUSIC_POP_EVENT                = Op(231) // 0xE7
	MSG_PLAYER_DIED                    = Op(232) // 0xE8
	MSG_PLAYER_RESPAWN                 = Op(233) // 0xE9
	MSG_FORGET_DRAWABLES               = Op(234) // 0xEA
	MSG_RESET_ABILITIES                = Op(235) // 0xEB
	MSG_RATE_CHANGE                    = Op(236) // 0xEC
	MSG_REPORT_CREATURE_CMD            = Op(237) // 0xED
	MSG_VOTE                           = Op(238) // 0xEE
	MSG_STAT_MULTIPLIERS               = Op(239) // 0xEF
	MSG_GAUNTLET                       = Op(240) // 0xF0
	MSG_INVENTORY_FAIL                 = Op(241) // 0xF1
)
View Source
const (
	CCOrientation            = CtrlCode(1)
	CCMoveForward            = CtrlCode(2)
	CCMoveBackward           = CtrlCode(3)
	CCMoveLeft               = CtrlCode(4)
	CCMoveRight              = CtrlCode(5)
	CCAction                 = CtrlCode(6)
	CCJump                   = CtrlCode(7)
	CCChat                   = CtrlCode(8)
	CCTeamChat               = CtrlCode(9)
	CCReadSpellbook          = CtrlCode(10)
	CCToggleConsole          = CtrlCode(11)
	CCIncreaseWindowSize     = CtrlCode(12)
	CCDecreaseWindowSize     = CtrlCode(13)
	CCIncreaseGamma          = CtrlCode(14)
	CCDecreaseGamma          = CtrlCode(15)
	CCQuit                   = CtrlCode(16)
	CCQuitMenu               = CtrlCode(17)
	CCReadMap                = CtrlCode(18)
	CCInventory              = CtrlCode(19)
	CCSpellGestureUp         = CtrlCode(20)
	CCSpellGestureDown       = CtrlCode(21)
	CCSpellGestureLeft       = CtrlCode(22)
	CCSpellGestureRight      = CtrlCode(23)
	CCSpellGestureUpperRight = CtrlCode(24)
	CCSpellGestureUpperLeft  = CtrlCode(25)
	CCSpellGestureLowerRight = CtrlCode(26)
	CCSpellGestureLowerLeft  = CtrlCode(27)
	CCSpellPatternEnd        = CtrlCode(28)
	CCCastQueuedSpell        = CtrlCode(29)
	CCCastMostRecentSpell    = CtrlCode(30)
	CCCastSpell1             = CtrlCode(31)
	CCCastSpell2             = CtrlCode(32)
	CCCastSpell3             = CtrlCode(33)
	CCCastSpell4             = CtrlCode(34)
	CCCastSpell5             = CtrlCode(35)
	CCMapZoomIn              = CtrlCode(36)
	CCMapZoomOut             = CtrlCode(37)
	CCNextWeapon             = CtrlCode(38)
	CCQuickHealthPotion      = CtrlCode(39)
	CCQuickManaPotion        = CtrlCode(40)
	CCQuickCurePoisonPotion  = CtrlCode(41)
	CCNextSpellSet           = CtrlCode(42)
	CCPreviousSpellSet       = CtrlCode(43)
	CCSelectSpellSet         = CtrlCode(44)
	CCBuildTrap              = CtrlCode(45)
	CCServerOptions          = CtrlCode(46)
	CCTaunt                  = CtrlCode(47)
	CCLaugh                  = CtrlCode(48)
	CCPoint                  = CtrlCode(49)
	CCInvertSpellTarget      = CtrlCode(50)
	CCToggleRank             = CtrlCode(51)
	CCToggleNetstat          = CtrlCode(52)
	CCToggleGUI              = CtrlCode(53)
	CCAutoSave               = CtrlCode(54)
	CCAutoLoad               = CtrlCode(55)
	CCScreenShot             = CtrlCode(56)
)

Variables

This section is empty.

Functions

func AppendPacket

func AppendPacket(data []byte, p Message) ([]byte, error)

func DecodePacket

func DecodePacket(data []byte, p Message) (int, error)

func EncodePacket

func EncodePacket(data []byte, p Message) (int, error)

func EncodePacketSize

func EncodePacketSize(p Message) int

func RegisterClientMessage

func RegisterClientMessage(p Message)

func RegisterMessage

func RegisterMessage(p Message)

func RegisterServerMessage

func RegisterServerMessage(p Message)

Types

type CtrlCode

type CtrlCode byte

func (CtrlCode) DataSize

func (code CtrlCode) DataSize() int

func (CtrlCode) String

func (code CtrlCode) String() string

type Encoded

type Encoded interface {
	EncodeSize() int
	Encode(data []byte) (int, error)
	Decode(data []byte) (int, error)
}

type Message

type Message interface {
	NetOp() Op
	Encoded
}

func DecodeAnyPacket

func DecodeAnyPacket(fromServer bool, data []byte) (Message, int, error)

type MsgClientAccept

type MsgClientAccept struct {
	Unk0         [2]byte // 0-1
	PlayerName   string  // 2-67
	PlayerClass  byte    // 68
	IsFemale     byte    // 69
	Unk70        [29]byte
	ScreenWidth  uint32 // 99-102
	ScreenHeight uint32 // 103-106
	Serial       string // 107-128
	Unk129       [26]byte
}

func (*MsgClientAccept) Decode

func (p *MsgClientAccept) Decode(data []byte) (int, error)

func (*MsgClientAccept) Encode

func (p *MsgClientAccept) Encode(data []byte) (int, error)

func (*MsgClientAccept) EncodeSize

func (p *MsgClientAccept) EncodeSize() int

func (*MsgClientAccept) NetOp

func (*MsgClientAccept) NetOp() Op

type MsgDiscover

type MsgDiscover struct {
	Unk0  [5]byte
	Token uint32
}

func (*MsgDiscover) Decode

func (p *MsgDiscover) Decode(data []byte) (int, error)

func (*MsgDiscover) Encode

func (p *MsgDiscover) Encode(data []byte) (int, error)

func (*MsgDiscover) EncodeSize

func (*MsgDiscover) EncodeSize() int

func (*MsgDiscover) NetOp

func (*MsgDiscover) NetOp() Op

type MsgFullTimestamp

type MsgFullTimestamp struct {
	T uint32
}

func (*MsgFullTimestamp) Decode

func (m *MsgFullTimestamp) Decode(data []byte) (int, error)

func (*MsgFullTimestamp) Encode

func (m *MsgFullTimestamp) Encode(data []byte) (int, error)

func (*MsgFullTimestamp) EncodeSize

func (*MsgFullTimestamp) EncodeSize() int

func (*MsgFullTimestamp) NetOp

func (*MsgFullTimestamp) NetOp() Op

type MsgJoinData

type MsgJoinData struct {
	NetCode uint16
	Unk2    uint32
}

func (*MsgJoinData) Decode

func (m *MsgJoinData) Decode(data []byte) (int, error)

func (*MsgJoinData) Encode

func (m *MsgJoinData) Encode(data []byte) (int, error)

func (*MsgJoinData) EncodeSize

func (*MsgJoinData) EncodeSize() int

func (*MsgJoinData) NetOp

func (*MsgJoinData) NetOp() Op

type MsgMouse

type MsgMouse struct {
	X, Y uint16
}

func (*MsgMouse) Decode

func (m *MsgMouse) Decode(data []byte) (int, error)

func (*MsgMouse) Encode

func (m *MsgMouse) Encode(data []byte) (int, error)

func (*MsgMouse) EncodeSize

func (*MsgMouse) EncodeSize() int

func (*MsgMouse) NetOp

func (*MsgMouse) NetOp() Op

type MsgPlayerInput

type MsgPlayerInput struct {
	Inputs []PlayerInput
}

func (*MsgPlayerInput) Decode

func (m *MsgPlayerInput) Decode(data []byte) (int, error)

func (*MsgPlayerInput) Encode

func (m *MsgPlayerInput) Encode(data []byte) (int, error)

func (*MsgPlayerInput) EncodeSize

func (m *MsgPlayerInput) EncodeSize() int

func (*MsgPlayerInput) NetOp

func (*MsgPlayerInput) NetOp() Op

type MsgServerAccept

type MsgServerAccept struct {
	Unk0   [2]byte
	ID     uint32
	XorKey byte
}

func (*MsgServerAccept) Decode

func (p *MsgServerAccept) Decode(data []byte) (int, error)

func (*MsgServerAccept) Encode

func (p *MsgServerAccept) Encode(data []byte) (int, error)

func (*MsgServerAccept) EncodeSize

func (p *MsgServerAccept) EncodeSize() int

func (*MsgServerAccept) NetOp

func (*MsgServerAccept) NetOp() Op

type MsgServerInfo

type MsgServerInfo struct {
	PlayersCur byte     // 0
	PlayersMax byte     // 1
	Unk2       [5]byte  // 2-6
	MapName    string   // 7-15
	Status1    byte     // 16
	Status2    byte     // 17
	Unk19      [7]byte  // 18-24
	Flags      uint16   // 25-26
	Unk27      [2]byte  // 27-28
	Unk29      [8]byte  // 29-36
	Unk37      [4]byte  // 37-40
	Token      uint32   // 41-44
	Unk45      [20]byte // 45-64
	Unk65      [4]byte  // 65-68
	ServerName string   // 69+
}

func (*MsgServerInfo) Decode

func (p *MsgServerInfo) Decode(data []byte) (int, error)

func (*MsgServerInfo) Encode

func (p *MsgServerInfo) Encode(data []byte) (int, error)

func (*MsgServerInfo) EncodeSize

func (p *MsgServerInfo) EncodeSize() int

func (*MsgServerInfo) NetOp

func (*MsgServerInfo) NetOp() Op

type MsgServerJoin

type MsgServerJoin struct {
	Unk0       byte     // 0
	PlayerName string   // 1-52?
	Serial     string   // 53-74
	Unk75      [2]byte  // 75-76
	Version    uint32   // 77-80
	Unk81      [16]byte // 81-96
}

func (*MsgServerJoin) Decode

func (p *MsgServerJoin) Decode(data []byte) (int, error)

func (*MsgServerJoin) Encode

func (p *MsgServerJoin) Encode(data []byte) (int, error)

func (*MsgServerJoin) EncodeSize

func (*MsgServerJoin) EncodeSize() int

func (*MsgServerJoin) NetOp

func (*MsgServerJoin) NetOp() Op

type MsgTimestamp

type MsgTimestamp struct {
	T uint16
}

func (*MsgTimestamp) Decode

func (m *MsgTimestamp) Decode(data []byte) (int, error)

func (*MsgTimestamp) Encode

func (m *MsgTimestamp) Encode(data []byte) (int, error)

func (*MsgTimestamp) EncodeSize

func (*MsgTimestamp) EncodeSize() int

func (*MsgTimestamp) NetOp

func (*MsgTimestamp) NetOp() Op

type MsgUseMap

type MsgUseMap struct {
	MapName     string
	CRC         uint32
	T           uint32
	MapNameJunk []byte
}

func (*MsgUseMap) Decode

func (m *MsgUseMap) Decode(data []byte) (int, error)

func (*MsgUseMap) Encode

func (m *MsgUseMap) Encode(data []byte) (int, error)

func (*MsgUseMap) EncodeSize

func (*MsgUseMap) EncodeSize() int

func (*MsgUseMap) NetOp

func (*MsgUseMap) NetOp() Op

type Op

type Op byte

func (Op) Len

func (op Op) Len() int

func (Op) String

func (op Op) String() string

type PlayerInput

type PlayerInput interface {
	CtrlCode() CtrlCode
	Encoded
}

type PlayerInput0

type PlayerInput0 struct {
	Code CtrlCode
}

func (*PlayerInput0) CtrlCode

func (p *PlayerInput0) CtrlCode() CtrlCode

func (*PlayerInput0) Decode

func (*PlayerInput0) Decode(data []byte) (int, error)

func (*PlayerInput0) Encode

func (*PlayerInput0) Encode(data []byte) (int, error)

func (*PlayerInput0) EncodeSize

func (*PlayerInput0) EncodeSize() int

type PlayerInput1

type PlayerInput1 struct {
	Code CtrlCode
	Val  byte
}

func (*PlayerInput1) CtrlCode

func (p *PlayerInput1) CtrlCode() CtrlCode

func (*PlayerInput1) Decode

func (p *PlayerInput1) Decode(data []byte) (int, error)

func (*PlayerInput1) Encode

func (p *PlayerInput1) Encode(data []byte) (int, error)

func (*PlayerInput1) EncodeSize

func (*PlayerInput1) EncodeSize() int

type PlayerInput4

type PlayerInput4 struct {
	Code CtrlCode
	Val  uint32
}

func (*PlayerInput4) CtrlCode

func (p *PlayerInput4) CtrlCode() CtrlCode

func (*PlayerInput4) Decode

func (p *PlayerInput4) Decode(data []byte) (int, error)

func (*PlayerInput4) Encode

func (p *PlayerInput4) Encode(data []byte) (int, error)

func (*PlayerInput4) EncodeSize

func (*PlayerInput4) EncodeSize() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL