Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Outfit packets #1187

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/scala/net/psforever/actors/net/MiddlewareActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class MiddlewareActor(
send(ServerStart(nonce, serverNonce), None, None)
cryptoSetup()

case (Unknown30(_), _) =>
case (Unknown30(_, _), _) =>
/*
Unknown30 is used to reuse an existing crypto session when switching from login to world
When not handling it, it appears that the client will fall back to using ClientStart
Expand Down Expand Up @@ -586,7 +586,7 @@ class MiddlewareActor(
case ClientStart(_) =>
start()

case Unknown30(_) =>
case Unknown30(_, _) =>
/*
Unknown30 is used to reuse an existing crypto session when switching from login to world
When not handling it, it appears that the client will fall back to using ClientStart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
package net.psforever.actors.session.support

import akka.actor.{ActorContext, ActorRef, typed}
import scala.concurrent.duration._
//
import net.psforever.actors.session.AvatarActor
import net.psforever.objects.Vehicle
import net.psforever.packet.game.{AvatarDeadStateMessage, BroadcastWarpgateUpdateMessage, DeadState, HotSpotInfo => PacketHotSpotInfo, HotSpotUpdateMessage, ZoneInfoMessage, ZonePopulationUpdateMessage}
import net.psforever.services.Service
import net.psforever.packet.game.{BroadcastWarpgateUpdateMessage, HotSpotInfo => PacketHotSpotInfo, HotSpotUpdateMessage, ZoneInfoMessage, ZonePopulationUpdateMessage}
import net.psforever.services.galaxy.GalaxyResponse
import net.psforever.types.{MemberAction, PlanetSideEmpire}

Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/net/psforever/packet/GamePacketOpcode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,13 @@ object GamePacketOpcode extends Enumeration {
case 0x8a => game.PlayerStasisMessage.decode
case 0x8b => noDecoder(UnknownMessage139)
case 0x8c => game.OutfitMembershipRequest.decode
case 0x8d => noDecoder(OutfitMembershipResponse)
case 0x8d => game.OutfitMembershipResponse.decode
case 0x8e => game.OutfitRequest.decode
case 0x8f => noDecoder(OutfitEvent)
case 0x8f => game.OutfitEvent.decode

// OPCODES 0x90-9f
case 0x90 => noDecoder(OutfitMemberEvent)
case 0x91 => noDecoder(OutfitMemberUpdate)
case 0x90 => game.OutfitMemberEvent.decode
case 0x91 => game.OutfitMemberUpdate.decode
case 0x92 => game.PlanetsideStringAttributeMessage.decode
case 0x93 => game.DataChallengeMessage.decode
case 0x94 => game.DataChallengeMessageResp.decode
Expand Down
12 changes: 10 additions & 2 deletions src/main/scala/net/psforever/packet/control/Unknown30.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ import net.psforever.packet.{ControlPacketOpcode, Marshallable, PlanetSideContro
import scodec.Codec
import scodec.codecs._

final case class Unknown30(clientNonce: Long) extends PlanetSideControlPacket {
// Probably a more lightweight variant of ClientStart, containing client and server nonce
// will be received when sending a ConnectionClose() (after client requests world connection info)
final case class Unknown30(
clientNonce: Long,
serverNonce: Long
) extends PlanetSideControlPacket {
type Packet = Unknown30
def opcode = ControlPacketOpcode.Unknown30
def encode = Unknown30.encode(this)
}

object Unknown30 extends Marshallable[Unknown30] {
implicit val codec: Codec[Unknown30] = ("client_nonce" | uint32L).as[Unknown30]
implicit val codec: Codec[Unknown30] = (
("client_nonce" | uint32L) ::
("server_nonce" | uint32L)
).as[Unknown30]
}
Loading
Loading