BWAPI
Public Member Functions | Private Attributes
UnitClass Class Reference

#include <Unit.h>

Collaboration diagram for UnitClass:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UnitClass (BWAPI::Unit *unit)
 UnitClass (Position pos, BWAPI::UnitType type, int completeTime)
void onDestroy ()
TilePosition getTilePosition ()
Position getPosition ()
Position getPosition (int inFramesTime)
Position getTargetPosition ()
BWAPI::UnitType getType ()
Player getPlayer ()
Unit getTarget ()
bool exists ()
int getExistTime ()
bool isMorphing ()
bool isCompleted ()
int getCompletedTime ()
bool isConstructing ()
bool isBeingConstructed ()
bool isTraining ()
bool isResearching ()
bool isUpgrading ()
int getRemainingTrainTime ()
int getRemainingUpgradeTime ()
int getRemainingResearchTime ()
int getResources ()
BWAPI::UpgradeType getUpgrade ()
BWAPI::TechType getTech ()
BWAPI::UnitType getBuildType ()
int getLastSeenTime ()
AccessType accessibility ()
void drawUnitPosition ()
void drawUnitTilePosition ()
BWAPI::Order getOrder ()
BWAPI::Order getSecondaryOrder ()
bool isLifted ()
bool isSieged ()
bool isCarryingGas ()
bool isCarryingMinerals ()
bool isLockedDown ()
bool isStasised ()
bool isCloaked ()
bool isBurrowed ()
bool isDetected ()
bool isStuck ()
bool isUnderStorm ()
bool isUnderDarkSwarm ()
bool isLoaded ()
bool hasAddon ()
bool canAttackNow (Unit unit)
bool canAttack (Unit unit)
bool isInRange (Unit unit)
bool isAttackFrame ()
int getGroundWeaponMaxRange ()
int getAirWeaponMaxRange ()
int getWeaponMaxRange (Unit unit)
int getWeaponMinRange (Unit unit)
int getWeaponCooldown (Unit unit)
int getRemainingCooldown (Unit unit)
int getRemainingGroundCooldown ()
int getRemainingAirCooldown ()
int getSpellCooldown ()
int getTimeToKill (Unit unit)
BWAPI::WeaponType getWeapon (Unit unit)
bool canAttackGround ()
bool canAttackAir ()
int getScarabCount ()
int getID ()
double totalHitPointFraction ()
int totalHitPoints ()
int getHealth ()
int getShield ()
int getDefenseMatrixPoints ()
bool isRepairing ()
bool isHealing ()
bool isBeingHealed ()
bool isBeingRepaired ()
int getEnergy ()
std::list< BWAPI::UnitTypegetTrainingQueue ()
int getDistance (BWAPI::UnitType targType, Position position)
int getDistance (Unit unit)
int getDistance (Position position)
int getDistance (Position position, int inFramesTime)
bool isSelected ()
bool hasPath (Position position)
BWAPI::UnitCommand getLastCommand ()
bool hasOrder (BWAPI::Order order)
void train (BWAPI::UnitType type)
Unit getBuildUnit ()
void gather (Unit unit)
void returnCargo ()
void returnCargo (Unit unit)
void build (TilePosition target, BWAPI::UnitType type)
void build (Unit unit)
void morph (BWAPI::UnitType type)
void stop ()
bool cancel (int slot=-2)
void upgrade (BWAPI::UpgradeType type)
void research (BWAPI::TechType mType)
void move (Position target, int accuracy=8)
void attack (Unit unit)
void attack (Position target, int accuracy=8)
void useTech (BWAPI::TechType tech, Position target)
void useTech (BWAPI::TechType tech, Unit target)
void promote (BWAPI::Unit *unit)
void setBuildTime (int time)
void setPosition (Position position)
void update ()

Private Attributes

BWAPI::UnitmUnit
Position mStoredPosition
Position mStoredTargetPosition
BWAPI::UnitType mStoredType
Player mStoredPlayer
bool mStoredCompleted
bool mStoredMorphing
int mStoredTime
int mStoredCompletedTime
int mStoredExistsTime
int mStoredHealth
int mStoredShield
int mStoredInt
bool mStoredBoolOne
AccessType mStoredAccessType
int mDeleteTimer
int mLastOrderExecuteTime

Detailed Description

Definition at line 41 of file Unit.h.


Constructor & Destructor Documentation

UnitClass::UnitClass ( Position  pos,
BWAPI::UnitType  type,
int  completeTime 
)

Member Function Documentation

Definition at line 245 of file Unit.cpp.

References BWAPI::Broodwar, BWAPI::UnitType::canMove(), AccessTypeDef::Dead, BWAPI::Unit::exists(), AccessTypeDef::Full, BWAPI::Unit::getPlayer(), getPlayer(), getTilePosition(), getType(), AccessTypeDef::Guess, MapHelper::isAnyVisible(), BWAPI::Unit::isBurrowed(), BWAPI::Unit::isCloaked(), BWAPI::Unit::isDetected(), BWAPI::UnitType::isFlyingBuilding(), AccessTypeDef::Lost, mStoredAccessType, mUnit, AccessTypeDef::Partial, BWAPI::Game::self(), and BWAPI::UnitTypes::Terran_Siege_Tank_Siege_Mode.

Referenced by drawUnitPosition(), isCompleted(), and update().

{
        if(mUnit)
        {
                if(mUnit->exists())
                {
                        if(mUnit->getPlayer() == BWAPI::Broodwar->self() || (!mUnit->isCloaked() && !mUnit->isBurrowed()) || mUnit->isDetected())
                                return AccessType::Full;
                        else
                                return AccessType::Partial;
                }

                // If it doesn't exist but its ours it must be dead, is also possible to check if the player has left the game
                // but in some game modes they don't disappear when player->leftGame() returns true, noticed in protoss champaign
                if(getPlayer() == BWAPI::Broodwar->self())
                        return AccessType::Dead;

                const BWAPI::UnitType &type = getType();
                if(MapHelper::isAnyVisible(getTilePosition(), type))
                {
                        if(type.canMove() || type.isFlyingBuilding() || type == BWAPI::UnitTypes::Terran_Siege_Tank_Siege_Mode)
                                mStoredAccessType = AccessType::Lost;
                        else
                                mStoredAccessType = AccessType::Dead;
                }
                else if(mStoredAccessType != AccessType::Lost)
                        mStoredAccessType = AccessType::Guess;
        }

        return mStoredAccessType;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void UnitClass::attack ( Unit  unit)
void UnitClass::attack ( Position  target,
int  accuracy = 8 
)
void UnitClass::build ( TilePosition  target,
BWAPI::UnitType  type 
)
void UnitClass::build ( Unit  unit)

Definition at line 564 of file Unit.cpp.

References exists(), mUnit, and BWAPI::Unit::rightClick().

{
        if(exists() && unit && unit->exists())
        {
                mUnit->rightClick(unit->mUnit);
                unit->mUnit->rightClick(mUnit);
        }
}

Here is the call graph for this function:

bool UnitClass::canAttack ( Unit  unit)

Definition at line 1018 of file Unit.cpp.

References canAttackAir(), canAttackGround(), BWAPI::Unit::isLockedDown(), BWAPI::Unit::isStasised(), and mUnit.

Referenced by canAttackNow().

{
        if(!unit)
                return false;

        if(mUnit->isLockedDown() || mUnit->isStasised() || unit->isStasised())
                return false;

        if((unit->isCloaked() || unit->isBurrowed()) && !unit->isDetected())
                return false;

        if(unit->getType().isFlyer() || unit->isLifted())
                return canAttackAir();
        else
                return canAttackGround();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1197 of file Unit.cpp.

References BWAPI::UnitType::airWeapon(), getType(), and BWAPI::BulletTypes::None.

Referenced by canAttack().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1185 of file Unit.cpp.

References getScarabCount(), getType(), BWAPI::UnitType::groundWeapon(), BWAPI::BulletTypes::None, BWAPI::UnitTypes::Protoss_Reaver, and BWAPI::UnitTypes::Terran_Vulture_Spider_Mine.

Referenced by canAttack().

Here is the call graph for this function:

Here is the caller graph for this function:

bool UnitClass::canAttackNow ( Unit  unit)

Definition at line 1010 of file Unit.cpp.

References canAttack(), and exists().

{
        if(!unit || !exists() || !unit->exists())
                return false;

        return canAttack(unit);
}

Here is the call graph for this function:

bool UnitClass::cancel ( int  slot = -2)

Definition at line 277 of file Unit.cpp.

References accessibility(), BWAPI::Colors::Blue, BWAPI::Broodwar, BWAPI::UnitType::buildTime(), BWAPI::UnitType::dimensionDown(), BWAPI::UnitType::dimensionLeft(), BWAPI::UnitType::dimensionRight(), BWAPI::UnitType::dimensionUp(), BWAPI::Game::drawBox(), BWAPI::Game::drawLine(), BWAPI::Game::drawTextMap(), getBuildType(), BWAPI::Player::getColor(), getCompletedTime(), getExistTime(), BWAPI::Game::getFrameCount(), getHealth(), AccessTypeDef::getName(), BWAPI::Player::getName(), getPlayer(), getPosition(), getShield(), getTargetPosition(), getType(), BWAPI::Colors::Green, Singleton< T >::Instance(), isCompleted(), isMorphing(), BWAPI::CoordinateType::Map, BWAPI::UnitType::maxHitPoints(), BWAPI::UnitType::maxShields(), AccessTypeDef::Prediction, BWAPI::Colors::Purple, BWAPI::Colors::Red, SafeEnum< def, inner >::underlying(), BWAPI::Position::x(), and BWAPI::Position::y().

{
        const Position &pos = getPosition();
        const BWAPI::UnitType &type = getType();
        Player player = getPlayer();

        const int barHeight = 4;

        if((!isCompleted() || isMorphing()) && accessibility() != AccessType::Prediction)
        {
                double progress = getCompletedTime() - BWAPI::Broodwar->getFrameCount();

                if(isMorphing())
                        progress /= getBuildType().buildTime();
                else
                        progress /= type.buildTime();

                progress = 1.0 - progress;

                BWAPI::Color barColour = isMorphing() ? BWAPI::Colors::Red : BWAPI::Colors::Purple;

                Position bottomLeft(pos.x() - type.dimensionLeft(), pos.y() + type.dimensionDown() + barHeight - 1);

                DrawingHelper::Instance().drawProgressBar(bottomLeft, type.dimensionLeft()+type.dimensionRight(), barHeight, progress, barColour, player->getColor());
        }

        if(type.maxShields() > 0)
        {
                double progress = getShield();
                progress /= type.maxShields();

                Position bottomLeft(pos.x() - type.dimensionLeft(), pos.y() - type.dimensionUp() - barHeight + 2);

                DrawingHelper::Instance().drawProgressBar(bottomLeft, type.dimensionLeft()+type.dimensionRight(), barHeight, progress, BWAPI::Colors::Blue, player->getColor());
        }

        if(type.maxHitPoints() > 0)
        {
                double progress = getHealth();
                progress /= type.maxHitPoints();

                Position bottomLeft(pos.x() - type.dimensionLeft(), pos.y() - type.dimensionUp() + 1);

                DrawingHelper::Instance().drawProgressBar(bottomLeft, type.dimensionLeft()+type.dimensionRight(), barHeight, progress, BWAPI::Colors::Green, player->getColor());
        }

        BWAPI::Broodwar->drawBox(BWAPI::CoordinateType::Map, pos.x() - type.dimensionLeft(), pos.y() - type.dimensionUp(), pos.x() + type.dimensionRight(), pos.y() + type.dimensionDown(), player->getColor());

        BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y(), "%s", player->getName().c_str());

        AccessType access = accessibility();
        BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y()+10, "%s", AccessType::getName(access.underlying()).c_str());

        BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y()+20, "%d", (getExistTime() - BWAPI::Broodwar->getFrameCount()));
        BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y()+30, "%d", (getCompletedTime() - BWAPI::Broodwar->getFrameCount()));

        if(isMorphing())
                BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y()+40, "Morphing");

        if(isCompleted())
                BWAPI::Broodwar->drawTextMap(pos.x() + type.dimensionRight(), pos.y()+50, "Completed");

        Position target = getTargetPosition();
        BWAPI::Broodwar->drawLine(BWAPI::CoordinateType::Map, pos.x(), pos.y(), target.x(), target.y(), player->getColor());
}

Here is the call graph for this function:

void UnitClass::gather ( Unit  unit)

Definition at line 750 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::UnitCommandTypes::Gather, BWAPI::Unit::gather(), BWAPI::Unit::getLastCommand(), BWAPI::Unit::getOrder(), BWAPI::Unit::getOrderTarget(), BWAPI::Game::getRemainingLatencyFrames(), BWAPI::UnitCommand::getTarget(), BWAPI::UnitCommand::getType(), BWAPI::Orders::Harvest1, BWAPI::Orders::HarvestGas, BWAPI::Orders::MiningMinerals, mLastOrderExecuteTime, move(), BWAPI::Orders::MoveToGas, BWAPI::Orders::MoveToMinerals, mUnit, BWAPI::UnitTypes::Resource_Mineral_Field, BWAPI::Orders::WaitForGas, and BWAPI::Orders::WaitForMinerals.

{
        if(exists() && unit)
        {
                if(!unit->exists())
                {
                        move(unit->getPosition());
                        return;
                }
        
                if(unit->getType() == BWAPI::UnitTypes::Resource_Mineral_Field)
                {
                        if(mUnit->getOrder() == BWAPI::Orders::MoveToMinerals || mUnit->getOrder() == BWAPI::Orders::WaitForMinerals || mUnit->getOrder() == BWAPI::Orders::MiningMinerals)
                        {
                                if(mUnit->getOrderTarget() == unit->mUnit)
                                        return;
                        }
                }
                else if(unit->getType().isRefinery())
                {
                        if(mUnit->getOrder() == BWAPI::Orders::Harvest1)
                                return;
                        else if(mUnit->getOrder() == BWAPI::Orders::MoveToGas || mUnit->getOrder() == BWAPI::Orders::WaitForGas || mUnit->getOrder() == BWAPI::Orders::HarvestGas)
                        {
                                if(mUnit->getOrderTarget() == unit->mUnit)
                                        return;
                        }
                }
                else
                        return;

                if(mUnit->getLastCommand().getType() == BWAPI::UnitCommandTypes::Gather && mUnit->getLastCommand().getTarget() == unit->mUnit)
                {
                        if(mLastOrderExecuteTime >= BWAPI::Broodwar->getFrameCount())
                                return;
                }

                if(mUnit->gather(unit->mUnit))
                        mLastOrderExecuteTime = BWAPI::Broodwar->getFrameCount() + BWAPI::Broodwar->getRemainingLatencyFrames();
        }
}

Here is the call graph for this function:

Definition at line 1060 of file Unit.cpp.

References getPlayer(), getType(), and BWAPI::Player::weaponMaxRange().

Referenced by getWeaponMaxRange().

{
        return getPlayer()->weaponMaxRange(getType().airWeapon());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 587 of file Unit.cpp.

References BWAPI::Unit::exists(), BWAPI::Unit::getBuildType(), mUnit, BWAPI::BulletTypes::None, and BWAPI::BulletTypes::Unknown.

Referenced by drawUnitPosition().

{
        if(mUnit)
        {
                if(mUnit->exists())
                        return mUnit->getBuildType();
                else
                        return BWAPI::UnitTypes::Unknown;
        }

        return BWAPI::UnitTypes::None;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 513 of file Unit.cpp.

References exists(), BWAPI::Unit::getBuildUnit(), Singleton< T >::Instance(), mUnit, and StaticUnits::nullunit.

{
        if(exists())
                return UnitTracker::Instance().getUnit(mUnit->getBuildUnit());

        return StaticUnits::nullunit;
}

Here is the call graph for this function:

Definition at line 406 of file Unit.cpp.

References BWAPI::Broodwar, BWAPI::UnitType::buildTime(), exists(), getExistTime(), BWAPI::Game::getFrameCount(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingBuildTime(), getType(), isCompleted(), mStoredCompletedTime, mUnit, and BWAPI::Game::self().

Referenced by drawUnitPosition().

{
        if(isCompleted())
                return BWAPI::Broodwar->getFrameCount();

        if(exists())
        {
                if(mUnit->getPlayer() == BWAPI::Broodwar->self())
                        return BWAPI::Broodwar->getFrameCount() + mUnit->getRemainingBuildTime();
        }
        else
        {
                const int existsTime = getExistTime();
                const int completeTime = existsTime + getType().buildTime();

                if(completeTime < existsTime)
                        return std::numeric_limits<int>::max();
                else
                        return completeTime;
        }

        return std::max(mStoredCompletedTime, BWAPI::Broodwar->getFrameCount() + 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 905 of file Unit.cpp.

References exists(), BWAPI::Unit::getDefenseMatrixPoints(), and mUnit.

Referenced by totalHitPoints().

{
        if(exists())
                return mUnit->getDefenseMatrixPoints();

        return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int UnitClass::getDistance ( BWAPI::UnitType  targType,
Position  position 
)

Definition at line 1256 of file Unit.cpp.

References getPosition(), and getType().

Referenced by build(), getDistance(), and isInRange().

{
        return UnitHelper::getDistance(getPosition(), getType(), position, targType);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1261 of file Unit.cpp.

References getDistance().

{
        if(!unit)
                return 0;

        return getDistance(unit->getType(), unit->getPosition());
}

Here is the call graph for this function:

int UnitClass::getDistance ( Position  position)

Definition at line 1269 of file Unit.cpp.

References getDistance(), getPosition(), and getType().

{
        return UnitHelper::getDistance(getPosition(), getType(), position);
}

Here is the call graph for this function:

int UnitClass::getDistance ( Position  position,
int  inFramesTime 
)

Definition at line 1274 of file Unit.cpp.

References getDistance(), getPosition(), and getType().

{
        return UnitHelper::getDistance(getPosition(inFramesTime), getType(), position);
}

Here is the call graph for this function:

Definition at line 1287 of file Unit.cpp.

References exists(), BWAPI::Unit::getEnergy(), and mUnit.

{
        if(exists())
                return mUnit->getEnergy();

        return 0;
}

Here is the call graph for this function:

Definition at line 357 of file Unit.cpp.

References BWAPI::Broodwar, BWAPI::Game::getFrameCount(), mStoredExistsTime, and mUnit.

Referenced by drawUnitPosition(), and getCompletedTime().

{
        if(mUnit)
                return BWAPI::Broodwar->getFrameCount();

        return std::max(mStoredExistsTime, BWAPI::Broodwar->getFrameCount() + 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1052 of file Unit.cpp.

References getPlayer(), getType(), BWAPI::UnitTypes::Protoss_Reaver, and BWAPI::Player::weaponMaxRange().

Referenced by getWeaponMaxRange().

{
        if(getType() == BWAPI::UnitTypes::Protoss_Reaver)
                return 256;
        else
                return getPlayer()->weaponMaxRange(getType().groundWeapon());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 889 of file Unit.cpp.

References exists(), BWAPI::Unit::getHitPoints(), mStoredHealth, and mUnit.

Referenced by drawUnitPosition(), and totalHitPoints().

{
        if(exists())
                return mUnit->getHitPoints();

        return mStoredHealth;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 600 of file Unit.cpp.

References BWAPI::Unit::getID(), and mUnit.

{
        if(mUnit)
                return mUnit->getID();

        return 0;
}

Here is the call graph for this function:

Definition at line 1234 of file Unit.cpp.

References exists(), BWAPI::Unit::getLastCommand(), and mUnit.

{
        if(exists())
                return mUnit->getLastCommand();

        return BWAPI::UnitCommand();
}

Here is the call graph for this function:

Definition at line 237 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Game::getFrameCount(), and mStoredTime.

{
        if(exists())
                return BWAPI::Broodwar->getFrameCount();

        return mStoredTime;
}

Here is the call graph for this function:

Definition at line 189 of file Unit.cpp.

References exists(), BWAPI::Unit::getOrder(), mUnit, and BWAPI::BulletTypes::None.

Referenced by hasOrder().

{
        if(exists())
                return mUnit->getOrder();

        return BWAPI::Orders::None;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 173 of file Unit.cpp.

References exists(), BWAPI::Unit::getPlayer(), mStoredPlayer, and mUnit.

Referenced by accessibility(), drawUnitPosition(), drawUnitTilePosition(), getAirWeaponMaxRange(), getGroundWeaponMaxRange(), and getTimeToKill().

{
        if(exists())
                return mUnit->getPlayer();

        return mStoredPlayer;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 88 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Position::getApproxDistance(), BWAPI::Game::getFrameCount(), BWAPI::Unit::getPosition(), BWAPI::Unit::getTransport(), getType(), BWAPI::Unit::isLoaded(), mStoredPosition, mStoredTargetPosition, mStoredTime, mUnit, and BWAPI::UnitType::topSpeed().

Referenced by drawUnitPosition(), getDistance(), getPosition(), getTilePosition(), hasPath(), and move().

{
        if(exists())
        {
                if(mUnit->isLoaded())
                        return mUnit->getTransport()->getPosition();
                else
                        return mUnit->getPosition();
        }

        const BWAPI::UnitType &type = getType();
        
        if(type.topSpeed() != 0.0)
        {
                int travelTime = int(mStoredPosition.getApproxDistance(mStoredTargetPosition) / type.topSpeed());
                int timeDifference = BWAPI::Broodwar->getFrameCount() - mStoredTime;

                if(timeDifference > travelTime)
                        return mStoredTargetPosition;

                if(travelTime != 0)
                {
                        float traveled = float(timeDifference) / float(travelTime);

                        Vector currentPosition = mStoredTargetPosition - mStoredPosition;

                        currentPosition *= traveled;
                        currentPosition += Vector(mStoredPosition);

                        return currentPosition;
                }
        }

        return mStoredPosition;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Position UnitClass::getPosition ( int  inFramesTime)

Definition at line 124 of file Unit.cpp.

References BWAPI::Position::getApproxDistance(), getPosition(), getTargetPosition(), getType(), mStoredPosition, and BWAPI::UnitType::topSpeed().

{
        const Position &currentPosition = getPosition();
        const BWAPI::UnitType &type = getType();

        if(type.topSpeed() != 0.0)
        {
                const Position &targetPosition = getTargetPosition();

                int travelTime = int(currentPosition.getApproxDistance(targetPosition) / type.topSpeed());

                if(inFramesTime > travelTime)
                        return targetPosition;

                if(travelTime != 0)
                {
                        float traveled = float(inFramesTime) / float(travelTime);

                        Vector direction = targetPosition - currentPosition;

                        direction *= traveled;
                        direction += Vector(mStoredPosition);

                        return direction;
                }
        }

        return currentPosition;
}

Here is the call graph for this function:

Definition at line 1120 of file Unit.cpp.

References exists(), BWAPI::Unit::getAirWeaponCooldown(), and mUnit.

Referenced by getRemainingCooldown().

{
        if(exists())
                return mUnit->getAirWeaponCooldown();

        return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1101 of file Unit.cpp.

References getRemainingAirCooldown(), and getRemainingGroundCooldown().

{
        if(!unit)
                return 0;

        if(unit->getType().isFlyer() || unit->isLifted())
                return getRemainingAirCooldown();
        else
                return getRemainingGroundCooldown();
}

Here is the call graph for this function:

Definition at line 1112 of file Unit.cpp.

References exists(), BWAPI::Unit::getGroundWeaponCooldown(), and mUnit.

Referenced by getRemainingCooldown().

{
        if(exists())
                return mUnit->getGroundWeaponCooldown();

        return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 478 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingResearchTime(), mUnit, and BWAPI::Game::self().

{
        if(exists() && mUnit->getPlayer() == BWAPI::Broodwar->self())
                return mUnit->getRemainingResearchTime();

        return 0;
}

Here is the call graph for this function:

Definition at line 462 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingTrainTime(), mUnit, and BWAPI::Game::self().

{
        if(exists() && mUnit->getPlayer() == BWAPI::Broodwar->self())
                return mUnit->getRemainingTrainTime();

        return 0;
}

Here is the call graph for this function:

Definition at line 470 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingUpgradeTime(), mUnit, and BWAPI::Game::self().

{
        if(exists() && mUnit->getPlayer() == BWAPI::Broodwar->self())
                return mUnit->getRemainingUpgradeTime();

        return 0;
}

Here is the call graph for this function:

Definition at line 608 of file Unit.cpp.

References exists(), BWAPI::Unit::getResources(), mStoredInt, and mUnit.

{
        if(exists())
                return mUnit->getResources();

        return mStoredInt;
}

Here is the call graph for this function:

Definition at line 1210 of file Unit.cpp.

References exists(), BWAPI::Unit::getScarabCount(), and mUnit.

Referenced by canAttackGround().

{
        if(exists())
                return mUnit->getScarabCount();

        return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 197 of file Unit.cpp.

References exists(), BWAPI::Unit::getSecondaryOrder(), mUnit, and BWAPI::BulletTypes::None.

Referenced by hasOrder().

{
        if(exists())
                return mUnit->getSecondaryOrder();

        return BWAPI::Orders::None;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 897 of file Unit.cpp.

References exists(), BWAPI::Unit::getShields(), mStoredShield, and mUnit.

Referenced by drawUnitPosition(), and totalHitPoints().

{
        if(exists())
                return mUnit->getShields();

        return mStoredShield;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1128 of file Unit.cpp.

References exists(), BWAPI::Unit::getSpellCooldown(), and mUnit.

{
        if(exists())
                return mUnit->getSpellCooldown();

        return 0;
}

Here is the call graph for this function:

Definition at line 521 of file Unit.cpp.

References exists(), BWAPI::Unit::getOrderTarget(), BWAPI::Unit::getTarget(), Singleton< T >::Instance(), mUnit, and StaticUnits::nullunit.

{
        if(exists())
        {
                if(mUnit->getOrderTarget())
                        return UnitTracker::Instance().getUnit(mUnit->getOrderTarget());
                else
                        return UnitTracker::Instance().getUnit(mUnit->getTarget());
        }

        return StaticUnits::nullunit;
}

Here is the call graph for this function:

Definition at line 154 of file Unit.cpp.

References BWAPI::UnitType::canMove(), exists(), BWAPI::Unit::getPosition(), BWAPI::Unit::getTargetPosition(), BWAPI::Unit::getTransport(), getType(), BWAPI::UnitType::isFlyingBuilding(), BWAPI::Unit::isLoaded(), mStoredTargetPosition, and mUnit.

Referenced by drawUnitPosition(), and getPosition().

{
        if(exists())
        {
                const BWAPI::UnitType &type = getType();
                if(type.canMove() || type.isFlyingBuilding())
                {
                        if(mUnit->isLoaded())
                                return mUnit->getTransport()->getTargetPosition();
                        else
                                return mUnit->getTargetPosition();
                }
                else
                        return mUnit->getPosition();
        }

        return mStoredTargetPosition;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 638 of file Unit.cpp.

References exists(), BWAPI::Unit::getTech(), mUnit, and BWAPI::BulletTypes::None.

{
        if(exists())
                return mUnit->getTech();

        return BWAPI::TechTypes::None;
}

Here is the call graph for this function:

Definition at line 72 of file Unit.cpp.

References exists(), getPosition(), BWAPI::Unit::getTilePosition(), BWAPI::Unit::getTransport(), getType(), BWAPI::Unit::isLoaded(), mUnit, BWAPI::UnitType::tileHeight(), BWAPI::UnitType::tileWidth(), BWAPI::Position::x(), and BWAPI::Position::y().

Referenced by accessibility(), drawUnitTilePosition(), and getTimeToKill().

{
        if(exists())
        {
                if(mUnit->isLoaded())
                        return mUnit->getTransport()->getTilePosition();
                else
                        return mUnit->getTilePosition();
        }

        const BWAPI::UnitType &type = getType();
        const Position &pos = getPosition();

        return TilePosition(Position(pos.x() - (type.tileWidth() * 16), pos.y() - (type.tileHeight() * 16)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1136 of file Unit.cpp.

References BWAPI::Broodwar, BWAPI::DamageTypes::Concussive, BWAPI::WeaponType::damageAmount(), BWAPI::WeaponType::damageCooldown(), BWAPI::WeaponType::damageFactor(), BWAPI::WeaponType::damageType(), BWAPI::DamageTypes::Explosive, getPlayer(), getTilePosition(), BWAPI::Player::getUpgradeLevel(), getWeapon(), BWAPI::UnitSizeTypes::Large, BWAPI::UnitSizeTypes::Medium, BWAPI::UnitSizeTypes::Small, and BWAPI::WeaponType::upgradeType().

{
        int health = unit->totalHitPoints();

        BWAPI::WeaponType weapon = getWeapon(unit);

        int weaponDamage = weapon.damageAmount() + (weapon.damageFactor() * getPlayer()->getUpgradeLevel(weapon.upgradeType()));
        if(weaponDamage == 0)
                return 5000;

        int thisNumberOfShots = health / weaponDamage;

        if(weapon.damageType() == BWAPI::DamageTypes::Concussive)
        {
                if(unit->getType().size() == BWAPI::UnitSizeTypes::Large)
                        thisNumberOfShots *= 4;
                else if(unit->getType().size() == BWAPI::UnitSizeTypes::Medium)
                        thisNumberOfShots += thisNumberOfShots;
        }
        else if(weapon.damageType() == BWAPI::DamageTypes::Explosive)
        {
                if(unit->getType().size() == BWAPI::UnitSizeTypes::Small)
                        thisNumberOfShots += thisNumberOfShots;
                else if(unit->getType().size() == BWAPI::UnitSizeTypes::Medium)
                        thisNumberOfShots += thisNumberOfShots / 2;
        }

        if((BWAPI::Broodwar->getGroundHeight(getTilePosition()) - BWAPI::Broodwar->getGroundHeight(unit->getTilePosition())) < 0)
                thisNumberOfShots += thisNumberOfShots;

        return thisNumberOfShots * weapon.damageCooldown();
}

Here is the call graph for this function:

Definition at line 1279 of file Unit.cpp.

References exists(), BWAPI::Unit::getTrainingQueue(), and mUnit.

{
        if(exists())
                return mUnit->getTrainingQueue();

        return std::list<BWAPI::UnitType>();
}

Here is the call graph for this function:

Definition at line 624 of file Unit.cpp.

References exists(), BWAPI::Unit::getUpgrade(), mUnit, and BWAPI::BulletTypes::None.

{
        if(exists())
                return mUnit->getUpgrade();
        
        return BWAPI::UpgradeTypes::None;
}

Here is the call graph for this function:

Definition at line 1169 of file Unit.cpp.

References BWAPI::UnitType::airWeapon(), getType(), BWAPI::UnitType::groundWeapon(), BWAPI::BulletTypes::None, BWAPI::UnitTypes::Protoss_Reaver, and BWAPI::WeaponTypes::Scarab.

Referenced by getTimeToKill().

{
        if(!unit)
                return BWAPI::WeaponTypes::None;

        if(unit->getType().isFlyer() || unit->isLifted())
                return getType().airWeapon();
        else
        {
                if(getType() == BWAPI::UnitTypes::Protoss_Reaver)
                        return BWAPI::WeaponTypes::Scarab;
                else
                        return getType().groundWeapon();
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1087 of file Unit.cpp.

References BWAPI::UnitType::airWeapon(), BWAPI::WeaponType::damageCooldown(), getType(), BWAPI::UnitType::groundWeapon(), and BWAPI::UnitTypes::Protoss_Reaver.

{
        if(!unit)
                return 0;

        if(getType() == BWAPI::UnitTypes::Protoss_Reaver)
                return 60;

        if(unit->getType().isFlyer() || unit->isLifted())
                return getType().airWeapon().damageCooldown();
        else
                return getType().groundWeapon().damageCooldown();
}

Here is the call graph for this function:

Definition at line 1065 of file Unit.cpp.

References getAirWeaponMaxRange(), and getGroundWeaponMaxRange().

Referenced by isInRange().

{
        if(!unit)
                return 0;

        if(unit->getType().isFlyer() || unit->isLifted())
                return getAirWeaponMaxRange();
        else
                return getGroundWeaponMaxRange();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1076 of file Unit.cpp.

References BWAPI::UnitType::airWeapon(), getType(), BWAPI::UnitType::groundWeapon(), and BWAPI::WeaponType::minRange().

Referenced by isInRange().

{
        if(!unit)
                return 0;

        if(unit->getType().isFlyer() || unit->isLifted())
                return getType().airWeapon().minRange();
        else
                return getType().groundWeapon().minRange();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 573 of file Unit.cpp.

References exists(), BWAPI::Unit::getAddon(), and mUnit.

{
        if(exists())
                return mUnit->getAddon() != NULL;

        return false;
}

Here is the call graph for this function:

Definition at line 1357 of file Unit.cpp.

References getOrder(), and getSecondaryOrder().

{
        if(getOrder() == order)
                return true;
        else if(getSecondaryOrder() == order)
                return true;
        else
                return false;
}

Here is the call graph for this function:

bool UnitClass::hasPath ( Position  position)

Definition at line 927 of file Unit.cpp.

References BWAPI::Broodwar, exists(), getPosition(), BWAPI::Unit::hasPath(), BWAPI::Game::hasPath(), and mUnit.

{
        if(exists())
                return mUnit->hasPath(position);

        return BWAPI::Broodwar->hasPath(getPosition(), position);
}

Here is the call graph for this function:

Definition at line 1202 of file Unit.cpp.

References exists(), BWAPI::Unit::isAttackFrame(), and mUnit.

{
        if(exists())
                return mUnit->isAttackFrame();

        return false;
}

Here is the call graph for this function:

Definition at line 454 of file Unit.cpp.

References exists(), BWAPI::Unit::isBeingConstructed(), and mUnit.

{
        if(exists())
                return mUnit->isBeingConstructed();

        return false;
}

Here is the call graph for this function:

Definition at line 1242 of file Unit.cpp.

References exists(), BWAPI::Unit::isBeingHealed(), and mUnit.

{
        if(exists())
                return mUnit->isBeingHealed();

        return false;
}

Here is the call graph for this function:

Definition at line 1250 of file Unit.cpp.

{
        //TODO: implement
        return false;
}

Definition at line 960 of file Unit.cpp.

References exists(), BWAPI::Unit::isBurrowed(), and mUnit.

{
        if(exists())
                return mUnit->isBurrowed();

        return false;
}

Here is the call graph for this function:

Definition at line 221 of file Unit.cpp.

References exists(), BWAPI::Unit::isCarryingGas(), and mUnit.

{
        if(exists())
                return mUnit->isCarryingGas();

        return false;
}

Here is the call graph for this function:

Definition at line 229 of file Unit.cpp.

References exists(), BWAPI::Unit::isCarryingMinerals(), and mUnit.

{
        if(exists())
                return mUnit->isCarryingMinerals();

        return false;
}

Here is the call graph for this function:

Definition at line 952 of file Unit.cpp.

References exists(), BWAPI::Unit::isCloaked(), and mUnit.

{
        if(exists())
                return mUnit->isCloaked();

        return false;
}

Here is the call graph for this function:

Definition at line 384 of file Unit.cpp.

References accessibility(), BWAPI::Broodwar, exists(), BWAPI::Game::getFrameCount(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingBuildTime(), BWAPI::Unit::isCompleted(), mStoredCompleted, mStoredCompletedTime, mUnit, AccessTypeDef::Prediction, and BWAPI::Game::self().

Referenced by drawUnitPosition(), getCompletedTime(), and UnitClass().

{
        if(exists())
        {
                if(mUnit->isCompleted())
                        return true;

                if(mUnit->getPlayer() == BWAPI::Broodwar->self())
                        return mUnit->getRemainingBuildTime() == 0;

                return false;
        }

        if(accessibility() == AccessType::Prediction)
                return false;

        if(mStoredCompleted)
                return true;

        return mStoredCompletedTime <= BWAPI::Broodwar->getFrameCount();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 446 of file Unit.cpp.

References exists(), BWAPI::Unit::isConstructing(), and mUnit.

{
        if(exists())
                return mUnit->isConstructing();

        return false;
}

Here is the call graph for this function:

Definition at line 968 of file Unit.cpp.

References exists(), BWAPI::Unit::isDetected(), and mUnit.

{
        if(exists())
                return mUnit->isDetected();

        return false;
}

Here is the call graph for this function:

Definition at line 1226 of file Unit.cpp.

References exists(), BWAPI::Unit::getOrder(), BWAPI::Orders::MedicHeal1, BWAPI::Orders::MedicHeal2, and mUnit.

Here is the call graph for this function:

bool UnitClass::isInRange ( Unit  unit)

Definition at line 1035 of file Unit.cpp.

References getDistance(), getWeaponMaxRange(), and getWeaponMinRange().

{
        int weaponMaxRange = getWeaponMaxRange(unit);

        if(weaponMaxRange <= 0)
                return false;

        int distance = getDistance(unit);
        int weaponMinRange = getWeaponMinRange(unit);
        
        if(weaponMinRange != 0 && distance <= weaponMinRange)
                return false;

        return weaponMaxRange >= distance;
}

Here is the call graph for this function:

Definition at line 205 of file Unit.cpp.

References exists(), getType(), BWAPI::UnitType::isFlyingBuilding(), BWAPI::Unit::isLifted(), mStoredBoolOne, and mUnit.

{
        if(exists())
                return mUnit->isLifted();

        return getType().isFlyingBuilding() && mStoredBoolOne;
}

Here is the call graph for this function:

Definition at line 1002 of file Unit.cpp.

References exists(), BWAPI::Unit::isLoaded(), and mUnit.

{
        if(exists())
                return mUnit->isLoaded();

        return false;
}

Here is the call graph for this function:

Definition at line 944 of file Unit.cpp.

References exists(), BWAPI::Unit::isLockedDown(), and mUnit.

{
        if(exists())
                return mUnit->isLockedDown();

        return false;
}

Here is the call graph for this function:

Definition at line 365 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Game::getFrameCount(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getRemainingBuildTime(), BWAPI::Unit::isMorphing(), mStoredCompletedTime, mStoredMorphing, mUnit, and BWAPI::Game::self().

Referenced by drawUnitPosition(), and UnitClass().

{
        if(exists())
        {
                if(!mUnit->isMorphing())
                        return false;

                if(mUnit->getPlayer() == BWAPI::Broodwar->self())
                        return mUnit->getRemainingBuildTime() > 0;

                return true;
        }

        if(!mStoredMorphing)
                return false;

        return mStoredCompletedTime > BWAPI::Broodwar->getFrameCount();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1218 of file Unit.cpp.

References exists(), BWAPI::Unit::isRepairing(), and mUnit.

{
        if(exists())
                return mUnit->isRepairing();

        return false;
}

Here is the call graph for this function:

Definition at line 438 of file Unit.cpp.

References exists(), BWAPI::Unit::isResearching(), and mUnit.

{
        if(exists())
                return mUnit->isResearching();

        return false;
}

Here is the call graph for this function:

Definition at line 919 of file Unit.cpp.

References exists(), BWAPI::Unit::isSelected(), and mUnit.

{
        if(exists())
                return mUnit->isSelected();

        return false;
}

Here is the call graph for this function:

Definition at line 935 of file Unit.cpp.

References exists(), Singleton< T >::Instance(), BWAPI::Unit::isStasised(), and mUnit.

{
        if(exists())
                if(mUnit->isStasised())
                        return true;

        return LatencyTracker::Instance().isStasisInRange(shared_from_this());
}

Here is the call graph for this function:

Definition at line 976 of file Unit.cpp.

References exists(), BWAPI::Unit::isStuck(), and mUnit.

{
        if(exists())
                return mUnit->isStuck();

        return false;
}

Here is the call graph for this function:

Definition at line 430 of file Unit.cpp.

References exists(), BWAPI::Unit::isTraining(), and mUnit.

{
        if(exists())
                return mUnit->isTraining();

        return false;
}

Here is the call graph for this function:

Definition at line 993 of file Unit.cpp.

References exists(), BWAPI::Unit::isUnderDarkSwarm(), and mUnit.

{
        if(exists())
                if(mUnit->isUnderDarkSwarm())
                        return true;

        return false;
}

Here is the call graph for this function:

Definition at line 984 of file Unit.cpp.

References exists(), Singleton< T >::Instance(), BWAPI::Unit::isUnderStorm(), and mUnit.

{
        if(exists())
                if(mUnit->isUnderStorm())
                        return true;

        return LatencyTracker::Instance().isStormInRange(shared_from_this());
}

Here is the call graph for this function:

Definition at line 616 of file Unit.cpp.

References exists(), BWAPI::Unit::isUpgrading(), and mUnit.

{
        if(exists())
                return mUnit->isUpgrading();

        return false;
}

Here is the call graph for this function:

Definition at line 581 of file Unit.cpp.

References exists(), BWAPI::Unit::morph(), and mUnit.

{
        if(exists())
                mUnit->morph(type);
}

Here is the call graph for this function:

void UnitClass::move ( Position  target,
int  accuracy = 8 
)

Definition at line 67 of file Unit.cpp.

References AccessTypeDef::Dead, and mStoredAccessType.

void UnitClass::promote ( BWAPI::Unit unit)

Definition at line 861 of file Unit.cpp.

References AccessTypeDef::Full, mStoredAccessType, mUnit, and update().

Here is the call graph for this function:

Definition at line 671 of file Unit.cpp.

References exists(), mUnit, and BWAPI::Unit::research().

{
        if(exists())
                mUnit->research(mType);
}

Here is the call graph for this function:

void UnitClass::returnCargo ( Unit  unit)
void UnitClass::setBuildTime ( int  time)

Definition at line 868 of file Unit.cpp.

References BWAPI::UnitType::buildTime(), getType(), mStoredCompletedTime, and mStoredExistsTime.

{
        mStoredExistsTime = time;

        mStoredCompletedTime = time + getType().buildTime();
        if(mStoredCompletedTime < time)
                mStoredCompletedTime = std::numeric_limits<int>::max();
}

Here is the call graph for this function:

void UnitClass::setPosition ( Position  position)

Definition at line 913 of file Unit.cpp.

References mStoredPosition, and mStoredTargetPosition.

{
        mStoredPosition = position;
        mStoredTargetPosition = position;
}
void UnitClass::stop ( )

Definition at line 877 of file Unit.cpp.

References getType(), and totalHitPoints().

{
        double currentHealth = totalHitPoints();

        return currentHealth / double(getType().maxHitPoints() + getType().maxShields());
}

Here is the call graph for this function:

Definition at line 884 of file Unit.cpp.

References getDefenseMatrixPoints(), getHealth(), and getShield().

Referenced by totalHitPointFraction().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1367 of file Unit.cpp.

References accessibility(), BWAPI::Broodwar, BWAPI::UnitType::buildTime(), exists(), BWAPI::Unit::getBuildType(), BWAPI::Game::getFrameCount(), BWAPI::Unit::getHitPoints(), BWAPI::Unit::getPlayer(), BWAPI::Unit::getPosition(), BWAPI::Unit::getRemainingBuildTime(), BWAPI::Unit::getResources(), BWAPI::Unit::getShields(), BWAPI::Unit::getTargetPosition(), BWAPI::Unit::getType(), BWAPI::Unit::isCompleted(), BWAPI::UnitType::isFlyingBuilding(), BWAPI::Unit::isLifted(), BWAPI::Unit::isMorphing(), BWAPI::Unit::isSieged(), mStoredAccessType, mStoredBoolOne, mStoredCompleted, mStoredCompletedTime, mStoredHealth, mStoredInt, mStoredMorphing, mStoredPlayer, mStoredPosition, mStoredShield, mStoredTargetPosition, mStoredTime, mStoredType, mUnit, BWAPI::Game::self(), BWAPI::UnitTypes::Terran_Siege_Tank_Siege_Mode, and BWAPI::UnitTypes::Terran_Siege_Tank_Tank_Mode.

Referenced by promote(), and UnitClass().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 632 of file Unit.cpp.

References exists(), mUnit, and BWAPI::Unit::upgrade().

{
        if(exists())
                mUnit->upgrade(type);
}

Here is the call graph for this function:

void UnitClass::useTech ( BWAPI::TechType  tech,
BWAPI::Position  target 
)
void UnitClass::useTech ( BWAPI::TechType  tech,
Unit  target 
)

Definition at line 1330 of file Unit.cpp.

References BWAPI::Broodwar, exists(), BWAPI::Unit::getLastCommand(), BWAPI::Unit::getOrder(), BWAPI::Unit::getOrderTarget(), BWAPI::Game::getRemainingLatencyFrames(), BWAPI::UnitCommand::getTarget(), getTechCastOrder(), BWAPI::UnitCommand::getTechType(), BWAPI::UnitCommand::getType(), mLastOrderExecuteTime, move(), mUnit, BWAPI::UnitCommandTypes::Use_Tech_Unit, and BWAPI::Unit::useTech().

{
        if(exists() && target)
        {
                if(!target->exists())
                {
                        move(target->getPosition());
                        return;
                }

                if(mUnit->getOrder() == getTechCastOrder(tech))//TODO: in latest revision, the tech knows the relating order
                {
                        if(mUnit->getOrderTarget() == target->mUnit)
                                return;
                }

                if(mUnit->getLastCommand().getType() == BWAPI::UnitCommandTypes::Use_Tech_Unit && mUnit->getLastCommand().getTechType() == tech && mUnit->getLastCommand().getTarget() == target->mUnit)
                {
                        if(mLastOrderExecuteTime >= BWAPI::Broodwar->getFrameCount())
                                return;
                }

                if(mUnit->useTech(tech, target->mUnit))
                        mLastOrderExecuteTime = BWAPI::Broodwar->getFrameCount() + BWAPI::Broodwar->getRemainingLatencyFrames();
        }
}

Here is the call graph for this function:


Member Data Documentation

int UnitClass::mDeleteTimer [private]

Definition at line 214 of file Unit.h.

Definition at line 216 of file Unit.h.

Referenced by attack(), build(), gather(), move(), returnCargo(), stop(), train(), and useTech().

Definition at line 213 of file Unit.h.

Referenced by accessibility(), onDestroy(), promote(), and update().

bool UnitClass::mStoredBoolOne [private]

Definition at line 211 of file Unit.h.

Referenced by isLifted(), isSieged(), and update().

Definition at line 197 of file Unit.h.

Referenced by isCompleted(), UnitClass(), and update().

Definition at line 201 of file Unit.h.

Referenced by getCompletedTime(), isCompleted(), isMorphing(), setBuildTime(), UnitClass(), and update().

Definition at line 202 of file Unit.h.

Referenced by getExistTime(), and setBuildTime().

int UnitClass::mStoredHealth [private]

Definition at line 204 of file Unit.h.

Referenced by getHealth(), and update().

int UnitClass::mStoredInt [private]

Definition at line 208 of file Unit.h.

Referenced by getResources(), and update().

Definition at line 198 of file Unit.h.

Referenced by isMorphing(), UnitClass(), and update().

Definition at line 196 of file Unit.h.

Referenced by getPlayer(), and update().

Definition at line 193 of file Unit.h.

Referenced by getPosition(), setPosition(), and update().

int UnitClass::mStoredShield [private]

Definition at line 205 of file Unit.h.

Referenced by getShield(), and update().

Definition at line 194 of file Unit.h.

Referenced by getPosition(), getTargetPosition(), setPosition(), and update().

int UnitClass::mStoredTime [private]

Definition at line 199 of file Unit.h.

Referenced by getLastSeenTime(), getPosition(), and update().

Definition at line 195 of file Unit.h.

Referenced by getType(), and update().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines