#pragma once // used: callvfunc #include "../../utilities/memory.h" class CEconItemDefinition; inline constexpr uint64_t Helper_GetAlternateIconKeyForWeaponPaintWearItem( uint16_t nDefIdx, uint32_t nPaintId, uint32_t nWear) { return (nDefIdx << 16) + (nPaintId << 2) + nWear; } struct AlternateIconData_t { const char* sSimpleName; const char* sLargeSimpleName; private: char pad0[0x8]; // no idea char pad1[0x8]; // no idea }; class CPaintKit { public: char pad_0x0000[0xE0]; //0x0000 int64_t PaintKitId() { return *reinterpret_cast((uintptr_t)(this)); } const char* PaintKitName() { return *reinterpret_cast((uintptr_t)(this) + 0x8); } const char* PaintKitDescriptionString() { return *reinterpret_cast((uintptr_t)(this) + 0x10); } const char* PaintKitDescriptionTag() { return *reinterpret_cast((uintptr_t)(this) + 0x18); } int32_t PaintKitRarity() { return *reinterpret_cast((uintptr_t)(this) + 0x44); } bool UsesOldModel() { return *reinterpret_cast((uintptr_t)(this) + 0xB2); } }; #include "../cstrike/sdk/datatypes/utlmap.h" class CEconItemSchema { public: auto GetAttributeDefinitionInterface(int iAttribIndex) { return MEM::CallVFunc (this, iAttribIndex); } auto& GetSortedItemDefinitionMap() { return *reinterpret_cast*>( (uintptr_t)(this) + 0x128); } auto& GetAlternateIconsMap() { return *reinterpret_cast*>( (uintptr_t)(this) + 0x278); } auto& GetPaintKits() { return *reinterpret_cast*>((uintptr_t)(this) + 0x2F0); } }; class CEconItemSystem { public: auto GetEconItemSchema() { return *reinterpret_cast((uintptr_t)(this) + 0x8); } }; enum EClientFrameStage : int { FRAME_UNDEFINED = -1, FRAME_START, // a network packet is being received FRAME_NET_UPDATE_START, // data has been received and we are going to start calling postdataupdate FRAME_NET_UPDATE_POSTDATAUPDATE_START, // data has been received and called postdataupdate on all data recipients FRAME_NET_UPDATE_POSTDATAUPDATE_END, // received all packets, we can now do interpolation, prediction, etc FRAME_NET_UPDATE_END, // start rendering the scene FRAME_RENDER_START = 9, // finished rendering the scene FRAME_RENDER_END, FRAME_NET_FULL_FRAME_UPDATE_ON_REMOVE }; enum flow : int { FLOW_OUTGOING = 0, FLOW_INCOMING = 1, }; class INetChannelInfo { public: float get_latency(flow flow) { return MEM::CallVFunc(this, flow); } }; class ISource2Client { public: auto GetEconItemSystem() { return MEM::CallVFunc(this); } }; class IEngineClient { public: int GetMaxClients() { return MEM::CallVFunc(this); } bool IsInGame() { return MEM::CallVFunc(this); } bool IsConnected() { return MEM::CallVFunc(this); } //gusta INetChannelInfo* GetNetChannelInfo(int split_screen_slot) { return MEM::CallVFunc(this, split_screen_slot); } // return CBaseHandle index int GetLocalPlayer() { int nIndex = -1; MEM::CallVFunc(this, std::ref(nIndex), 0); return nIndex + 1; } [[nodiscard]] const char* GetLevelName() { return MEM::CallVFunc(this); } [[nodiscard]] const char* GetLevelNameShort() { return MEM::CallVFunc(this); } [[nodiscard]] const char* GetProductVersionString() { return MEM::CallVFunc(this); } };