[Stats] IsMaxLevel function implemented, XP bar hook coming soon.

This commit is contained in:
RektInator 2017-02-26 21:34:18 +01:00
parent a8931fcc56
commit 92102e44bb
2 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,19 @@
namespace Components
{
bool Stats::IsMaxLevel()
{
// obtain statsbuffer (offset 4, first 4 bytes is statVersion.)
char* statsBuffer = Utils::Hook::Call<char *(int)>(0x4C49F0)(0) + 4;
// obtain experience from statsbuffer (offset 2056)
std::uint32_t experience = *reinterpret_cast<std::uint32_t*>(statsBuffer + 2056);
// 2516000 should be the max experience.
if (experience >= 2516000) return true;
return false;
}
void Stats::SendStats()
{
// check if we're connected to a server...

View File

@ -13,6 +13,7 @@ namespace Components
#endif
private:
static bool IsMaxLevel();
static void UpdateClasses(UIScript::Token token);
static void SendStats();