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

update-protobufs, add 5129306977 match to tests #123

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: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/replays/*.dem*
/tmp
/vendor
/.idea
200 changes: 200 additions & 0 deletions callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ type Callbacks struct {
onCDOTAUserMsg_FoundNeutralItem []func(*dota.CDOTAUserMsg_FoundNeutralItem) error
onCDOTAUserMsg_OutpostCaptured []func(*dota.CDOTAUserMsg_OutpostCaptured) error
onCDOTAUserMsg_OutpostGrantedXP []func(*dota.CDOTAUserMsg_OutpostGrantedXP) error
onCDOTAUserMsg_MoveCameraToUnit []func(*dota.CDOTAUserMsg_MoveCameraToUnit) error
onCDOTAUserMsg_PauseMinigameData []func(*dota.CDOTAUserMsg_PauseMinigameData) error
onCDOTAUserMsg_VersusScene_PlayerBehavior []func(*dota.CDOTAUserMsg_VersusScene_PlayerBehavior) error
onCDOTAUserMsg_QoP_ArcanaSummary []func(*dota.CDOTAUserMsg_QoP_ArcanaSummary) error
onCDOTAUserMsg_HotPotato_Created []func(*dota.CDOTAUserMsg_HotPotato_Created) error
onCDOTAUserMsg_HotPotato_Exploded []func(*dota.CDOTAUserMsg_HotPotato_Exploded) error
onCDOTAUserMsg_WK_Arcana_Progress []func(*dota.CDOTAUserMsg_WK_Arcana_Progress) error
onCDOTAUserMsg_GuildChallenge_Progress []func(*dota.CDOTAUserMsg_GuildChallenge_Progress) error

pb *proto.Buffer
}
Expand Down Expand Up @@ -1409,6 +1417,46 @@ func (c *Callbacks) OnCDOTAUserMsg_OutpostGrantedXP(fn func(*dota.CDOTAUserMsg_O
c.onCDOTAUserMsg_OutpostGrantedXP = append(c.onCDOTAUserMsg_OutpostGrantedXP, fn)
}

// OnCDOTAUserMsg_MoveCameraToUnit registers a callback for EDotaUserMessages_DOTA_UM_MoveCameraToUnit
func (c *Callbacks) OnCDOTAUserMsg_MoveCameraToUnit(fn func(*dota.CDOTAUserMsg_MoveCameraToUnit) error) {
c.onCDOTAUserMsg_MoveCameraToUnit = append(c.onCDOTAUserMsg_MoveCameraToUnit, fn)
}

// OnCDOTAUserMsg_PauseMinigameData registers a callback for EDotaUserMessages_DOTA_UM_PauseMinigameData
func (c *Callbacks) OnCDOTAUserMsg_PauseMinigameData(fn func(*dota.CDOTAUserMsg_PauseMinigameData) error) {
c.onCDOTAUserMsg_PauseMinigameData = append(c.onCDOTAUserMsg_PauseMinigameData, fn)
}

// OnCDOTAUserMsg_VersusScene_PlayerBehavior registers a callback for EDotaUserMessages_DOTA_UM_VersusScene_PlayerBehavior
func (c *Callbacks) OnCDOTAUserMsg_VersusScene_PlayerBehavior(fn func(*dota.CDOTAUserMsg_VersusScene_PlayerBehavior) error) {
c.onCDOTAUserMsg_VersusScene_PlayerBehavior = append(c.onCDOTAUserMsg_VersusScene_PlayerBehavior, fn)
}

// OnCDOTAUserMsg_QoP_ArcanaSummary registers a callback for EDotaUserMessages_DOTA_UM_QoP_ArcanaSummary
func (c *Callbacks) OnCDOTAUserMsg_QoP_ArcanaSummary(fn func(*dota.CDOTAUserMsg_QoP_ArcanaSummary) error) {
c.onCDOTAUserMsg_QoP_ArcanaSummary = append(c.onCDOTAUserMsg_QoP_ArcanaSummary, fn)
}

// OnCDOTAUserMsg_HotPotato_Created registers a callback for EDotaUserMessages_DOTA_UM_HotPotato_Created
func (c *Callbacks) OnCDOTAUserMsg_HotPotato_Created(fn func(*dota.CDOTAUserMsg_HotPotato_Created) error) {
c.onCDOTAUserMsg_HotPotato_Created = append(c.onCDOTAUserMsg_HotPotato_Created, fn)
}

// OnCDOTAUserMsg_HotPotato_Exploded registers a callback for EDotaUserMessages_DOTA_UM_HotPotato_Exploded
func (c *Callbacks) OnCDOTAUserMsg_HotPotato_Exploded(fn func(*dota.CDOTAUserMsg_HotPotato_Exploded) error) {
c.onCDOTAUserMsg_HotPotato_Exploded = append(c.onCDOTAUserMsg_HotPotato_Exploded, fn)
}

// OnCDOTAUserMsg_WK_Arcana_Progress registers a callback for EDotaUserMessages_DOTA_UM_WK_Arcana_Progress
func (c *Callbacks) OnCDOTAUserMsg_WK_Arcana_Progress(fn func(*dota.CDOTAUserMsg_WK_Arcana_Progress) error) {
c.onCDOTAUserMsg_WK_Arcana_Progress = append(c.onCDOTAUserMsg_WK_Arcana_Progress, fn)
}

// OnCDOTAUserMsg_GuildChallenge_Progress registers a callback for EDotaUserMessages_DOTA_UM_GuildChallenge_Progress
func (c *Callbacks) OnCDOTAUserMsg_GuildChallenge_Progress(fn func(*dota.CDOTAUserMsg_GuildChallenge_Progress) error) {
c.onCDOTAUserMsg_GuildChallenge_Progress = append(c.onCDOTAUserMsg_GuildChallenge_Progress, fn)
}

func (c *Callbacks) callByDemoType(t int32, buf []byte) error {
switch t {
case 0: // dota.EDemoCommands_DEM_Stop
Expand Down Expand Up @@ -5830,6 +5878,158 @@ func (c *Callbacks) callByPacketType(t int32, buf []byte) error {

return nil

case 596: // dota.EDotaUserMessages_DOTA_UM_MoveCameraToUnit
if c.onCDOTAUserMsg_MoveCameraToUnit == nil {
return nil
}

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

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

return nil

case 597: // dota.EDotaUserMessages_DOTA_UM_PauseMinigameData
if c.onCDOTAUserMsg_PauseMinigameData == nil {
return nil
}

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

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

return nil

case 598: // dota.EDotaUserMessages_DOTA_UM_VersusScene_PlayerBehavior
if c.onCDOTAUserMsg_VersusScene_PlayerBehavior == nil {
return nil
}

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

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

return nil

case 600: // dota.EDotaUserMessages_DOTA_UM_QoP_ArcanaSummary
if c.onCDOTAUserMsg_QoP_ArcanaSummary == nil {
return nil
}

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

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

return nil

case 601: // dota.EDotaUserMessages_DOTA_UM_HotPotato_Created
if c.onCDOTAUserMsg_HotPotato_Created == nil {
return nil
}

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

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

return nil

case 602: // dota.EDotaUserMessages_DOTA_UM_HotPotato_Exploded
if c.onCDOTAUserMsg_HotPotato_Exploded == nil {
return nil
}

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

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

return nil

case 603: // dota.EDotaUserMessages_DOTA_UM_WK_Arcana_Progress
if c.onCDOTAUserMsg_WK_Arcana_Progress == nil {
return nil
}

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

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

return nil

case 604: // dota.EDotaUserMessages_DOTA_UM_GuildChallenge_Progress
if c.onCDOTAUserMsg_GuildChallenge_Progress == nil {
return nil
}

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

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

return nil

}

return nil
Expand Down
Loading