string_tables

package
v0.0.0-...-caf82ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2014 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func ParseUST

func ParseUST(obj USTObject, meta *CacheItem) map[int]*StringTableItem

Types

type CSTObject

type CSTObject interface {
	GetStringData() []byte
	GetNumEntries() int32
	GetMaxEntries() int32
	GetUserDataFixedSize() bool
	GetUserDataSizeBits() int32
}

type CacheItem

type CacheItem struct {
	Bits        int
	IsFixedSize bool
	MaxEntries  int
	Name        string
}

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 USTObject

type USTObject interface {
	GetStringData() []byte
	GetNumChangedEntries() int32
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL