mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-24 14:29:08 +00:00
Merge pull request #139 from Fate-JH/unuse-item
Packet: UnuseItemMessage
This commit is contained in:
commit
e092ad6980
4 changed files with 63 additions and 2 deletions
|
|
@ -363,7 +363,7 @@ object GamePacketOpcode extends Enumeration {
|
|||
case 0x23 => noDecoder(ActionCancelAcknowledgeMessage)
|
||||
case 0x24 => game.SetEmpireMessage.decode
|
||||
case 0x25 => game.EmoteMsg.decode
|
||||
case 0x26 => noDecoder(UnuseItemMessage)
|
||||
case 0x26 => game.UnuseItemMessage.decode
|
||||
case 0x27 => game.ObjectDetachMessage.decode
|
||||
// 0x28
|
||||
case 0x28 => game.CreateShortcutMessage.decode
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package net.psforever.packet.game
|
||||
|
||||
import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacket}
|
||||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
/**
|
||||
* Dispatched by the client when its player is done using something.<br>
|
||||
* <br>
|
||||
* The common example is sifting through backpacks, an activity that only one player is allowed to do at a time.
|
||||
* When a backpack is accessed by one player, other players are blocked.
|
||||
* When the first player is done accessing the backpack, this packet informs the server so other players may be allowed access.
|
||||
* @param player_guid the player
|
||||
* @param item_guid the item
|
||||
*/
|
||||
final case class UnuseItemMessage(player_guid : PlanetSideGUID,
|
||||
item_guid : PlanetSideGUID)
|
||||
extends PlanetSideGamePacket {
|
||||
type Packet = UnuseItemMessage
|
||||
def opcode = GamePacketOpcode.UnuseItemMessage
|
||||
def encode = UnuseItemMessage.encode(this)
|
||||
}
|
||||
|
||||
object UnuseItemMessage extends Marshallable[UnuseItemMessage] {
|
||||
implicit val codec : Codec[UnuseItemMessage] = (
|
||||
("player_guid" | PlanetSideGUID.codec) ::
|
||||
("item_guid" | PlanetSideGUID.codec)
|
||||
).as[UnuseItemMessage]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue