From c8b5781443279d919bab007521e1e4a129645cc3 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 31 Dec 2019 01:28:50 -0400 Subject: [PATCH] remove manual padding --- src/packet/ship.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/packet/ship.rs b/src/packet/ship.rs index 628099b..7f73916 100644 --- a/src/packet/ship.rs +++ b/src/packet/ship.rs @@ -257,12 +257,7 @@ pub struct PlayerChat { } impl PlayerChat { - pub fn new(guildcard: u32, mut message: String) -> PlayerChat { - let mut mlen = (message.len() * 2) + 0x12; - while mlen & 0x07 != 0 { - message.push('\0'); - mlen += 1; - } + pub fn new(guildcard: u32, message: String) -> PlayerChat { PlayerChat { unknown: 0x00010000, guildcard: guildcard,