mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-17 11:20:40 +00:00
* extensive modifications to source entry shorthand * moving 11 files changes 55 other files * added score card classes; upgraded packet classes * I decided to import over everything * proliferation of in-game activity messages, especially for spawning activity; removed defaults for activities; fixed (most?) building tests * upkeep on the LLU's managing service, as well as the facility hack management service, in response to a potential bug * a facility that changes faction affiliation while it is the destination of an LLU delivery will cancel that LLU delivery * fixed crash due to boomer trigger overriding position of ace, without the ace being properly cleaned up on the client of the bomber; fixed issue with the boomer trigger going missing * flipped the first two FDU deployable settings so they match the correct fire modes; corrected a stack overflow situation with the sourcing entities * action, but no response * condensed parameters on avatar class * as always, fixing tests * quickly, loose ends tied
30 lines
826 B
Scala
30 lines
826 B
Scala
// Copyright (c) 2017 PSForever
|
|
package game
|
|
|
|
import org.specs2.mutable._
|
|
import net.psforever.packet._
|
|
import net.psforever.packet.game._
|
|
import net.psforever.types.{ExperienceType, PlanetSideGUID}
|
|
import scodec.bits._
|
|
|
|
class BattleExperienceMessageTest extends Specification {
|
|
val string = hex"B4 8A0A E7030000 00"
|
|
|
|
"decode" in {
|
|
PacketCoding.decodePacket(string).require match {
|
|
case BattleExperienceMessage(player_guid, experience, unk) =>
|
|
player_guid mustEqual PlanetSideGUID(2698)
|
|
experience mustEqual 999
|
|
unk mustEqual ExperienceType.Normal
|
|
case _ =>
|
|
ko
|
|
}
|
|
}
|
|
|
|
"encode" in {
|
|
val msg = BattleExperienceMessage(PlanetSideGUID(2698), 999, ExperienceType.Normal)
|
|
val pkt = PacketCoding.encodePacket(msg).require.toByteVector
|
|
|
|
pkt mustEqual string
|
|
}
|
|
}
|