Skip to content

Commit 81ed030

Browse files
committed
feat: update protos for 2018 spring cleaning
1 parent b8186b5 commit 81ed030

File tree

9 files changed

+4529
-3526
lines changed

9 files changed

+4529
-3526
lines changed

client_generated.go

Lines changed: 125 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,6 +2531,26 @@ func (d *Dota2) RequestGetPlayerCardRoster(
25312531
)
25322532
}
25332533

2534+
// RequestGetRecentPlayTimeFriends requests to check if the target get recent play time friends.
2535+
// Request ID: k_EMsgGetRecentPlayTimeFriendsRequest
2536+
// Response ID: k_EMsgGetRecentPlayTimeFriendsResponse
2537+
// Request type: CMsgDOTAGetRecentPlayTimeFriendsRequest
2538+
// Response type: CMsgDOTAGetRecentPlayTimeFriendsResponse
2539+
func (d *Dota2) RequestGetRecentPlayTimeFriends(
2540+
ctx context.Context,
2541+
) (*dota_gcmessages_client.CMsgDOTAGetRecentPlayTimeFriendsResponse, error) {
2542+
req := &dota_gcmessages_client.CMsgDOTAGetRecentPlayTimeFriendsRequest{}
2543+
resp := &dota_gcmessages_client.CMsgDOTAGetRecentPlayTimeFriendsResponse{}
2544+
2545+
return resp, d.MakeRequest(
2546+
ctx,
2547+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGetRecentPlayTimeFriendsRequest),
2548+
req,
2549+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGetRecentPlayTimeFriendsResponse),
2550+
resp,
2551+
)
2552+
}
2553+
25342554
// RequestGuildCancelInvite requests a guild cancel invite.
25352555
// Request ID: k_EMsgGCGuildCancelInviteRequest
25362556
// Response ID: k_EMsgGCGuildCancelInviteResponse
@@ -3091,6 +3111,26 @@ func (d *Dota2) RequestOfferings(
30913111
)
30923112
}
30933113

3114+
// RequestPartyReadyCheck requests a party ready check.
3115+
// Request ID: k_EMsgPartyReadyCheckRequest
3116+
// Response ID: k_EMsgPartyReadyCheckResponse
3117+
// Request type: CMsgPartyReadyCheckRequest
3118+
// Response type: CMsgPartyReadyCheckResponse
3119+
func (d *Dota2) RequestPartyReadyCheck(
3120+
ctx context.Context,
3121+
) (*dota_gcmessages_common_match_management.CMsgPartyReadyCheckResponse, error) {
3122+
req := &dota_gcmessages_common_match_management.CMsgPartyReadyCheckRequest{}
3123+
resp := &dota_gcmessages_common_match_management.CMsgPartyReadyCheckResponse{}
3124+
3125+
return resp, d.MakeRequest(
3126+
ctx,
3127+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgPartyReadyCheckRequest),
3128+
req,
3129+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgPartyReadyCheckResponse),
3130+
resp,
3131+
)
3132+
}
3133+
30943134
// RequestPartySetOpenGuild requests a party set open guild.
30953135
// Request ID: k_EMsgGCPartySetOpenGuildRequest
30963136
// Response ID: k_EMsgGCPartySetOpenGuildResponse
@@ -3208,21 +3248,42 @@ func (d *Dota2) RequestPrivateChatInfo(
32083248
)
32093249
}
32103250

3251+
// RequestProfile requests a profile.
3252+
// Request ID: k_EMsgProfileRequest
3253+
// Response ID: k_EMsgProfileResponse
3254+
// Request type: CMsgProfileRequest
3255+
// Response type: CMsgProfileResponse
3256+
func (d *Dota2) RequestProfile(
3257+
ctx context.Context,
3258+
accountID uint32,
3259+
) (*dota_gcmessages_client.CMsgProfileResponse, error) {
3260+
req := &dota_gcmessages_client.CMsgProfileRequest{
3261+
AccountId: &accountID,
3262+
}
3263+
resp := &dota_gcmessages_client.CMsgProfileResponse{}
3264+
3265+
return resp, d.MakeRequest(
3266+
ctx,
3267+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgProfileRequest),
3268+
req,
3269+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgProfileResponse),
3270+
resp,
3271+
)
3272+
}
3273+
32113274
// RequestProfile requests a profile.
32123275
// Request ID: k_EMsgGCProfileRequest
32133276
// Response ID: k_EMsgGCProfileResponse
3214-
// Request type: CMsgDOTAProfileRequest
3215-
// Response type: CMsgDOTAProfileResponse
3277+
// Request type: CMsgProfileRequest
3278+
// Response type: CMsgProfileResponse
32163279
func (d *Dota2) RequestProfile(
32173280
ctx context.Context,
32183281
accountID uint32,
3219-
requestName bool,
3220-
) (*dota_gcmessages_client.CMsgDOTAProfileResponse, error) {
3221-
req := &dota_gcmessages_client.CMsgDOTAProfileRequest{
3222-
AccountId: &accountID,
3223-
RequestName: &requestName,
3282+
) (*dota_gcmessages_client.CMsgProfileResponse, error) {
3283+
req := &dota_gcmessages_client.CMsgProfileRequest{
3284+
AccountId: &accountID,
32243285
}
3225-
resp := &dota_gcmessages_client.CMsgDOTAProfileResponse{}
3286+
resp := &dota_gcmessages_client.CMsgProfileResponse{}
32263287

32273288
return resp, d.MakeRequest(
32283289
ctx,
@@ -4078,6 +4139,18 @@ func (d *Dota2) SendMergePartyInvite(
40784139
d.write(uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgClientToGCMergePartyInvite), req)
40794140
}
40804141

4142+
// SendPartyReadyCheckAcknowledge sends a party ready check acknowledge.
4143+
// Request ID: k_EMsgPartyReadyCheckAcknowledge
4144+
// Request type: CMsgPartyReadyCheckAcknowledge
4145+
func (d *Dota2) SendPartyReadyCheckAcknowledge(
4146+
readyStatus dota_gcmessages_common_match_management.EReadyCheckStatus,
4147+
) {
4148+
req := &dota_gcmessages_common_match_management.CMsgPartyReadyCheckAcknowledge{
4149+
ReadyStatus: &readyStatus,
4150+
}
4151+
d.write(uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgPartyReadyCheckAcknowledge), req)
4152+
}
4153+
40814154
// SendPeriodicResourceUpdated sends a periodic resource updated.
40824155
// Request ID: k_EMsgDOTAPeriodicResourceUpdated
40834156
// Request type: CMsgDOTAPeriodicResourceUpdated
@@ -4120,6 +4193,31 @@ func (d *Dota2) SendPresentedClientTerminateDlg() {
41204193
d.write(uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgPresentedClientTerminateDlg), req)
41214194
}
41224195

4196+
// SendProfileUpdate sends a profile update.
4197+
// Request ID: k_EMsgProfileUpdate
4198+
// Response ID: k_EMsgProfileUpdateResponse
4199+
// Request type: CMsgProfileUpdate
4200+
// Response type: CMsgProfileUpdateResponse
4201+
func (d *Dota2) SendProfileUpdate(
4202+
ctx context.Context,
4203+
backgroundItemID uint64,
4204+
featuredHeroIDs []uint32,
4205+
) (*dota_gcmessages_client.CMsgProfileUpdateResponse, error) {
4206+
req := &dota_gcmessages_client.CMsgProfileUpdate{
4207+
BackgroundItemId: &backgroundItemID,
4208+
FeaturedHeroIds: featuredHeroIDs,
4209+
}
4210+
resp := &dota_gcmessages_client.CMsgProfileUpdateResponse{}
4211+
4212+
return resp, d.MakeRequest(
4213+
ctx,
4214+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgProfileUpdate),
4215+
req,
4216+
uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgProfileUpdateResponse),
4217+
resp,
4218+
)
4219+
}
4220+
41234221
// SendReadyUp sends a ready up.
41244222
// Request ID: k_EMsgGCReadyUp
41254223
// Request type: CMsgReadyUp
@@ -4165,6 +4263,22 @@ func (d *Dota2) SendStopFindingMatch() {
41654263
d.write(uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGCStopFindingMatch), req)
41664264
}
41674265

4266+
// SendSuccessfulHero sends a successful hero.
4267+
// Request ID: k_EMsgSuccessfulHero
4268+
// Request type: CMsgSuccessfulHero
4269+
func (d *Dota2) SendSuccessfulHero(
4270+
heroID uint32,
4271+
winPercent float32,
4272+
longestStreak uint32,
4273+
) {
4274+
req := &dota_gcmessages_common.CMsgSuccessfulHero{
4275+
HeroId: &heroID,
4276+
WinPercent: &winPercent,
4277+
LongestStreak: &longestStreak,
4278+
}
4279+
d.write(uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgSuccessfulHero), req)
4280+
}
4281+
41684282
// SendSuspiciousActivity sends a suspicious activity.
41694283
// Request ID: k_EMsgClientToGCSuspiciousActivity
41704284
// Request type: CMsgClientToGCSuspiciousActivity
@@ -4813,6 +4927,9 @@ func (d *Dota2) registerGeneratedHandlers() {
48134927
d.handlers[uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGCClientSuspended)] = d.getEventEmitter(func() events.Event {
48144928
return &events.ClientSuspended{}
48154929
})
4930+
d.handlers[uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGCToClientCommendNotification)] = d.getEventEmitter(func() events.Event {
4931+
return &events.CommendNotification{}
4932+
})
48164933
d.handlers[uint32(dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGCCompendiumDataChanged)] = d.getEventEmitter(func() events.Event {
48174934
return &events.CompendiumDataChanged{}
48184935
})

events/generated.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,27 @@ func (e *ClientSuspended) GetEventName() string {
224224
return "ClientSuspended"
225225
}
226226

227+
// CommendNotification event.
228+
// MessageID: k_EMsgGCToClientCommendNotification
229+
type CommendNotification struct {
230+
dota_gcmessages_client.CMsgGCToClientCommendNotification
231+
}
232+
233+
// GetDotaEventMsgID returns the dota message ID of the event.
234+
func (e *CommendNotification) GetDotaEventMsgID() dota_gcmessages_msgid.EDOTAGCMsg {
235+
return dota_gcmessages_msgid.EDOTAGCMsg_k_EMsgGCToClientCommendNotification
236+
}
237+
238+
// GetEventBody returns the event body.
239+
func (e *CommendNotification) GetEventBody() proto.Message {
240+
return &e.CMsgGCToClientCommendNotification
241+
}
242+
243+
// GetEventName returns the event name.
244+
func (e *CommendNotification) GetEventName() string {
245+
return "CommendNotification"
246+
}
247+
227248
// CompendiumDataChanged event.
228249
// MessageID: k_EMsgGCCompendiumDataChanged
229250
type CompendiumDataChanged struct {

0 commit comments

Comments
 (0)