LootItwemMessage documentation

This commit is contained in:
FateJH 2018-05-10 23:11:52 -04:00
parent 1d956c834c
commit 34210fe581

View file

@ -6,13 +6,20 @@ import scodec.Codec
import scodec.codecs._
/**
* na
* Dispatched by the client when the user right-clicks on a piece of `Equipment`
* in an inventory that is not his own backpack
* in an attempt to quick-swap that `Equipment` into his inventory.
* Examples of this "other" inventory include: corpses, lockers, and vehicle trunks.<br>
* <br>
* Compared to `MoveItemMessage`, the source location where `item` currently resides is not provided.
* Additionally, while the over-all destination is provided, the specific insertion point of the destination is not.
* @see `MoveItemMessage`
* @param item_guid the item being taken
* @param target_guid what is taking the item;
* in general, usually the player who is doing the taking
* @param destination_guid where the item will be placed;
* generally, the player is taking the item
*/
final case class LootItemMessage(item_guid : PlanetSideGUID,
target_guid : PlanetSideGUID
destination_guid : PlanetSideGUID
) extends PlanetSideGamePacket {
type Packet = LootItemMessage
def opcode = GamePacketOpcode.LootItemMessage
@ -22,6 +29,6 @@ final case class LootItemMessage(item_guid : PlanetSideGUID,
object LootItemMessage extends Marshallable[LootItemMessage] {
implicit val codec : Codec[LootItemMessage] = (
("item_guid" | PlanetSideGUID.codec) ::
("target_guid" | PlanetSideGUID.codec)
("destination_guid" | PlanetSideGUID.codec)
).as[LootItemMessage]
}