From 318771ec824e7702044cf67a1f88fe2a350e734c Mon Sep 17 00:00:00 2001 From: FateJH Date: Tue, 10 Jan 2017 23:36:57 -0500 Subject: [PATCH] clarifying parameter (partially) --- .../packet/game/BattleExperienceMessage.scala | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/common/src/main/scala/net/psforever/packet/game/BattleExperienceMessage.scala b/common/src/main/scala/net/psforever/packet/game/BattleExperienceMessage.scala index 542f76daf..163db697d 100644 --- a/common/src/main/scala/net/psforever/packet/game/BattleExperienceMessage.scala +++ b/common/src/main/scala/net/psforever/packet/game/BattleExperienceMessage.scala @@ -16,14 +16,25 @@ import scodec.codecs._ *
* It is possible to award more battle experience than is necessary to progress one's character to the highest battle rank. * (This must be accomplished in a single event packet.) - * Only the most significant notification will be displayed. + * Only the most significant notifications will be displayed in that case. + * If the BEP has been modified, there will be an extra three bits to indicate which message to display.
+ *
+ * Messages:
+ * 0 - Normal
+ * 1 - Normal (repeat?)
+ * 2 - Support bonus ("due to support activity")
+ * 4 - Rabbit bonus ("+25% rabbit Bonus")
+ * (Support message has priority over Rabbit message.)
+ *
+ * Exploration:
+ * `msg = 1` probably does not do the same thing as `mod = 0`. * @param player_guid the player * @param experience the current total experience - * @param unk na; always zero? + * @param msg modifies the awarded experience message */ final case class BattleExperienceMessage(player_guid : PlanetSideGUID, experience : Long, - unk : Int) + msg : Int) extends PlanetSideGamePacket { type Packet = BattleExperienceMessage def opcode = GamePacketOpcode.BattleExperienceMessage @@ -33,7 +44,7 @@ final case class BattleExperienceMessage(player_guid : PlanetSideGUID, object BattleExperienceMessage extends Marshallable[BattleExperienceMessage] { implicit val codec : Codec[BattleExperienceMessage] = ( ("player_guid" | PlanetSideGUID.codec) :: - ("experience" | ulongL(32)) :: - ("unk" | uint8L) + ("experience" | uint32L) :: + ("msg" | uintL(3)) ).as[BattleExperienceMessage] }