CTeam Class Reference
[Client API]

Team implementation on client side. More...

#include <CTeam.hh>

Inheritance diagram for CTeam:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CTeam (int team_id, CRules *r, CPlayerMsg *pm)
void loadConfig (const std::string &team_file)
 Load team configuration from xml.
void loadPlayerConfig (xml::XMLTeam &team, int player_id)
 Load player configuration from xml.
void placeTeam (int formation_id)
 Set the coordinates of all players on the field.
int beginAction (CPlayer *p, enum eAction action)
 Begin an action for the player Called from the UI.
int endAction ()
 End action of active player.
void msgTeamInfo (const MsgTeamInfo *m)
void msgPlayerCreate (const MsgPlayerCreate *m)
void msgAction (const MsgAction *m)
void msgReroll (const MsgReroll *m)
void msgTouchdooown (const MsgTouchdooown *m)

Detailed Description

Team implementation on client side.


Member Function Documentation

int CTeam::beginAction ( CPlayer p,
enum eAction  action 
)

Begin an action for the player Called from the UI.

References CPlayer::beginAction(), INVALID_REQUEST, and Player::stringify().

Referenced by Api::doBeginAction().

void CTeam::placeTeam ( int  formation_id  ) 

Set the coordinates of all players on the field.

Parameters:
formation_id The xml formation id to fetch coordinates from.
Exceptions:
XMLError Thrown on any xml error, including if the player coordinates can't be found in the xml file.

References Coordinates::col, xml::XMLFormation::getCoord(), xml::XMLFormation::hasCoord(), MAX_PLAYER, Team< CPlayer >::player_, MsgPlayerCoord::player_id, Coordinates::row, ROWS, BaseCRules::sendPacket(), xml::XMLFormation::switchFormationId(), and Team< CPlayer >::team_id_.

Referenced by Api::doPlaceTeam().


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 21:17:32 2010 for Stechec/TBT by  doxygen 1.6.3