forked from arturzxc/myapex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Level.cpp
42 lines (41 loc) · 992 Bytes
/
Level.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <iostream>
#include "Memory.cpp"
#include "Offsets.cpp"
class Level
{
public:
long getBasePointer()
{
long basePointer = offsets::REGION + offsets::LEVEL;
return basePointer;
}
std::string getName()
{
long basePointer = getBasePointer();
std::string result = mem::ReadString(basePointer);
return result;
}
bool isPlayable()
{
if (getName().empty())
return false;
if (getName().compare("mp_lobby") == 0)
return false;
return true;
}
bool isTrainingArea()
{
if (getName().compare("mp_rr_canyonlands_staging") == 0)
return true;
return false;
}
void print()
{
std::string str;
str += "Level:\n";
str += "\tBasePointer:\t\t\t\t" + mem::convertPointerToHexString(getBasePointer()) + "\n";
str += "\tName:\t\t\t\t\t" + getName() + "\n";
std::cout << str;
}
};