Fixed mail decoding

This commit is contained in:
Josh-Larson
2024-10-05 13:42:12 -05:00
parent 733d356d0a
commit 2159f15199

View File

@@ -1,11 +1,10 @@
/***********************************************************************************
* Copyright (c) 2018 /// Project SWG /// www.projectswg.com *
* Copyright (c) 2024 /// Project SWG /// www.projectswg.com *
* *
* ProjectSWG is the first NGE emulator for Star Wars Galaxies founded on *
* ProjectSWG is an emulation project for Star Wars Galaxies founded on *
* July 7th, 2011 after SOE announced the official shutdown of Star Wars Galaxies. *
* Our goal is to create an emulator which will provide a server for players to *
* continue playing a game similar to the one they used to play. We are basing *
* it on the final publish of the game prior to end-game events. *
* Our goal is to create one or more emulators which will provide servers for *
* players to continue playing a game similar to the one they used to play. *
* *
* This file is part of PSWGCommon. *
* *
@@ -29,6 +28,7 @@ package com.projectswg.common.network.packets.swg.zone.chat;
import com.projectswg.common.data.encodables.player.Mail;
import com.projectswg.common.network.NetBuffer;
import com.projectswg.common.network.packets.SWGPacket;
import org.jetbrains.annotations.NotNull;
import java.time.Instant;
@@ -51,10 +51,10 @@ public class ChatPersistentMessageToClient extends SWGPacket {
}
@Override
public void decode(NetBuffer data) {
public void decode(@NotNull NetBuffer data) {
if (!super.checkDecode(data, CRC))
return;
mail = new Mail(null, null, null, 0);
mail = new Mail("", "", "", 0);
mail.setSender(data.getAscii());
data.getAscii(); // SWG
galaxy = data.getAscii();