Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
TeamPrototype Class Reference

#include <Team.h>

Inherits MemoryPoolObject, and Snapshot.

Public Member Functions

 TeamPrototype (TeamFactory *tf, const AsciiString &name, Player *ownerPlayer, Bool isSingleton, Dict *d, TeamPrototypeID id)
 
TeamPrototypeID getID () const
 
const AsciiStringgetName () const
 
Bool getIsSingleton () const
 
const TeamTemplateInfogetTemplateInfo (void) const
 
PlayergetControllingPlayer () const
 
TeamfindTeamByID (TeamID teamID)
 
void setControllingPlayer (Player *newController)
 
Bool evaluateProductionCondition (void)
 
void countObjectsByThingTemplate (Int numTmplates, const ThingTemplate *const *things, Bool ignoreDead, Int *counts, Bool ignoreUnderConstruction=TRUE) const
 
Int countBuildings (void)
 
Int countObjects (KindOfMaskType setMask, KindOfMaskType clearMask)
 
void healAllObjects ()
 
void iterateObjects (ObjectIterateFunc func, void *userData)
 
Int countTeamInstances (void)
 count the number of teams that have been instanced by this prototype
 
void updateState (void)
 
Bool hasAnyBuildings (void) const
 
Bool hasAnyBuildings (KindOfMaskType kindOf) const
 
Bool hasAnyUnits (void) const
 
Bool hasAnyObjects (void) const
 
Bool hasAnyBuildFacility (void) const
 
void damageTeamMembers (Real amount)
 
void moveTeamTo (Coord3D destination)
 
void friend_setOwningPlayer (Player *p)
 
void teamAboutToBeDeleted (Team *team)
 
ScriptgetGenericScript (Int scriptToRetrieve)
 
void increaseAIPriorityForSuccess (void) const
 
void decreaseAIPriorityForFailure (void) const
 
void setAttackPriorityName (const AsciiString &name)
 
AsciiString getAttackPriorityName (void) const
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Note that TeamPrototype is used to hold information that is invariant between multiple instances of a given Team (e.g., alliance info).

However, a TeamPrototype doesn't contain any build-list style info; that is handled by the BuildList stuff.

Definition at line 516 of file Team.h.

Constructor & Destructor Documentation

◆ TeamPrototype()

TeamPrototype::TeamPrototype ( TeamFactory * tf,
const AsciiString & name,
Player * ownerPlayer,
Bool isSingleton,
Dict * d,
TeamPrototypeID id )

Definition at line 804 of file Team.cpp.

Member Function Documentation

◆ countBuildings()

Int TeamPrototype::countBuildings ( void )

count the buildings owned by this Team template

Definition at line 963 of file Team.cpp.

◆ countObjects()

Int TeamPrototype::countObjects ( KindOfMaskType setMask,
KindOfMaskType clearMask )

simply returns the number of objects on this team with a specific KindOfMaskType

Definition at line 973 of file Team.cpp.

◆ countObjectsByThingTemplate()

void TeamPrototype::countObjectsByThingTemplate ( Int numTmplates,
const ThingTemplate *const * things,
Bool ignoreDead,
Int * counts,
Bool ignoreUnderConstruction = TRUE ) const

count for all the team instances belonging to this prototype.

Definition at line 904 of file Team.cpp.

◆ countTeamInstances()

Int TeamPrototype::countTeamInstances ( void )

count the number of teams that have been instanced by this prototype

Count the number of teams that have been instanced by this prototype

Definition at line 1004 of file Team.cpp.

◆ crc()

void TeamPrototype::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 1189 of file Team.cpp.

◆ damageTeamMembers()

void TeamPrototype::damageTeamMembers ( Real amount)

a convenience routine to quickly destroy a team.

Definition at line 1109 of file Team.cpp.

◆ decreaseAIPriorityForFailure()

void TeamPrototype::decreaseAIPriorityForFailure ( void ) const

Definition at line 957 of file Team.cpp.

◆ evaluateProductionCondition()

Bool TeamPrototype::evaluateProductionCondition ( void )

Evaluate team's production condition.

Definition at line 1128 of file Team.cpp.

◆ findTeamByID()

Team * TeamPrototype::findTeamByID ( TeamID teamID)

Return a team with matching team ID if present

Definition at line 876 of file Team.cpp.

◆ friend_setOwningPlayer()

void TeamPrototype::friend_setOwningPlayer ( Player * p)
inline

Definition at line 624 of file Team.h.

◆ getAttackPriorityName()

AsciiString TeamPrototype::getAttackPriorityName ( void ) const
inline

Definition at line 636 of file Team.h.

◆ getControllingPlayer()

Player * TeamPrototype::getControllingPlayer ( ) const

return the team's owner (backtracking up if necessary)

Definition at line 870 of file Team.cpp.

◆ getGenericScript()

Script * TeamPrototype::getGenericScript ( Int scriptToRetrieve)

Definition at line 923 of file Team.cpp.

◆ getID()

TeamPrototypeID TeamPrototype::getID ( ) const
inline

Definition at line 531 of file Team.h.

◆ getIsSingleton()

Bool TeamPrototype::getIsSingleton ( ) const
inline

Definition at line 533 of file Team.h.

◆ getName()

const AsciiString & TeamPrototype::getName ( ) const
inline

Definition at line 532 of file Team.h.

◆ getTemplateInfo()

const TeamTemplateInfo * TeamPrototype::getTemplateInfo ( void ) const
inline

Definition at line 534 of file Team.h.

◆ hasAnyBuildFacility()

Bool TeamPrototype::hasAnyBuildFacility ( void ) const

a convenience routine to quickly check if any buildfacilities are owned.

Definition at line 1099 of file Team.cpp.

◆ hasAnyBuildings() [1/2]

Bool TeamPrototype::hasAnyBuildings ( KindOfMaskType kindOf) const

a convenience routine to quickly check if any buildings with a specific KindOfType flag are owned.

Definition at line 1025 of file Team.cpp.

◆ hasAnyBuildings() [2/2]

Bool TeamPrototype::hasAnyBuildings ( void ) const

a convenience routine to quickly check if any buildings are owned.

Definition at line 1015 of file Team.cpp.

◆ hasAnyObjects()

Bool TeamPrototype::hasAnyObjects ( void ) const

a convenience routine to quickly check if any objects are owned.

Definition at line 1045 of file Team.cpp.

◆ hasAnyUnits()

Bool TeamPrototype::hasAnyUnits ( void ) const

a convenience routine to quickly check if any units are owned.

Definition at line 1035 of file Team.cpp.

◆ healAllObjects()

void TeamPrototype::healAllObjects ( void )

This TeamProtoType will heal all objects in all its instances

Definition at line 983 of file Team.cpp.

◆ increaseAIPriorityForSuccess()

void TeamPrototype::increaseAIPriorityForSuccess ( void ) const

Definition at line 950 of file Team.cpp.

◆ iterateObjects()

void TeamPrototype::iterateObjects ( ObjectIterateFunc func,
void * userData )

Iterate all members of the team

Definition at line 992 of file Team.cpp.

◆ loadPostProcess()

void TeamPrototype::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 1298 of file Team.cpp.

◆ moveTeamTo()

void TeamPrototype::moveTeamTo ( Coord3D destination)

Move team to destination.

Definition at line 1119 of file Team.cpp.

◆ setAttackPriorityName()

void TeamPrototype::setAttackPriorityName ( const AsciiString & name)
inline

Definition at line 635 of file Team.h.

◆ setControllingPlayer()

void TeamPrototype::setControllingPlayer ( Player * newController)

set the team's owner. (NULL is not allowed)

Definition at line 887 of file Team.cpp.

◆ teamAboutToBeDeleted()

void TeamPrototype::teamAboutToBeDeleted ( Team * team)

Definition at line 913 of file Team.cpp.

◆ updateState()

void TeamPrototype::updateState ( void )

Checks & clears the flags that a team member entered or exited a trigger area, or was created.

Definition at line 1055 of file Team.cpp.

◆ xfer()

void TeamPrototype::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 1199 of file Team.cpp.


The documentation for this class was generated from the following files: