forked from leftspace89/pPlat
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLObjectManager.h
More file actions
40 lines (34 loc) · 1.08 KB
/
LObjectManager.h
File metadata and controls
40 lines (34 loc) · 1.08 KB
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
#pragma once
class Obj_AI_Base;
class
DLLEXPORT ObjectManager
{
public:
enum ObjectTeam
{
All,
Allies,
Enemies
};
static GameObject** GetUnitArray();
static std::vector<GameObject*> GetMinions(ObjectTeam enemy);
static std::vector<GameObject*> GetHeroes(ObjectTeam type, float range = FLT_MAX, Obj_AI_Base*entity = GetPlayer());
static Obj_AI_Base* GetPlayer();
static GameObject*GetUnderMouseObj()
{
auto obj = MAKEPTR(Offsets::ObjectManager::UnderMouseObj);
if (!obj)
return nullptr;
if (*reinterpret_cast<GameObject*>(obj)->GetNetworkId() == *reinterpret_cast<GameObject*>(GetPlayer())->GetNetworkId())
return nullptr;
if (*reinterpret_cast<GameObject*>(obj)->GetTeam() == *reinterpret_cast<GameObject*>(GetPlayer())->GetTeam())
return nullptr;
if (reinterpret_cast<GameObject*>(obj)->GetType() != UnitType::AIHeroClient)
return nullptr;
return reinterpret_cast<GameObject*>(obj);
}
//mouse en yak? hedefi al?
static GameObject*GetNearMouseTarget();
static GameObject* GetUnitByIndex(uint index);
static GameObject* GetUnitByNetworkId(uint networkId);
};