Skip to content

Commit

Permalink
refactor: rename party ready check calls
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Sep 14, 2019
1 parent 9ad6cef commit faf4686
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 38 deletions.
2 changes: 2 additions & 0 deletions apigen/msg_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ var msgMethodNameOverrides = map[dm.EDOTAGCMsg]string{
dm.EDOTAGCMsg_k_EMsgGCTeamInvite_InviterToGC: "InvitePlayerToTeam",
dm.EDOTAGCMsg_k_EMsgGCTeamInvite_InviteeResponseToGC: "RespondToTeamInvite",
dm.EDOTAGCMsg_k_EMsgClientsRejoinChatChannels: "RejoinAllChatChannels",
dm.EDOTAGCMsg_k_EMsgPartyReadyCheckRequest: "SendPartyReadyCheck",
dm.EDOTAGCMsg_k_EMsgPartyReadyCheckAcknowledge: "AckPartyReadyCheck",
}

// msgResponseOverrides maps request message IDs to response message IDs.
Expand Down
3 changes: 3 additions & 0 deletions apigen/msg_verb.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func init() {
"Autograph",
"Award",
"Cancel",
"Check",
"Close",
"Create",
"Demote",
Expand All @@ -40,6 +41,7 @@ func init() {
"Refresh",
"Release",
"Report",
"Revoke",
"Request",
"Reroll",
"Reserve",
Expand All @@ -49,6 +51,7 @@ func init() {
"Set",
"Spectate",
"Start",
"Stop",
"Submit",
"Swap",
"Toggle",
Expand Down
76 changes: 38 additions & 38 deletions client_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ func (d *Dota2) AbandonLobby() {
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgGCAbandonCurrentGame), req)
}

// AckPartyReadyCheck checks for/from a ack party ready.
// Request ID: k_EMsgPartyReadyCheckAcknowledge
// Request type: CMsgPartyReadyCheckAcknowledge
func (d *Dota2) AckPartyReadyCheck(
readyStatus protocol.EReadyCheckStatus,
) {
req := &protocol.CMsgPartyReadyCheckAcknowledge{
ReadyStatus: &readyStatus,
}
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckAcknowledge), req)
}

// ApplyGemCombiner applys a gem combiner.
// Request ID: k_EMsgClientToGCApplyGemCombiner
// Request type: CMsgClientToGCApplyGemCombiner
Expand Down Expand Up @@ -3402,26 +3414,6 @@ func (d *Dota2) RequestOfferings(
)
}

// RequestPartyReadyCheck requests a party ready check.
// Request ID: k_EMsgPartyReadyCheckRequest
// Response ID: k_EMsgPartyReadyCheckResponse
// Request type: CMsgPartyReadyCheckRequest
// Response type: CMsgPartyReadyCheckResponse
func (d *Dota2) RequestPartyReadyCheck(
ctx context.Context,
) (*protocol.CMsgPartyReadyCheckResponse, error) {
req := &protocol.CMsgPartyReadyCheckRequest{}
resp := &protocol.CMsgPartyReadyCheckResponse{}

return resp, d.MakeRequest(
ctx,
uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckRequest),
req,
uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckResponse),
resp,
)
}

// RequestPartySetOpenGuild requests a party set open guild.
// Request ID: k_EMsgGCPartySetOpenGuildRequest
// Response ID: k_EMsgGCPartySetOpenGuildResponse
Expand Down Expand Up @@ -4799,16 +4791,24 @@ func (d *Dota2) SendMergePartyInvite(
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgClientToGCMergePartyInvite), req)
}

// SendPartyReadyCheckAcknowledge sends a party ready check acknowledge.
// Request ID: k_EMsgPartyReadyCheckAcknowledge
// Request type: CMsgPartyReadyCheckAcknowledge
func (d *Dota2) SendPartyReadyCheckAcknowledge(
readyStatus protocol.EReadyCheckStatus,
) {
req := &protocol.CMsgPartyReadyCheckAcknowledge{
ReadyStatus: &readyStatus,
}
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckAcknowledge), req)
// SendPartyReadyCheck sends a party ready check.
// Request ID: k_EMsgPartyReadyCheckRequest
// Response ID: k_EMsgPartyReadyCheckResponse
// Request type: CMsgPartyReadyCheckRequest
// Response type: CMsgPartyReadyCheckResponse
func (d *Dota2) SendPartyReadyCheck(
ctx context.Context,
) (*protocol.CMsgPartyReadyCheckResponse, error) {
req := &protocol.CMsgPartyReadyCheckRequest{}
resp := &protocol.CMsgPartyReadyCheckResponse{}

return resp, d.MakeRequest(
ctx,
uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckRequest),
req,
uint32(protocol.EDOTAGCMsg_k_EMsgPartyReadyCheckResponse),
resp,
)
}

// SendPeriodicResourceUpdated sends a periodic resource updated.
Expand Down Expand Up @@ -4926,14 +4926,6 @@ func (d *Dota2) SendSpectatorLobbyGameDetails(
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgSpectatorLobbyGameDetails), req)
}

// SendStopFindingMatch sends a stop finding match.
// Request ID: k_EMsgGCStopFindingMatch
// Request type: CMsgStopFindingMatch
func (d *Dota2) SendStopFindingMatch() {
req := &protocol.CMsgStopFindingMatch{}
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgGCStopFindingMatch), req)
}

// SendSuccessfulHero sends a successful hero.
// Request ID: k_EMsgSuccessfulHero
// Request type: CMsgSuccessfulHero
Expand Down Expand Up @@ -5378,6 +5370,14 @@ func (d *Dota2) StartTriviaSession(
)
}

// StopFindingMatch stops a finding match.
// Request ID: k_EMsgGCStopFindingMatch
// Request type: CMsgStopFindingMatch
func (d *Dota2) StopFindingMatch() {
req := &protocol.CMsgStopFindingMatch{}
d.write(uint32(protocol.EDOTAGCMsg_k_EMsgGCStopFindingMatch), req)
}

// SubmitCoachTeammateRating submits a coach teammate rating.
// Request ID: k_EMsgClientToGCSubmitCoachTeammateRating
// Response ID: k_EMsgClientToGCSubmitCoachTeammateRatingResponse
Expand Down

0 comments on commit faf4686

Please sign in to comment.