# ObjectManager

# Description

The ObjectManager namespace provides functionality to access and manage various objects in the game, including collections and query functions for heroes, minions, turrets, and other game units.

# How to Use

#include "Noble.h"

// Get the current player
AIBaseClient* player = ObjectManager::Player();

// Get enemy heroes
std::vector<AIBaseClient*> const& enemies = ObjectManager::GetEnemies();

// Iterate through enemy heroes
for (auto enemy : enemies)
{
    // Process each enemy hero
    if (enemy->IsValidTarget() && player->GetPosition().Distance(enemy->GetPosition()) < 1000.0f)
    {
        // Perform operations on enemies within range
    }
}

# GetAllAnimation

std::vector<AnimationClient*> const& GetAllAnimation()

Gets the collection of all animation objects.

std::vector<AnimationClient*> const& animations = ObjectManager::GetAllAnimation();
for (auto animation : animations)
{
    // Process each animation object
    // Perform related operations
}

# GetAllies

std::vector<AIBaseClient*> const& GetAllies()

Gets the collection of allied heroes.

std::vector<AIBaseClient*> const& allies = ObjectManager::GetAllies();
for (auto ally : allies)
{
    // Process each allied hero
    float distance = player->GetPosition().Distance(ally->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on allied heroes within range
    }
}

# GetAllMinions

std::vector<AIBaseClient*> const& GetAllMinions()

Gets the collection of all minions, without any filtering or validation.

std::vector<AIBaseClient*> const& allMinions = ObjectManager::GetAllMinions();
for (auto minion : allMinions)
{
    // Process each minion
    // Note: You need to check the minion's validity, visibility, and death status yourself
    if (minion->IsValid() && minion->IsVisible() && !minion->IsDead())
    {
        float distance = player->GetPosition().Distance(minion->GetPosition());
        if (distance < 800.0f)
        {
            // Perform operations on valid minions within range
        }
    }
}

# GetAllMissile

std::vector<MissileClient*> const& GetAllMissile()

Gets the collection of all missile objects.

std::vector<MissileClient*> const& missiles = ObjectManager::GetAllMissile();
for (auto missile : missiles)
{
    // Process each missile object
    // For example, detect enemy skill projectiles and perform evasive action
    if (missile->IsEnemyMissile() && missile->IsTargetingLocalPlayer())
    {
        // Perform evasive action
    }
}

# GetAllyInhibitors

std::vector<AIBaseClient*> const& GetAllyInhibitors()

Gets the collection of allied inhibitors. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& inhibitors = ObjectManager::GetAllyInhibitors();
for (auto inhibitor : inhibitors)
{
    // Process each allied inhibitor
    float distance = player->GetPosition().Distance(inhibitor->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on allied inhibitors within range
    }
}

# GetAllyMinions

std::vector<AIBaseClient*> const& GetAllyMinions()

Gets the collection of allied minions. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& allyMinions = ObjectManager::GetAllyMinions();
for (auto minion : allyMinions)
{
    // Process each allied minion
    float distance = player->GetPosition().Distance(minion->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on allied minions within range
    }
}

# GetAllyTurrets

std::vector<AIBaseClient*> const& GetAllyTurrets()

Gets the collection of allied turrets, excluding destroyed turrets.

std::vector<AIBaseClient*> const& turrets = ObjectManager::GetAllyTurrets();
for (auto turret : turrets)
{
    // Process each allied turret
    float distance = player->GetPosition().Distance(turret->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on allied turrets within range
    }
}

# GetEnemies

std::vector<AIBaseClient*> const& GetEnemies()

Gets the collection of enemy heroes.

std::vector<AIBaseClient*> const& enemies = ObjectManager::GetEnemies();
for (auto enemy : enemies)
{
    // Process each enemy hero
    float distance = player->GetPosition().Distance(enemy->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on enemy heroes within range
    }
}

# GetEnemyInhibitors

std::vector<AIBaseClient*> const& GetEnemyInhibitors()

Gets the collection of enemy inhibitors. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& inhibitors = ObjectManager::GetEnemyInhibitors();
for (auto inhibitor : inhibitors)
{
    // Process each enemy inhibitor
    float distance = player->GetPosition().Distance(inhibitor->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on enemy inhibitors within range
    }
}

# GetEnemyMinions

std::vector<AIBaseClient*> const& GetEnemyMinions()

Gets the collection of enemy minions. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& enemyMinions = ObjectManager::GetEnemyMinions();
for (auto minion : enemyMinions)
{
    // Process each enemy minion
    float distance = player->GetPosition().Distance(minion->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on enemy minions within range
    }
}

# GetEnemyTurrets

std::vector<AIBaseClient*> const& GetEnemyTurrets()

Gets the collection of enemy turrets, excluding destroyed turrets.

std::vector<AIBaseClient*> const& turrets = ObjectManager::GetEnemyTurrets();
for (auto turret : turrets)
{
    // Process each enemy turret
    float distance = player->GetPosition().Distance(turret->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on enemy turrets within range
    }
}

# GetEnemyWards

std::vector<AIBaseClient*> const& GetEnemyWards()

Gets the collection of enemy wards. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& wards = ObjectManager::GetEnemyWards();
for (auto ward : wards)
{
    // Process each enemy ward
    float distance = player->GetPosition().Distance(ward->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on enemy wards within range
    }
}

# GetGangplankBarrels

std::vector<AIBaseClient*> const& GetGangplankBarrels()

Gets the collection of Gangplank's barrels. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& barrels = ObjectManager::GetGangplankBarrels();
for (auto barrel : barrels)
{
    // Process each Gangplank barrel
    float distance = player->GetPosition().Distance(barrel->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on Gangplank barrels within range
    }
}

# GetNeutralMinions

std::vector<AIBaseClient*> const& GetNeutralMinions()

Gets the collection of jungle monsters. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& neutralMinions = ObjectManager::GetNeutralMinions();
for (auto monster : neutralMinions)
{
    // Process each jungle monster
    float distance = player->GetPosition().Distance(monster->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on jungle monsters within range
    }
}

# GetPlantsMinions

std::vector<AIBaseClient*> const& GetPlantsMinions()

Gets the collection of plants on the map. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& plants = ObjectManager::GetPlantsMinions();
for (auto plant : plants)
{
    // Process each plant
    float distance = player->GetPosition().Distance(plant->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on plants within range
    }
}

# GetSennaSouls

std::vector<AIBaseClient*> const& GetSennaSouls()

Gets the collection of Senna's souls. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& souls = ObjectManager::GetSennaSouls();
for (auto soul : souls)
{
    // Process each Senna soul
    float distance = player->GetPosition().Distance(soul->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on Senna souls within range
    }
}

# GetSpecialMinions

std::vector<AIBaseClient*> const& GetSpecialMinions()

Gets the collection of special minions, such as Jarvan's flag, Zed's shadow, Syndra's ball, Irelia's E, Zyra's seeds, Caitlyn's W, Xayah's feathers, etc. These objects are valid but cannot be attacked. Only distance needs to be checked, as visibility, death state, and valid target checks are already handled.

std::vector<AIBaseClient*> const& specialMinions = ObjectManager::GetSpecialMinions();
for (auto minion : specialMinions)
{
    // Process each special minion
    float distance = player->GetPosition().Distance(minion->GetPosition());
    if (distance < 800.0f)
    {
        // Perform operations on special minions within range
    }
}

# GetUnitByIndex

AIBaseClient* GetUnitByIndex(short index)

Gets a game unit by its index.

Parameter Name Parameter Type Description
index short The unit's index
AIBaseClient* unit = ObjectManager::GetUnitByIndex(5);
if (unit && unit->IsValid())
{
    // Process valid unit
}

# Player

AIBaseClient* Player()

Gets the unit controlled by the current player.

AIBaseClient* player = ObjectManager::Player();
Vector playerPosition = player->GetPosition();