Permalink
Browse files

Part 2

  • Loading branch information...
1 parent c40e9b9 commit bad50f7d2310244d8e9fc4bdc15fd166d944447a Keabard committed Mar 27, 2012
Showing with 13 additions and 7 deletions.
  1. +13 −7 lib/honcore/networking.py
View
20 lib/honcore/networking.py
@@ -1020,14 +1020,18 @@ def send_auth_info(self, player_name, cookie, ip, acc_key, account_id, acc_key_h
magic_c = Struct("magic_packet",
ULInt16("hon_connection_id"),
- ULInt16("id"),
- String("hon_name", len("Heroes of Newerth")+1, encoding="utf8", padchar = "\x00"),
- String("server_version", len(HON_SERVER_VERSION)+1, encoding="utf8", padchar = "\x00"),
- ULInt32("host_id"),
- ULInt16("connection_id"),
- Byte("break_byte"))
+ ULInt16("magic_int"))
- magic_packet = c.build(Container())
+ magic_packet = magic_c.build(Container(
+ hon_connection_id = HON_CONNECTION_ID,
+ magic_int = 0xc901
+ ))
+
+ try:
+ for i in range(4):
+ self.send(magic_packet)
+ except socket.error, e:
+ raise GameServerError()
def send_magic_packet(self):
""" Sends the post-authentication magic packet to the game server
@@ -1112,6 +1116,8 @@ def parse_server_state(self, packet):
Packet ID: 0x03
"""
+ print 'PACKET : %s'%len(packet)
+
c = Struct('game_server_state',
ULInt16('null_int'),
Byte('byte_id'),

0 comments on commit bad50f7

Please sign in to comment.