Skip to content

darfink/muonline-packet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mu Online Packet

This is an implementation of the network packet used in the MMORPG Mu Online. It supports C1/C2 XOR encryption as well as the symmetric-key algorithm used in C3/C4 packets.

Features

  • serialize: Includes derive, serialization and deserializaition.
  • codec: Includes a Tokio IO codec ready for use.

Example

Packet - derive

use serde::{Serialize, Deserialize};
use muonline_packet::{Packet, PacketEncodable, PacketDecodable};

#[derive(Serialize, Deserialize, Packet, Debug, PartialEq, Eq)]
#[packet(kind = "C1", code = "18")]
struct CharacterAction {
  direction: u8,
  action: u8,
}

fn main() {
  let action = CharacterAction { direction: 3, action: 7 };
  let packet = action.to_packet().unwrap();
  assert_eq!(&packet.to_bytes(), &[0xC1, 0x05, 0x18, 0x3, 0x7]);

  let action2 = CharacterAction::from_packet(&packet).unwrap();
  assert_eq!(action, action2);
}

About

An implementation Mu Online's network packet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy