/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteByte(Response); return p; }
/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteInt(SessionID); p.WriteByte(WorldID); return p; }
/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteString ( Login, Password ); p.WriteInt(SessionID); return p; }
/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteString(Session.AccountName); p.WriteString(Session.IPAddress); p.WriteInt ( Session.ID, Session.AccountID, Session.Login1, Session.Login2, Session.Play1, Session.Play2 ); p.InternalWriteDateTime(Session.StartTime); return p; }
/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteByte(( byte )Response); switch ( Response ) { case UserAuthenticationResponseType.UserAccepted: { p.WriteInt(UserID); p.WriteByte ( LastWorldID, AccessLevel ); break; } default: break; } return p; }
/// <summary> /// Converts current struct to it's <see cref="Packet"/> equivalent. /// </summary> /// <returns><see cref="Packet"/> equivalent of current struct.</returns> public Packet ToPacket() { Packet p = new OPPacket(Opcodes); p.WriteLong(RequestID); p.WriteByte(( byte )Result); return p; }