made woopsie, fix
This commit is contained in:
parent
f9a1b4c594
commit
500dd6a899
@ -67,7 +67,7 @@ class Client(ClientBase):
|
||||
if not self._channels:
|
||||
return
|
||||
|
||||
await self.send_packet(iPacket(SendOps.CHARLIST_REQUEST))
|
||||
await self.send_packet(oPacket(SendOps.CHARLIST_REQUEST))
|
||||
return
|
||||
|
||||
world_name = ipkt.decode_string()
|
||||
|
@ -120,11 +120,10 @@ class ClientBase:
|
||||
else:
|
||||
nbytes = -1
|
||||
|
||||
await sleep(0.5)
|
||||
|
||||
async with self._lock:
|
||||
buf = bytearray(self._buff)[4:length + 4][:]
|
||||
|
||||
print(length, len(buf))
|
||||
|
||||
if length == len(buf):
|
||||
buf = MapleAes.transform(buf, self._recv_iv)
|
||||
buf = decrypt_transform(buf)
|
||||
@ -139,9 +138,10 @@ class ClientBase:
|
||||
def handle_packet(self, packet):
|
||||
coro = None
|
||||
|
||||
for packet_handler in self._packet_handlers:
|
||||
if packet_handler.op_code == packet.op_code:
|
||||
coro = packet_handler.callback
|
||||
for pkt_hndl in self._packet_handlers:
|
||||
print(f"handler: {pkt_hndl.op_code} | packet: {packet.op_code}")
|
||||
if int(pkt_hndl.op_code) == int(packet.op_code):
|
||||
coro = pkt_hndl.callback
|
||||
break
|
||||
else:
|
||||
print(f"Unhandled packet: {packet.op_code}")
|
||||
|
Loading…
Reference in New Issue
Block a user