aboutsummaryrefslogtreecommitdiff
path: root/build/test.py
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-12 06:53:52 -0700
committerFuwn <[email protected]>2024-06-12 06:53:52 -0700
commitf1d1e303a2ff0cd81001eb0283eeb3741c126588 (patch)
treef1fdb613b7a7a5c57eeb7c6480d1cdae6c372799 /build/test.py
parentrefactor: clearer network protobuf names (diff)
downloadworldserver-protobufs-f1d1e303a2ff0cd81001eb0283eeb3741c126588.tar.xz
worldserver-protobufs-f1d1e303a2ff0cd81001eb0283eeb3741c126588.zip
refactor: clearer comamnd names
Diffstat (limited to 'build/test.py')
-rw-r--r--build/test.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/build/test.py b/build/test.py
index 417e9eb..f23bbc4 100644
--- a/build/test.py
+++ b/build/test.py
@@ -1,14 +1,16 @@
import NetworkPacket_pb2
-import BuddyListNotifyCmd_pb2
+import BuddyListNotifyCommand_pb2
request = NetworkPacket_pb2.NetworkPacket()
request.length = 3
request.short_object_id = 0xFF
request.type = 0x0A
-request.buddy_list_notify_cmd.CopyFrom(BuddyListNotifyCmd_pb2.BuddyListNotifyCmd())
-request.buddy_list_notify_cmd.buddy_name = "Whirl"
-request.buddy_list_notify_cmd.logged_on = 1
+request.buddy_list_notify_command.CopyFrom(
+ BuddyListNotifyCommand_pb2.BuddyListNotifyCommand()
+)
+request.buddy_list_notify_command.buddy_name = "Whirl"
+request.buddy_list_notify_command.logged_on = 1
print(request.SerializeToString())
print(request.WhichOneof("command"))
@@ -20,5 +22,5 @@ deserialised_request.ParseFromString(request.SerializeToString())
print(deserialised_request.length)
print(deserialised_request.short_object_id)
print(deserialised_request.type)
-print(deserialised_request.buddy_list_notify_cmd.buddy_name)
-print(deserialised_request.buddy_list_notify_cmd.logged_on)
+print(deserialised_request.buddy_list_notify_command.buddy_name)
+print(deserialised_request.buddy_list_notify_command.logged_on)