BigBrotherBot v1.5.0
System Development Information for the BigBrotherBot project.
Public Member Functions | Public Attributes | Static Public Attributes

b3::parsers::frostbite::util::PlayerInfoBlock Class Reference

List of all members.

Public Member Functions

def __init__
def __len__
def __getitem__
def getPlayerData
def __repr__

Public Attributes


Static Public Attributes

list playersData = []
int numOfParameters = 0
int numOfPlayers = 0
list parameterTypes = []

Detailed Description

help extract player info from a frostbite Player Info Block which we obtain
from admin.listPlayers

usage :
    words = [3, 'name', 'guid', 'ping', 2, 
        'Courgette', 'A32132e', 130, 
        'SpacepiG', '6546545665465', 120,
        'Bakes', '6ae54ae54ae5', 50]
    playersInfo = PlayerInfoBlock(words)
    print "num of players : %s" % len(playersInfo)
    print "first player : %s" % playersInfo[0]
    print "second player : %s" % playersInfo[1]
    print "the first 2 players : %s" % playersInfo[0:2]
    for p in playersInfo:
        print p

Constructor & Destructor Documentation

def b3::parsers::frostbite::util::PlayerInfoBlock::__init__ (   self,
Represent a frostbite Player info block
The standard set of info for a group of players contains a lot of different 
fields. To reduce the risk of having to do backwards-incompatible changes to
the protocol, the player info block includes some formatting information.
<number of parameters>       - number of parameters for each player 
N x <parameter type: string> - the parameter types that will be sent below 
<number of players>          - number of players following 
M x N x <parameter value>    - all parameter values for player 0, then all 
                    parameter values for player 1, etc
Current parameters:
  name     string     - player name 
  guid     GUID       - player GUID, or '' if GUID is not yet known 
  teamId   Team ID    - player's current team 
  squadId  Squad ID   - player's current squad 
  kills    integer    - number of kills, as shown in the in-game scoreboard
  deaths   integer    - number of deaths, as shown in the in-game scoreboard
  score    integer    - score, as shown in the in-game scoreboard 
  ping     integer    - ping (ms), as shown in the in-game scoreboard

Member Function Documentation

def b3::parsers::frostbite::util::PlayerInfoBlock::__getitem__ (   self,
Returns the player data, for provided key (int or slice)
def b3::parsers::frostbite::util::PlayerInfoBlock::__len__ (   self)
def b3::parsers::frostbite::util::PlayerInfoBlock::__repr__ (   self)
def b3::parsers::frostbite::util::PlayerInfoBlock::getPlayerData (   self,

Member Data Documentation

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties