Skip to content

Commit

Permalink
update protos
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoene committed Jul 30, 2024
1 parent a3353b7 commit 6c2c46e
Show file tree
Hide file tree
Showing 58 changed files with 17,407 additions and 14,622 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ update-protobufs:
cp -a ./dota/tmp/Protobufs/*.proto ./dota/ && \
rm -rf ./dota/tmp
rm -rf dota/gametoolevents.proto dota/dota_messages_mlbot.proto dota/dota_gcmessages_common_bot_script.proto dota/steammessages_base.proto dota/steammessages_clientserver_login.proto dota/tensorflow
$(SED) -i 's/\.CMsgFightingGame_GameData/CMsgFightingGame_GameData/g' dota/dota_fighting_game_p2p_messages.proto
$(SED) -i 's/^\(\s*\)\(optional\|repeated\|required\|extend\)\s*\./\1\2 /' dota/*.proto
$(SED) -i 's!^\s*rpc\s*\(\S*\)\s*(\.\([^)]*\))\s*returns\s*(\.\([^)]*\))\s*{!rpc \1 (\2) returns (\3) {!' dota/*.proto
$(SED) -i '1isyntax = "proto2";\n\npackage dota;\noption go_package = "github.com/dotabuff/manta/dota;dota";\n' dota/*.proto
Expand Down
75 changes: 0 additions & 75 deletions callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type Callbacks struct {
onCDemoAnimationData []func(*dota.CDemoAnimationData) error
onCDemoAnimationHeader []func(*dota.CDemoAnimationHeader) error
onCNETMsg_NOP []func(*dota.CNETMsg_NOP) error
onCNETMsg_Disconnect_Legacy []func(*dota.CNETMsg_Disconnect_Legacy) error
onCNETMsg_SplitScreenUser []func(*dota.CNETMsg_SplitScreenUser) error
onCNETMsg_Tick []func(*dota.CNETMsg_Tick) error
onCNETMsg_StringCmd []func(*dota.CNETMsg_StringCmd) error
Expand Down Expand Up @@ -65,7 +64,6 @@ type Callbacks struct {
onCSVCMsg_FullFrameSplit []func(*dota.CSVCMsg_FullFrameSplit) error
onCSVCMsg_RconServerDetails []func(*dota.CSVCMsg_RconServerDetails) error
onCSVCMsg_UserMessage []func(*dota.CSVCMsg_UserMessage) error
onCSVCMsg_HltvReplay []func(*dota.CSVCMsg_HltvReplay) error
onCSVCMsg_Broadcast_Command []func(*dota.CSVCMsg_Broadcast_Command) error
onCSVCMsg_HltvFixupOperatorStatus []func(*dota.CSVCMsg_HltvFixupOperatorStatus) error
onCUserMessageAchievementEvent []func(*dota.CUserMessageAchievementEvent) error
Expand Down Expand Up @@ -199,7 +197,6 @@ type Callbacks struct {
onCDOTAUserMsg_CustomHeaderMessage []func(*dota.CDOTAUserMsg_CustomHeaderMessage) error
onCDOTAUserMsg_QuickBuyAlert []func(*dota.CDOTAUserMsg_QuickBuyAlert) error
onCDOTAUserMsg_StatsHeroMinuteDetails []func(*dota.CDOTAUserMsg_StatsHeroMinuteDetails) error
onCDOTAUserMsg_PredictionResult []func(*dota.CDOTAUserMsg_PredictionResult) error
onCDOTAUserMsg_ModifierAlert []func(*dota.CDOTAUserMsg_ModifierAlert) error
onCDOTAUserMsg_HPManaAlert []func(*dota.CDOTAUserMsg_HPManaAlert) error
onCDOTAUserMsg_GlyphAlert []func(*dota.CDOTAUserMsg_GlyphAlert) error
Expand Down Expand Up @@ -383,11 +380,6 @@ func (c *Callbacks) OnCNETMsg_NOP(fn func(*dota.CNETMsg_NOP) error) {
c.onCNETMsg_NOP = append(c.onCNETMsg_NOP, fn)
}

// OnCNETMsg_Disconnect_Legacy registers a callback for NET_Messages_net_Disconnect_Legacy
func (c *Callbacks) OnCNETMsg_Disconnect_Legacy(fn func(*dota.CNETMsg_Disconnect_Legacy) error) {
c.onCNETMsg_Disconnect_Legacy = append(c.onCNETMsg_Disconnect_Legacy, fn)
}

// OnCNETMsg_SplitScreenUser registers a callback for NET_Messages_net_SplitScreenUser
func (c *Callbacks) OnCNETMsg_SplitScreenUser(fn func(*dota.CNETMsg_SplitScreenUser) error) {
c.onCNETMsg_SplitScreenUser = append(c.onCNETMsg_SplitScreenUser, fn)
Expand Down Expand Up @@ -578,11 +570,6 @@ func (c *Callbacks) OnCSVCMsg_UserMessage(fn func(*dota.CSVCMsg_UserMessage) err
c.onCSVCMsg_UserMessage = append(c.onCSVCMsg_UserMessage, fn)
}

// OnCSVCMsg_HltvReplay registers a callback for SVC_Messages_svc_HltvReplay
func (c *Callbacks) OnCSVCMsg_HltvReplay(fn func(*dota.CSVCMsg_HltvReplay) error) {
c.onCSVCMsg_HltvReplay = append(c.onCSVCMsg_HltvReplay, fn)
}

// OnCSVCMsg_Broadcast_Command registers a callback for SVC_Messages_svc_Broadcast_Command
func (c *Callbacks) OnCSVCMsg_Broadcast_Command(fn func(*dota.CSVCMsg_Broadcast_Command) error) {
c.onCSVCMsg_Broadcast_Command = append(c.onCSVCMsg_Broadcast_Command, fn)
Expand Down Expand Up @@ -1248,11 +1235,6 @@ func (c *Callbacks) OnCDOTAUserMsg_StatsHeroMinuteDetails(fn func(*dota.CDOTAUse
c.onCDOTAUserMsg_StatsHeroMinuteDetails = append(c.onCDOTAUserMsg_StatsHeroMinuteDetails, fn)
}

// OnCDOTAUserMsg_PredictionResult registers a callback for EDotaUserMessages_DOTA_UM_PredictionResult
func (c *Callbacks) OnCDOTAUserMsg_PredictionResult(fn func(*dota.CDOTAUserMsg_PredictionResult) error) {
c.onCDOTAUserMsg_PredictionResult = append(c.onCDOTAUserMsg_PredictionResult, fn)
}

// OnCDOTAUserMsg_ModifierAlert registers a callback for EDotaUserMessages_DOTA_UM_ModifierAlert
func (c *Callbacks) OnCDOTAUserMsg_ModifierAlert(fn func(*dota.CDOTAUserMsg_ModifierAlert) error) {
c.onCDOTAUserMsg_ModifierAlert = append(c.onCDOTAUserMsg_ModifierAlert, fn)
Expand Down Expand Up @@ -2017,25 +1999,6 @@ func (c *Callbacks) callByPacketType(t int32, buf []byte) error {

return nil

case 1: // dota.NET_Messages_net_Disconnect_Legacy
if c.onCNETMsg_Disconnect_Legacy == nil {
return nil
}

msg := &dota.CNETMsg_Disconnect_Legacy{}
c.pb.SetBuf(buf)
if err := c.pb.Unmarshal(msg); err != nil {
return err
}

for _, fn := range c.onCNETMsg_Disconnect_Legacy {
if err := fn(msg); err != nil {
return err
}
}

return nil

case 3: // dota.NET_Messages_net_SplitScreenUser
if c.onCNETMsg_SplitScreenUser == nil {
return nil
Expand Down Expand Up @@ -2758,25 +2721,6 @@ func (c *Callbacks) callByPacketType(t int32, buf []byte) error {

return nil

case 73: // dota.SVC_Messages_svc_HltvReplay
if c.onCSVCMsg_HltvReplay == nil {
return nil
}

msg := &dota.CSVCMsg_HltvReplay{}
c.pb.SetBuf(buf)
if err := c.pb.Unmarshal(msg); err != nil {
return err
}

for _, fn := range c.onCSVCMsg_HltvReplay {
if err := fn(msg); err != nil {
return err
}
}

return nil

case 74: // dota.SVC_Messages_svc_Broadcast_Command
if c.onCSVCMsg_Broadcast_Command == nil {
return nil
Expand Down Expand Up @@ -5304,25 +5248,6 @@ func (c *Callbacks) callByPacketType(t int32, buf []byte) error {

return nil

case 542: // dota.EDotaUserMessages_DOTA_UM_PredictionResult
if c.onCDOTAUserMsg_PredictionResult == nil {
return nil
}

msg := &dota.CDOTAUserMsg_PredictionResult{}
c.pb.SetBuf(buf)
if err := c.pb.Unmarshal(msg); err != nil {
return err
}

for _, fn := range c.onCDOTAUserMsg_PredictionResult {
if err := fn(msg); err != nil {
return err
}
}

return nil

case 543: // dota.EDotaUserMessages_DOTA_UM_ModifierAlert
if c.onCDOTAUserMsg_ModifierAlert == nil {
return nil
Expand Down
52 changes: 31 additions & 21 deletions dota/c_peer2peer_netmessages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dota/c_peer2peer_netmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ enum P2P_Messages {
p2p_Ping = 258;
p2p_VRAvatarPosition = 259;
p2p_WatchSynchronization = 260;
p2p_FightingGame_GameData = 261;
p2p_FightingGame_Connection = 262;
}

message CP2P_TextMessage {
Expand Down
6 changes: 3 additions & 3 deletions dota/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dota/demo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ message CGameInfo {
message CHeroSelectEvent {
optional bool is_pick = 1;
optional uint32 team = 2;
optional uint32 hero_id = 3;
optional int32 hero_id = 3;
}

optional uint64 match_id = 1;
Expand Down
Loading

0 comments on commit 6c2c46e

Please sign in to comment.