Module bzMessage :: Class InitInventory
[frames] | no frames]

Class InitInventory

source code


Init player inventory.

Message sent when connection accepted. 'BB' + 'BB%ds'*NbObject

Instance Methods
 
__init__(self, inventory=[]) source code
Byte Array. 'B' + 'B' + 'BB%ds'*NbObject
Encode(self, inventory=[])
Returns: the encoded data
source code
list of tuple [Integer, String]
Decode(self, data)
Returns: list of NbObject objects in inventory [quantity, object name]
source code

Inherited from ServerMessage: __repr__

Method Details

__init__(self, inventory=[])
(Constructor)

source code 
Overrides: ServerMessage.__init__

Encode(self, inventory=[])

source code 
Parameters:
  • inventory (list of tuple [quantity, object]) - list of owned objects
Returns: Byte Array. 'B' + 'B' + 'BB%ds'*NbObject
the encoded data

Decode(self, data)

source code 
Parameters:
  • data (Byte Array. 'B' + 'B' + 'BB%ds'*NbObject) - the data to decode.
Returns: list of tuple [Integer, String]
list of NbObject objects in inventory [quantity, object name]