[Stats] IsMaxLevel function implemented, XP bar hook coming soon.
This commit is contained in:
parent
a8931fcc56
commit
92102e44bb
@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
namespace Components
|
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()
|
void Stats::SendStats()
|
||||||
{
|
{
|
||||||
// check if we're connected to a server...
|
// check if we're connected to a server...
|
||||||
|
@ -13,6 +13,7 @@ namespace Components
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static bool IsMaxLevel();
|
||||||
static void UpdateClasses(UIScript::Token token);
|
static void UpdateClasses(UIScript::Token token);
|
||||||
static void SendStats();
|
static void SendStats();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user