game

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0, BSD-3-Clause, ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CensusMaxUsers = 36
View Source
const (
	ChatMessageData = 0
)

Variables

View Source
var ClientMessageTable = common.NewMessageTable(map[uint16]ClientMessage{
	0x0002: &ClientAuth{},
	0x0003: &ClientMessageSend{},
	0x0004: &ClientJoinChannel{},
	0x0007: &ClientGetUserOnlineStatus{},
	0x0008: &ClientRoomCreate{},
	0x000A: &ClientRoomEdit{},
	0x000B: &ClientTutorialStart{},
	0x000C: &ClientRoomUserEquipmentChange{},
	0x000D: &ClientPlayerReady{},
	0x000F: &ClientRoomLeave{},
	0x001A: &Client001A{},
	0x001D: &ClientBuyItem{},
	0x0020: &ClientEquipmentUpdate{},
	0x002F: &ClientGetUserData{},
	0x0033: &ClientException{},
	0x0043: &ClientRequestServerList{},
	0x0048: &ClientUnknownCounter{},
	0x0063: &ClientRoomLoungeAction{},
	0x0069: &ClientUserMacrosSet{},
	0x0081: &ClientMultiplayerJoin{},
	0x0082: &ClientMultiplayerLeave{},
	0x0088: &Client0088{},
	0x008B: &ClientRequestMessengerList{},
	0x009C: &Client009C{},
	0x00AE: &ClientTutorialClear{},
	0x00FE: &Client00FE{},
	0x0140: &ClientShopJoin{},
	0x0143: &ClientRequestInboxList{},
	0x0144: &ClientRequestInboxMessage{},
	0x016E: &ClientRequestDailyReward{},
	0x0176: &ClientEventLobbyJoin{},
	0x0177: &ClientEventLobbyLeave{},
	0x0184: &ClientAssistModeToggle{},
})
View Source
var ServerMessageTable = common.NewMessageTable(map[uint16]ServerMessage{
	0x0040: &ServerGlobalEvent{},
	0x0044: &ServerUserData{},
	0x0046: &ServerUserCensus{},
	0x0047: &ServerRoomList{},
	0x0048: &ServerRoomCensus{},
	0x0049: &ServerRoomJoin{},
	0x004A: &ServerRoomStatus{},
	0x004B: &ServerRoomEquipmentData{},
	0x004C: &ServerRoomLeave{},
	0x004E: &Server004E{},
	0x0052: &ServerRoomGameData{},
	0x0070: &ServerCharData{},
	0x0076: &ServerGameInit{},
	0x0078: &ServerPlayerReady{},
	0x0095: &ServerMoneyUpdate{},
	0x009F: &ServerChannelList{},
	0x00A1: &ServerUserInfo{},
	0x00C4: &ServerRoomLoungeAction{},
	0x00C8: &ServerPangPurchaseData{},
	0x00F1: &ServerMessageConnect{},
	0x00F5: &ServerMultiplayerJoined{},
	0x00F6: &ServerMultiplayerLeft{},
	0x010E: &Server010E{},
	0x011F: &ServerTutorialStatus{},
	0x01F6: &Server01F6{},
	0x0210: &ServerInboxNotify{},
	0x0211: &ServerInboxList{},
	0x0212: &ServerMailMessage{},
	0x0216: &ServerUserStatusUpdate{},
	0x021D: &ServerAchievementProgress{},
	0x0230: &Server0230{},
	0x0231: &Server0231{},
	0x0248: &ServerLoginBonusStatus{},
	0x0250: &ServerEventLobbyJoined{},
	0x0251: &ServerEventLobbyLeft{},
	0x026A: &ServerAssistModeToggled{},
})

Functions

This section is empty.

Types

type AchievementProgress

type AchievementProgress struct {
	Unknown    byte
	StatusID   uint32
	StatusSlot uint32
	Value      uint32
}

type CensusUser

type CensusUser struct {
	UserID        uint32
	ConnID        uint32
	RoomNumber    int16
	Nickname      string `struct:"[22]byte"`
	Rank          byte
	Unknown       uint32
	Badge         uint32
	Unknown2      uint32
	Unknown3      uint32
	Unknown4      byte
	GuildEmblemID string `struct:"[19]byte"`
	GlobalID      string `struct:"[128]byte"`
}

type Client00FE

type Client00FE struct {
	ClientMessage_
}

type Client001A

type Client001A struct {
	ClientMessage_
}

type Client009C

type Client009C struct {
	ClientMessage_
}

Client009C is an unknown message.

type Client0088

type Client0088 struct {
	ClientMessage_
}

Client0088 is an unknown message.

type ClientAssistModeToggle

type ClientAssistModeToggle struct {
	ClientMessage_
}

ClientAssistModeToggle is sent when assist mode is toggled.

type ClientAuth

type ClientAuth struct {
	ClientMessage_
	Username common.PString
	Unknown1 uint32
	Unknown2 uint32
	Unknown3 uint16
	LoginKey common.PString
	Version  common.PString
}

ClientAuth is a message sent to authenticate a session.

type ClientBuyItem

type ClientBuyItem struct {
	ClientMessage_
	Unknown1 byte
	NumItems uint16 `struct:"sizeof=Items"`
	Items    []PurchaseItem
}

ClientBuyItem is sent by the client to buy an item from the shop.

type ClientEquipmentUpdate

type ClientEquipmentUpdate struct {
	ClientMessage_
}

ClientEquipmentUpdate

type ClientEventLobbyJoin

type ClientEventLobbyJoin struct {
	ClientMessage_
}

ClientEventLobbyJoin is the message sent when joining the event lobby.

type ClientEventLobbyLeave

type ClientEventLobbyLeave struct {
	ClientMessage_
}

ClientEventLobbyLeave is sent when the client exits the event lobby.

type ClientException

type ClientException struct {
	ClientMessage_
	Empty   byte
	Message common.PString
}

ClientException is a message sent when the client encounters an error.

type ClientGetUserData

type ClientGetUserData struct {
	ClientMessage_
	UserID  uint32
	Request byte
}

ClientGetUserData is a message sent by the client to request the client state.

type ClientGetUserOnlineStatus

type ClientGetUserOnlineStatus struct {
	ClientMessage_
	Unknown  uint8
	Username common.PString
}

ClientGetUserOnlineStatus is sent to get information of a user.

type ClientJoinChannel

type ClientJoinChannel struct {
	ClientMessage_
	ChannelID byte
}

ClientJoinChannel is a message sent when the client joins a channel.

type ClientMessage

type ClientMessage interface {
	common.Message
	// contains filtered or unexported methods
}

type ClientMessageSend

type ClientMessageSend struct {
	ClientMessage_
	Nickname common.PString
	Message  common.PString
}

ClientMessageSend is sent when the client sends a public chat message.

type ClientMessage_

type ClientMessage_ struct{}

type ClientMultiplayerJoin

type ClientMultiplayerJoin struct {
	ClientMessage_
}

ClientMultiplayerJoin is the message sent when joining multiplayer.

type ClientMultiplayerLeave

type ClientMultiplayerLeave struct {
	ClientMessage_
}

ClientMultiplayerLeave is sent when the client exits multiplayer mode.

type ClientPlayerReady

type ClientPlayerReady struct {
	ClientMessage_
	State byte
}

ClientPlayerReady is sent by the client when they are ready/to start the game.

type ClientRequestDailyReward

type ClientRequestDailyReward struct {
	ClientMessage_
}

ClientRequestDailyReward is the message sent to request the daily reward.

type ClientRequestInboxList

type ClientRequestInboxList struct {
	ClientMessage_
	PageNum uint32
}

ClientRequestInboxList is the message sent to request the inbox.

type ClientRequestInboxMessage

type ClientRequestInboxMessage struct {
	ClientMessage_
	MessageID uint32
}

ClientRequestInboxMessage is sent by the client to retrieve a message from the inbox.

type ClientRequestMessengerList

type ClientRequestMessengerList struct {
	ClientMessage_
}

ClientRequestMessengerList is a message sent to request the current list of message servers.

type ClientRequestServerList

type ClientRequestServerList struct {
	ClientMessage_
}

ClientRequestServerList is a message sent to request the current list of game servers.

type ClientRoomCreate

type ClientRoomCreate struct {
	ClientMessage_
	Unknown     byte
	ShotTimerMS uint32
	GameTimerMS uint32
	MaxUsers    uint8
	RoomType    byte
	NumHoles    byte
	Course      byte
	Unknown2    [5]byte
	RoomName    common.PString
	Password    common.PString
	Unknown3    [4]byte
}

ClientRoomCreate is sent by the client when creating a room.

type ClientRoomEdit

type ClientRoomEdit struct {
	ClientMessage_
	Unknown    uint16
	NumChanges uint8 `struct:"sizeof=Changes"`
	Changes    []SettingsChange
}

ClientRoomEdit is sent when the client changes room settings.

type ClientRoomLeave

type ClientRoomLeave struct {
	ClientMessage_
	Unknown    byte
	RoomNumber uint16
	Unknown2   uint32
	Unknown3   uint32
	Unknown4   uint32
	Unknown5   uint32
}

ClientRoomLeave is sent by the client when leaving a room back to lobby

type ClientRoomLoungeAction

type ClientRoomLoungeAction struct {
	ClientMessage_
	LoungeAction
}

ClientRoomLoungeAction

type ClientRoomUserEquipmentChange

type ClientRoomUserEquipmentChange struct {
	ClientMessage_
}

ClientRoomUserEquipmentChange is sent when a user's equipment changes in a room.

type ClientShopJoin

type ClientShopJoin struct {
	ClientMessage_
}

ClientShopJoin is an unknown message.

type ClientTutorialClear

type ClientTutorialClear struct {
	ClientMessage_
}

ClientTutorialClear is an unknown message.

type ClientTutorialStart

type ClientTutorialStart struct {
	ClientMessage_
}

ClientTutorialStart is sent when starting a tutorial.

type ClientUnknownCounter

type ClientUnknownCounter struct {
	ClientMessage_
	Unknown uint8
}

type ClientUserMacrosSet

type ClientUserMacrosSet struct {
	ClientMessage_
	MacroList pangya.MacroList
}

ClientUserMacrosSet is a message sent to set the user's macros.

type Conn

type Conn struct {
	common.ServerConn[ClientMessage, ServerMessage]
	// contains filtered or unexported fields
}

Conn holds the state for a connection to the server.

func (*Conn) Handle

func (c *Conn) Handle(ctx context.Context) error

Handle runs the main connection loop.

func (*Conn) SendHello

func (c *Conn) SendHello() error

SendHello sends the initial handshake bytes to the client.

type ConnectMessage

type ConnectMessage struct {
	Unknown [8]byte
	Key     byte
}

ConnectMessage is the message sent upon connecting.

type GamePlayer

type GamePlayer struct {
	Number    uint16
	Info      PlayerInfo
	Game      PlayerGameInfo
	Unknown   [11430]byte
	Character pangya.PlayerCharacterData
	Caddie    pangya.PlayerCaddieData
	ClubSet   pangya.PlayerClubData
	Mascot    pangya.PlayerMascotData
	StartTime pangya.SystemTime
	NumCards  uint8
}

type GlobalChatMessage

type GlobalChatMessage struct {
	Nickname common.PString
	Message  common.PString
}

GlobalChatMessage contains a global chat message

type HoleInfo

type HoleInfo struct {
	HoleID uint32
	Pin    uint8
	Course uint8
	Num    uint8
}

type InboxMessage

type InboxMessage struct {
	ID              uint32
	SenderNickname  string `struct:"[30]byte"`
	Message         string `struct:"[80]byte"`
	Unknown         [18]byte
	Unknown2        uint32
	Unknown3        byte
	AttachmentCount uint32 `struct:"sizeof=Attachments"`
	Attachments     []MessageAttachment
}

type ListType

type ListType byte

ListType enumerates the types of room list messages.

const (
	ListSet    ListType = 0
	ListAdd    ListType = 1
	ListRemove ListType = 2
	ListChange ListType = 3

	// Only valid for lounge mode rooms
	ListLounge ListType = 7
)

type LoungeAction

type LoungeAction struct {
	ActionType  byte
	Rotation    *LoungeActionRotation `struct-if:"ActionType == 0"`
	PositionAbs *LoungeActionRotation `struct-if:"ActionType == 4"`
	PositionRel *LoungeActionRotation `struct-if:"ActionType == 6"`
	Emote       *common.PString       `struct-if:"ActionType == 7"`
	Departure   *uint32               `struct-if:"ActionType == 8"`
}

type LoungeActionPosition

type LoungeActionPosition struct {
	X, Y, Z float32
}

type LoungeActionRotation

type LoungeActionRotation struct {
	Z float32
}

type MailMessage

type MailMessage struct {
	ID              uint32
	SenderNickname  common.PString
	DateTime        common.PString
	Message         common.PString
	Unknown         byte
	AttachmentCount uint32 `struct:"sizeof=Attachments"`
	Attachments     []MessageAttachment
}

type MessageAttachment

type MessageAttachment struct {
	ID           uint32
	ItemID       uint32
	Unknown      byte
	ItemQuantity uint32
	Unknown2     uint32
	Unknown3     uint64
	Unknown5     uint64
	Unknown6     uint32
	Unknown7     uint32
	Unknown8     [12]byte
	Unknown10    uint16
}

type MessageDataType

type MessageDataType byte

MessageDataType enumerates message data event types.

type MoneyUpdateType

type MoneyUpdateType uint16
const (
	MoneyUpdateRewardUnknown MoneyUpdateType = 2
	MoneyUpdatePangBalance   MoneyUpdateType = 273
)

type Options

type Options struct {
	TopologyClient  topologypbconnect.TopologyServiceClient
	AccountsService *accounts.Service
	PangyaIFF       *iff.Archive
	ServerID        uint32
	ChannelName     string
}

Options specify the options used to construct the game server.

type PlayerGameInfo

type PlayerGameInfo struct {
	Stroke     uint32
	Putt       uint32
	Time       uint32
	StrokeTime uint32
	Unknown    float32
	Unknown2   uint32
	Unknown3   uint32
	Unknown4   uint32
	Unknown5   uint32
	Unknown6   uint32
	Unknown7   uint32
	Unknown8   uint16
	Unknown9   uint32
	Unknown10  uint32
	Unknown11  uint32
	Unknown12  uint32
	Unknown13  float32
	Unknown14  float32
	Unknown15  uint32
	Level      byte
	Pang       uint64
	Unknown16  uint32
	Unknown17  [6]byte
	Unknown18  [5]uint64
	Unknown19  uint64
	Unknown20  uint32
	Unknown21  uint32
	Unknown22  uint32
	Unknown23  uint32
	Unknown24  uint32
	Unknown25  uint32
	Unknown26  uint32
	Unknown27  uint32
	Unknown28  uint32
	Unknown29  uint32
	Unknown30  uint32
	Unknown31  uint32
	Unknown32  uint64
	Unknown33  uint32
	Unknown34  uint32
	Unknown35  uint32
	Unknown36  uint32
	Unknown37  uint32
	Unknown38  uint32
	Unknown39  uint16
	Unknown40  uint32
	Unknown41  uint32
	Unknown42  uint32
	Unknown43  uint32
	Unknown44  uint32
	Unknown45  uint32
	Unknown46  uint32
	Unknown47  uint32
	Unknown48  uint32
	Unknown49  uint16
}

type PlayerInfo

type PlayerInfo struct {
	Username         string `struct:"[22]byte"`
	Nickname         string `struct:"[22]byte"`
	GuildName        string `struct:"[17]byte"`
	GuildEmblemImage string `struct:"[12]byte"`
	Unknown          [71]byte
	Flag             byte
	Unknown2         uint16
	Unknown3         uint16
	Unknown4         uint16
	Unknown5         uint16
	Unknown6         [16]byte
	GlobalID         string `struct:"[128]byte"`
}

type PurchaseItem

type PurchaseItem struct {
	Unknown        uint32
	ItemID         uint32
	Unknown2       uint16
	Unknown3       uint16
	Quantity       uint32
	ItemCostPang   uint32
	ItemCostCookie uint32
}

type RoomCensusListAdd

type RoomCensusListAdd struct {
	User RoomListUser
}

type RoomCensusListChange

type RoomCensusListChange struct {
	ConnID uint32
	User   RoomListUser
}

type RoomCensusListRemove

type RoomCensusListRemove struct {
	ConnID uint32
}

type RoomCensusListSet

type RoomCensusListSet struct {
	UserCount uint8 `struct:"sizeof=UserList"`
	UserList  []RoomListUser
}

type RoomListRoom

type RoomListRoom struct {
	Name             string `struct:"[64]byte"`
	Public           bool   `struct:"byte"`
	Unknown          uint16
	UserMax          uint8
	UserCount        uint8
	Unknown2         [18]byte
	NumHoles         uint8
	Number           uint16
	HoleProgression  uint8
	Course           uint8
	ShotTimerMS      uint32
	GameTimerMS      uint32
	Flags            uint32
	Unknown3         [76]byte
	Unknown4         uint32
	Unknown5         uint32
	OwnerID          uint32
	Class            byte
	ArtifactID       uint32
	Unknown6         uint32
	EventNum         uint32
	EventNumTop      uint32
	EventShotTimerMS uint32
	Unknown7         uint32
}

type RoomListUser

type RoomListUser struct {
	ConnID            uint32
	Nickname          string `struct:"[22]byte"`
	GuildName         string `struct:"[20]byte"`
	Slot              uint8
	Flag              uint32
	TitleID           uint32
	CharTypeID        uint32
	PortraitBGID      uint32
	PortraitFrameID   uint32
	PortraitStickerID uint32
	PortraitSlotID    uint32
	SkinUnknown1      uint32
	SkinUnknown2      uint32
	Flag2             uint16
	Rank              uint8
	Unknown           uint8
	Unknown2          uint16
	GuildID           uint32
	GuildEmblemImage  string `struct:"[12]byte"`
	GuildEmblemID     uint8
	UserID            uint32
	LoungeState       uint32
	Unknown3          uint16
	Unknown4          uint32
	X                 float32
	Y                 float32
	Z                 float32
	Angle             float32
	ShopUnknown       uint32
	ShopName          string `struct:"[64]byte"`
	MascotTypeID      uint32
	GlobalID          string `struct:"[22]byte"`
	Unknown5          [106]byte
	Guest             bool `struct:"byte"`
	AverageScore      float32
	Unknown6          [3]byte
	UnknownMisalign   byte // TODO: something either before or after here is misaligned
	CharacterData     pangya.PlayerCharacterData
}

type Server

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

Server provides an implementation of the PangYa game server.

func New

func New(opts Options) *Server

New creates a new instance of the game server.

func (*Server) Listen

func (s *Server) Listen(ctx context.Context, addr string) error

Listen listens for connections on a given address and blocks indefinitely.

func (*Server) Shutdown

func (s *Server) Shutdown(shutdownCtx context.Context) error

type Server01F6

type Server01F6 struct {
	ServerMessage_
	Unknown []byte
}

type Server004E

type Server004E struct {
	ServerMessage_
	Unknown []byte
}

type Server010E

type Server010E struct {
	ServerMessage_
	Unknown []byte
}

type Server0230

type Server0230 struct {
	ServerMessage_
}

type Server0231

type Server0231 struct {
	ServerMessage_
}

type ServerAchievementProgress

type ServerAchievementProgress struct {
	ServerMessage_
	Status       uint32
	Remaining    uint32
	Count        uint32 `struct:"sizeof=Achievements"`
	Achievements []AchievementProgress
}

type ServerAssistModeToggled

type ServerAssistModeToggled struct {
	ServerMessage_
	Unknown uint32
}

type ServerChannelList

type ServerChannelList struct {
	ServerMessage_
	Count   byte `struct:"sizeof=Servers"`
	Servers []pangya.ServerEntry
}

ServerChannelList is a message that contains a list of all of the channels for a given server. Channels are isolated game zones within a region.

type ServerCharData

type ServerCharData struct {
	ServerMessage_
	Count1     uint16 `struct:"sizeof=Characters"`
	Count2     uint16 `struct:"sizeof=Characters"`
	Characters []pangya.PlayerCharacterData
}

ServerCharData contains the user's characters.

type ServerEventLobbyJoined

type ServerEventLobbyJoined struct {
	ServerMessage_
}

type ServerEventLobbyLeft

type ServerEventLobbyLeft struct {
	ServerMessage_
}

type ServerGameInit

type ServerGameInit struct {
	ServerMessage_
	Unknown    byte
	NumPlayers byte `struct:"sizeof=Players"`
	Players    []GamePlayer
}

type ServerGlobalEvent

type ServerGlobalEvent struct {
	ServerMessage_
	Type MessageDataType
	Data GlobalChatMessage
}

ServerGlobalEvent is a message that contains global chat events.

type ServerInboxList

type ServerInboxList struct {
	ServerMessage_
	Status      uint32
	PageNum     uint32
	NumPages    uint32
	NumMessages uint32 `struct:"sizeof=Messages"`
	Messages    []InboxMessage
}

type ServerInboxNotify

type ServerInboxNotify struct {
	ServerMessage_
	Unknown []byte
}

ServerInboxNotify is unimplemented.

type ServerLoginBonusStatus

type ServerLoginBonusStatus struct {
	ServerMessage_
	Unknown []byte
}

type ServerMailMessage

type ServerMailMessage struct {
	ServerMessage_
	Status  uint32
	Message MailMessage
}

type ServerMessage

type ServerMessage interface {
	common.Message
	// contains filtered or unexported methods
}

type ServerMessageConnect

type ServerMessageConnect struct {
	ServerMessage_
	Unknown byte
}

ServerMessageConnect seems to make the client connect to the message server. TODO: need to do more reverse engineering effort

type ServerMessage_

type ServerMessage_ struct{}

type ServerMoneyUpdate

type ServerMoneyUpdate struct {
	ServerMessage_
	Type uint16

	RewardUnknown *UpdateRewardUnknownData `struct-if:"Type == 2"`
	PangBalance   *UpdatePangBalanceData   `struct-if:"Type == 273"`
}

type ServerMultiplayerJoined

type ServerMultiplayerJoined struct {
	ServerMessage_
}

type ServerMultiplayerLeft

type ServerMultiplayerLeft struct {
	ServerMessage_
}

type ServerPangPurchaseData

type ServerPangPurchaseData struct {
	ServerMessage_
	PangsRemaining uint64
	PangsSpent     uint64
}

ServerPangPurchaseData is sent after a pang purchase succeeds.

type ServerPlayerID

type ServerPlayerID struct {
	ServerMessage_
	Empty    byte
	PlayerID uint32
	Unknown  [239]byte
}

ServerPlayerID is a message that contains the PlayerID and some other unknown data.

type ServerPlayerReady

type ServerPlayerReady struct {
	ServerMessage_
	ConnID uint32
	State  byte
}

type ServerRoomCensus

type ServerRoomCensus struct {
	ServerMessage_
	Type       byte
	Unknown    uint16
	ListSet    *RoomCensusListSet    `struct-if:"Type == 0"`
	ListAdd    *RoomCensusListAdd    `struct-if:"Type == 1"`
	ListRemove *RoomCensusListRemove `struct-if:"Type == 2"`
	ListChange *RoomCensusListChange `struct-if:"Type == 3"`
}

ServerRoomCensus reports on the users in a game room.

type ServerRoomEquipmentData

type ServerRoomEquipmentData struct {
	ServerMessage_
	Unknown []byte
}

type ServerRoomGameData

type ServerRoomGameData struct {
	ServerMessage_
	Course          byte
	Unknown         byte
	HoleProgression byte
	NumHoles        uint8
	Unknown2        uint32
	ShotTimerMS     uint32
	GameTimerMS     uint32
	Holes           []HoleInfo `struct:"sizefrom=NumHoles"`
	RandomSeed      uint32
}

type ServerRoomJoin

type ServerRoomJoin struct {
	ServerMessage_
	Status      byte
	Unknown     byte
	RoomName    string `struct:"[64]byte"`
	Unknown2    [25]byte
	RoomNumber  uint16
	Unknown3    [111]byte
	EventNumber uint32
	Unknown4    [12]byte
}

ServerRoomJoin is sent when a room is joined.

type ServerRoomLeave

type ServerRoomLeave struct {
	ServerMessage_
	RoomNumber uint16
}

type ServerRoomList

type ServerRoomList struct {
	ServerMessage_
	Count    uint8 `struct:"sizeof=RoomList"`
	Type     ListType
	Unknown  uint16
	RoomList []RoomListRoom
}

ServerRoomList contains information about rooms currently open in multiplayer.

type ServerRoomLoungeAction

type ServerRoomLoungeAction struct {
	ServerMessage_
	ConnID uint32
	LoungeAction
}

type ServerRoomStatus

type ServerRoomStatus struct {
	ServerMessage_
	Unknown         uint16
	RoomType        byte
	Course          byte
	NumHoles        byte
	HoleProgression byte
	NaturalWind     uint32
	MaxUsers        byte
	Unknown2        uint16
	ShotTimerMS     uint32
	GameTimerMS     uint32
	Flags           uint32
	Owner           bool `struct:"byte"`
	RoomName        common.PString
}

ServerRoomStatus is sent when a room's settings or status changes.

type ServerTutorialStatus

type ServerTutorialStatus struct {
	ServerMessage_
	Unknown [6]byte
}

type ServerUserCensus

type ServerUserCensus struct {
	ServerMessage_
	Type     UserCensusType
	Count    uint8 `struct:"sizeof=UserList"`
	UserList []CensusUser
}

ServerUserCensus contains information about users currently online in multiplayer

type ServerUserData

type ServerUserData struct {
	ServerMessage_
	Empty             byte
	ClientVersion     common.PString
	ServerVersion     common.PString
	Game              uint16
	UserInfo          pangya.UserInfo
	PlayerStats       pangya.PlayerStats
	Unknown           [78]byte
	Items             pangya.PlayerEquipment
	JunkData          [252 * 43]byte
	EquippedCharacter pangya.PlayerCharacterData
	EquippedCaddie    pangya.PlayerCaddieData
	EquippedClub      pangya.PlayerClubData
	EquippedMascot    pangya.PlayerMascotData
	Unknown2          [321]byte
}

ServerUserData contains important state information.

type ServerUserInfo

type ServerUserInfo struct {
	ServerMessage_
	ResponseCode uint8
	PlayerID     uint32
	UserInfo     pangya.UserInfo
}

ServerUserInfo contains requested user information.

type ServerUserStatusUpdate

type ServerUserStatusUpdate struct {
	ServerMessage_
	DateTimeUnix uint32
	Count        uint32
	Changes      []UserStatusChange
}

type SettingsChange

type SettingsChange struct {
	Type             byte
	RoomName         *common.PString `struct-if:"Type == 0"`
	Password         *common.PString `struct-if:"Type == 1"`
	RoomType         *byte           `struct-if:"Type == 2"`
	Course           *byte           `struct-if:"Type == 3"`
	NumHoles         *uint8          `struct-if:"Type == 4"`
	HoleProgression  *uint8          `struct-if:"Type == 5"`
	ShotTimerSeconds *uint8          `struct-if:"Type == 6"`
	MaxUsers         *uint8          `struct-if:"Type == 7"`
	GameTimerMinutes *uint8          `struct-if:"Type == 8"`
	ArtifactID       *uint32         `struct-if:"Type == 13"`
	NaturalWind      *uint32         `struct-if:"Type == 14"`
}

type UpdatePangBalanceData

type UpdatePangBalanceData struct {
	Unknown    uint32
	PangAmount uint32
	Unknown2   uint32
}

type UpdateRewardUnknownData

type UpdateRewardUnknownData struct {
	Unknown uint16
}

type UserCensusType

type UserCensusType byte

UserCensusType enumerates the types of census messages.

const (
	UserAdd        UserCensusType = 1
	UserRemove     UserCensusType = 3
	UserListSet    UserCensusType = 4
	UserListAppend UserCensusType = 5
)

type UserStatusChange

type UserStatusChange struct {
	StatusChangeType byte
	Value            *UserStatusChangeValue   `struct-if:"StatusChangeType == 2"`
	Mastery          *UserStatusChangeMastery `struct-if:"StatusChangeType == 201"`
	Unknown204       *UserStatusChange204     `struct-if:"StatusChangeType == 204"`
}

type UserStatusChange204

type UserStatusChange204 struct {
	Unknown [72]byte
}

type UserStatusChangeMastery

type UserStatusChangeMastery struct {
	CharacterID           uint32
	StatusSlot            uint32
	Unknown               [16]byte
	MasteryPowerUpCount   uint16
	MasteryControlUpCount uint16
	MasteryImpactUpCount  uint16
	MasterySpinUpCount    uint16
	MasteryCurveUpCount   uint16
	Unknown2              [16]byte
}

type UserStatusChangeValue

type UserStatusChangeValue struct {
	StatusID          uint32
	StatusSlot        uint32
	Unknown           uint32
	StatusAmountOld   uint32
	StatusAmountNew   uint32
	StatusAmountDelta int32
	Unknown2          [25]byte
}

Jump to

Keyboard shortcuts

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