network

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package network encodes and decodes Ragnarok Online packets and manages socket I/O. It should expose parsed protocol facts without making UI or gameplay policy decisions.

Index

Constants

View Source
const (
	ActorActionPickupItem uint8 = 1
	ActorActionSkill      uint8 = 6
)
View Source
const (
	PacketZCReqBaby   uint16 = 0x01F6
	PacketCZJoinBaby  uint16 = 0x01F7
	PacketZCStartBaby uint16 = 0x01F8
	PacketCZReqBaby   uint16 = 0x01F9
	PacketZCBabyMsg   uint16 = 0x0216
)
View Source
const (
	PacketCZRequestChatLegacy uint16 = 0x008C
	PacketCZRequestChat       uint16 = 0x00F3
	PacketCZWhisper           uint16 = 0x0096
	PacketCZWhisperIgnore     uint16 = 0x00CF
	PacketCZWhisperIgnoreAll  uint16 = 0x00D0
	PacketCZCreateChatRoom    uint16 = 0x00D5
	PacketCZEnterChatRoom     uint16 = 0x00D9
	PacketCZExitChatRoom      uint16 = 0x00E3
	PacketZCNotifyChat        uint16 = 0x008D
	PacketZCNotifyPlayerChat  uint16 = 0x008E
	PacketZCWhisper           uint16 = 0x0097
	PacketZCAckWhisper        uint16 = 0x0098
	PacketZCWhisperIgnoreAck  uint16 = 0x00D1
	PacketZCWhisperAllAck     uint16 = 0x00D2
	PacketZCAckCreateChatRoom uint16 = 0x00D6
	PacketZCChatRoomBoard     uint16 = 0x00D7
	PacketZCDestroyChatRoom   uint16 = 0x00D8
	PacketZCChatRoomChanged   uint16 = 0x00DF
	PacketZCChatRoomEnter     uint16 = 0x00DB
	PacketZCChatRoomJoin      uint16 = 0x00DC
	PacketZCChatRoomLeave     uint16 = 0x00DD
	PacketZCChatRoomRole      uint16 = 0x00E1
	PacketZCBroadcast         uint16 = 0x009A
	PacketZCBroadcast2        uint16 = 0x01C3
	PacketZCNPCChat           uint16 = 0x02C1
	PacketZCMsg               uint16 = 0x0291
	PacketZCMsgValue          uint16 = 0x07E2
	PacketZCMsgSkill          uint16 = 0x07E6
	PacketZCMsgColor          uint16 = 0x09CD
)
View Source
const (
	PacketCZCommandMercenary       uint16 = 0x022D
	PacketZCPropertyHomunculus     uint16 = 0x022E
	PacketZCFeedMercenary          uint16 = 0x022F
	PacketZCChangeStateMercenary   uint16 = 0x0230
	PacketCZRenameMercenary        uint16 = 0x0231
	PacketCZRequestMoveNPC         uint16 = 0x0232
	PacketCZRequestActNPC          uint16 = 0x0233
	PacketCZRequestMoveToOwner     uint16 = 0x0234
	PacketZCHomunculusSkillList    uint16 = 0x0235
	PacketZCHomunculusSkillUpdate  uint16 = 0x0239
	PacketZCPropertyMercenaryOld   uint16 = 0x027D
	PacketZCMercenaryInit          uint16 = 0x029B
	PacketZCMercenaryProperty      uint16 = 0x029C
	PacketZCMercenarySkillList     uint16 = 0x029D
	PacketZCMercenarySkillUpdate   uint16 = 0x029E
	PacketCZMercenaryCommand       uint16 = 0x029F
	PacketZCMercenaryParamChange   uint16 = 0x02A2
	PacketZCHomunculusParamChange  uint16 = 0x07DB
	PacketZCPropertyHomunculus2    uint16 = 0x09F7
	PacketZCPropertyHomunculus3    uint16 = 0x0B2F
	PacketZCPropertyHomunculus4    uint16 = 0x0B76
	PacketZCPropertyHomunculus5    uint16 = 0x0BA4
	PacketZCHomunculusParamChange2 uint16 = 0x0BA5
)
View Source
const (
	HomunculusCommandInfo   uint8 = 0
	HomunculusCommandFeed   uint8 = 1
	HomunculusCommandDelete uint8 = 2

	MercenaryCommandInfo   uint8 = 1
	MercenaryCommandDelete uint8 = 2
)
View Source
const (
	PacketSCNotifyBan      uint16 = 0x0081
	PacketZCISVRDisconnect uint16 = 0x02D5
)
View Source
const (
	PacketCZLessEffect    uint16 = 0x021D
	PacketZCLessEffect    uint16 = 0x021E
	PacketZCNotifyEffect  uint16 = 0x019B
	PacketZCNotifyEffect2 uint16 = 0x01F3
	PacketZCMVP           uint16 = 0x010C

	SpecialEffectBaseLevelUp            = 0
	SpecialEffectJobLevelUp             = 1
	SpecialEffectRefineFailure          = 2
	SpecialEffectRefineSuccess          = 3
	SpecialEffectGameOver               = 4
	SpecialEffectPharmacySuccess        = 5
	SpecialEffectPharmacyFailure        = 6
	SpecialEffectSuperNoviceBaseLevelUp = 7
	SpecialEffectSuperNoviceJobLevelUp  = 8
	SpecialEffectTaekwonBaseLevelUp     = 9
)
View Source
const (
	PacketCZReqEmotion uint16 = 0x00BF
	PacketZCEmotion    uint16 = 0x00C0
)
View Source
const (
	PacketCZReqCartOff         uint16 = 0x012A
	PacketCZEquipWinMicroscope uint16 = 0x02D6
	PacketZCEquipWinMicroscope uint16 = 0x02D7
	PacketCZConfig             uint16 = 0x02D8
	PacketZCConfigNotify       uint16 = 0x02DA

	ConfigOpenEquipmentWindow uint32 = 0
)
View Source
const (
	PacketCZAddFriends       uint16 = 0x0202
	PacketCZDeleteFriends    uint16 = 0x0203
	PacketCZAckReqAddFriends uint16 = 0x0208

	PacketZCFriendsList    uint16 = 0x0201
	PacketZCFriendsState   uint16 = 0x0206
	PacketZCReqAddFriends  uint16 = 0x0207
	PacketZCAddFriendsList uint16 = 0x0209
	PacketZCDeleteFriends  uint16 = 0x020A
)
View Source
const (
	PacketCZReqMakeGuild          uint16 = 0x0165
	PacketZCResultMakeGuild       uint16 = 0x0167
	PacketCZReqJoinGuild          uint16 = 0x0168
	PacketZCAckReqJoinGuild       uint16 = 0x0169
	PacketZCReqJoinGuild          uint16 = 0x016A
	PacketCZJoinGuild             uint16 = 0x016B
	PacketCZGuildNotice           uint16 = 0x016E
	PacketZCGuildInfo             uint16 = 0x0150
	PacketZCGuildInfo2            uint16 = 0x01B6
	PacketZCGuildMembers          uint16 = 0x0154
	PacketCZReqChangeMember       uint16 = 0x0155
	PacketZCAckChangeMember       uint16 = 0x0156
	PacketCZReqOpenMember         uint16 = 0x0157
	PacketZCAckOpenMember         uint16 = 0x0158
	PacketCZReqLeaveGuild         uint16 = 0x0159
	PacketZCAckLeaveGuild         uint16 = 0x015A
	PacketCZReqExpelGuildMember   uint16 = 0x015B
	PacketZCAckExpelGuildMember   uint16 = 0x015C
	PacketCZReqDisbandGuild       uint16 = 0x015D
	PacketZCAckDisbandGuild       uint16 = 0x015E
	PacketZCGuildPositions        uint16 = 0x0160
	PacketCZRegGuildPosInfo       uint16 = 0x0161
	PacketZCGuildSkillInfo        uint16 = 0x0162
	PacketZCGuildBanList          uint16 = 0x0163
	PacketZCGuildPosNames         uint16 = 0x0166
	PacketZCGuildNotice           uint16 = 0x016F
	PacketZCAckGuildPosInfo       uint16 = 0x0174
	PacketCZReqGuildMember        uint16 = 0x0175
	PacketZCGuildMemberInfo       uint16 = 0x0176
	PacketCZGuildMessage          uint16 = 0x017E
	PacketZCGuildChat             uint16 = 0x017F
	PacketZCUpdateGuildID         uint16 = 0x016C
	PacketCZReqGuildMenuInterface uint16 = 0x014D
	PacketZCAckGuildMenuInterface uint16 = 0x014E
	PacketCZReqGuildMenu          uint16 = 0x014F
	PacketCZReqGuildEmblem        uint16 = 0x0151
	PacketZCGuildEmblem           uint16 = 0x0152
	PacketCZRegGuildEmblem        uint16 = 0x0153
	PacketZCChangeGuild           uint16 = 0x01B4
	PacketZCGuildRelations        uint16 = 0x014C
	PacketZCGuildMemberState      uint16 = 0x016D
	PacketZCGuildMemberState2     uint16 = 0x01F2
	PacketCZReqGuildAlliance      uint16 = 0x0170
	PacketZCGuildAllianceRequest  uint16 = 0x0171
	PacketCZGuildAllianceReply    uint16 = 0x0172
	PacketZCGuildAllianceResult   uint16 = 0x0173
	PacketCZReqGuildHostility     uint16 = 0x0180
	PacketZCGuildHostilityResult  uint16 = 0x0181
	PacketZCGuildMemberAdded      uint16 = 0x0182
	PacketCZDeleteGuildRelation   uint16 = 0x0183
	PacketZCGuildRelationDeleted  uint16 = 0x0184
	PacketZCGuildRelationAdded    uint16 = 0x0185
	PacketZCGuildMemberLocation   uint16 = 0x01EB
)
View Source
const (
	PacketZCShortcutKeyList   uint16 = 0x02B9
	PacketCZShortcutKeyChange uint16 = 0x02BA

	HotkeyTypeItem  uint8 = 0
	HotkeyTypeSkill uint8 = 1

	HotkeyListSlots2008 = 27
)
View Source
const (
	PacketCZACKSelectDealType      uint16 = 0x00C5
	PacketCZItemThrow              uint16 = 0x00A2
	PacketCZReqItemIdentify        uint16 = 0x0178
	PacketCZReqItemCompositionList uint16 = 0x017A
	PacketCZReqItemComposition     uint16 = 0x017C
	PacketCZReqMakingItem          uint16 = 0x018E
	PacketCZReqItemRepair          uint16 = 0x01FD
	PacketCZReqMakingArrow         uint16 = 0x01AE
	PacketCZReqWeaponRefine        uint16 = 0x0222
	PacketCZUseItem2               uint16 = 0x0439
	PacketCZUseItemLegacy          uint16 = 0x00A7
	PacketCZReqWearEquip           uint16 = 0x00A9
	PacketCZReqTakeoffEquip        uint16 = 0x00AB
	PacketCZPCPurchaseItemList     uint16 = 0x00C8
	PacketCZPCSellItemList         uint16 = 0x00C9
	PacketCZMoveToStorage          uint16 = 0x0094
	PacketCZMoveFromStorage        uint16 = 0x00F7
	PacketCZCloseStorage           uint16 = 0x0193
	PacketCZMoveToCart             uint16 = 0x0126
	PacketCZMoveFromCart           uint16 = 0x0127
	PacketCZMoveStorageToCart      uint16 = 0x0128
	PacketCZMoveCartToStorage      uint16 = 0x0129
)
View Source
const (
	PacketZCMakableItemList  uint16 = 0x018D
	PacketZCAckReqMakingItem uint16 = 0x018F
	PacketZCRepairItemList   uint16 = 0x01FC
	PacketZCAckItemRepair    uint16 = 0x01FE
	PacketZCWeaponRefineList uint16 = 0x0221
	PacketZCAckWeaponRefine  uint16 = 0x0223
	PacketZCMakingItemList   uint16 = 0x025A
)
View Source
const (
	PacketCAPlainLogin     uint16 = 0x0064
	PacketCAEnter          uint16 = 0x0065
	PacketCZSelectChar     uint16 = 0x0066
	PacketCHMakeChar       uint16 = 0x0067
	PacketCHDeleteCharOld  uint16 = 0x0068
	PacketCHDeleteChar     uint16 = 0x01FB
	PacketCZLoadEndAck     uint16 = 0x007D
	PacketCZTickSend       uint16 = 0x0089
	PacketCZTickSendRE     uint16 = 0x0360
	PacketCZReqName        uint16 = 0x0094
	PacketCZReqNameRE      uint16 = 0x0368
	PacketCZWalkToXY       uint16 = 0x00A7
	PacketCZWalkToXYRE     uint16 = 0x035F
	PacketCZChangeDir      uint16 = 0x009B
	PacketCZChangeDirRE    uint16 = 0x0361
	PacketCZRestart        uint16 = 0x00B2
	PacketPing             uint16 = 0x0187
	PacketCZQuitGame       uint16 = 0x018A
	PacketCZRequestAct     uint16 = 0x0190
	PacketCZRequestAct2    uint16 = 0x0437
	PacketCZRequestAct2012 uint16 = 0x0369
	PacketCZEnter2         uint16 = 0x0436
)
View Source
const (
	ActionSitDown uint8 = 2
	ActionStandUp uint8 = 3
	ActionAttack  uint8 = 7
)
View Source
const (
	RestartTypeRespawn    uint8 = 0
	RestartTypeCharSelect uint8 = 1
)
View Source
const (
	PacketCZMailRefresh       uint16 = 0x023F
	PacketZCMailList          uint16 = 0x0240
	PacketCZMailRead          uint16 = 0x0241
	PacketZCMailRead          uint16 = 0x0242
	PacketCZMailDelete        uint16 = 0x0243
	PacketCZMailGetAttachment uint16 = 0x0244
	PacketZCMailGetAttachment uint16 = 0x0245
	PacketCZMailReset         uint16 = 0x0246
	PacketCZMailAddAttachment uint16 = 0x0247
	PacketCZMailSend          uint16 = 0x0248
	PacketZCMailSend          uint16 = 0x0249
	PacketZCMailNew           uint16 = 0x024A
	PacketZCMailAddAttachment uint16 = 0x0255
	PacketZCMailDelete        uint16 = 0x0257
	PacketZCMailWindow        uint16 = 0x0260
	PacketCZMailReturn        uint16 = 0x0273
	PacketZCMailReturn        uint16 = 0x0274

	MailInboxCapacity = 30
	MailRecipientMax  = 23
	MailTitleMax      = 39
	MailBodyMax       = 199
)

These are the pre-RODEX packets used by the 2008 client. Legacy mail has one item-stack attachment and Zeny, and a single-byte body length.

View Source
const (
	PacketZCShowImage2 uint16 = 0x01B3

	NPCCutinLeft       uint8 = 0
	NPCCutinCenter     uint8 = 1
	NPCCutinRight      uint8 = 2
	NPCCutinWindow     uint8 = 3
	NPCCutinWindowless uint8 = 4
	NPCCutinClear      uint8 = 255
)
View Source
const (
	PacketCZMakeGroup           uint16 = 0x00F9
	PacketCZReqJoinGroup        uint16 = 0x00FC
	PacketCZJoinGroup           uint16 = 0x00FF
	PacketCZReqLeaveGroup       uint16 = 0x0100
	PacketCZChangeGroupExp      uint16 = 0x0102
	PacketCZReqExpelGroupMember uint16 = 0x0103
	PacketCZPartyMessage        uint16 = 0x0108
	PacketCZMakeGroup2          uint16 = 0x01E8
	PacketCZPartyJoinReq        uint16 = 0x02C4
	PacketCZPartyJoinReqAck     uint16 = 0x02C7
	PacketCZPartyConfig         uint16 = 0x02C8

	PacketZCAckMakeGroup        uint16 = 0x00FA
	PacketZCGroupList           uint16 = 0x00FB
	PacketZCAckReqJoinGroup     uint16 = 0x00FD
	PacketZCReqJoinGroup        uint16 = 0x00FE
	PacketZCGroupInfoChange     uint16 = 0x0101
	PacketZCAddMemberToGroup    uint16 = 0x0104
	PacketZCAddMemberToGroup2   uint16 = 0x01E9
	PacketZCDeleteMemberFromGrp uint16 = 0x0105
	PacketZCNotifyHPToGroup     uint16 = 0x0106
	PacketZCNotifyPositionToGrp uint16 = 0x0107
	PacketZCNotifyChatParty     uint16 = 0x0109
	PacketZCPartyJoinReqAck     uint16 = 0x02C5
	PacketZCPartyJoinReq        uint16 = 0x02C6
	PacketZCPartyConfig         uint16 = 0x02C9
	PacketZCNotifyHPToGroupR2   uint16 = 0x080E
)
View Source
const (
	PacketZCStartCapture      uint16 = 0x019E
	PacketCZTryCaptureMonster uint16 = 0x019F
	PacketZCTryCaptureMonster uint16 = 0x01A0
	PacketCZCommandPet        uint16 = 0x01A1
	PacketZCPropertyPet       uint16 = 0x01A2
	PacketZCFeedPet           uint16 = 0x01A3
	PacketZCChangeStatePet    uint16 = 0x01A4
	PacketCZRenamePet         uint16 = 0x01A5
	PacketZCPetEggList        uint16 = 0x01A6
	PacketCZSelectPetEgg      uint16 = 0x01A7
	PacketCZPetAct            uint16 = 0x01A9
	PacketZCPetAct            uint16 = 0x01AA
)
View Source
const (
	PetCommandInfo uint8 = iota
	PetCommandFeed
	PetCommandPerformance
	PetCommandBackToEgg
	PetCommandUnequipAccessory
)
View Source
const (
	PacketZCNotifyMapProperty uint16 = 0x0199
	PacketZCNotifyRanking     uint16 = 0x019A
	PacketCZRequestPvPInfo    uint16 = 0x020F
	PacketZCAckPvPInfo        uint16 = 0x0210
)
View Source
const (
	PacketCZBlacksmithRank  uint16 = 0x0217
	PacketCZAlchemistRank   uint16 = 0x0218
	PacketZCBlacksmithRank  uint16 = 0x0219
	PacketZCAlchemistRank   uint16 = 0x021A
	PacketZCBlacksmithPoint uint16 = 0x021B
	PacketZCAlchemistPoint  uint16 = 0x021C
	PacketZCTaekwonPoint    uint16 = 0x0224
	PacketCZTaekwonRank     uint16 = 0x0225
	PacketZCTaekwonRank     uint16 = 0x0226
)
View Source
const (
	PacketZCShowDigit      uint16 = 0x01B1
	PacketZCSkillMessage   uint16 = 0x0215
	PacketZCBossInfo       uint16 = 0x0293
	PacketZCProgress       uint16 = 0x02F0
	PacketCZProgress       uint16 = 0x02F1
	PacketZCProgressCancel uint16 = 0x02F2
)
View Source
const (
	PacketZCMonsterInfo     uint16 = 0x018C
	PacketZCAutoSpellList   uint16 = 0x01CD
	PacketCZSelectAutoSpell uint16 = 0x01CE
)
View Source
const (
	PacketZCNotifyExp uint16 = 0x07F6

	StatusSpeed       uint16 = 0
	StatusBaseExp     uint16 = 1
	StatusJobExp      uint16 = 2
	StatusHP          uint16 = 5
	StatusMaxHP       uint16 = 6
	StatusSP          uint16 = 7
	StatusMaxSP       uint16 = 8
	StatusPoint       uint16 = 9
	StatusBaseLevel   uint16 = 11
	StatusSkillPoint  uint16 = 12
	StatusStr         uint16 = 13
	StatusAgi         uint16 = 14
	StatusVit         uint16 = 15
	StatusInt         uint16 = 16
	StatusDex         uint16 = 17
	StatusLuk         uint16 = 18
	StatusZeny        uint16 = 20
	StatusNextBaseExp uint16 = 22
	StatusNextJobExp  uint16 = 23
	StatusWeight      uint16 = 24
	StatusMaxWeight   uint16 = 25
	StatusUStr        uint16 = 32
	StatusUAgi        uint16 = 33
	StatusUVit        uint16 = 34
	StatusUInt        uint16 = 35
	StatusUDex        uint16 = 36
	StatusULuk        uint16 = 37
	StatusJobLevel    uint16 = 55
	StatusMercFlee    uint16 = 165
	StatusMercKills   uint16 = 189
	StatusMercFaith   uint16 = 190
)
View Source
const (
	PacketZCStoragePasswordPrompt uint16 = 0x023A
	PacketCZStoragePasswordReply  uint16 = 0x023B
	PacketZCStoragePasswordResult uint16 = 0x023C
)
View Source
const (
	PacketZCStarSkill      uint16 = 0x020E
	PacketZCStarPlace      uint16 = 0x0253
	PacketCZAgreeStarPlace uint16 = 0x0254
)
View Source
const (
	PacketCZReqExchangeItem      uint16 = 0x00E4
	PacketCZAckExchangeItem      uint16 = 0x00E6
	PacketCZAddExchangeItem      uint16 = 0x00E8
	PacketCZConcludeExchangeItem uint16 = 0x00EB
	PacketCZCancelExchangeItem   uint16 = 0x00ED
	PacketCZExecExchangeItem     uint16 = 0x00EF

	PacketZCReqExchangeItem      uint16 = 0x00E5
	PacketZCAckExchangeItem      uint16 = 0x00E7
	PacketZCAddExchangeItem      uint16 = 0x00E9
	PacketZCAckAddExchangeItem   uint16 = 0x00EA
	PacketZCConcludeExchangeItem uint16 = 0x00EC
	PacketZCCancelExchangeItem   uint16 = 0x00EE
	PacketZCExecExchangeItem     uint16 = 0x00F0
	PacketZCExchangeItemUndo     uint16 = 0x00F1
	PacketZCReqExchangeItem2     uint16 = 0x01F4
	PacketZCAckExchangeItem2     uint16 = 0x01F5
)
View Source
const (
	TradeAckAccept uint8 = 3
	TradeAckCancel uint8 = 4
)
View Source
const (
	PacketCZReqCloseStore            uint16 = 0x012E
	PacketCZReqOpenStore             uint16 = 0x012F
	PacketCZReqBuyFromMC             uint16 = 0x0130
	PacketCZPCPurchaseItemListFromMC uint16 = 0x0134
	PacketCZReqOpenStore2            uint16 = 0x01B2
	PacketZCOpenStore                uint16 = 0x012D
	PacketZCStoreEntry               uint16 = 0x0131
	PacketZCDisappearEntry           uint16 = 0x0132
	PacketZCPCPurchaseItemListFromMC uint16 = 0x0133
	PacketZCPCPurchaseResultFromMC   uint16 = 0x0135
	PacketZCPCPurchaseMyItemList     uint16 = 0x0136
	PacketZCDeleteItemFromMCStore    uint16 = 0x0137
)
View Source
const PacketCAConnectInfoChanged uint16 = 0x0200
View Source
const PacketCZAutoRevive uint16 = 0x0292
View Source
const PacketCZDoriDori uint16 = 0x01E7
View Source
const PacketCZItemPickup uint16 = 0x009F
View Source
const PacketZCCompass uint16 = 0x0144
View Source
const PacketZCNotifyMapInfo uint16 = 0x0189
View Source
const PacketZCQuitGameAck uint16 = 0x018B
View Source
const PacketZCRestartAck uint16 = 0x00B3

Variables

View Source
var ErrDisconnected = errors.New("disconnected from server")

Functions

func BuildAccountLoginPacket

func BuildAccountLoginPacket(login AccountLogin) []byte

func BuildAckFriendRequestPacket

func BuildAckFriendRequestPacket(accountID, charID uint32, accepted bool) []byte

func BuildActionRequestPacket

func BuildActionRequestPacket(targetGID uint32, action uint8) []byte

func BuildActionRequestPacketForClientDate

func BuildActionRequestPacketForClientDate(targetGID uint32, action uint8, clientDate int) []byte

func BuildAddFriendPacket

func BuildAddFriendPacket(name string) []byte

func BuildAdoptionReplyPacket added in v0.8.0

func BuildAdoptionReplyPacket(fatherAccountID, motherAccountID uint32, accepted bool) []byte

func BuildAdoptionRequestPacket added in v0.8.0

func BuildAdoptionRequestPacket(targetAccountID uint32) []byte

func BuildAgreeStarPlacePacket added in v0.9.0

func BuildAgreeStarPlacePacket(place uint8) []byte

func BuildAutoRevivePacket added in v0.10.0

func BuildAutoRevivePacket() []byte

func BuildBuyItemListPacket

func BuildBuyItemListPacket(items []BuyRequestItem) []byte

func BuildCancelVendingStoreOpenPacket

func BuildCancelVendingStoreOpenPacket() []byte

func BuildChangeCartPacket

func BuildChangeCartPacket(cartNum uint16) []byte

func BuildChangeDirectionPacket

func BuildChangeDirectionPacket(headDir, dir uint8) []byte

func BuildChangeDirectionPacketForClientDate

func BuildChangeDirectionPacketForClientDate(headDir, dir uint8, clientDate int) []byte

func BuildChangeGuildMemberPositionPacket

func BuildChangeGuildMemberPositionPacket(members []GuildMemberPosition) []byte

func BuildCharServerEnterPacket

func BuildCharServerEnterPacket(enter CharServerEnter) []byte

func BuildCloseStoragePacketForClientDate

func BuildCloseStoragePacketForClientDate(clientDate int) []byte

func BuildCloseVendingStorePacket

func BuildCloseVendingStorePacket() []byte

func BuildCommandPetPacket

func BuildCommandPetPacket(command uint8) []byte

func BuildCompanionAttackPacket

func BuildCompanionAttackPacket(gid, targetGID uint32, action uint8) []byte

func BuildCompanionMovePacket

func BuildCompanionMovePacket(gid uint32, x, y int) ([]byte, bool)

func BuildCompanionMoveToOwnerPacket

func BuildCompanionMoveToOwnerPacket(gid uint32) []byte

func BuildCreateChatRoomPacket

func BuildCreateChatRoomPacket(room ChatRoomCreate) []byte

func BuildCreateGuildPacket

func BuildCreateGuildPacket(charID uint32, name string) []byte

func BuildDeleteCharacterPacket

func BuildDeleteCharacterPacket(clientDate int, charID uint32, key string) []byte

func BuildDeleteFriendPacket

func BuildDeleteFriendPacket(accountID, charID uint32) []byte

func BuildDeleteGuildRelationPacket added in v0.8.0

func BuildDeleteGuildRelationPacket(guildID, relation uint32) []byte

func BuildDisbandGuildPacket added in v0.8.1

func BuildDisbandGuildPacket(name string) []byte

func BuildDoriDoriPacket added in v0.10.0

func BuildDoriDoriPacket() []byte

func BuildDropInventoryItemPacket

func BuildDropInventoryItemPacket(index, amount uint16) []byte

func BuildDropInventoryItemPacketForClientDate

func BuildDropInventoryItemPacketForClientDate(index, amount uint16, clientDate int) []byte

func BuildEmotionPacket

func BuildEmotionPacket(emotionType uint8) []byte

func BuildEnterChatRoomPacket

func BuildEnterChatRoomPacket(roomID uint32, password string) []byte

func BuildExitChatRoomPacket

func BuildExitChatRoomPacket() []byte

func BuildExpelGuildMemberPacket added in v0.8.1

func BuildExpelGuildMemberPacket(guildID, accountID, charID uint32, reason string) []byte

func BuildExpelPartyMemberPacket

func BuildExpelPartyMemberPacket(accountID uint32, name string) []byte

func BuildFameRankingRequestPacket added in v0.10.0

func BuildFameRankingRequestPacket(kind FameRankingKind) ([]byte, error)

func BuildGlobalChatPacket

func BuildGlobalChatPacket(name, message string) []byte

func BuildGlobalChatPacketForClientDate

func BuildGlobalChatPacketForClientDate(name, message string, clientDate int) []byte

func BuildGuildAllianceReplyPacket added in v0.8.0

func BuildGuildAllianceReplyPacket(accountID uint32, accept bool) []byte

func BuildGuildAllianceRequestPacket added in v0.8.0

func BuildGuildAllianceRequestPacket(targetAID, accountID, charID uint32) []byte

func BuildGuildEmblemRequestPacket

func BuildGuildEmblemRequestPacket(guildID uint32) []byte

func BuildGuildHostilityRequestPacket added in v0.8.0

func BuildGuildHostilityRequestPacket(targetAID uint32) []byte

func BuildGuildInviteReplyPacket

func BuildGuildInviteReplyPacket(guildID uint32, accept bool) []byte

func BuildGuildMenuInterfaceRequestPacket added in v0.8.1

func BuildGuildMenuInterfaceRequestPacket() []byte

func BuildGuildMenuRequestPacket

func BuildGuildMenuRequestPacket(tab uint32) []byte

func BuildGuildMessagePacket added in v0.7.0

func BuildGuildMessagePacket(message string) []byte

func BuildGuildNoticePacket

func BuildGuildNoticePacket(guildID uint32, subject, notice string) []byte

func BuildHomunculusCommandPacket

func BuildHomunculusCommandPacket(command uint8) []byte

func BuildHomunculusCommandPacketWithType

func BuildHomunculusCommandPacketWithType(commandType uint16, command uint8) []byte

func BuildHomunculusRenamePacket

func BuildHomunculusRenamePacket(name string) []byte

func BuildHotkeyPacket

func BuildHotkeyPacket(index uint16, slot HotkeySlot) []byte

func BuildItemCompositionListPacket

func BuildItemCompositionListPacket(cardIndex uint16) []byte

func BuildItemCompositionPacket

func BuildItemCompositionPacket(cardIndex, equipIndex uint16) []byte

func BuildItemIdentifyPacket

func BuildItemIdentifyPacket(index uint16) []byte

func BuildItemPickupPacket

func BuildItemPickupPacket(gid uint32) []byte

func BuildItemPickupPacketForClientDate

func BuildItemPickupPacketForClientDate(gid uint32, clientDate int) []byte

func BuildLeaveGuildPacket added in v0.8.1

func BuildLeaveGuildPacket(guildID, accountID, charID uint32, reason string) []byte

func BuildLeavePartyPacket

func BuildLeavePartyPacket() []byte

func BuildLessEffectPacket

func BuildLessEffectPacket(enabled bool) []byte

func BuildLoadEndAckPacket

func BuildLoadEndAckPacket() []byte

func BuildLoginServerKeepalivePacket added in v0.8.1

func BuildLoginServerKeepalivePacket(username string) []byte

func BuildMailAddAttachmentPacket added in v0.11.0

func BuildMailAddAttachmentPacket(index uint16, amount uint32) []byte

func BuildMailDeletePacket added in v0.11.0

func BuildMailDeletePacket(id uint32) []byte

func BuildMailGetAttachmentPacket added in v0.11.0

func BuildMailGetAttachmentPacket(id uint32) []byte

func BuildMailReadPacket added in v0.11.0

func BuildMailReadPacket(id uint32) []byte

func BuildMailRefreshPacket added in v0.11.0

func BuildMailRefreshPacket() []byte

func BuildMailResetPacket added in v0.11.0

func BuildMailResetPacket(kind MailResetType) []byte

func BuildMailReturnPacket added in v0.11.0

func BuildMailReturnPacket(id uint32, sender string) []byte

func BuildMailSendPacket added in v0.11.0

func BuildMailSendPacket(recipient, title, body string) ([]byte, error)

func BuildMakeCharacterPacket

func BuildMakeCharacterPacket(character MakeCharacter) []byte

func BuildMakeParty2Packet

func BuildMakeParty2Packet(name string, itemPickupRule, itemDivisionRule uint8) []byte

func BuildMakePartyPacket

func BuildMakePartyPacket(name string) []byte

func BuildMakingArrowPacket

func BuildMakingArrowPacket(itemID uint16) []byte

func BuildMakingItemPacket

func BuildMakingItemPacket(itemID uint16, material [3]uint16) []byte

func BuildMapServerEnterPacket

func BuildMapServerEnterPacket(enter MapServerEnter) []byte

func BuildMapServerEnterPacketForClientDate

func BuildMapServerEnterPacketForClientDate(enter MapServerEnter, clientDate int) []byte

func BuildMercenaryCommandPacket

func BuildMercenaryCommandPacket(command uint8) []byte

func BuildMoveCartToStoragePacket

func BuildMoveCartToStoragePacket(index uint16, amount uint32) []byte

func BuildMoveFromCartPacket

func BuildMoveFromCartPacket(index uint16, amount uint32) []byte

func BuildMoveFromStoragePacketForClientDate

func BuildMoveFromStoragePacketForClientDate(index uint16, amount uint32, clientDate int) []byte

func BuildMoveStorageToCartPacket

func BuildMoveStorageToCartPacket(index uint16, amount uint32) []byte

func BuildMoveToCartPacket

func BuildMoveToCartPacket(index uint16, amount uint32) []byte

func BuildMoveToStoragePacketForClientDate

func BuildMoveToStoragePacketForClientDate(index uint16, amount uint32, clientDate int) []byte

func BuildNPCClosePacket

func BuildNPCClosePacket(npcID uint32) []byte

func BuildNPCContactPacket

func BuildNPCContactPacket(npcID uint32, contactType uint8) []byte

func BuildNPCMenuChoicePacket

func BuildNPCMenuChoicePacket(npcID uint32, choice uint8) []byte

func BuildNPCNextPacket

func BuildNPCNextPacket(npcID uint32) []byte

func BuildNPCNumberInputPacket

func BuildNPCNumberInputPacket(npcID uint32, value int32) []byte

func BuildNPCStringInputPacket

func BuildNPCStringInputPacket(npcID uint32, value string) []byte

func BuildNameRequestPacket

func BuildNameRequestPacket(gid uint32) []byte

func BuildNameRequestPacketForClientDate

func BuildNameRequestPacketForClientDate(gid uint32, clientDate int) ([]byte, bool)

func BuildOpenVendingStorePacket

func BuildOpenVendingStorePacket(name string, items []VendingOpenItem) []byte

func BuildPartyInviteAckPacket

func BuildPartyInviteAckPacket(requestID uint32, accepted bool) []byte

func BuildPartyInviteConfigPacket

func BuildPartyInviteConfigPacket(refuseInvites bool) []byte

func BuildPartyInvitePacket

func BuildPartyInvitePacket(accountID uint32, name string) []byte

func BuildPartyMessagePacket

func BuildPartyMessagePacket(message string) []byte

func BuildPartyOptionPacket

func BuildPartyOptionPacket(expOption uint32) []byte

func BuildPetActPacket

func BuildPetActPacket(data uint32) []byte

func BuildPingPacket

func BuildPingPacket(accountID uint32) []byte

func BuildProgressBarDonePacket added in v0.10.0

func BuildProgressBarDonePacket() []byte

func BuildPvPInfoRequestPacket added in v0.7.0

func BuildPvPInfoRequestPacket(charID, accountID uint32) []byte

func BuildQuitGamePacket

func BuildQuitGamePacket() []byte

func BuildRegisterGuildEmblemPacket

func BuildRegisterGuildEmblemPacket(bmp []byte) ([]byte, error)

func BuildRegisterGuildPositionsPacket

func BuildRegisterGuildPositionsPacket(positions []GuildPosition) []byte

func BuildRememberWarpPointPacket

func BuildRememberWarpPointPacket() []byte

func BuildRemoveOptionPacket

func BuildRemoveOptionPacket() []byte

func BuildRenamePetPacket

func BuildRenamePetPacket(name string) []byte

func BuildRepairItemPacket

func BuildRepairItemPacket(item RepairItem) []byte

func BuildRequestGuildInvitePacket

func BuildRequestGuildInvitePacket(targetAID, inviterAID, inviterCharID uint32) []byte

func BuildRestartPacket

func BuildRestartPacket(restartType uint8) []byte

func BuildSelectAutoSpellPacket added in v0.9.0

func BuildSelectAutoSpellPacket(skillID uint16) []byte

func BuildSelectCharacterPacket

func BuildSelectCharacterPacket(slot uint8) []byte

func BuildSelectPetEggPacket

func BuildSelectPetEggPacket(index uint16) []byte

func BuildSelectWarpPointPacket

func BuildSelectWarpPointPacket(skillID uint16, mapName string) []byte

func BuildSellItemListPacket

func BuildSellItemListPacket(items []SellRequestItem) []byte

func BuildShopDealSelectionPacket

func BuildShopDealSelectionPacket(npcID uint32, dealType uint8) []byte

func BuildShowEquipConfigPacket

func BuildShowEquipConfigPacket(enabled bool) []byte

func BuildSkillLevelUpPacket

func BuildSkillLevelUpPacket(skillID uint16) []byte

func BuildStatusIncreasePacket

func BuildStatusIncreasePacket(statusID uint16) []byte

func BuildStoragePasswordReplyPacket added in v0.10.0

func BuildStoragePasswordReplyPacket(replyType StoragePasswordReplyType, password, newPassword string) []byte

BuildStoragePasswordReplyPacket builds the 36-byte CZ_ACK_STORE_PASSWORD layout used by the 2008 client. The active password occupies bytes 4..19; a replacement password occupies bytes 20..35.

func BuildTakeoffEquipPacket

func BuildTakeoffEquipPacket(index uint16) []byte

func BuildTickSendPacket

func BuildTickSendPacket(clientTick uint32) []byte

func BuildTickSendPacketForClientDate

func BuildTickSendPacketForClientDate(clientTick uint32, clientDate int) []byte

func BuildTradeAckPacket

func BuildTradeAckPacket(accept bool) []byte

func BuildTradeAddItemPacket

func BuildTradeAddItemPacket(index uint16, amount uint32) []byte

func BuildTradeCancelPacket

func BuildTradeCancelPacket() []byte

func BuildTradeCommitPacket

func BuildTradeCommitPacket() []byte

func BuildTradeConcludePacket

func BuildTradeConcludePacket() []byte

func BuildTradeRequestPacket

func BuildTradeRequestPacket(targetID uint32) []byte

func BuildTryCaptureMonsterPacket

func BuildTryCaptureMonsterPacket(targetID uint32) []byte

func BuildUseInventoryItemPacketForClientDate

func BuildUseInventoryItemPacketForClientDate(index uint16, targetAID uint32, clientDate int) []byte

func BuildUseSkillToGroundPacketForClientDate

func BuildUseSkillToGroundPacketForClientDate(skillID, level uint16, x, y int, clientDate int) []byte

func BuildUseSkillToGroundWithTextPacketForClientDate

func BuildUseSkillToGroundWithTextPacketForClientDate(skillID, level uint16, x, y int, text string, clientDate int) []byte

func BuildUseSkillToIDPacketForClientDate

func BuildUseSkillToIDPacketForClientDate(skillID, level uint16, targetID uint32, clientDate int) []byte

func BuildVendingListRequestPacket

func BuildVendingListRequestPacket(ownerAID uint32) []byte

func BuildVendingPurchasePacket

func BuildVendingPurchasePacket(ownerAID uint32, items []VendingPurchaseItem) []byte

func BuildViewPlayerEquipmentPacket

func BuildViewPlayerEquipmentPacket(targetID uint32) []byte

func BuildWalkToXYPacket

func BuildWalkToXYPacket(x, y int) ([]byte, bool)

func BuildWalkToXYPacketForClientDate

func BuildWalkToXYPacketForClientDate(x, y, clientDate int) ([]byte, bool)

func BuildWeaponRefinePacket

func BuildWeaponRefinePacket(index uint32) []byte

func BuildWearEquipPacket

func BuildWearEquipPacket(index, location uint16) []byte

func BuildWhisperIgnoreAllPacket

func BuildWhisperIgnoreAllPacket(allow bool) []byte

func BuildWhisperIgnorePacket

func BuildWhisperIgnorePacket(name string, allow bool) []byte

func BuildWhisperPacket

func BuildWhisperPacket(receiver, message string) []byte

func EncodeMoveDestination

func EncodeMoveDestination(x, y int) ([3]byte, bool)

func ID

func ID(data []byte) uint16

func IsInterServerDisconnect

func IsInterServerDisconnect(packet Packet) bool

func ParseAdoptionStarted added in v0.8.0

func ParseAdoptionStarted(packet Packet) bool

func ParseCartClosed

func ParseCartClosed(packet Packet) bool

func ParseDeleteCharacterAccept

func ParseDeleteCharacterAccept(packet Packet) error

func ParseDeleteCharacterRefuse

func ParseDeleteCharacterRefuse(packet Packet) (uint8, error)

func ParseLessEffect

func ParseLessEffect(packet Packet) (bool, bool, error)

func ParseMailWindow added in v0.11.0

func ParseMailWindow(packet Packet) (bool, bool, error)

func ParseMakeCharacterRefuse

func ParseMakeCharacterRefuse(packet Packet) (uint8, error)

func ParseProgressBarCancel added in v0.10.0

func ParseProgressBarCancel(packet Packet) (bool, error)

func ParseShowEquipConfig

func ParseShowEquipConfig(packet Packet) (bool, bool, error)

func ParseStorageClosed

func ParseStorageClosed(packet Packet) bool

func ParseTradeCanceled

func ParseTradeCanceled(packet Packet) bool

func ParseTradeUndo

func ParseTradeUndo(packet Packet) bool

Types

type AccountAcceptLogin

type AccountAcceptLogin struct {
	AuthCode   uint32
	AccountID  uint32
	UserLevel  uint32
	LastLogin  string
	Sex        uint8
	CharServer []CharServer
}

func ParseAccountAcceptLogin

func ParseAccountAcceptLogin(packet Packet) (AccountAcceptLogin, error)

type AccountLogin

type AccountLogin struct {
	Version    uint32
	Username   string
	Password   string
	ClientType uint8
}

type AccountRefuseLogin added in v0.8.1

type AccountRefuseLogin struct {
	ErrorCode   uint8
	UnblockTime string
}

func ParseAccountRefuseLogin added in v0.8.1

func ParseAccountRefuseLogin(packet Packet) (AccountRefuseLogin, error)

type ActorActionNotify

type ActorActionNotify struct {
	SourceID    uint32
	TargetID    uint32
	ServerTick  uint32
	SourceSpeed int32
	TargetSpeed int32
	Damage      int32
	HitCount    uint16
	Action      uint8
	LeftDamage  int32
	SkillID     uint16
	SkillLevel  uint16
}

func ParseActorActionNotify

func ParseActorActionNotify(packet Packet) (ActorActionNotify, bool, error)

type ActorBladeStop

type ActorBladeStop struct {
	SourceID uint32
	TargetID uint32
	Active   bool
}

func ParseActorBladeStop

func ParseActorBladeStop(packet Packet) (ActorBladeStop, bool, error)

type ActorDirectionChange

type ActorDirectionChange struct {
	ID      uint32
	HeadDir uint8
	Dir     uint8
}

func ParseActorDirectionChange

func ParseActorDirectionChange(packet Packet) (ActorDirectionChange, bool, error)

type ActorEntry

type ActorEntry struct {
	ID               uint32
	GuildID          uint32
	EmblemVersion    uint32
	Job              int16
	Head             int16
	Weapon           int16
	Shield           int16
	HeadTop          int16
	HeadMid          int16
	HeadLow          int16
	HeadPal          int16
	BodyPal          int16
	Sex              uint8
	HeadDir          uint8
	Appearance       bool
	X                int
	Y                int
	Dir              int
	Moving           bool
	FromX            int
	FromY            int
	ToX              int
	ToY              int
	MoveStartTick    uint32
	HasMoveStartTick bool
	ObjectType       uint8
	HasObjectType    bool
	Speed            int
	BodyState        uint16
	HealthState      uint16
	EffectState      uint32
	HasState         bool
	Level            int
	HasLevel         bool
}

func ParseActorEntry

func ParseActorEntry(packet Packet) (ActorEntry, bool, error)

type ActorHPUpdate

type ActorHPUpdate struct {
	ID    uint32
	HP    int
	MaxHP int
	Tiny  bool
}

func ParseActorHPUpdate

func ParseActorHPUpdate(packet Packet) (ActorHPUpdate, bool, error)

type ActorJumpPosition

type ActorJumpPosition struct {
	ID uint32
	X  int
	Y  int
}

func ParseActorJumpPosition

func ParseActorJumpPosition(packet Packet) (ActorJumpPosition, bool, error)

type ActorLookChange

type ActorLookChange struct {
	ID    uint32
	Type  uint8
	Value uint32
}

func ParseActorLookChange

func ParseActorLookChange(packet Packet) (ActorLookChange, bool, error)

type ActorNameAck

type ActorNameAck struct {
	ID           uint32
	Name         string
	PartyName    string
	GuildName    string
	Title        string
	HasGuildName bool
}

func ParseActorNameAck

func ParseActorNameAck(packet Packet) (ActorNameAck, bool, error)

type ActorResurrection added in v0.7.0

type ActorResurrection struct {
	ID   uint32
	Type uint16
}

func ParseActorResurrection added in v0.7.0

func ParseActorResurrection(packet Packet) (ActorResurrection, bool, error)

type ActorSetPosition

type ActorSetPosition struct {
	ID uint32
	X  int
	Y  int
}

func ParseActorSetPosition

func ParseActorSetPosition(packet Packet) (ActorSetPosition, bool, error)

type ActorStateChange

type ActorStateChange struct {
	ID          uint32
	BodyState   uint16
	HealthState uint16
	EffectState uint32
}

func ParseActorStateChange

func ParseActorStateChange(packet Packet) (ActorStateChange, bool, error)

type ActorVanish

type ActorVanish struct {
	ID     uint32
	Reason uint8
}

func ParseActorVanish

func ParseActorVanish(packet Packet) (ActorVanish, bool, error)

type AdoptionMessage added in v0.8.0

type AdoptionMessage struct {
	Code uint32
}

func ParseAdoptionMessage added in v0.8.0

func ParseAdoptionMessage(packet Packet) (AdoptionMessage, bool, error)

type AdoptionRequest added in v0.8.0

type AdoptionRequest struct {
	FatherAccountID uint32
	MotherAccountID uint32
	FatherName      string
}

func ParseAdoptionRequest added in v0.8.0

func ParseAdoptionRequest(packet Packet) (AdoptionRequest, bool, error)

type AttackFailureForDistance

type AttackFailureForDistance struct {
	TargetID    uint32
	TargetX     int
	TargetY     int
	SourceX     int
	SourceY     int
	AttackRange int
}

func ParseAttackFailureForDistance

func ParseAttackFailureForDistance(packet Packet) (AttackFailureForDistance, bool, error)

type AutoRunSkill

type AutoRunSkill struct {
	Skill SkillInfo
}

func ParseAutoRunSkill

func ParseAutoRunSkill(packet Packet) (AutoRunSkill, bool, error)

type AutoSpellList added in v0.9.0

type AutoSpellList struct {
	SkillIDs []uint16
}

func ParseAutoSpellList added in v0.9.0

func ParseAutoSpellList(packet Packet) (AutoSpellList, bool, error)

type BossInfo added in v0.10.0

type BossInfo struct {
	Kind       BossInfoKind
	X          uint32
	Y          uint32
	MinRespawn time.Duration
	MaxRespawn time.Duration
	Name       string
}

func ParseBossInfo added in v0.10.0

func ParseBossInfo(packet Packet) (BossInfo, bool, error)

type BossInfoKind added in v0.10.0

type BossInfoKind uint8
const (
	BossInfoNotOnMap BossInfoKind = iota
	BossInfoAlive
	BossInfoAliveAnnounced
	BossInfoDead
)

type BuyRequestItem

type BuyRequestItem struct {
	ItemID uint16
	Amount uint16
}

type CartAddAck

type CartAddAck struct {
	Result uint8
}

func ParseCartAddAck

func ParseCartAddAck(packet Packet) (CartAddAck, bool, error)

type CartAmount

type CartAmount struct {
	Amount    uint16
	MaxAmount uint16
	Weight    uint32
	MaxWeight uint32
}

func ParseCartAmount

func ParseCartAmount(packet Packet) (CartAmount, bool, error)

type CartItemRemoved

type CartItemRemoved struct {
	Index  uint16
	Amount uint32
}

func ParseCartItemRemoved

func ParseCartItemRemoved(packet Packet) (CartItemRemoved, bool, error)

type CharList

type CharList struct {
	Layout     string
	Characters []Character
}

func ParseCharList

func ParseCharList(packet Packet) (CharList, error)

type CharServer

type CharServer struct {
	Address   string
	Port      uint16
	Name      string
	UserCount uint16
	State     uint16
	Property  uint16
}

type CharServerEnter

type CharServerEnter struct {
	AccountID uint32
	AuthCode  uint32
	UserLevel uint32
	Sex       uint8
}

type Character

type Character struct {
	ID        uint32
	Exp       int64
	Money     int64
	Name      string
	Slot      uint8
	Level     int16
	JobLevel  int16
	Job       int16
	HP        int16
	MaxHP     int16
	SP        int16
	MaxSP     int16
	Str       uint8
	Agi       uint8
	Vit       uint8
	Int       uint8
	Dex       uint8
	Luk       uint8
	Hair      int16
	HairColor uint8
	HeadPal   int16
	BodyPal   int16
	Weapon    int16
	Shield    int16
	HeadTop   int16
	HeadMid   int16
	HeadLow   int16
	Option    uint32
}

func ParseMakeCharacterAccept

func ParseMakeCharacterAccept(packet Packet) (Character, error)

type ChatMessage

type ChatMessage struct {
	GID          uint32
	Text         string
	MessageID    int
	Value        int32
	SkillID      uint16
	Color        uint32
	HasColor     bool
	Announcement bool
	FontType     int16
	FontSize     int16
	FontAlign    int16
	FontY        int16
}

func ParseChatMessage

func ParseChatMessage(packet Packet) (ChatMessage, bool, error)

type ChatRoomBoard

type ChatRoomBoard struct {
	OwnerID uint32
	RoomID  uint32
	Limit   uint16
	Count   uint16
	Public  bool
	Title   string
}

func ParseChatRoomBoard

func ParseChatRoomBoard(packet Packet) (ChatRoomBoard, bool, error)

type ChatRoomChange

type ChatRoomChange struct {
	OwnerID uint32
	RoomID  uint32
	Limit   uint16
	Count   uint16
	Public  bool
	Title   string
}

func ParseChatRoomChange

func ParseChatRoomChange(packet Packet) (ChatRoomChange, bool, error)

type ChatRoomCreate

type ChatRoomCreate struct {
	Title    string
	Password string
	Limit    uint16
	Public   bool
}

type ChatRoomCreateAck

type ChatRoomCreateAck struct {
	Result uint8
}

func ParseChatRoomCreateAck

func ParseChatRoomCreateAck(packet Packet) (ChatRoomCreateAck, bool, error)

type ChatRoomDestroy

type ChatRoomDestroy struct {
	RoomID uint32
}

func ParseChatRoomDestroy

func ParseChatRoomDestroy(packet Packet) (ChatRoomDestroy, bool, error)

type ChatRoomEnter

type ChatRoomEnter struct {
	RoomID  uint32
	Members []ChatRoomMember
}

func ParseChatRoomEnter

func ParseChatRoomEnter(packet Packet) (ChatRoomEnter, bool, error)

type ChatRoomMember

type ChatRoomMember struct {
	Owner bool
	Name  string
}

type ChatRoomMemberJoin

type ChatRoomMemberJoin struct {
	Count uint16
	Name  string
}

func ParseChatRoomMemberJoin

func ParseChatRoomMemberJoin(packet Packet) (ChatRoomMemberJoin, bool, error)

type ChatRoomMemberLeave

type ChatRoomMemberLeave struct {
	Count  uint16
	Name   string
	Kicked bool
}

func ParseChatRoomMemberLeave

func ParseChatRoomMemberLeave(packet Packet) (ChatRoomMemberLeave, bool, error)

type ChatRoomRoleChange

type ChatRoomRoleChange struct {
	Owner bool
	Name  string
}

func ParseChatRoomRoleChange

func ParseChatRoomRoleChange(packet Packet) (ChatRoomRoleChange, bool, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientDate int, trace bool) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect(ctx context.Context, address string, port int) error

func (*Client) DrainErrors

func (c *Client) DrainErrors() []error

func (*Client) DrainPackets

func (c *Client) DrainPackets() []Packet

func (*Client) Pump

func (c *Client) Pump()

func (*Client) Send

func (c *Client) Send(data []byte) error

func (*Client) SendAccountLogin

func (c *Client) SendAccountLogin(username, password string, version uint32, clientType uint8) error

func (*Client) SendActionRequest

func (c *Client) SendActionRequest(targetGID uint32, action uint8) error

func (*Client) SendAddFriend

func (c *Client) SendAddFriend(name string) error

func (*Client) SendAdoptionReply added in v0.8.0

func (c *Client) SendAdoptionReply(fatherAccountID, motherAccountID uint32, accepted bool) error

func (*Client) SendAdoptionRequest added in v0.8.0

func (c *Client) SendAdoptionRequest(targetAccountID uint32) error

func (*Client) SendAgreeStarPlace added in v0.9.0

func (c *Client) SendAgreeStarPlace(place uint8) error

func (*Client) SendAutoRevive added in v0.10.0

func (c *Client) SendAutoRevive() error

func (*Client) SendCancelVendingStoreOpen

func (c *Client) SendCancelVendingStoreOpen() error

func (*Client) SendChangeCart

func (c *Client) SendChangeCart(cartNum uint16) error

func (*Client) SendChangeDirection

func (c *Client) SendChangeDirection(headDir, dir uint8) error

func (*Client) SendCharServerEnter

func (c *Client) SendCharServerEnter(accountID, authCode, userLevel uint32, sex uint8) error

func (*Client) SendCloseStorage

func (c *Client) SendCloseStorage() error

func (*Client) SendCloseVendingStore

func (c *Client) SendCloseVendingStore() error

func (*Client) SendCompanionAttack

func (c *Client) SendCompanionAttack(gid, targetGID uint32) error

func (*Client) SendCompanionMove

func (c *Client) SendCompanionMove(gid uint32, x, y int) error

func (*Client) SendCompanionMoveToOwner

func (c *Client) SendCompanionMoveToOwner(gid uint32) error

func (*Client) SendCreateChatRoom

func (c *Client) SendCreateChatRoom(room ChatRoomCreate) error

func (*Client) SendCreateGuild

func (c *Client) SendCreateGuild(charID uint32, name string) error

func (*Client) SendDeleteCharacter

func (c *Client) SendDeleteCharacter(charID uint32, key string) error

func (*Client) SendDeleteFriend

func (c *Client) SendDeleteFriend(accountID, charID uint32) error

func (*Client) SendDeleteGuildRelation added in v0.8.0

func (c *Client) SendDeleteGuildRelation(guildID, relation uint32) error

func (*Client) SendDisbandGuild added in v0.8.1

func (c *Client) SendDisbandGuild(name string) error

func (*Client) SendDoriDori added in v0.10.0

func (c *Client) SendDoriDori() error

func (*Client) SendDropInventoryItem

func (c *Client) SendDropInventoryItem(index, amount uint16) error

func (*Client) SendEmotion

func (c *Client) SendEmotion(emotionType uint8) error

func (*Client) SendEnterChatRoom

func (c *Client) SendEnterChatRoom(roomID uint32, password string) error

func (*Client) SendExitChatRoom

func (c *Client) SendExitChatRoom() error

func (*Client) SendExpelGuildMember added in v0.8.1

func (c *Client) SendExpelGuildMember(guildID, accountID, charID uint32, reason string) error

func (*Client) SendExpelPartyMember

func (c *Client) SendExpelPartyMember(accountID uint32, name string) error

func (*Client) SendFameRankingRequest added in v0.10.0

func (c *Client) SendFameRankingRequest(kind FameRankingKind) error

func (*Client) SendFriendRequestAck

func (c *Client) SendFriendRequestAck(accountID, charID uint32, accepted bool) error

func (*Client) SendGlobalChat

func (c *Client) SendGlobalChat(name, message string) error

func (*Client) SendGuildAllianceReply added in v0.8.0

func (c *Client) SendGuildAllianceReply(accountID uint32, accept bool) error

func (*Client) SendGuildAllianceRequest added in v0.8.0

func (c *Client) SendGuildAllianceRequest(targetAID, accountID, charID uint32) error

func (*Client) SendGuildEmblem

func (c *Client) SendGuildEmblem(bmp []byte) error

func (*Client) SendGuildEmblemRequest

func (c *Client) SendGuildEmblemRequest(guildID uint32) error

func (*Client) SendGuildHostilityRequest added in v0.8.0

func (c *Client) SendGuildHostilityRequest(targetAID uint32) error

func (*Client) SendGuildInvite

func (c *Client) SendGuildInvite(targetAID, inviterAID, inviterCharID uint32) error

func (*Client) SendGuildInviteReply

func (c *Client) SendGuildInviteReply(guildID uint32, accept bool) error

func (*Client) SendGuildMemberPositions

func (c *Client) SendGuildMemberPositions(members []GuildMemberPosition) error

func (*Client) SendGuildMenuInterfaceRequest added in v0.8.1

func (c *Client) SendGuildMenuInterfaceRequest() error

func (*Client) SendGuildMenuRequest

func (c *Client) SendGuildMenuRequest(tab uint32) error

func (*Client) SendGuildMessage added in v0.7.0

func (c *Client) SendGuildMessage(message string) error

func (*Client) SendGuildNotice

func (c *Client) SendGuildNotice(guildID uint32, subject, notice string) error

func (*Client) SendGuildPositions

func (c *Client) SendGuildPositions(positions []GuildPosition) error

func (*Client) SendHomunculusCommand

func (c *Client) SendHomunculusCommand(command uint8) error

func (*Client) SendHomunculusDelete

func (c *Client) SendHomunculusDelete() error

func (*Client) SendHomunculusFeed

func (c *Client) SendHomunculusFeed() error

func (*Client) SendHomunculusRename

func (c *Client) SendHomunculusRename(name string) error

func (*Client) SendHotkey

func (c *Client) SendHotkey(index uint16, slot HotkeySlot) error

func (*Client) SendItemComposition

func (c *Client) SendItemComposition(cardIndex, equipIndex uint16) error

func (*Client) SendItemCompositionList

func (c *Client) SendItemCompositionList(cardIndex uint16) error

func (*Client) SendItemIdentify

func (c *Client) SendItemIdentify(index uint16) error

func (*Client) SendItemPickup

func (c *Client) SendItemPickup(gid uint32) error

func (*Client) SendLeaveGuild added in v0.8.1

func (c *Client) SendLeaveGuild(guildID, accountID, charID uint32, reason string) error

func (*Client) SendLeaveParty

func (c *Client) SendLeaveParty() error

func (*Client) SendLessEffect

func (c *Client) SendLessEffect(enabled bool) error

func (*Client) SendLoadEndAck

func (c *Client) SendLoadEndAck() error

func (*Client) SendLoginServerKeepalive added in v0.8.1

func (c *Client) SendLoginServerKeepalive(username string) error

func (*Client) SendMail added in v0.11.0

func (c *Client) SendMail(recipient, title, body string) error

func (*Client) SendMailAddAttachment added in v0.11.0

func (c *Client) SendMailAddAttachment(index uint16, amount uint32) error

func (*Client) SendMailDelete added in v0.11.0

func (c *Client) SendMailDelete(id uint32) error

func (*Client) SendMailGetAttachment added in v0.11.0

func (c *Client) SendMailGetAttachment(id uint32) error

func (*Client) SendMailRead added in v0.11.0

func (c *Client) SendMailRead(id uint32) error

func (*Client) SendMailRefresh added in v0.11.0

func (c *Client) SendMailRefresh() error

func (*Client) SendMailReset added in v0.11.0

func (c *Client) SendMailReset(kind MailResetType) error

func (*Client) SendMailReturn added in v0.11.0

func (c *Client) SendMailReturn(id uint32, sender string) error

func (*Client) SendMakeCharacter

func (c *Client) SendMakeCharacter(character MakeCharacter) error

func (*Client) SendMakeParty

func (c *Client) SendMakeParty(name string) error

func (*Client) SendMakeParty2

func (c *Client) SendMakeParty2(name string, itemPickupRule, itemDivisionRule uint8) error

func (*Client) SendMakingArrow

func (c *Client) SendMakingArrow(itemID uint16) error

func (*Client) SendMakingItem

func (c *Client) SendMakingItem(itemID uint16, material [3]uint16) error

func (*Client) SendMapServerEnter

func (c *Client) SendMapServerEnter(accountID, charID, authCode, clientTick uint32, sex uint8) error

func (*Client) SendMercenaryCommand

func (c *Client) SendMercenaryCommand(command uint8) error

func (*Client) SendMoveCartToStorage

func (c *Client) SendMoveCartToStorage(index uint16, amount uint32) error

func (*Client) SendMoveFromCart

func (c *Client) SendMoveFromCart(index uint16, amount uint32) error

func (*Client) SendMoveFromStorage

func (c *Client) SendMoveFromStorage(index uint16, amount uint32) error

func (*Client) SendMoveStorageToCart

func (c *Client) SendMoveStorageToCart(index uint16, amount uint32) error

func (*Client) SendMoveToCart

func (c *Client) SendMoveToCart(index uint16, amount uint32) error

func (*Client) SendMoveToStorage

func (c *Client) SendMoveToStorage(index uint16, amount uint32) error

func (*Client) SendNPCClose

func (c *Client) SendNPCClose(npcID uint32) error

func (*Client) SendNPCContact

func (c *Client) SendNPCContact(npcID uint32) error

func (*Client) SendNPCMenuChoice

func (c *Client) SendNPCMenuChoice(npcID uint32, choice uint8) error

func (*Client) SendNPCNext

func (c *Client) SendNPCNext(npcID uint32) error

func (*Client) SendNPCNumberInput

func (c *Client) SendNPCNumberInput(npcID uint32, value int32) error

func (*Client) SendNPCStringInput

func (c *Client) SendNPCStringInput(npcID uint32, value string) error

func (*Client) SendNameRequest

func (c *Client) SendNameRequest(gid uint32) error

func (*Client) SendOpenVendingStore

func (c *Client) SendOpenVendingStore(name string, items []VendingOpenItem) error

func (*Client) SendPartyInvite

func (c *Client) SendPartyInvite(accountID uint32, name string) error

func (*Client) SendPartyInviteAck

func (c *Client) SendPartyInviteAck(requestID uint32, accepted bool) error

func (*Client) SendPartyInviteConfig

func (c *Client) SendPartyInviteConfig(refuseInvites bool) error

func (*Client) SendPartyMessage

func (c *Client) SendPartyMessage(message string) error

func (*Client) SendPartyOption

func (c *Client) SendPartyOption(expOption uint32) error

func (*Client) SendPetAct

func (c *Client) SendPetAct(data uint32) error

func (*Client) SendPetCommand

func (c *Client) SendPetCommand(command uint8) error

func (*Client) SendPing

func (c *Client) SendPing(accountID uint32) error

func (*Client) SendProgressBarDone added in v0.10.0

func (c *Client) SendProgressBarDone() error

func (*Client) SendPvPInfoRequest added in v0.7.0

func (c *Client) SendPvPInfoRequest(charID, accountID uint32) error

func (*Client) SendQuitGame

func (c *Client) SendQuitGame() error

func (*Client) SendRememberWarpPoint

func (c *Client) SendRememberWarpPoint() error

func (*Client) SendRemoveOption

func (c *Client) SendRemoveOption() error

func (*Client) SendRenamePet

func (c *Client) SendRenamePet(name string) error

func (*Client) SendRepairItem

func (c *Client) SendRepairItem(item RepairItem) error

func (*Client) SendRestart

func (c *Client) SendRestart(restartType uint8) error

func (*Client) SendSelectAutoSpell added in v0.9.0

func (c *Client) SendSelectAutoSpell(skillID uint16) error

func (*Client) SendSelectCharacter

func (c *Client) SendSelectCharacter(slot uint8) error

func (*Client) SendSelectPetEgg

func (c *Client) SendSelectPetEgg(index uint16) error

func (*Client) SendSelectWarpPoint

func (c *Client) SendSelectWarpPoint(skillID uint16, mapName string) error

func (*Client) SendShopBuyItems

func (c *Client) SendShopBuyItems(items []BuyRequestItem) error

func (*Client) SendShopDealSelection

func (c *Client) SendShopDealSelection(npcID uint32, dealType uint8) error

func (*Client) SendShopSellItems

func (c *Client) SendShopSellItems(items []SellRequestItem) error

func (*Client) SendShowEquipConfig

func (c *Client) SendShowEquipConfig(enabled bool) error

func (*Client) SendSkillLevelUp

func (c *Client) SendSkillLevelUp(skillID uint16) error

func (*Client) SendStatusIncrease

func (c *Client) SendStatusIncrease(statusID uint16) error

func (*Client) SendStoragePasswordReply added in v0.10.0

func (c *Client) SendStoragePasswordReply(replyType StoragePasswordReplyType, password, newPassword string) error

func (*Client) SendTakeoffEquip

func (c *Client) SendTakeoffEquip(index uint16) error

func (*Client) SendTradeAck

func (c *Client) SendTradeAck(accept bool) error

func (*Client) SendTradeAddItem

func (c *Client) SendTradeAddItem(index uint16, amount uint32) error

func (*Client) SendTradeCancel

func (c *Client) SendTradeCancel() error

func (*Client) SendTradeCommit

func (c *Client) SendTradeCommit() error

func (*Client) SendTradeConclude

func (c *Client) SendTradeConclude() error

func (*Client) SendTradeRequest

func (c *Client) SendTradeRequest(targetID uint32) error

func (*Client) SendTryCaptureMonster

func (c *Client) SendTryCaptureMonster(targetID uint32) error

func (*Client) SendUseInventoryItem

func (c *Client) SendUseInventoryItem(index uint16, targetAID uint32) error

func (*Client) SendUseSkillToGround

func (c *Client) SendUseSkillToGround(skillID, level uint16, x, y int) error

func (*Client) SendUseSkillToGroundWithText

func (c *Client) SendUseSkillToGroundWithText(skillID, level uint16, x, y int, text string) error

func (*Client) SendUseSkillToID

func (c *Client) SendUseSkillToID(skillID, level uint16, targetID uint32) error

func (*Client) SendVendingListRequest

func (c *Client) SendVendingListRequest(ownerAID uint32) error

func (*Client) SendVendingPurchase

func (c *Client) SendVendingPurchase(ownerAID uint32, items []VendingPurchaseItem) error

func (*Client) SendViewPlayerEquipment

func (c *Client) SendViewPlayerEquipment(targetID uint32) error

func (*Client) SendWalkToXY

func (c *Client) SendWalkToXY(x, y int) error

func (*Client) SendWeaponRefine

func (c *Client) SendWeaponRefine(index uint32) error

func (*Client) SendWearEquip

func (c *Client) SendWearEquip(index, location uint16) error

func (*Client) SendWhisper

func (c *Client) SendWhisper(receiver, message string) error

func (*Client) SendWhisperIgnore

func (c *Client) SendWhisperIgnore(name string, allow bool) error

func (*Client) SendWhisperIgnoreAll

func (c *Client) SendWhisperIgnoreAll(allow bool) error

func (*Client) Status

func (c *Client) Status() string

type EmotionNotify

type EmotionNotify struct {
	GID  uint32
	Type uint8
}

func ParseEmotionNotify

func ParseEmotionNotify(packet Packet) (EmotionNotify, bool, error)

type EquippedArrow

type EquippedArrow struct {
	Index uint16
}

func ParseEquippedArrow

func ParseEquippedArrow(packet Packet) (EquippedArrow, bool, error)

type ExpNotify

type ExpNotify struct {
	AID     uint32
	Amount  int32
	VarID   uint16
	ExpType uint16
}

func ParseExpNotify

func ParseExpNotify(packet Packet) (ExpNotify, bool, error)

type FamePointUpdate added in v0.10.0

type FamePointUpdate struct {
	Kind         FameRankingKind
	GainedPoints uint32
	TotalPoints  uint32
}

func ParseFamePointUpdate added in v0.10.0

func ParseFamePointUpdate(packet Packet) (FamePointUpdate, bool, error)

type FameRanking added in v0.10.0

type FameRanking struct {
	Kind    FameRankingKind
	Entries []FameRankingEntry
}

func ParseFameRanking added in v0.10.0

func ParseFameRanking(packet Packet) (FameRanking, bool, error)

type FameRankingEntry added in v0.10.0

type FameRankingEntry struct {
	Name   string
	Points uint32
}

type FameRankingKind added in v0.10.0

type FameRankingKind uint8
const (
	FameRankingUnknown FameRankingKind = iota
	FameRankingBlacksmith
	FameRankingAlchemist
	FameRankingTaekwon
)

type FloorItemDisappear

type FloorItemDisappear struct {
	ID uint32
}

func ParseFloorItemDisappear

func ParseFloorItemDisappear(packet Packet) (FloorItemDisappear, bool, error)

type FloorItemEntry

type FloorItemEntry struct {
	ID         uint32
	ItemID     uint16
	Identified bool
	X          int
	Y          int
	SubX       uint8
	SubY       uint8
	Amount     uint16
	Falling    bool
}

func ParseFloorItemEntry

func ParseFloorItemEntry(packet Packet) (FloorItemEntry, bool, error)

type FrameError

type FrameError struct {
	Err error
}

func (FrameError) Error

func (e FrameError) Error() string

func (FrameError) Unwrap

func (e FrameError) Unwrap() error

type Framer

type Framer struct {
	// contains filtered or unexported fields
}

func NewFramer

func NewFramer(lengths LengthTable) *Framer

func (*Framer) Push

func (f *Framer) Push(data []byte) ([]Packet, error)

type Friend

type Friend struct {
	AccountID uint32
	CharID    uint32
	Name      string
	State     uint8
}

func ParseFriendsList

func ParseFriendsList(packet Packet) ([]Friend, bool, error)

type FriendAddResult

type FriendAddResult struct {
	Result    uint16
	AccountID uint32
	CharID    uint32
	Name      string
}

func ParseFriendAddResult

func ParseFriendAddResult(packet Packet) (FriendAddResult, bool, error)

type FriendDelete

type FriendDelete struct {
	AccountID uint32
	CharID    uint32
}

func ParseFriendDelete

func ParseFriendDelete(packet Packet) (FriendDelete, bool, error)

type FriendRequest

type FriendRequest struct {
	AccountID uint32
	CharID    uint32
	Name      string
}

func ParseFriendRequest

func ParseFriendRequest(packet Packet) (FriendRequest, bool, error)

type FriendState

type FriendState struct {
	AccountID uint32
	CharID    uint32
	State     uint8
	Name      string
}

func ParseFriendState

func ParseFriendState(packet Packet) (FriendState, bool, error)

type GroundSkillNotify

type GroundSkillNotify struct {
	SkillID  uint16
	SourceID uint32
	Level    uint16
	X        uint16
	Y        uint16
}

func ParseGroundSkillNotify

func ParseGroundSkillNotify(packet Packet) (GroundSkillNotify, bool, error)

type GuildAllianceRequest added in v0.8.0

type GuildAllianceRequest struct {
	AccountID uint32
	GuildName string
}

func ParseGuildAllianceRequest added in v0.8.0

func ParseGuildAllianceRequest(packet Packet) (GuildAllianceRequest, bool, error)

type GuildAllianceResult added in v0.8.0

type GuildAllianceResult struct {
	Result uint8
}

func ParseGuildAllianceResult added in v0.8.0

func ParseGuildAllianceResult(packet Packet) (GuildAllianceResult, bool, error)

type GuildBelonging

type GuildBelonging struct {
	GuildID       uint32
	EmblemVersion uint32
	Mode          uint32
	IsMaster      bool
	GuildName     string
}

func ParseGuildBelonging

func ParseGuildBelonging(packet Packet) (GuildBelonging, bool, error)

type GuildChat added in v0.8.1

type GuildChat struct {
	Message string
}

func ParseGuildChat added in v0.8.1

func ParseGuildChat(packet Packet) (GuildChat, bool, error)

type GuildCreationResult

type GuildCreationResult struct {
	Result uint8
}

func ParseGuildCreationResult

func ParseGuildCreationResult(packet Packet) (GuildCreationResult, bool, error)

type GuildDisbandResult added in v0.8.1

type GuildDisbandResult struct {
	Result uint32
}

func ParseGuildDisbandResult added in v0.8.1

func ParseGuildDisbandResult(packet Packet) (GuildDisbandResult, bool, error)

type GuildEmblemChange

type GuildEmblemChange struct {
	ActorID       uint32
	GuildID       uint32
	EmblemVersion uint32
}

func ParseGuildEmblemChange

func ParseGuildEmblemChange(packet Packet) (GuildEmblemChange, bool, error)

type GuildEmblemImage

type GuildEmblemImage struct {
	GuildID       uint32
	EmblemVersion uint32
	Data          []byte
}

func ParseGuildEmblemImage

func ParseGuildEmblemImage(packet Packet) (GuildEmblemImage, bool, error)

type GuildExpelHistory

type GuildExpelHistory struct {
	CharName string
	Account  string
	Reason   string
}

func ParseGuildExpelHistory

func ParseGuildExpelHistory(packet Packet) ([]GuildExpelHistory, bool, error)

type GuildHostilityResult added in v0.8.0

type GuildHostilityResult struct {
	Result uint8
}

func ParseGuildHostilityResult added in v0.8.0

func ParseGuildHostilityResult(packet Packet) (GuildHostilityResult, bool, error)

type GuildInfo

type GuildInfo struct {
	GuildID          uint32
	Level            uint32
	UserNum          uint32
	MaxUserNum       uint32
	UserAverageLevel uint32
	Exp              uint32
	MaxExp           uint32
	Point            uint32
	Honor            uint32
	Virtue           uint32
	EmblemVersion    uint32
	GuildName        string
	MasterName       string
	ManageLand       string
	Zeny             uint32
}

func ParseGuildInfo

func ParseGuildInfo(packet Packet) (GuildInfo, bool, error)

type GuildInviteAck

type GuildInviteAck struct {
	Result uint8
}

func ParseGuildInviteAck

func ParseGuildInviteAck(packet Packet) (GuildInviteAck, bool, error)

type GuildInviteRequest

type GuildInviteRequest struct {
	GuildID   uint32
	GuildName string
}

func ParseGuildInviteRequest

func ParseGuildInviteRequest(packet Packet) (GuildInviteRequest, bool, error)

type GuildMember

type GuildMember struct {
	AccountID    uint32
	CharID       uint32
	HeadType     uint16
	HeadPalette  uint16
	Sex          uint16
	Job          uint16
	Level        uint16
	MemberExp    uint32
	CurrentState uint32
	PositionID   uint32
	Memo         string
	CharName     string
}

func ParseGuildMemberInfo

func ParseGuildMemberInfo(packet Packet) (GuildMember, bool, error)

func ParseGuildMembers

func ParseGuildMembers(packet Packet) ([]GuildMember, bool, error)

type GuildMemberDeparture added in v0.8.1

type GuildMemberDeparture struct {
	CharName string
	Reason   string
}

func ParseGuildMemberDeparture added in v0.8.1

func ParseGuildMemberDeparture(packet Packet) (GuildMemberDeparture, bool, error)

type GuildMemberExpulsion added in v0.8.1

type GuildMemberExpulsion struct {
	CharName string
	Reason   string
	Account  string
}

func ParseGuildMemberExpulsion added in v0.8.1

func ParseGuildMemberExpulsion(packet Packet) (GuildMemberExpulsion, bool, error)

type GuildMemberLocation added in v0.8.0

type GuildMemberLocation struct {
	AccountID uint32
	X         int16
	Y         int16
}

func ParseGuildMemberLocation added in v0.8.0

func ParseGuildMemberLocation(packet Packet) (GuildMemberLocation, bool, error)

type GuildMemberPosition

type GuildMemberPosition struct {
	AccountID  uint32
	CharID     uint32
	PositionID uint32
}

func ParseGuildMemberPositions

func ParseGuildMemberPositions(packet Packet) ([]GuildMemberPosition, bool, error)

type GuildMemberState added in v0.8.0

type GuildMemberState struct {
	AccountID     uint32
	CharID        uint32
	State         uint32
	HasAppearance bool
	Sex           uint16
	HeadType      uint16
	HeadPalette   uint16
}

func ParseGuildMemberState added in v0.8.0

func ParseGuildMemberState(packet Packet) (GuildMemberState, bool, error)

type GuildMenuAccess added in v0.8.1

type GuildMenuAccess struct {
	Mask uint32
}

func ParseGuildMenuAccess added in v0.8.1

func ParseGuildMenuAccess(packet Packet) (GuildMenuAccess, bool, error)

type GuildNotice

type GuildNotice struct {
	Subject string
	Notice  string
}

func ParseGuildNotice

func ParseGuildNotice(packet Packet) (GuildNotice, bool, error)

type GuildPosition

type GuildPosition struct {
	PositionID uint32
	Right      uint32
	Ranking    uint32
	PayRate    uint32
	PosName    string
}

func ParseGuildPositionNames

func ParseGuildPositionNames(packet Packet) ([]GuildPosition, bool, error)

func ParseGuildPositions

func ParseGuildPositions(packet Packet) ([]GuildPosition, bool, error)

type GuildRelation added in v0.8.0

type GuildRelation struct {
	Relation uint32
	GuildID  uint32
	Name     string
}

func ParseGuildRelationAdded added in v0.8.0

func ParseGuildRelationAdded(packet Packet) (GuildRelation, bool, error)

func ParseGuildRelations added in v0.8.0

func ParseGuildRelations(packet Packet) ([]GuildRelation, bool, error)

type GuildRelationDeleted added in v0.8.0

type GuildRelationDeleted struct {
	GuildID  uint32
	Relation uint32
}

func ParseGuildRelationDeleted added in v0.8.0

func ParseGuildRelationDeleted(packet Packet) (GuildRelationDeleted, bool, error)

type GuildSkillInfo

type GuildSkillInfo struct {
	SkillPoints int
	Skills      []SkillInfo
}

func ParseGuildSkillInfo

func ParseGuildSkillInfo(packet Packet) (GuildSkillInfo, bool, error)

type HomunculusFeedResult

type HomunculusFeedResult struct {
	Result bool
	ItemID uint16
}

func ParseHomunculusFeedResult

func ParseHomunculusFeedResult(packet Packet) (HomunculusFeedResult, bool, error)

type HomunculusParamChange

type HomunculusParamChange struct {
	Param uint16
	Value int64
}

func ParseHomunculusParamChange

func ParseHomunculusParamChange(packet Packet) (HomunculusParamChange, bool, error)

type HomunculusProperty

type HomunculusProperty struct {
	Name         string
	Flags        uint8
	Level        int
	Hunger       int
	Intimacy     int
	ItemID       uint32
	Attack       int
	MagicAttack  int
	Hit          int
	Critical     int
	Defense      int
	MagicDefense int
	Flee         int
	ASPD         int
	HP           int
	MaxHP        int
	SP           int
	MaxSP        int
	Exp          uint64
	MaxExp       uint64
	SkillPoints  int
	AttackRange  int
}

func ParseHomunculusProperty

func ParseHomunculusProperty(packet Packet) (HomunculusProperty, bool, error)

type HomunculusSkillInfoList

type HomunculusSkillInfoList struct {
	Skills []SkillInfo
}

func ParseHomunculusSkillInfoList

func ParseHomunculusSkillInfoList(packet Packet) (HomunculusSkillInfoList, bool, error)

type HomunculusSkillInfoUpdate

type HomunculusSkillInfoUpdate struct {
	Skill SkillInfo
}

func ParseHomunculusSkillInfoUpdate

func ParseHomunculusSkillInfoUpdate(packet Packet) (HomunculusSkillInfoUpdate, bool, error)

type HomunculusStateChange

type HomunculusStateChange struct {
	Type  uint8
	State uint8
	GID   uint32
	Data  uint32
}

func ParseHomunculusStateChange

func ParseHomunculusStateChange(packet Packet) (HomunculusStateChange, bool, error)

type HotkeyList

type HotkeyList struct {
	Slots []HotkeySlot
}

func ParseHotkeyList

func ParseHotkeyList(packet Packet) (HotkeyList, bool, error)

type HotkeySlot

type HotkeySlot struct {
	Type  uint8
	ID    uint32
	Level uint16
}

type InventoryEquipAck

type InventoryEquipAck struct {
	Index    uint16
	Location uint16
	Success  bool
	Unequip  bool
}

func ParseInventoryEquipAck

func ParseInventoryEquipAck(packet Packet) (InventoryEquipAck, bool, error)

type InventoryItem

type InventoryItem struct {
	Index      uint16
	ItemID     uint16
	Type       uint8
	Location   uint16
	Identified bool
	Amount     uint16
	Equip      bool
	Equipped   bool
	Damaged    bool
	Refine     uint8
	Cards      [4]uint16
}

func ParseCartItemAdded

func ParseCartItemAdded(packet Packet) (InventoryItem, bool, error)

func ParseCartItemList

func ParseCartItemList(packet Packet) ([]InventoryItem, bool, error)

func ParseInventoryItemList

func ParseInventoryItemList(packet Packet) ([]InventoryItem, bool, error)

func ParseStorageItemAdded

func ParseStorageItemAdded(packet Packet) (InventoryItem, bool, error)

func ParseStorageItemList

func ParseStorageItemList(packet Packet) ([]InventoryItem, bool, error)

type InventoryItemDelete

type InventoryItemDelete struct {
	Index  uint16
	Amount uint16
	Reason uint16
}

func ParseInventoryItemDelete

func ParseInventoryItemDelete(packet Packet) (InventoryItemDelete, bool, error)

type ItemCompositionAck

type ItemCompositionAck struct {
	EquipIndex uint16
	CardIndex  uint16
	Success    bool
}

func ParseItemCompositionAck

func ParseItemCompositionAck(packet Packet) (ItemCompositionAck, bool, error)

type ItemCompositionList

type ItemCompositionList struct {
	Indexes []uint16
}

func ParseItemCompositionList

func ParseItemCompositionList(packet Packet) (ItemCompositionList, bool, error)

type ItemIdentifyAck

type ItemIdentifyAck struct {
	Index   uint16
	Success bool
}

func ParseItemIdentifyAck

func ParseItemIdentifyAck(packet Packet) (ItemIdentifyAck, bool, error)

type ItemIdentifyList

type ItemIdentifyList struct {
	Indexes []uint16
}

func ParseItemIdentifyList

func ParseItemIdentifyList(packet Packet) (ItemIdentifyList, bool, error)

type ItemPickupAck

type ItemPickupAck struct {
	Index      uint16
	Amount     uint16
	ItemID     uint16
	Location   uint16
	Identified bool
	Type       uint8
	Damaged    bool
	Refine     uint8
	Result     uint8
}

func ParseItemPickupAck

func ParseItemPickupAck(packet Packet) (ItemPickupAck, bool, error)

type LengthTable

type LengthTable map[uint16]int

func PacketLengths2008

func PacketLengths2008() LengthTable

type MVPNotify

type MVPNotify struct {
	AID uint32
}

func ParseMVPNotify

func ParseMVPNotify(packet Packet) (MVPNotify, bool, error)

type MailAttachment added in v0.11.0

type MailAttachment struct {
	Amount     uint32
	ItemID     uint16
	Type       uint16
	Identified bool
	Damaged    bool
	Refine     uint8
	Cards      [4]uint16
}

type MailEntry added in v0.11.0

type MailEntry struct {
	ID        uint32
	Title     string
	Read      bool
	Sender    string
	Timestamp uint32
}

func ParseMailList added in v0.11.0

func ParseMailList(packet Packet) ([]MailEntry, bool, error)

func ParseMailNew added in v0.11.0

func ParseMailNew(packet Packet) (MailEntry, bool, error)

type MailMessage added in v0.11.0

type MailMessage struct {
	ID         uint32
	Title      string
	Sender     string
	Body       string
	Zeny       uint32
	Attachment MailAttachment
}

func ParseMailRead added in v0.11.0

func ParseMailRead(packet Packet) (MailMessage, bool, error)

func (MailMessage) HasAttachment added in v0.11.0

func (m MailMessage) HasAttachment() bool

type MailResetType added in v0.11.0

type MailResetType uint16
const (
	MailResetAll MailResetType = iota
	MailResetItem
	MailResetZeny
)

type MailResult added in v0.11.0

type MailResult struct {
	ID     uint32
	Index  uint16
	Result uint16
}

MailResult covers the legacy acknowledgements. Get-attachment and send acknowledgements carry no ID; the caller must correlate outstanding work.

func ParseMailResult added in v0.11.0

func ParseMailResult(packet Packet) (MailResult, bool, error)

type MakeCharacter

type MakeCharacter struct {
	Name      string
	Str       uint8
	Agi       uint8
	Vit       uint8
	Int       uint8
	Dex       uint8
	Luk       uint8
	Slot      uint8
	HairColor uint16
	HairStyle uint16
}

type MakingArrowList

type MakingArrowList struct {
	ItemIDs []uint16
}

func ParseMakingArrowList

func ParseMakingArrowList(packet Packet) (MakingArrowList, bool, error)

type MakingItemAck

type MakingItemAck struct {
	Result uint16
	ItemID uint16
}

func ParseMakingItemAck

func ParseMakingItemAck(packet Packet) (MakingItemAck, bool, error)

func (MakingItemAck) Alchemist

func (a MakingItemAck) Alchemist() bool

func (MakingItemAck) Success

func (a MakingItemAck) Success() bool

type MakingItemList

type MakingItemList struct {
	Type  uint16
	Items []MakingItemOption
}

func ParseMakableItemList

func ParseMakableItemList(packet Packet) (MakingItemList, bool, error)

func ParseMakingItemList

func ParseMakingItemList(packet Packet) (MakingItemList, bool, error)

type MakingItemOption

type MakingItemOption struct {
	ItemID   uint16
	Material [3]uint16
}

type MapAcceptEnter

type MapAcceptEnter struct {
	ServerTick uint32
	X          int
	Y          int
	Dir        int
}

func ParseMapAcceptEnter

func ParseMapAcceptEnter(packet Packet) (MapAcceptEnter, error)

type MapCellUpdate

type MapCellUpdate struct {
	MapName string
	X       int
	Y       int
	RawType uint32
}

func ParseMapCellUpdate

func ParseMapCellUpdate(packet Packet) (MapCellUpdate, bool, error)

type MapChange

type MapChange struct {
	MapName    string
	X          int
	Y          int
	Address    string
	Port       uint16
	ServerMove bool
}

func ParseMapChange

func ParseMapChange(packet Packet) (MapChange, bool, error)

type MapInfoNotify added in v0.8.0

type MapInfoNotify struct {
	Result uint16
}

func ParseMapInfoNotify added in v0.8.0

func ParseMapInfoNotify(packet Packet) (MapInfoNotify, bool, error)

type MapPropertyNotify added in v0.7.0

type MapPropertyNotify struct {
	Property uint16
}

func ParseMapPropertyNotify added in v0.7.0

func ParseMapPropertyNotify(packet Packet) (MapPropertyNotify, bool, error)

type MapServerEnter

type MapServerEnter struct {
	AccountID  uint32
	CharID     uint32
	AuthCode   uint32
	ClientTick uint32
	Sex        uint8
}

type MercenaryParamChange

type MercenaryParamChange struct {
	Param uint16
	Value int32
}

func ParseMercenaryParamChange

func ParseMercenaryParamChange(packet Packet) (MercenaryParamChange, bool, error)

type MercenaryProperty

type MercenaryProperty struct {
	ID           uint32
	Name         string
	Level        int
	Faith        int
	SummonCount  int
	Calls        uint32
	Kills        uint32
	ExpireTick   uint32
	Attack       int
	MagicAttack  int
	Hit          int
	Critical     int
	Defense      int
	MagicDefense int
	Flee         int
	ASPD         int
	HP           int
	MaxHP        int
	SP           int
	MaxSP        int
	Exp          uint32
	AttackRange  int
}

func ParseMercenaryProperty

func ParseMercenaryProperty(packet Packet) (MercenaryProperty, bool, error)

type MercenarySkillInfoList

type MercenarySkillInfoList struct {
	Skills []SkillInfo
}

func ParseMercenarySkillInfoList

func ParseMercenarySkillInfoList(packet Packet) (MercenarySkillInfoList, bool, error)

type MercenarySkillInfoUpdate

type MercenarySkillInfoUpdate struct {
	Skill SkillInfo
}

func ParseMercenarySkillInfoUpdate

func ParseMercenarySkillInfoUpdate(packet Packet) (MercenarySkillInfoUpdate, bool, error)

type MinimapCompass

type MinimapCompass struct {
	NPCID uint32
	Type  int
	X     int
	Y     int
	ID    uint8
	Color uint32
}

func ParseMinimapCompass

func ParseMinimapCompass(packet Packet) (MinimapCompass, bool, error)

type MonsterElementRates added in v0.10.0

type MonsterElementRates struct {
	Water  uint8
	Earth  uint8
	Fire   uint8
	Wind   uint8
	Poison uint8
	Holy   uint8
	Shadow uint8
	Ghost  uint8
	Undead uint8
}

type MonsterInfo added in v0.10.0

type MonsterInfo struct {
	Class        uint16
	Level        uint16
	Size         uint16
	HP           uint32
	Defense      int16
	Race         uint16
	MagicDefense int16
	Property     uint16
	Elements     MonsterElementRates
}

func ParseMonsterInfo added in v0.10.0

func ParseMonsterInfo(packet Packet) (MonsterInfo, bool, error)

type NPCCutin added in v0.9.0

type NPCCutin struct {
	Image    string
	Position uint8
}

func ParseNPCCutin added in v0.9.0

func ParseNPCCutin(packet Packet) (NPCCutin, bool, error)

type NPCDialog

type NPCDialog struct {
	Kind    NPCDialogKind
	NPCID   uint32
	Message string
	Options []string
}

func ParseNPCDialog

func ParseNPCDialog(packet Packet) (NPCDialog, bool, error)

type NPCDialogKind

type NPCDialogKind int
const (
	NPCDialogSay NPCDialogKind = iota
	NPCDialogNext
	NPCDialogClose
	NPCDialogMenu
	NPCDialogClear
	NPCDialogNumberInput
	NPCDialogStringInput
)

type NotifyBan

type NotifyBan struct {
	ErrorCode uint8
}

func ParseNotifyBan

func ParseNotifyBan(packet Packet) (NotifyBan, bool, error)

type Packet

type Packet struct {
	ID   uint16
	Data []byte
}

func (Packet) String

func (p Packet) String() string

type ParameterChange

type ParameterChange struct {
	VarID uint16
	Value int64
}

func ParseParameterChange

func ParseParameterChange(packet Packet) (ParameterChange, bool, error)

type PartyChat

type PartyChat struct {
	AccountID uint32
	Message   string
}

func ParsePartyChat

func ParsePartyChat(packet Packet) (PartyChat, bool, error)

type PartyCreateResult

type PartyCreateResult struct {
	Result uint8
}

func ParsePartyCreateResult

func ParsePartyCreateResult(packet Packet) (PartyCreateResult, bool, error)

type PartyInviteAnswer

type PartyInviteAnswer struct {
	Name   string
	Answer uint8
}

func ParsePartyInviteAnswer

func ParsePartyInviteAnswer(packet Packet) (PartyInviteAnswer, bool, error)

type PartyInviteConfig

type PartyInviteConfig struct {
	RefuseInvites bool
}

func ParsePartyInviteConfig

func ParsePartyInviteConfig(packet Packet) (PartyInviteConfig, bool, error)

type PartyInviteRequest

type PartyInviteRequest struct {
	RequestID uint32
	Name      string
}

func ParsePartyInviteRequest

func ParsePartyInviteRequest(packet Packet) (PartyInviteRequest, bool, error)

type PartyList

type PartyList struct {
	Name    string
	Members []PartyMember
}

func ParsePartyList

func ParsePartyList(packet Packet) (PartyList, bool, error)

type PartyMember

type PartyMember struct {
	AccountID uint32
	GroupName string
	Name      string
	MapName   string
	Role      uint32
	State     uint8
	X         int
	Y         int
}

func ParsePartyMemberJoin

func ParsePartyMemberJoin(packet Packet) (PartyMember, bool, error)

type PartyMemberHP

type PartyMemberHP struct {
	AccountID uint32
	HP        int
	MaxHP     int
}

func ParsePartyMemberHP

func ParsePartyMemberHP(packet Packet) (PartyMemberHP, bool, error)

type PartyMemberLeave

type PartyMemberLeave struct {
	AccountID uint32
	Name      string
	Result    uint8
}

func ParsePartyMemberLeave

func ParsePartyMemberLeave(packet Packet) (PartyMemberLeave, bool, error)

type PartyMemberPosition

type PartyMemberPosition struct {
	AccountID uint32
	X         int
	Y         int
}

func ParsePartyMemberPosition

func ParsePartyMemberPosition(packet Packet) (PartyMemberPosition, bool, error)

type PartyOption

type PartyOption struct {
	ExpOption uint32
}

func ParsePartyOption

func ParsePartyOption(packet Packet) (PartyOption, bool, error)

type PetAction

type PetAction struct {
	ID   uint32
	Data uint32
}

func ParsePetAction

func ParsePetAction(packet Packet) (PetAction, bool, error)

type PetCaptureResult

type PetCaptureResult struct {
	Success bool
}

func ParsePetCaptureResult

func ParsePetCaptureResult(packet Packet) (PetCaptureResult, bool, error)

type PetCaptureStart

type PetCaptureStart struct{}

func ParsePetCaptureStart

func ParsePetCaptureStart(packet Packet) (PetCaptureStart, bool, error)

type PetEggList

type PetEggList struct {
	Indexes []uint16
}

func ParsePetEggList

func ParsePetEggList(packet Packet) (PetEggList, bool, error)

type PetFeedResult

type PetFeedResult struct {
	Success bool
	ItemID  uint16
}

func ParsePetFeedResult

func ParsePetFeedResult(packet Packet) (PetFeedResult, bool, error)

type PetProperty

type PetProperty struct {
	Name         string
	Modified     bool
	Level        uint16
	Fullness     uint16
	Relationship uint16
	AccessoryID  uint16
	Job          uint16
}

func ParsePetProperty

func ParsePetProperty(packet Packet) (PetProperty, bool, error)

type PetStateChange

type PetStateChange struct {
	Type uint8
	ID   uint32
	Data uint32
}

func ParsePetStateChange

func ParsePetStateChange(packet Packet) (PetStateChange, bool, error)

type ProgressBar added in v0.10.0

type ProgressBar struct {
	Color    uint32
	Duration time.Duration
}

func ParseProgressBar added in v0.10.0

func ParseProgressBar(packet Packet) (ProgressBar, bool, error)

type PvPInfo added in v0.7.0

type PvPInfo struct {
	CharID    uint32
	AccountID uint32
	Wins      int32
	Losses    int32
	Points    int32
}

func ParsePvPInfo added in v0.7.0

func ParsePvPInfo(packet Packet) (PvPInfo, bool, error)

type PvPRanking added in v0.7.0

type PvPRanking struct {
	ActorID uint32
	Rank    int32
	Total   int32
}

func ParsePvPRanking added in v0.7.0

func ParsePvPRanking(packet Packet) (PvPRanking, bool, error)

type QuitGameAck

type QuitGameAck struct {
	Allowed bool
	Result  uint16
}

func ParseQuitGameAck

func ParseQuitGameAck(packet Packet) (QuitGameAck, bool, error)

type Recovery

type Recovery struct {
	StatusID uint16
	Amount   int
}

func ParseRecovery

func ParseRecovery(packet Packet) (Recovery, bool, error)

type RememberWarpPointAck

type RememberWarpPointAck struct {
	Result byte
}

func ParseRememberWarpPointAck

func ParseRememberWarpPointAck(packet Packet) (RememberWarpPointAck, bool, error)

type RepairItem

type RepairItem struct {
	Index  uint16
	ItemID uint16
	Refine uint8
	Cards  [4]uint16
}

type RepairItemAck

type RepairItemAck struct {
	Index   uint16
	Failure bool
}

func ParseRepairItemAck

func ParseRepairItemAck(packet Packet) (RepairItemAck, bool, error)

func (RepairItemAck) Success

func (a RepairItemAck) Success() bool

type RepairItemList

type RepairItemList struct {
	Items []RepairItem
}

func ParseRepairItemList

func ParseRepairItemList(packet Packet) (RepairItemList, bool, error)

type RestartAck

type RestartAck struct {
	Allowed bool
}

func ParseRestartAck

func ParseRestartAck(packet Packet) (RestartAck, bool, error)

type SelfMoveAck

type SelfMoveAck struct {
	ServerTick uint32
	FromX      int
	FromY      int
	ToX        int
	ToY        int
}

func ParseSelfMoveAck

func ParseSelfMoveAck(packet Packet) (SelfMoveAck, bool, error)

type SellRequestItem

type SellRequestItem struct {
	Index  uint16
	Amount uint16
}

type ShopBuyItem

type ShopBuyItem struct {
	ItemID        uint16
	Type          uint8
	Price         uint32
	DiscountPrice uint32
}

func ParseShopBuyList

func ParseShopBuyList(packet Packet) ([]ShopBuyItem, bool, error)

type ShopDealSelection

type ShopDealSelection struct {
	NPCID uint32
}

func ParseShopDealSelection

func ParseShopDealSelection(packet Packet) (ShopDealSelection, bool, error)

type ShopResult

type ShopResult struct {
	Sell   bool
	Result uint8
}

func ParseShopResult

func ParseShopResult(packet Packet) (ShopResult, bool, error)

type ShopSellItem

type ShopSellItem struct {
	Index           uint16
	Price           uint32
	OverchargePrice uint32
}

func ParseShopSellList

func ParseShopSellList(packet Packet) ([]ShopSellItem, bool, error)

type ShowDigit added in v0.10.0

type ShowDigit struct {
	Mode  ShowDigitMode
	Value int32
}

func ParseShowDigit added in v0.10.0

func ParseShowDigit(packet Packet) (ShowDigit, bool, error)

type ShowDigitMode added in v0.10.0

type ShowDigitMode uint8
const (
	ShowDigitStatic ShowDigitMode = iota
	ShowDigitCountUp
	ShowDigitCountDown
	ShowDigitFastCountDown
)

type SkillCastNotify

type SkillCastNotify struct {
	SourceID  uint32
	TargetID  uint32
	X         uint16
	Y         uint16
	SkillID   uint16
	Property  uint32
	DelayTime uint32
}

func ParseSkillCastNotify

func ParseSkillCastNotify(packet Packet) (SkillCastNotify, bool, error)

type SkillFailAck

type SkillFailAck struct {
	SkillID uint16
	Number  uint32
	ItemID  uint32
	Result  byte
	Cause   byte
}

func ParseSkillFailAck

func ParseSkillFailAck(packet Packet) (SkillFailAck, bool, error)

type SkillInfo

type SkillInfo struct {
	ID         uint16
	Type       uint32
	Level      int
	SPCost     int
	Range      int
	Name       string
	Upgradable bool
}

type SkillInfoList

type SkillInfoList struct {
	Skills []SkillInfo
}

func ParseSkillInfoList

func ParseSkillInfoList(packet Packet) (SkillInfoList, bool, error)

type SkillInfoUpdate

type SkillInfoUpdate struct {
	Skill SkillInfo
}

func ParseSkillInfoUpdate

func ParseSkillInfoUpdate(packet Packet) (SkillInfoUpdate, bool, error)

type SkillMessage added in v0.10.0

type SkillMessage struct {
	ID int32
}

func ParseSkillMessage added in v0.10.0

func ParseSkillMessage(packet Packet) (SkillMessage, bool, error)

type SkillNoDamageNotify

type SkillNoDamageNotify struct {
	SkillID  uint16
	Amount   uint32
	TargetID uint32
	SourceID uint32
	Result   byte
}

func ParseSkillNoDamageNotify

func ParseSkillNoDamageNotify(packet Packet) (SkillNoDamageNotify, bool, error)

type SkillUnitDisappear

type SkillUnitDisappear struct {
	ID uint32
}

func ParseSkillUnitDisappear

func ParseSkillUnitDisappear(packet Packet) (SkillUnitDisappear, bool, error)

type SkillUnitEntry

type SkillUnitEntry struct {
	ID        uint32
	CreatorID uint32
	X         uint16
	Y         uint16
	UnitID    uint16
	Visible   bool
}

func ParseSkillUnitEntry

func ParseSkillUnitEntry(packet Packet) (SkillUnitEntry, bool, error)

type SkillUnitUpdate

type SkillUnitUpdate struct {
	ID uint32
}

func ParseSkillUnitUpdate

func ParseSkillUnitUpdate(packet Packet) (SkillUnitUpdate, bool, error)

type SpecialEffectNotify

type SpecialEffectNotify struct {
	AID      uint32
	EffectID uint32
}

func ParseSpecialEffectNotify

func ParseSpecialEffectNotify(packet Packet) (SpecialEffectNotify, bool, error)

type StarPlace added in v0.6.0

type StarPlace struct {
	Place uint8
}

func ParseStarPlace added in v0.6.0

func ParseStarPlace(packet Packet) (StarPlace, bool, error)

type StatusChangeAck

type StatusChangeAck struct {
	StatusID uint16
	Success  bool
	Value    int
}

func ParseStatusChangeAck

func ParseStatusChangeAck(packet Packet) (StatusChangeAck, bool, error)

type StatusEffectChange

type StatusEffectChange struct {
	StatusID    uint16
	ActorID     uint32
	Active      bool
	HasDuration bool
	Duration    time.Duration
	HasValues   bool
	Values      [3]int32
}

func ParseStatusEffectChange

func ParseStatusEffectChange(packet Packet) (StatusEffectChange, bool, error)

type StatusSnapshot

type StatusSnapshot struct {
	Points int
	Str    int
	Agi    int
	Vit    int
	Int    int
	Dex    int
	Luk    int

	StrBonus int
	AgiBonus int
	VitBonus int
	IntBonus int
	DexBonus int
	LukBonus int

	StrCost int
	AgiCost int
	VitCost int
	IntCost int
	DexCost int
	LukCost int

	Attack        int
	AttackBonus   int
	MatkMax       int
	MatkMin       int
	Defense       int
	DefenseBonus  int
	MDefense      int
	MDefenseBonus int
	Hit           int
	Flee          int
	FleeBonus     int
	Critical      int
	ASPD          int
	ASPDBonus     int
}

func ParseStatusSnapshot

func ParseStatusSnapshot(packet Packet) (StatusSnapshot, bool, error)

type StorageAmount

type StorageAmount struct {
	Amount    uint16
	MaxAmount uint16
}

func ParseStorageAmount

func ParseStorageAmount(packet Packet) (StorageAmount, bool, error)

type StorageItemRemoved

type StorageItemRemoved struct {
	Index  uint16
	Amount uint32
}

func ParseStorageItemRemoved

func ParseStorageItemRemoved(packet Packet) (StorageItemRemoved, bool, error)

type StoragePasswordPrompt added in v0.10.0

type StoragePasswordPrompt struct {
	State StoragePasswordPromptState
}

func ParseStoragePasswordPrompt added in v0.10.0

func ParseStoragePasswordPrompt(packet Packet) (StoragePasswordPrompt, bool, error)

type StoragePasswordPromptState added in v0.10.0

type StoragePasswordPromptState uint16
const (
	StoragePasswordNotSet StoragePasswordPromptState = 0
	StoragePasswordSet    StoragePasswordPromptState = 1
	StoragePasswordLocked StoragePasswordPromptState = 8
)

type StoragePasswordReplyType added in v0.10.0

type StoragePasswordReplyType uint16
const (
	StoragePasswordChange StoragePasswordReplyType = 2
	StoragePasswordCheck  StoragePasswordReplyType = 3
)

type StoragePasswordResult added in v0.10.0

type StoragePasswordResult struct {
	Code       StoragePasswordResultCode
	ErrorCount uint16
}

func ParseStoragePasswordResult added in v0.10.0

func ParseStoragePasswordResult(packet Packet) (StoragePasswordResult, bool, error)

type StoragePasswordResultCode added in v0.10.0

type StoragePasswordResultCode uint16
const (
	StoragePasswordChangeSucceeded StoragePasswordResultCode = 4
	StoragePasswordChangeFailed    StoragePasswordResultCode = 5
	StoragePasswordCheckSucceeded  StoragePasswordResultCode = 6
	StoragePasswordCheckFailed     StoragePasswordResultCode = 7
	StoragePasswordTooManyFailures StoragePasswordResultCode = 8
)

type TaekwonMission added in v0.6.0

type TaekwonMission struct {
	MonsterName string
	MonsterID   uint32
	Progress    uint8
	Result      uint8
}

func ParseTaekwonMission added in v0.6.0

func ParseTaekwonMission(packet Packet) (TaekwonMission, bool, error)

type TradeAddItemAck

type TradeAddItemAck struct {
	Index  uint16
	Result uint8
}

func ParseTradeAddItemAck

func ParseTradeAddItemAck(packet Packet) (TradeAddItemAck, bool, error)

type TradeConclude

type TradeConclude struct {
	Other bool
}

func ParseTradeConclude

func ParseTradeConclude(packet Packet) (TradeConclude, bool, error)

type TradeExec

type TradeExec struct {
	Result uint8
}

func ParseTradeExec

func ParseTradeExec(packet Packet) (TradeExec, bool, error)

type TradeItem

type TradeItem struct {
	Amount     uint32
	ItemID     uint16
	Identified bool
	Damaged    bool
	Refine     uint8
	Cards      [4]uint16
}

func ParseTradeItem

func ParseTradeItem(packet Packet) (TradeItem, bool, error)

type TradeRequest

type TradeRequest struct {
	Name     string
	TargetID uint32
	Level    uint16
}

func ParseTradeRequest

func ParseTradeRequest(packet Packet) (TradeRequest, bool, error)

type TradeResponse

type TradeResponse struct {
	Result   uint8
	TargetID uint32
	Level    uint16
}

func ParseTradeResponse

func ParseTradeResponse(packet Packet) (TradeResponse, bool, error)

type UseItemAck

type UseItemAck struct {
	Index  uint16
	Amount uint16
	ItemID uint16
	AID    uint32
	Result uint8
}

func ParseUseItemAck

func ParseUseItemAck(packet Packet) (UseItemAck, bool, error)

type VendingBoard

type VendingBoard struct {
	OwnerAID uint32
	Name     string
}

func ParseVendingBoard

func ParseVendingBoard(packet Packet) (VendingBoard, bool, error)

type VendingBoardDisappear

type VendingBoardDisappear struct {
	OwnerAID uint32
}

func ParseVendingBoardDisappear

func ParseVendingBoardDisappear(packet Packet) (VendingBoardDisappear, bool, error)

type VendingItem

type VendingItem struct {
	Price      uint32
	Amount     uint16
	Index      uint16
	Type       uint8
	ItemID     uint16
	Identified bool
	Damaged    bool
	Refine     uint8
	Cards      [4]uint16
}

type VendingItemList

type VendingItemList struct {
	OwnerAID uint32
	Items    []VendingItem
	Own      bool
}

func ParseVendingItemList

func ParseVendingItemList(packet Packet) (VendingItemList, bool, error)

type VendingOpenItem

type VendingOpenItem struct {
	Index  uint16
	Amount uint16
	Price  uint32
}

type VendingOpenRequest

type VendingOpenRequest struct {
	MaxItems uint16
}

func ParseVendingOpenRequest

func ParseVendingOpenRequest(packet Packet) (VendingOpenRequest, bool, error)

type VendingPurchaseItem

type VendingPurchaseItem struct {
	Index  uint16
	Amount uint16
}

type VendingPurchaseResult

type VendingPurchaseResult struct {
	Index  uint16
	Amount uint16
	Result uint8
}

func ParseVendingPurchaseResult

func ParseVendingPurchaseResult(packet Packet) (VendingPurchaseResult, bool, error)

type VendingSoldItem

type VendingSoldItem struct {
	Index  uint16
	Amount uint16
}

func ParseVendingSoldItem

func ParseVendingSoldItem(packet Packet) (VendingSoldItem, bool, error)

type ViewedEquipment

type ViewedEquipment struct {
	Name        string
	Job         uint16
	Head        uint16
	HeadTop     uint16
	HeadMid     uint16
	HeadLow     uint16
	HeadPalette uint16
	BodyPalette uint16
	Sex         byte
	Items       []InventoryItem
}

func ParseViewedEquipment

func ParseViewedEquipment(packet Packet) (ViewedEquipment, bool, error)

type WarpPointList

type WarpPointList struct {
	SkillID  uint16
	MapNames []string
}

func ParseWarpPointList

func ParseWarpPointList(packet Packet) (WarpPointList, bool, error)

type WeaponRefineAck

type WeaponRefineAck struct {
	Result uint32
	ItemID uint16
}

func ParseWeaponRefineAck

func ParseWeaponRefineAck(packet Packet) (WeaponRefineAck, bool, error)

func (WeaponRefineAck) Success

func (a WeaponRefineAck) Success() bool

type WeaponRefineItem

type WeaponRefineItem struct {
	Index  uint16
	ItemID uint16
	Refine uint8
	Cards  [4]uint16
}

type WeaponRefineList

type WeaponRefineList struct {
	Items []WeaponRefineItem
}

func ParseWeaponRefineList

func ParseWeaponRefineList(packet Packet) (WeaponRefineList, bool, error)

type WhisperAck

type WhisperAck struct {
	Result uint8
}

func ParseWhisperAck

func ParseWhisperAck(packet Packet) (WhisperAck, bool, error)

type WhisperIgnoreAck

type WhisperIgnoreAck struct {
	TargetAll bool
	Allow     bool
	Result    uint8
}

func ParseWhisperIgnoreAck

func ParseWhisperIgnoreAck(packet Packet) (WhisperIgnoreAck, bool, error)

type WhisperMessage

type WhisperMessage struct {
	Sender  string
	Message string
}

func ParseWhisperMessage

func ParseWhisperMessage(packet Packet) (WhisperMessage, bool, error)

type Writer

type Writer struct {
	bytes.Buffer
}

func (*Writer) CString

func (w *Writer) CString(value string, size int)

func (*Writer) Uint8

func (w *Writer) Uint8(value uint8)

func (*Writer) Uint16

func (w *Writer) Uint16(value uint16)

func (*Writer) Uint32

func (w *Writer) Uint32(value uint32)

type ZoneServerNotify

type ZoneServerNotify struct {
	CharID  uint32
	MapName string
	Address string
	Port    uint16
}

func ParseZoneServerNotify

func ParseZoneServerNotify(packet Packet) (ZoneServerNotify, error)

Jump to

Keyboard shortcuts

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