Dota2Patcher
 
Loading...
Searching...
No Matches
CSchemaSystem Class Reference

#include <CSchemaSystem.h>

Public Member Functions

optional< CSchemaSystemTypeScope * > type_scope (const string &scope_name) const
 
optional< CSchemaSystemTypeScope * > type_scope (const size_t scope_index) const
 
std::stringstream iterate_netvars (const string &class_name, const ClassDescription *class_description, const bool dump_to_file) const
 
size_t dump_netvars (const string &scope_name, const bool dump_to_file) const
 
size_t dump_netvars (const size_t scope_index, const bool dump_to_file) const
 
template<typename T >
optional< uintptr_t > get_netvar (const T &addr, const string &class_name, const string &netvar_name) const
 

Static Public Attributes

static std::unordered_map< string, std::unordered_map< std::string, int32_t > > g_netvars
 Global variable to store dumped NetVars.
 

Member Function Documentation

◆ dump_netvars() [1/2]

size_t CSchemaSystem::dump_netvars ( const size_t  scope_index,
const bool  dump_to_file 
) const
inline

dump_netvars overload

Parameters
scope_indexIndex a of scope. Will be converted to a scope_name and send to original dump_netvars

◆ dump_netvars() [2/2]

size_t CSchemaSystem::dump_netvars ( const string &  scope_name,
const bool  dump_to_file 
) const
inline

Dump NetVars to std::unordered_map and optionally to a file

Parameters
scope_nameName of a scope. Ex: client.dll
dump_to_fileDump NetVars to files or not

◆ get_netvar()

template<typename T >
optional< uintptr_t > CSchemaSystem::get_netvar ( const T &  addr,
const string &  class_name,
const string &  netvar_name 
) const
inline

Get NetVar's offset for a class

Parameters
addrPointer to a class instance (this)
class_nameName of the class. Ex: C_DOTA_BaseNPC
netvar_nameName of the netvar. Ex: m_iszUnitName
Returns
uintptr_t address of this + offset

◆ iterate_netvars()

std::stringstream CSchemaSystem::iterate_netvars ( const string &  class_name,
const ClassDescription class_description,
const bool  dump_to_file 
) const
inline

Iterate through a list of NetVars and save them to g_netvars

Parameters
class_nameName of a class. Ex: C_DOTA_BaseNPC
class_descriptionPointer to a ClassDescription* class
dump_to_fileDump NetVars to files or not
Returns
A stringstream with a list of NetVars

◆ type_scope() [1/2]

optional< CSchemaSystemTypeScope * > CSchemaSystem::type_scope ( const size_t  scope_index) const
inline

type_scope overload

Parameters
scope_indexIndex a of scope. Will be converted to scope_name and send to original dump_netvars

◆ type_scope() [2/2]

optional< CSchemaSystemTypeScope * > CSchemaSystem::type_scope ( const string &  scope_name) const
inline

Get type_scope

Parameters
scope_nameName of a scope. Ex: client.dll
Returns
CSchemaSystemTypeScope pointer

Member Data Documentation

◆ g_netvars

std::unordered_map<string, std::unordered_map<std::string, int32_t> > CSchemaSystem::g_netvars
inlinestatic

Global variable to store dumped NetVars.


The documentation for this class was generated from the following file: