Exemple #1
0
 def move(self, gamedata, connection, handler):    
     (charId,b0, b1, b2, b3, b4, b5) = struct.unpack('4sBBBBBB', gamedata[2:12])
     (x0, y0, x1, y1) = util.getPos2(b0, b1, b2, b3, b4, b5)
     (connection.x, connection.y) = x0, y0
     for h in handler:
         h(charId,x0, y0, x1, y1)
Exemple #2
0
 def walkOk(self, gamedata, connection, handler):    
     (b0, b1, b2, b3, b4, b5) = struct.unpack('BBBBBB', gamedata[6:12])
     (x0, y0, x1, y1) = util.getPos2(b0, b1, b2, b3, b4, b5)
     (connection.x, connection.y) = x0, y0
     for h in handler:
         h(x0, y0, x1, y1)