def createMapMessage(command):
    """
        Returns a new map message of the given type.
    """
    newPyDatagram = PyDatagram()
    newPyDatagram.addUint8(MAP_MESSAGE)
    newPyDatagram.addString32(command)
    return newPyDatagram
Ejemplo n.º 2
0
 def PARTY_UPDATED(self, yourturn, chars, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_UPDATED')
     myPyDatagram.addBool(yourturn)
     myPyDatagram.addString32(json.dumps(chars))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 3
0
 def PARTY_JOINED(self, party, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_JOINED')
     myPyDatagram.addString32(json.dumps(party))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 4
0
 def START_FORMATION(self, tileset, team, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('START_FORMATION')
     myPyDatagram.addString32(json.dumps(tileset))
     myPyDatagram.addString32(json.dumps(team))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 5
0
 def PARTY_LIST(self, parties, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_LIST')
     myPyDatagram.addString32(json.dumps(parties))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 6
0
 def PARTY_JOIN_FAIL(self, name, parties, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_JOIN_FAIL')
     myPyDatagram.addString('Party '+name+' is full.')
     myPyDatagram.addString32(json.dumps(parties))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 7
0
 def PARTY_UPDATED(self, yourturn, chars, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_UPDATED')
     myPyDatagram.addBool(yourturn)
     myPyDatagram.addString32(json.dumps(chars))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 8
0
 def START_BATTLE(self, party, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('START_BATTLE')
     myPyDatagram.addString32(json.dumps(party))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 9
0
 def START_FORMATION(self, tileset, team, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('START_FORMATION')
     myPyDatagram.addString32(json.dumps(tileset))
     myPyDatagram.addString32(json.dumps(team))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 10
0
 def PARTY_JOINED(self, party, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_JOINED')
     myPyDatagram.addString32(json.dumps(party))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 11
0
 def PARTY_JOIN_FAIL(self, name, parties, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_JOIN_FAIL')
     myPyDatagram.addString('Party ' + name + ' is full.')
     myPyDatagram.addString32(json.dumps(parties))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 12
0
 def PARTY_LIST(self, parties, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('PARTY_LIST')
     myPyDatagram.addString32(json.dumps(parties))
     self.cWriter.send(myPyDatagram, player)
Ejemplo n.º 13
0
 def START_BATTLE(self, party, player):
     myPyDatagram = PyDatagram()
     myPyDatagram.addString('START_BATTLE')
     myPyDatagram.addString32(json.dumps(party))
     self.cWriter.send(myPyDatagram, player)