mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-27 07:49:11 +00:00
Restructure repository
* Move /common/src to /src * Move services to net.psforever package * Move /pslogin to /server
This commit is contained in:
parent
89a30ae6f6
commit
f4fd78fc5d
958 changed files with 527 additions and 725 deletions
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package game
|
||||
|
||||
import org.specs2.mutable._
|
||||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
import scodec.bits._
|
||||
|
||||
class MoveItemMessageTest extends Specification {
|
||||
val string = hex"11 4C00 4B00 4B00 0900 0100"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case MoveItemMessage(item_guid, avatar_guid_1, avatar_guid_2, dest, unk1) =>
|
||||
item_guid mustEqual PlanetSideGUID(76)
|
||||
avatar_guid_1 mustEqual PlanetSideGUID(75)
|
||||
avatar_guid_2 mustEqual PlanetSideGUID(75)
|
||||
dest mustEqual 9
|
||||
unk1 mustEqual 1
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = MoveItemMessage(PlanetSideGUID(76), PlanetSideGUID(75), PlanetSideGUID(75), 9, 1)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue