summaryrefslogtreecommitdiff
path: root/network/map_server.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-12-15 14:23:25 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-12-15 14:23:25 +0100
commita14e88ff4d0d87841a44254e2bff1784da6e8b48 (patch)
tree0507cb8117da7943805a6479aef4526edb2db4dd /network/map_server.gd
parentca4d1945598863d0ce297f4272317e5dd5797f88 (diff)
next commit
Diffstat (limited to 'network/map_server.gd')
-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):