Documentation ¶
Overview ¶
NOTE: This file is generated by update_pbem.rb
Index ¶
- Constants
- func Parse(data []byte, numEntries, maxEntries, dataSizeBits int, dataFixedSize bool) map[int]*StringTableItem
- func ParseCST(obj CSTObject) map[int]*StringTableItem
- func ParseUST(obj USTObject, meta *CacheItem) map[int]*StringTableItem
- func ProtoUnmarshal(data []byte, obj proto.Message) error
- func ReadBz2File(path string) []byte
- func ReadFile(path string) []byte
- func ReadStringZ(datas []byte, offset int) string
- func SnappyUncompress(compressed []byte) []byte
- type Abilities
- type AbilityTracker
- type BitReader
- func (br *BitReader) BitsLeft() int
- func (br *BitReader) BytesLeft() int
- func (br *BitReader) CurrentBit() int
- func (br *BitReader) CurrentByte() int
- func (br *BitReader) Length() int
- func (br *BitReader) ReadBitCellCoord(bits int, integral, lowPrecision bool) (value float32)
- func (br *BitReader) ReadBitCoord() (value float32)
- func (br *BitReader) ReadBitFloat() float32
- func (br *BitReader) ReadBitNormal() float32
- func (br *BitReader) ReadBits(nBits int) int
- func (br *BitReader) ReadBitsAsBytes(n int) []byte
- func (br *BitReader) ReadBoolean() bool
- func (br *BitReader) ReadByte() byte
- func (br *BitReader) ReadBytes(nBytes int) []byte
- func (br *BitReader) ReadFloat(prop *SendProp) float64
- func (br *BitReader) ReadNextEntityIndex(oldEntity int) int
- func (br *BitReader) ReadPropertiesIndex() []int
- func (br *BitReader) ReadPropertiesValues(mapping []*SendProp, multiples map[string]int, indices []int) map[string]interface{}
- func (br *BitReader) ReadSpecialFloat(prop *SendProp) (float32, bool)
- func (br *BitReader) ReadString() string
- func (br *BitReader) ReadStringN(n int) string
- func (br *BitReader) ReadUBits(nBits int) uint
- func (br *BitReader) ReadUBitsByteAligned(nBits int) uint
- func (br *BitReader) ReadUBitsNotByteAligned(nBits int) uint
- func (br *BitReader) ReadVarInt() (result uint)
- func (br *BitReader) ReadVector(prop *SendProp) *Vector3
- func (br *BitReader) ReadVectorXY(prop *SendProp) *Vector2
- func (br *BitReader) SeekBits(offset int, origin SeekOrigin)
- type BytesReader
- type CSTObject
- type CacheItem
- type CombatLogAbility
- type CombatLogAbilityTrigger
- type CombatLogBuyback
- type CombatLogDamage
- type CombatLogDeath
- type CombatLogEntry
- type CombatLogGameState
- type CombatLogGold
- type CombatLogHeal
- type CombatLogItem
- type CombatLogKillStreak
- type CombatLogLocation
- type CombatLogModifierAdd
- type CombatLogModifierRemove
- type CombatLogMultikill
- type CombatLogPlayerstats
- type CombatLogPurchase
- type CombatLogTeamBuildingKill
- type CombatLogXP
- type DPTType
- type Error
- type Flag
- type Helper
- type ItemType
- type LastHitTracker
- type LastHits
- type ModifierBuffs
- type OuterParser
- func (p *OuterParser) Analyze(callback func(*OuterParserBaseItem))
- func (p *OuterParser) AnalyzePacket(callback func(*OuterParserBaseItem), fromEvent dota.EDemoCommands, tick int, ...)
- func (p *OuterParser) AsBaseEvent(commandName string) (proto.Message, error)
- func (p *OuterParser) AsBaseEventBUMDUM(value int) (proto.Message, error)
- func (p *OuterParser) AsBaseEventNETSVC(value int) (proto.Message, error)
- type OuterParserBaseEvent
- type OuterParserBaseEventMapType
- type OuterParserBaseItem
- type OuterParserBaseItems
- type OuterParserItem
- type OuterParserItems
- type PacketEntity
- type Parser
- type SeekOrigin
- type SendProp
- type SignonPacket
- type StateHelper
- func (helper *StateHelper) AppendPacket(packet *OuterParserBaseItem)
- func (helper *StateHelper) GetStateAtTick(tick int) map[int]*StringTable
- func (helper *StateHelper) GetTableAtTick(tick int, tableName string) (result *StringTable)
- func (helper *StateHelper) GetTableNow(tableName string) (result *StringTable)
- func (helper *StateHelper) OnCDST(tick int, obj *dota.CDemoStringTables)
- func (helper *StateHelper) OnCST(tick int, obj *dota.CSVCMsg_CreateStringTable)
- func (helper *StateHelper) OnUST(tick int, obj *dota.CSVCMsg_UpdateStringTable)
- type StringTable
- type StringTableItem
- type USTObject
- type UpdateType
- type Userinfo
- type Vector2
- type Vector3
Constants ¶
const ( CoordIntegerBits = 14 CoordFractionalBits = 5 CoordDenominator = (1 << CoordFractionalBits) CoordResolution = (1.0 / CoordDenominator) NormalFractionalBits = 11 NormalDenominator = ((1 << NormalFractionalBits) - 1) NormalResolution = (1.0 / NormalDenominator) )
const ( MaxNameLength = 0x400 KeyHistorySize = 32 )
const ( MAX_PLAYER_NAME_LENGTH = 32 MAX_CUSTOM_FILES = 4 // max 4 files SIGNED_GUID_LEN = 32 // Hashed CD Key (32 hex alphabetic chars + 0 terminator ) )
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(data []byte, numEntries, maxEntries, dataSizeBits int, dataFixedSize bool) map[int]*StringTableItem
func ParseCST ¶
func ParseCST(obj CSTObject) map[int]*StringTableItem
func ReadBz2File ¶
func ReadStringZ ¶
func SnappyUncompress ¶
Types ¶
type Abilities ¶
type Abilities []*AbilityTracker
type BitReader ¶
type BitReader struct {
// contains filtered or unexported fields
}
func NewBitReader ¶
func (*BitReader) CurrentBit ¶
func (*BitReader) CurrentByte ¶
func (*BitReader) ReadBitCellCoord ¶
func (*BitReader) ReadBitCoord ¶
func (*BitReader) ReadBitFloat ¶
func (*BitReader) ReadBitNormal ¶
func (*BitReader) ReadBitsAsBytes ¶
func (*BitReader) ReadBoolean ¶
func (*BitReader) ReadNextEntityIndex ¶
func (*BitReader) ReadPropertiesIndex ¶
func (*BitReader) ReadPropertiesValues ¶
func (br *BitReader) ReadPropertiesValues(mapping []*SendProp, multiples map[string]int, indices []int) map[string]interface{}
FIXME: Rememver that our PE decoder is wrong, it needs to construct key names recursively. https://github.com/spheenik/clarity/tree/master/src/main/java/clarity/decoder/SendTableFlattener.java https://gist.githubusercontent.com/onethirtyfive/07899a78622dc18679c3/raw/19d411910016170e4c4ee2782fd4a987e9ce2afc/gistfile1.txt
func (*BitReader) ReadSpecialFloat ¶
func (*BitReader) ReadString ¶
func (*BitReader) ReadStringN ¶
func (*BitReader) ReadUBitsByteAligned ¶
func (*BitReader) ReadUBitsNotByteAligned ¶
func (*BitReader) ReadVarInt ¶
func (*BitReader) ReadVector ¶
func (*BitReader) ReadVectorXY ¶
func (*BitReader) SeekBits ¶
func (br *BitReader) SeekBits(offset int, origin SeekOrigin)
type BytesReader ¶
type BytesReader struct {
// contains filtered or unexported fields
}
func NewBytesReader ¶
func NewBytesReader(data []byte) *BytesReader
func (BytesReader) CanRead ¶
func (br BytesReader) CanRead() bool
func (*BytesReader) Read ¶
func (br *BytesReader) Read(length int) []byte
func (*BytesReader) ReadInt32 ¶
func (br *BytesReader) ReadInt32() (result int32)
func (*BytesReader) ReadVarInt32 ¶
func (br *BytesReader) ReadVarInt32() (result int32)
func (*BytesReader) Skip ¶
func (br *BytesReader) Skip(length int)
type CombatLogAbility ¶
type CombatLogAbility struct { Target string `logIndex:"2" logTable:"CombatLogNames"` Attacker string `logIndex:"3" logTable:"CombatLogNames"` Ability string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` IsDebuff int `logIndex:"7"` // seen values: 0,1,2 Time float32 `logIndex:"9"` TargetSource string `logIndex:"10" logTable:"CombatLogNames"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
TODO: only observed 2,3,4,7,13 so far, but the others would make sense too.
func (CombatLogAbility) Timestamp ¶
func (c CombatLogAbility) Timestamp() float32
func (CombatLogAbility) Type ¶
func (c CombatLogAbility) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogAbilityTrigger ¶
type CombatLogAbilityTrigger struct { Target string `logIndex:"2" logTable:"CombatLogNames"` // 12 Attacker string `logIndex:"3" logTable:"CombatLogNames"` // 5 Ability string `logIndex:"4" logTable:"CombatLogNames"` // 47 AttackerIsIllusion bool `logIndex:"5"` // false TargetIsIllusion bool `logIndex:"6"` // false IsDebuff int `logIndex:"7"` // 3 (seen values: 3) Unknown8 int `logIndex:"8"` // 0 Time float32 `logIndex:"9"` // 1519.1506 TargetSource string `logIndex:"10" logTable:"CombatLogNames"` // 0 TimeRaw float32 `logIndex:"11"` // 1638.1001 AttackerIsHero bool `logIndex:"12"` // true TargetIsHero bool `logIndex:"13"` // true Unknown14 bool `logIndex:"14"` // false Unknown15 bool `logIndex:"15"` // false Unknown16 int `logIndex:"16"` // 4 Unknown17 int `logIndex:"17"` // 0 Unknown18 int `logIndex:"18"` // 0 Unknown19 int `logIndex:"19"` // 0 }
func (CombatLogAbilityTrigger) Timestamp ¶
func (c CombatLogAbilityTrigger) Timestamp() float32
func (CombatLogAbilityTrigger) Type ¶
func (c CombatLogAbilityTrigger) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogBuyback ¶
type CombatLogBuyback struct { PlayerId int `logIndex:"7"` // 7: 9 Time float32 `logIndex:"9"` // 9: 2625.6892 TimeRaw float32 `logIndex:"11"` // 11: 2666.3 }
func (CombatLogBuyback) Timestamp ¶
func (c CombatLogBuyback) Timestamp() float32
func (CombatLogBuyback) Type ¶
func (c CombatLogBuyback) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogDamage ¶
type CombatLogDamage struct { Source string `logIndex:"1" logTable:"CombatLogNames"` // 3 Target string `logIndex:"2" logTable:"CombatLogNames"` // 27 Attacker string `logIndex:"3" logTable:"CombatLogNames"` // 3 Cause string `logIndex:"4" logTable:"CombatLogNames"` // 0 AttackerIsIllusion bool `logIndex:"5"` // false TargetIsIllusion bool `logIndex:"6"` // false Value int `logIndex:"7"` // 70 Health int `logIndex:"8"` // 429 Time float32 `logIndex:"9"` // 229.45338 TargetSource string `logIndex:"10" logTable:"CombatLogNames"` // 27 TimeRaw float32 `logIndex:"11"` // 238.43335 AttackerIsHero bool `logIndex:"12"` // true TargetIsHero bool `logIndex:"13"` // false }
func (CombatLogDamage) Timestamp ¶
func (c CombatLogDamage) Timestamp() float32
func (CombatLogDamage) Type ¶
func (c CombatLogDamage) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogDeath ¶
type CombatLogDeath struct { Source string `logIndex:"1" logTable:"CombatLogNames"` Target string `logIndex:"2" logTable:"CombatLogNames"` Attacker string `logIndex:"3" logTable:"CombatLogNames"` Cause string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` Time float32 `logIndex:"9"` TargetSource string `logIndex:"10" logTable:"CombatLogNames"` TimeRaw float32 `logIndex:"11"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogDeath) Timestamp ¶
func (c CombatLogDeath) Timestamp() float32
func (CombatLogDeath) Type ¶
func (c CombatLogDeath) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogEntry ¶
type CombatLogEntry interface { Type() dota.DOTA_COMBATLOG_TYPES Timestamp() float32 }
type CombatLogGameState ¶
type CombatLogGameState struct { State int `logIndex:"7"` // 7: 5 (2,3,4,5,6) Time float32 `logIndex:"9"` // 9: 505.76474 TimeRaw float32 `logIndex:"11"` // 11: 597.93335 }
func (CombatLogGameState) Timestamp ¶
func (c CombatLogGameState) Timestamp() float32
func (CombatLogGameState) Type ¶
func (c CombatLogGameState) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogGold ¶
type CombatLogGold struct { Target string `logIndex:"2" logTable:"CombatLogNames"` Value int `logIndex:"7"` Time float32 `logIndex:"9"` TimeRaw float32 `logIndex:"11"` Reason int `logIndex:"17"` }
func (CombatLogGold) Timestamp ¶
func (c CombatLogGold) Timestamp() float32
func (CombatLogGold) Type ¶
func (c CombatLogGold) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogHeal ¶
type CombatLogHeal struct { Source string `logIndex:"1" logTable:"CombatLogNames"` Target string `logIndex:"2" logTable:"CombatLogNames"` Attacker string `logIndex:"3" logTable:"CombatLogNames"` Modifier string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` Value int `logIndex:"7"` Health int `logIndex:"8"` Time float32 `logIndex:"9"` TargetSource string `logIndex:"10" logTable:"CombatLogNames"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogHeal) Timestamp ¶
func (c CombatLogHeal) Timestamp() float32
func (CombatLogHeal) Type ¶
func (c CombatLogHeal) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogItem ¶
type CombatLogItem struct { Target string `logIndex:"2" logTable:"CombatLogNames"` User string `logIndex:"3" logTable:"CombatLogNames"` Item string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` Time float32 `logIndex:"9"` UserIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogItem) Timestamp ¶
func (c CombatLogItem) Timestamp() float32
func (CombatLogItem) Type ¶
func (c CombatLogItem) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogKillStreak ¶
type CombatLogKillStreak struct { Unknown0 int `logIndex:"0"` // 16 Unknown1 int `logIndex:"1"` // 0 Unknown2 int `logIndex:"2"` // 6 Unknown3 int `logIndex:"3"` // 6 Unknown4 int `logIndex:"4"` // 0 Unknown5 bool `logIndex:"5"` // false Unknown6 bool `logIndex:"6"` // false Unknown7 int `logIndex:"7"` // 3 Unknown8 int `logIndex:"8"` // 0 Time float32 `logIndex:"9"` // 0 Unknown10 int `logIndex:"10"` // 6 TimeRaw float32 `logIndex:"11"` // 0 Unknown12 bool `logIndex:"12"` // false Unknown13 bool `logIndex:"13"` // false Unknown14 bool `logIndex:"14"` // false Unknown15 bool `logIndex:"15"` // false Unknown16 int `logIndex:"16"` // 0 Unknown17 int `logIndex:"17"` // 0 Unknown18 int `logIndex:"18"` // 0 }
func (CombatLogKillStreak) Timestamp ¶
func (c CombatLogKillStreak) Timestamp() float32
func (CombatLogKillStreak) Type ¶
func (c CombatLogKillStreak) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogLocation ¶
type CombatLogLocation struct { Source string `logIndex:"1" logTable:"CombatLogNames"` Target string `logIndex:"2" logTable:"CombatLogNames"` Attacker string `logIndex:"3" logTable:"CombatLogNames"` Modifier string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` Value int `logIndex:"7"` Health int `logIndex:"8"` Time float32 `logIndex:"9"` TargetSource string `logIndex:"10" logTable:"CombatLogNames"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogLocation) Timestamp ¶
func (c CombatLogLocation) Timestamp() float32
func (CombatLogLocation) Type ¶
func (c CombatLogLocation) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogModifierAdd ¶
type CombatLogModifierAdd struct { Source string `logIndex:"1" logTable:"CombatLogNames"` Target string `logIndex:"2" logTable:"CombatLogNames"` Attacker string `logIndex:"3" logTable:"CombatLogNames"` Modifier string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` IsDebuff bool `logIndex:"7"` Health int `logIndex:"8"` Time float32 `logIndex:"9"` TargetSource string `logIndex:"10" logTable:"CombatLogNames"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogModifierAdd) Timestamp ¶
func (c CombatLogModifierAdd) Timestamp() float32
func (CombatLogModifierAdd) Type ¶
func (c CombatLogModifierAdd) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogModifierRemove ¶
type CombatLogModifierRemove struct { Target string `logIndex:"2" logTable:"CombatLogNames"` Caster string `logIndex:"3" logTable:"CombatLogNames"` Modifier string `logIndex:"4" logTable:"CombatLogNames"` AttackerIsIllusion bool `logIndex:"5"` TargetIsIllusion bool `logIndex:"6"` IsDebuff bool `logIndex:"7"` Health int `logIndex:"8"` Time float32 `logIndex:"9"` AttackerIsHero bool `logIndex:"12"` TargetIsHero bool `logIndex:"13"` }
func (CombatLogModifierRemove) Timestamp ¶
func (c CombatLogModifierRemove) Timestamp() float32
func (CombatLogModifierRemove) Type ¶
func (c CombatLogModifierRemove) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogMultikill ¶
type CombatLogMultikill struct { Unknown0 int `logIndex:"0"` // 15 Unknown1 int `logIndex:"1"` // 0 Unknown2 int `logIndex:"2"` // 7 Unknown3 int `logIndex:"3"` // 7 Unknown4 int `logIndex:"4"` // 0 Unknown5 bool `logIndex:"5"` // false Unknown6 bool `logIndex:"6"` // false Unknown7 int `logIndex:"7"` // 3 Unknown8 int `logIndex:"8"` // 0 Time float32 `logIndex:"9"` // 0 Unknown10 int `logIndex:"10"` // 2 TimeRaw float32 `logIndex:"11"` // 0 Unknown12 bool `logIndex:"12"` // false Unknown13 bool `logIndex:"13"` // false Unknown14 bool `logIndex:"14"` // false Unknown15 bool `logIndex:"15"` // false Unknown16 int `logIndex:"16"` // 0 Unknown17 int `logIndex:"17"` // 0 Unknown18 int `logIndex:"18"` // 0 }
func (CombatLogMultikill) Timestamp ¶
func (c CombatLogMultikill) Timestamp() float32
func (CombatLogMultikill) Type ¶
func (c CombatLogMultikill) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogPlayerstats ¶
type CombatLogPlayerstats struct { Unknown0 int `logIndex:"0"` // 14 Unknown1 int `logIndex:"1"` // 0 Target string `logIndex:"2" logTable:"CombatLogNames"` // val_shrt:9 Unknown3 int `logIndex:"3"` // 11 Unknown4 int `logIndex:"4"` // 0 Unknown5 bool `logIndex:"5"` // false Unknown6 bool `logIndex:"6"` // false Unknown7 int `logIndex:"7"` // 22 Unknown8 int `logIndex:"8"` // 0 Time float32 `logIndex:"9"` // 2051.7341 TargetSource string `logIndex:"10" logTable:"CombatLogNames"` // 3 TimeRaw float32 `logIndex:"11"` // 2066.2668 Unknown12 bool `logIndex:"12"` // false Unknown13 bool `logIndex:"13"` // false Unknown14 bool `logIndex:"14"` // false Unknown15 bool `logIndex:"15"` // false Unknown16 int `logIndex:"16"` // 0 Unknown17 int `logIndex:"17"` // 0 Unknown18 int `logIndex:"18"` // 0 }
func (CombatLogPlayerstats) Timestamp ¶
func (c CombatLogPlayerstats) Timestamp() float32
func (CombatLogPlayerstats) Type ¶
func (c CombatLogPlayerstats) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogPurchase ¶
type CombatLogPurchase struct { Buyer string `logIndex:"2" logTable:"CombatLogNames"` Item string `logIndex:"7" logTable:"CombatLogNames"` Time float32 `logIndex:"9"` TimeRaw float32 `logIndex:"11"` }
func (CombatLogPurchase) Timestamp ¶
func (c CombatLogPurchase) Timestamp() float32
func (CombatLogPurchase) Type ¶
func (c CombatLogPurchase) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogTeamBuildingKill ¶
type CombatLogTeamBuildingKill struct { Unknown0 int `logIndex:"0"` // 17 Unknown1 int `logIndex:"1"` // 0 Unknown2 int `logIndex:"2"` // 0 Unknown3 int `logIndex:"3"` // 0 Unknown4 int `logIndex:"4"` // 0 Unknown5 bool `logIndex:"5"` // false Unknown6 bool `logIndex:"6"` // false Unknown7 int `logIndex:"7"` // 3 Unknown8 int `logIndex:"8"` // 0 Time float32 `logIndex:"9"` // 0 Unknown10 int `logIndex:"10"` // 0 TimeRaw float32 `logIndex:"11"` // 0 Unknown12 bool `logIndex:"12"` // false Unknown13 bool `logIndex:"13"` // false Unknown14 bool `logIndex:"14"` // false Unknown15 bool `logIndex:"15"` // false Unknown16 int `logIndex:"16"` // 0 Unknown17 int `logIndex:"17"` // 0 Unknown18 int `logIndex:"18"` // 0 }
func (CombatLogTeamBuildingKill) Timestamp ¶
func (c CombatLogTeamBuildingKill) Timestamp() float32
func (CombatLogTeamBuildingKill) Type ¶
func (c CombatLogTeamBuildingKill) Type() dota.DOTA_COMBATLOG_TYPES
type CombatLogXP ¶
type CombatLogXP struct { Target string `logIndex:"2" logTable:"CombatLogNames"` Value int `logIndex:"7"` Time float32 `logIndex:"9"` TimeRaw float32 `logIndex:"11"` Reason int `logIndex:"18"` }
func (CombatLogXP) Timestamp ¶
func (c CombatLogXP) Timestamp() float32
func (CombatLogXP) Type ¶
func (c CombatLogXP) Type() dota.DOTA_COMBATLOG_TYPES
type Flag ¶
type Flag int
const ( SPROP_UNSIGNED Flag = 1 << 0 SPROP_COORD Flag = 1 << 1 SPROP_NOSCALE Flag = 1 << 2 SPROP_ROUNDDOWN Flag = 1 << 3 SPROP_ROUNDUP Flag = 1 << 4 SPROP_NORMAL Flag = 1 << 5 SPROP_EXCLUDE Flag = 1 << 6 SPROP_XYZE Flag = 1 << 7 SPROP_INSIDEARRAY Flag = 1 << 8 SPROP_PROXY_ALWAYS_YES Flag = 1 << 9 SPROP_IS_A_VECTOR_ELEM Flag = 1 << 10 SPROP_COLLAPSIBLE Flag = 1 << 11 SPROP_COORD_MP Flag = 1 << 12 SPROP_COORD_MP_LOWPRECISION Flag = 1 << 13 SPROP_COORD_MP_INTEGRAL Flag = 1 << 14 SPROP_CELL_COORD Flag = 1 << 15 SPROP_CELL_COORD_LOWPRECISION Flag = 1 << 16 SPROP_CELL_COORD_INTEGRAL Flag = 1 << 17 SPROP_CHANGES_OFTEN Flag = 1 << 18 SPROP_ENCODED_AGAINST_TICKCOUNT Flag = 1 << 19 )
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func NewSendTablesHelper ¶
func NewSendTablesHelper() *Helper
func (*Helper) LoadSendTable ¶
func (*Helper) SetSendTable ¶
func (sth *Helper) SetSendTable(name string, table *dota.CSVCMsg_SendTable)
type LastHitTracker ¶
type LastHits ¶
type LastHits []*LastHitTracker
type ModifierBuffs ¶
type ModifierBuffs []*dota.CDOTAModifierBuffTableEntry
func (ModifierBuffs) Len ¶
func (m ModifierBuffs) Len() int
func (ModifierBuffs) Less ¶
func (m ModifierBuffs) Less(i, j int) bool
func (ModifierBuffs) Swap ¶
func (m ModifierBuffs) Swap(i, j int)
type OuterParser ¶
type OuterParser struct { Sequence int64 Items map[int64]*OuterParserItem // contains filtered or unexported fields }
func NewOuterParser ¶
func NewOuterParser(data []byte) *OuterParser
func OuterParserFromFile ¶
func OuterParserFromFile(path string) *OuterParser
func (*OuterParser) Analyze ¶
func (p *OuterParser) Analyze(callback func(*OuterParserBaseItem))
func (*OuterParser) AnalyzePacket ¶
func (p *OuterParser) AnalyzePacket(callback func(*OuterParserBaseItem), fromEvent dota.EDemoCommands, tick int, data []byte)
func (*OuterParser) AsBaseEvent ¶
func (p *OuterParser) AsBaseEvent(commandName string) (proto.Message, error)
func (*OuterParser) AsBaseEventBUMDUM ¶
func (p *OuterParser) AsBaseEventBUMDUM(value int) (proto.Message, error)
func (*OuterParser) AsBaseEventNETSVC ¶
func (p *OuterParser) AsBaseEventNETSVC(value int) (proto.Message, error)
type OuterParserBaseEvent ¶
type OuterParserBaseEvent int
type OuterParserBaseEventMapType ¶
type OuterParserBaseEventMapType int
const ( DEM OuterParserBaseEventMapType = iota NET SVC BUM DUM )
type OuterParserBaseItem ¶
type OuterParserBaseItems ¶
type OuterParserBaseItems []*OuterParserBaseItem
OuterParserBaseItems attaches the methods of Interface to []*OuterParserBaseItem, sorting in increasing order by Sequence.
func (OuterParserBaseItems) Len ¶
func (p OuterParserBaseItems) Len() int
func (OuterParserBaseItems) Less ¶
func (p OuterParserBaseItems) Less(i, j int) bool
func (OuterParserBaseItems) Swap ¶
func (p OuterParserBaseItems) Swap(i, j int)
type OuterParserItem ¶
type OuterParserItems ¶
type OuterParserItems []*OuterParserItem
OuterParserItems attaches the methods of Interface to []*OuterParserItem, sorting in increasing order by Sequence.
func (OuterParserItems) Len ¶
func (p OuterParserItems) Len() int
func (OuterParserItems) Less ¶
func (p OuterParserItems) Less(i, j int) bool
func (OuterParserItems) Swap ¶
func (p OuterParserItems) Swap(i, j int)
type PacketEntity ¶
type PacketEntity struct { Tick int Index int SerialNum int ClassId int EntityHandle int Name string Type UpdateType Values map[string]interface{} Delta map[string]interface{} OldDelta map[string]interface{} }
func (*PacketEntity) Clone ¶
func (pe *PacketEntity) Clone() *PacketEntity
func (*PacketEntity) Handle ¶
func (pe *PacketEntity) Handle() int
type Parser ¶
type Parser struct { Parser *OuterParser ClassIdNumBits int ClassInfosIdMapping map[string]int ClassInfosNameMapping map[int]string FileHeader *dota.CDemoFileHeader GameEventMap map[int32]*dota.CSVCMsg_GameEventListDescriptorT Mapping map[int][]*SendProp Multiples map[int]map[string]int ServerInfo *dota.CSVCMsg_ServerInfo Sth *Helper Stsh *StateHelper VoiceInit *dota.CSVCMsg_VoiceInit ActiveModifiers map[int]*dota.CDOTAModifierBuffTableEntry Entities []*PacketEntity ByHandle map[int]*PacketEntity OnEntityCreated func(*PacketEntity) OnEntityDeleted func(*PacketEntity) OnEntityPreserved func(*PacketEntity) OnActiveModifierDelta func(map[int]*StringTableItem, ModifierBuffs) OnAbilitySteal func(tick int, obj *dota.CDOTAUserMsg_AbilitySteal) OnBoosterState func(tick int, obj *dota.CDOTAUserMsg_BoosterState) OnBotChat func(tick int, obj *dota.CDOTAUserMsg_BotChat) OnChatEvent func(tick int, obj *dota.CDOTAUserMsg_ChatEvent) OnChatWheel func(tick int, obj *dota.CDOTAUserMsg_ChatWheel) OnClassInfo func(tick int, obj *dota.CSVCMsg_ClassInfo) OnCourierKilledAlert func(tick int, obj *dota.CDOTAUserMsg_CourierKilledAlert) OnCreateLinearProjectile func(tick int, obj *dota.CDOTAUserMsg_CreateLinearProjectile) OnDemoStop func(tick int, obj *dota.CDemoStop) OnDemoSyncTick func(tick int, obj *dota.CDemoSyncTick) OnDestroyLinearProjectile func(tick int, obj *dota.CDOTAUserMsg_DestroyLinearProjectile) OnDodgeTrackingProjectiles func(tick int, obj *dota.CDOTAUserMsg_DodgeTrackingProjectiles) OnEnemyItemAlert func(tick int, obj *dota.CDOTAUserMsg_EnemyItemAlert) OnGlobalLightColor func(tick int, obj *dota.CDOTAUserMsg_GlobalLightColor) OnGlobalLightDirection func(tick int, obj *dota.CDOTAUserMsg_GlobalLightDirection) OnHPManaAlert func(tick int, obj *dota.CDOTAUserMsg_HPManaAlert) OnHalloweenDrops func(tick int, obj *dota.CDOTAUserMsg_HalloweenDrops) OnHudError func(tick int, obj *dota.CDOTAUserMsg_HudError) OnLocationPing func(tick int, obj *dota.CDOTAUserMsg_LocationPing) OnMapLine func(tick int, obj *dota.CDOTAUserMsg_MapLine) OnMinimapEvent func(tick int, obj *dota.CDOTAUserMsg_MinimapEvent) OnNevermoreRequiem func(tick int, obj *dota.CDOTAUserMsg_NevermoreRequiem) OnOverheadEvent func(tick int, obj *dota.CDOTAUserMsg_OverheadEvent) OnParticleManager func(tick int, obj *dota.CDOTAUserMsg_ParticleManager) OnPredictionResult func(tick int, obj *dota.CDOTAUserMsg_PredictionResult) OnPrint func(tick int, obj *dota.CSVCMsg_Print) OnSayText2 func(tick int, obj *dota.CUserMsg_SayText2) OnSendAudio func(tick int, obj *dota.CUserMsg_SendAudio) OnSendRoshanPopup func(tick int, obj *dota.CDOTAUserMsg_SendRoshanPopup) OnSendStatPopup func(tick int, obj *dota.CDOTAUserMsg_SendStatPopup) OnSetView func(tick int, obj *dota.CSVCMsg_SetView) OnSignonState func(tick int, obj *dota.CNETMsg_SignonState) OnSounds func(tick int, obj *dota.CSVCMsg_Sounds) OnSpectatorPlayerClick func(tick int, obj *dota.CDOTAUserMsg_SpectatorPlayerClick) OnSpectatorPlayerUnitOrders func(tick int, obj *dota.CDOTAUserMsg_SpectatorPlayerUnitOrders) OnTempEntities func(tick int, obj *dota.CSVCMsg_TempEntities) OnTextMsg func(tick int, obj *dota.CUserMsg_TextMsg) OnTick func(tick int, obj *dota.CNETMsg_Tick) OnUnitEvent func(tick int, obj *dota.CDOTAUserMsg_UnitEvent) OnVoiceMask func(tick int, obj *dota.CUserMsg_VoiceMask) OnWorldLine func(tick int, obj *dota.CDOTAUserMsg_WorldLine) OnFileInfo func(obj *dota.CDemoFileInfo) OnSetConVar func(obj *dota.CNETMsg_SetConVar) OnVoiceData func(obj *dota.CSVCMsg_VoiceData) OnCombatLog func(tick int, log CombatLogEntry) OnTablename func(name string) BeforeTick func(tick int) AfterTick func(tick int) // contains filtered or unexported fields }
func ParserFromFile ¶
func (*Parser) ParsePacket ¶
func (p *Parser) ParsePacket(tick int, pe *dota.CSVCMsg_PacketEntities)
func (*Parser) PrintDistinctCombatLogTypes ¶
func (p *Parser) PrintDistinctCombatLogTypes()
type SignonPacket ¶
type SignonPacket struct{}
func (SignonPacket) ProtoMessage ¶
func (s SignonPacket) ProtoMessage()
func (SignonPacket) Reset ¶
func (s SignonPacket) Reset()
func (SignonPacket) String ¶
func (s SignonPacket) String() string
type StateHelper ¶
type StateHelper struct { ClassInfosNameMapping map[int]string ActiveModifierDelta ModifierBuffs Mapping map[int][]*SendProp Multiples map[int]map[string]int Baseline map[int]map[string]interface{} // contains filtered or unexported fields }
func NewStateHelper ¶
func NewStateHelper() *StateHelper
func (*StateHelper) AppendPacket ¶
func (helper *StateHelper) AppendPacket(packet *OuterParserBaseItem)
func (*StateHelper) GetStateAtTick ¶
func (helper *StateHelper) GetStateAtTick(tick int) map[int]*StringTable
func (*StateHelper) GetTableAtTick ¶
func (helper *StateHelper) GetTableAtTick(tick int, tableName string) (result *StringTable)
func (*StateHelper) GetTableNow ¶
func (helper *StateHelper) GetTableNow(tableName string) (result *StringTable)
func (*StateHelper) OnCDST ¶
func (helper *StateHelper) OnCDST(tick int, obj *dota.CDemoStringTables)
func (*StateHelper) OnCST ¶
func (helper *StateHelper) OnCST(tick int, obj *dota.CSVCMsg_CreateStringTable)
func (*StateHelper) OnUST ¶
func (helper *StateHelper) OnUST(tick int, obj *dota.CSVCMsg_UpdateStringTable)
NOTE: We ignore the "userinfo" table decoding process since it's a PITA and has no useful info anyway. In case we ever need it, a struct describing the binary is at: https://github.com/mitsuhiko/dota2-demoinfo2/blob/4ca45a87c631787eab140d313a3f21210b543741/demofile.h#L48
type StringTable ¶
type StringTable struct { Tick int Index int Name string Items map[int]*StringTableItem }
type StringTableItem ¶
type StringTableItem struct { Str string Data []byte ModifierBuff *dota.CDOTAModifierBuffTableEntry Userinfo *Userinfo }
type UpdateType ¶
type UpdateType int
const ( Create UpdateType = iota Delete Leave Preserve )
func ReadUpdateType ¶
func ReadUpdateType(br *BitReader) UpdateType
type Userinfo ¶
type Userinfo struct { XUID uint64 // network xuid Name string // scoreboard information UserID int // local server user ID, unique while server is running GUID string // global unique player identifer FriendsID uint // friends identification number FriendsName string // friends name SteamID uint64 }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package dota is a generated protocol buffer package.
|
Package dota is a generated protocol buffer package. |
google/protobuf
Package google_protobuf is a generated protocol buffer package.
|
Package google_protobuf is a generated protocol buffer package. |
examples
|
|