1
0
Protocol/structs/opcodes.go

162 lines
5.0 KiB
Go

package packets
// InternalOpcode represents the internal opcode enumeration
type InternalOpcode int32
// Internal opcode constants - these map to the C++ EmuOpcode enum
const (
OP_Unknown InternalOpcode = iota
// Login server specific opcodes (from C++ LoginServer)
OP_Login2
OP_GetLoginInfo
OP_LoginInfo
OP_SessionId
OP_SessionKey
OP_Disconnect
OP_AllFinish
OP_Ack5
OP_SendServersFragment
OP_ServerList
OP_RequestServerStatus
OP_SendServerStatus
OP_Version
OP_LoginBanner
OP_PlayCharacterRequest
OP_CharacterList
OP_CharacterCreate
OP_CharacterDelete
// Login and authentication operations
OP_LoginRequestMsg
OP_LoginReplyMsg
OP_LoginByNumRequestMsg
OP_WSLoginRequestMsg
// Server initialization and zone management
OP_ESInitMsg
OP_ESReadyForClientsMsg
OP_CreateZoneInstanceMsg
OP_ZoneInstanceCreateReplyMsg
OP_ZoneInstanceDestroyedMsg
OP_ExpectClientAsCharacterRequest
OP_ExpectClientAsCharacterReplyMs
OP_ZoneInfoMsg
// Character creation and loading
OP_AllCharactersDescRequestMsg
OP_AllCharactersDescReplyMsg
OP_CreateCharacterRequestMsg
OP_ReskinCharacterRequestMsg
OP_CreateCharacterReplyMsg
OP_DeleteCharacterRequestMsg
OP_DeleteCharacterReplyMsg
OP_PlayCharacterRequestMsg
OP_PlayCharacterReplyMsg
// World server communication
OP_WSCreateCharacterRequestMsg
OP_WSCreateCharacterReplyMsg
OP_ServerPlayCharacterRequestMsg
OP_ServerPlayCharacterReplyMsg
OP_ExpectClientAsCharacterRequ
OP_ExpectClientAsCharacterReply
OP_WorldListMsg
OP_WorldStatusChangeMsg
OP_AllWSDescRequestMsg
OP_WSStatusReplyMsg
OP_WSAcctLockStatusMsg
OP_WSServerLockMsg
OP_WSServerHideMsg
OP_LSServerLockMsg
// Keymap and configuration
OP_KeymapLoadMsg
OP_KeymapNoneMsg
OP_KeymapDataMsg
OP_KeymapSaveMsg
// Account and security management
OP_LSCheckAcctLockMsg
OP_LsRequestClientCrashLogMsg
OP_LsClientBaselogReplyMsg
OP_LsClientCrashlogReplyMsg
OP_LsClientAlertlogReplyMsg
OP_LsClientVerifylogReplyMsg
OP_BadLanguageFilter
// Character sheet and inventory
OP_UpdateCharacterSheetMsg
OP_UpdateInventoryMsg
)
// OpcodeNames provides human-readable names for internal opcodes
var OpcodeNames = map[InternalOpcode]string{
OP_Unknown: "OP_Unknown",
// Login server specific opcodes
OP_Login2: "OP_Login2",
OP_GetLoginInfo: "OP_GetLoginInfo",
OP_LoginInfo: "OP_LoginInfo",
OP_SessionId: "OP_SessionId",
OP_SessionKey: "OP_SessionKey",
OP_Disconnect: "OP_Disconnect",
OP_AllFinish: "OP_AllFinish",
OP_Ack5: "OP_Ack5",
OP_SendServersFragment: "OP_SendServersFragment",
OP_ServerList: "OP_ServerList",
OP_RequestServerStatus: "OP_RequestServerStatus",
OP_SendServerStatus: "OP_SendServerStatus",
OP_Version: "OP_Version",
OP_LoginBanner: "OP_LoginBanner",
OP_PlayCharacterRequest: "OP_PlayCharacterRequest",
OP_CharacterList: "OP_CharacterList",
OP_CharacterCreate: "OP_CharacterCreate",
OP_CharacterDelete: "OP_CharacterDelete",
// Login and authentication operations
OP_LoginRequestMsg: "OP_LoginRequestMsg",
OP_LoginReplyMsg: "OP_LoginReplyMsg",
OP_LoginByNumRequestMsg: "OP_LoginByNumRequestMsg",
OP_WSLoginRequestMsg: "OP_WSLoginRequestMsg",
// Character operations
OP_AllCharactersDescRequestMsg: "OP_AllCharactersDescRequestMsg",
OP_AllCharactersDescReplyMsg: "OP_AllCharactersDescReplyMsg",
OP_CreateCharacterRequestMsg: "OP_CreateCharacterRequestMsg",
OP_ReskinCharacterRequestMsg: "OP_ReskinCharacterRequestMsg",
OP_CreateCharacterReplyMsg: "OP_CreateCharacterReplyMsg",
OP_DeleteCharacterRequestMsg: "OP_DeleteCharacterRequestMsg",
OP_DeleteCharacterReplyMsg: "OP_DeleteCharacterReplyMsg",
OP_PlayCharacterRequestMsg: "OP_PlayCharacterRequestMsg",
OP_PlayCharacterReplyMsg: "OP_PlayCharacterReplyMsg",
// World server communication
OP_WorldListMsg: "OP_WorldListMsg",
OP_WorldStatusChangeMsg: "OP_WorldStatusChangeMsg",
OP_AllWSDescRequestMsg: "OP_AllWSDescRequestMsg",
OP_WSStatusReplyMsg: "OP_WSStatusReplyMsg",
OP_WSAcctLockStatusMsg: "OP_WSAcctLockStatusMsg",
OP_WSServerLockMsg: "OP_WSServerLockMsg",
OP_WSServerHideMsg: "OP_WSServerHideMsg",
OP_LSServerLockMsg: "OP_LSServerLockMsg",
// Keymap operations
OP_KeymapLoadMsg: "OP_KeymapLoadMsg",
OP_KeymapNoneMsg: "OP_KeymapNoneMsg",
OP_KeymapDataMsg: "OP_KeymapDataMsg",
OP_KeymapSaveMsg: "OP_KeymapSaveMsg",
// Account and security
OP_LSCheckAcctLockMsg: "OP_LSCheckAcctLockMsg",
OP_LsRequestClientCrashLogMsg: "OP_LsRequestClientCrashLogMsg",
OP_LsClientBaselogReplyMsg: "OP_LsClientBaselogReplyMsg",
OP_LsClientCrashlogReplyMsg: "OP_LsClientCrashlogReplyMsg",
OP_LsClientAlertlogReplyMsg: "OP_LsClientAlertlogReplyMsg",
OP_LsClientVerifylogReplyMsg: "OP_LsClientVerifylogReplyMsg",
OP_BadLanguageFilter: "OP_BadLanguageFilter",
// Character sheet and inventory
OP_UpdateCharacterSheetMsg: "OP_UpdateCharacterSheetMsg",
OP_UpdateInventoryMsg: "OP_UpdateInventoryMsg",
}