#include <LANGameInfo.h>
Inherits GameSlot.
Public Member Functions | |
| LANGameSlot () | |
| LANPlayer * | getUser (void) |
| Get the User structure associated with the slot (NULL for non-humans) | |
| Bool | isUser (LANPlayer *user) |
| Does this slot contain the given user? Based off user->name. | |
| Bool | isUser (UnicodeString userName) |
| Does this slot contain the given user? | |
| Bool | isLocalPlayer (void) const |
| Is this slot me? | |
| void | setLogin (UnicodeString name) |
| void | setLogin (AsciiString name) |
| void | setHost (UnicodeString name) |
| void | setHost (AsciiString name) |
| void | setSerial (AsciiString serial) |
| AsciiString | getSerial (void) |
| void | setLastHeard (UnsignedInt t) |
| UnsignedInt | getLastHeard (void) |
Public Member Functions inherited from GameSlot | |
| GameSlot () | |
| virtual void | reset () |
| void | setAccept (void) |
| Accept the current options. | |
| void | unAccept (void) |
| Unaccept (options changed, etc) | |
| Bool | isAccepted (void) const |
| Non-human slots are always accepted. | |
| void | setMapAvailability (Bool hasMap) |
| Set whether the slot has the map. | |
| Bool | hasMap (void) const |
| Non-human slots always have the map. | |
| void | setState (SlotState state, UnicodeString name=UnicodeString::TheEmptyString, UnsignedInt IP=0) |
| Set the slot's state (human, AI, open, etc) | |
| SlotState | getState (void) const |
| Get the slot state. | |
| void | setColor (Int color) |
| Int | getColor (void) const |
| void | setStartPos (Int startPos) |
| Int | getStartPos (void) const |
| void | setPlayerTemplate (Int playerTemplate) |
| Int | getPlayerTemplate (void) const |
| void | setTeamNumber (Int teamNumber) |
| Int | getTeamNumber (void) const |
| void | setName (UnicodeString name) |
| UnicodeString | getName (void) const |
| void | setIP (UnsignedInt IP) |
| UnsignedInt | getIP (void) const |
| void | setPort (UnsignedShort port) |
| UnsignedShort | getPort (void) const |
| void | setNATBehavior (FirewallHelperClass::FirewallBehaviorType NATBehavior) |
| FirewallHelperClass::FirewallBehaviorType | getNATBehavior () const |
| void | saveOffOriginalInfo (void) |
| Int | getOriginalPlayerTemplate (void) const |
| Int | getOriginalColor (void) const |
| Int | getOriginalStartPos (void) const |
| Int | getApparentPlayerTemplate (void) const |
| Int | getApparentColor (void) const |
| Int | getApparentStartPos (void) const |
| UnicodeString | getApparentPlayerTemplateDisplayName (void) const |
| Bool | isHuman (void) const |
| Is this slot occupied by a human player? | |
| Bool | isOccupied (void) const |
| Is this slot occupied (by a human or an AI)? | |
| Bool | isAI (void) const |
| Is this slot occupied by an AI? | |
| Bool | isPlayer (AsciiString userName) const |
| Does this slot contain the given user? | |
| Bool | isPlayer (UnicodeString userName) const |
| Does this slot contain the given user? | |
| Bool | isPlayer (UnsignedInt ip) const |
| Is this slot at this IP? | |
| Bool | isOpen (void) const |
| void | setLastFrameInGame (UnsignedInt frame) |
| void | markAsDisconnected (void) |
| UnsignedInt | lastFrameInGame (void) const |
| Bool | disconnected (void) const |
| void | mute (Bool isMuted) |
| Bool | isMuted (void) const |
Additional Inherited Members | |
Protected Attributes inherited from GameSlot | |
| SlotState | m_state |
| Bool | m_isAccepted |
| Bool | m_hasMap |
| Bool | m_isMuted |
| Int | m_color |
| color, or -1 for random | |
| Int | m_startPos |
| start position, or -1 for random | |
| Int | m_playerTemplate |
| PlayerTemplate. | |
| Int | m_teamNumber |
| alliance, -1 for none | |
| Int | m_origColor |
| color, or -1 for random | |
| Int | m_origStartPos |
| start position, or -1 for random | |
| Int | m_origPlayerTemplate |
| PlayerTemplate. | |
| UnicodeString | m_name |
| Only valid for human players. | |
| UnsignedInt | m_IP |
| Only valid for human players in LAN/WOL. | |
| UnsignedShort | m_port |
| Only valid for human players in LAN/WOL. | |
| FirewallHelperClass::FirewallBehaviorType | m_NATBehavior |
| The NAT behavior for this slot's player. | |
| UnsignedInt | m_lastFrameInGame |
| Bool | m_disconnected |
LANGameSlot class - maintains information about the contents of a game slot. This persists throughout the game.
Definition at line 43 of file LANGameInfo.h.
| LANGameSlot::LANGameSlot | ( | ) |
Definition at line 52 of file LANGameInfo.cpp.
|
inline |
Definition at line 62 of file LANGameInfo.h.
|
inline |
Definition at line 59 of file LANGameInfo.h.
| LANPlayer * LANGameSlot::getUser | ( | void | ) |
Get the User structure associated with the slot (NULL for non-humans)
Definition at line 58 of file LANGameInfo.cpp.
| Bool LANGameSlot::isLocalPlayer | ( | void | ) | const |
Is this slot me?
Definition at line 82 of file LANGameInfo.cpp.
Does this slot contain the given user? Based off user->name.
Definition at line 72 of file LANGameInfo.cpp.
| Bool LANGameSlot::isUser | ( | UnicodeString | userName | ) |
Does this slot contain the given user?
Definition at line 77 of file LANGameInfo.cpp.
|
inline |
Definition at line 57 of file LANGameInfo.h.
|
inline |
Definition at line 56 of file LANGameInfo.h.
|
inline |
Definition at line 61 of file LANGameInfo.h.
|
inline |
Definition at line 55 of file LANGameInfo.h.
|
inline |
Definition at line 54 of file LANGameInfo.h.
|
inline |
Definition at line 58 of file LANGameInfo.h.