BigBrotherBot v1.8.0
System Development Information for the BigBrotherBot project.

b3::parsers::frostbite2::util::PlayerInfoBlock Class Reference

List of all members.

Public Member Functions

def __init__
def __len__
def __getitem__
def __repr__
def __init__
def __len__
def __getitem__
def __repr__

Private Member Functions

def _getPlayerData
def _getPlayerData

Private Attributes

 _num_parameters
 _parameter_types
 _num_players
 _players_data

Detailed Description

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

usage :
    words = [3, 'name', 'guid', 'teamId', 2, 
        'Courgette', 'A32132e', 0, 
        'SpacepiG', '6546545665465', 1]
    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::frostbite2::util::PlayerInfoBlock::__init__ (   self,
  data 
)
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.
    
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 string - player�s unique ID 
    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
def b3::parsers::frostbite2::util::PlayerInfoBlock::__init__ (   self,
  data 
)
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.
    
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 string - player�s unique ID 
    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

Member Function Documentation

def b3::parsers::frostbite2::util::PlayerInfoBlock::__getitem__ (   self,
  key 
)
Returns the player data, for provided key (int or slice)
def b3::parsers::frostbite2::util::PlayerInfoBlock::__getitem__ (   self,
  key 
)
Returns the player data, for provided key (int or slice)
def b3::parsers::frostbite2::util::PlayerInfoBlock::__len__ (   self)
def b3::parsers::frostbite2::util::PlayerInfoBlock::__len__ (   self)
def b3::parsers::frostbite2::util::PlayerInfoBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::PlayerInfoBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::PlayerInfoBlock::_getPlayerData (   self,
  index 
) [private]
def b3::parsers::frostbite2::util::PlayerInfoBlock::_getPlayerData (   self,
  index 
) [private]

Member Data Documentation


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