Packet refactoring.

This commit is contained in:
Filip Maj 2019-07-26 23:24:06 -04:00
parent 96641865bc
commit 0ec9c5576c
22 changed files with 115 additions and 109 deletions

View file

@ -19,9 +19,10 @@ along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
===========================================================================
*/
using Meteor.Common;
using System;
using System.IO;
using System.Text;
namespace Meteor.Map.packets.receive
{
@ -51,7 +52,7 @@ namespace Meteor.Map.packets.receive
posZ = binReader.ReadSingle();
posRot = binReader.ReadSingle();
logType = binReader.ReadUInt32();
message = Encoding.ASCII.GetString(binReader.ReadBytes(0x200)).Trim(new [] { '\0' });
message = Utils.ReadNullTermString(binReader, 0x200);
}
catch (Exception){
invalidPacket = true;