Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player-data-struct: move 'game' variable to inside the PlayerData struct #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion game/packet/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ type ServerChannelList struct {
type PlayerMainData struct {
ClientVersion common.PString
ServerVersion common.PString
Game uint16
PlayerData pangya.PlayerData
Unknown2 [321]byte
}
Expand Down
2 changes: 1 addition & 1 deletion game/server/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (c *Conn) handleAuth(ctx context.Context) error {

// TODO: need data modelling
c.playerData = pangya.PlayerData{
Game: 0xFFFF,
UserInfo: pangya.PlayerInfo{
Username: c.player.Username,
Nickname: c.player.Nickname.String,
Expand Down Expand Up @@ -105,7 +106,6 @@ func (c *Conn) handleAuth(ctx context.Context) error {
MainData: &gamepacket.PlayerMainData{
ClientVersion: common.ToPString("824.00"),
ServerVersion: common.ToPString("Pangbox"),
Game: 0xFFFF,
PlayerData: c.playerData,
},
})
Expand Down
1 change: 1 addition & 0 deletions pangya/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ type PlayerMascotData struct {
}

type PlayerData struct {
Game uint16
UserInfo PlayerInfo
PlayerStats PlayerStats
Trophy [13][3]uint16
Expand Down