summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/map_server.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/network/map_server.gd b/network/map_server.gd
index cf6f2ad..24f0181 100644
--- a/network/map_server.gd
+++ b/network/map_server.gd
@@ -3,11 +3,24 @@ extends Server
signal logged_in(packet: MapServerLoginSuccessPacket)
+signal received_server_message(packet: ServerMessagePacket)
+signal received_broadcast_formatted_message(packet: BroadcastFormattedMessagePacket)
@warning_ignore("shadowed_variable")
func _init(host: String, port: int = 5121) -> void:
super._init(host, port)
+ _setup_signals()
+
+
+func _setup_signals():
+ received_packet.connect(func(packet: Packet):
+ if packet is ServerMessagePacket:
+ received_server_message.emit(packet)
+
+ if packet is BroadcastFormattedMessagePacket:
+ received_broadcast_formatted_message.emit(packet)
+ )
func login(account_id: int, character_id: int, login_id1: int, gender: Constants.Gender):