Documentation ¶
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
- type CSTObject
- type CacheItem
- type ModifierBuffs
- type StateHelper
- func (helper *StateHelper) AppendPacket(packet *parser.ParserBaseItem)
- 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 Userinfo
Constants ¶
View Source
const ( MaxNameLength = 0x400 KeyHistorySize = 32 )
View Source
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
Types ¶
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 StateHelper ¶
type StateHelper struct { ClassInfosNameMapping map[int]string ActiveModifierDelta ModifierBuffs Mapping map[int][]*send_tables.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 *parser.ParserBaseItem)
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 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 }
Click to show internal directories.
Click to hide internal directories.