Permalink
Browse files

Game Server stops spamming. Need to read HoNSlaught code with more at…

…tention :P
  • Loading branch information...
1 parent bad50f7 commit c677160fc1d8c85265316298b2fb94787da65214 @keabard committed Mar 28, 2012
Showing with 34 additions and 18 deletions.
  1. +1 −1 lib/honcore/client.py
  2. +33 −17 lib/honcore/networking.py
View
@@ -291,7 +291,7 @@ def _game_connect(self):
account_id = self.account.account_id,
acc_key_hash = self.account.acc_key_hash,
auth_hash = self.account.auth_hash)
- self.__game_socket.send_magic_packet()
+ #self.__game_socket.send_magic_packet()
except GameServerError:
raise # Re-raise the exception.
View
@@ -942,7 +942,7 @@ def on_server_state(self, packet_body):
packet = c.build(Container(
hon_connection_id=HON_CONNECTION_ID,
- server_state_response_byte = 5,
+ server_state_response_byte = 2,
packet_body=packet_body))
try:
@@ -1016,22 +1016,38 @@ def send_auth_info(self, player_name, cookie, ip, acc_key, account_id, acc_key_h
raise GameServerError(206)
- # Send the 4 first magic packets
-
- magic_c = Struct("magic_packet",
- ULInt16("hon_connection_id"),
- ULInt16("magic_int"))
-
- 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()
+# # Send the 4 first magic packets
+#
+# magic_c = Struct("magic_packet",
+# ULInt16("hon_connection_id"),
+# ULInt16("magic_int"))
+#
+# magic_packet = magic_c.build(Container(
+# hon_connection_id = 0,
+# magic_int = 0xc901
+# ))
+#
+# try:
+# for i in range(13):
+# self.send(magic_packet)
+# except socket.error, e:
+# raise GameServerError()
+#
+# # Send another magic packet
+# magic_c2 = Struct("magic_packet2",
+# ULInt16("hon_connection_id"),
+# Byte("magic_byte"),
+# ULInt32('magic_int'),
+# ULInt16('loading_state'))
+#
+# magic_packet2 = magic_c2.build(Container(
+# hon_connection_id = HON_CONNECTION_ID,
+# magic_byte = 3,
+# magic_int = 1,
+# loading_state = 50370
+# ))
+#
+# self.send(magic_packet2)
def send_magic_packet(self):
""" Sends the post-authentication magic packet to the game server

0 comments on commit c677160

Please sign in to comment.