TankAIWeaponSets::WeaponSet Class Reference

#include <TankAIWeaponSets.h>

List of all members.

Public Member Functions

bool parseConfig (XMLNode *node)
void buyWeapons (Tank *tank, bool lastRound)
AccessorygetTankAccessoryByType (Tank *tank, const char *type)

Public Attributes

std::string name
std::vector
< WeaponSetEntry
weapons


Detailed Description

Definition at line 50 of file TankAIWeaponSets.h.


Member Function Documentation

bool TankAIWeaponSets::WeaponSet::parseConfig ( XMLNode node  ) 

Definition at line 86 of file TankAIWeaponSets.cpp.

References XMLNode::failChildren(), XMLNode::getNamedChild(), name, TankAIWeaponSets::WeaponSetEntry::parseConfig(), and weapons.

Referenced by TankAIWeaponSets::parseConfig().

void TankAIWeaponSets::WeaponSet::buyWeapons ( Tank tank,
bool  lastRound 
)

Definition at line 101 of file TankAIWeaponSets.cpp.

References TankAIWeaponSets::WeaponSetEntry::accessory, TankAccessories::add(), Tank::getAccessories(), Accessory::getBundle(), TankScore::getMoney(), Accessory::getPrice(), Tank::getScore(), TankAIWeaponSets::WeaponSetEntry::prioritybuy, TankScore::setMoney(), weapons, and TankAIWeaponSets::WeaponSetEntry::weaponValid().

Referenced by TankAICurrentWeapons::buyWeapons().

Accessory * TankAIWeaponSets::WeaponSet::getTankAccessoryByType ( Tank tank,
const char *  type 
)

Definition at line 145 of file TankAIWeaponSets.cpp.

References TankAIWeaponSets::WeaponSetEntry::accessory, TankAccessories::canUse(), TankAIWeaponSets::WeaponSetEntry::checkType(), DIALOG_ASSERT, Tank::getAccessories(), OptionsTransient::getArmsLevel(), Accessory::getArmsLevel(), ScorchedContext::getOptionsGame(), ScorchedContext::getOptionsTransient(), ScorchedServer::instance(), TankAIWeaponSets::WeaponSetEntry::priorityuse, TankAIWeaponSets::WeaponSetEntry::type, and weapons.

Referenced by TankAICurrentMove::makeGroupShot(), TankAICurrentMove::makeMoveShot(), and TankAICurrentMoveWeapons::TankAICurrentMoveWeapons().


Member Data Documentation

std::string TankAIWeaponSets::WeaponSet::name

Definition at line 53 of file TankAIWeaponSets.h.

Referenced by parseConfig(), and TankAIWeaponSets::parseConfig().

std::vector<WeaponSetEntry> TankAIWeaponSets::WeaponSet::weapons

Definition at line 54 of file TankAIWeaponSets.h.

Referenced by buyWeapons(), getTankAccessoryByType(), and parseConfig().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:07 2009 for Scorched3D by  doxygen 1.5.3