final case class WeaponData(data: CommonFieldData, fire_mode: Int, ammo: List[InternalSlot], unk: Boolean = false) extends ConstructorData with Product with Serializable
A representation of a class of weapons that can be created using ObjectCreateMessage
packet data.
This data will help construct a "loaded weapon" such as a Suppressor or a Gauss.
Common uses include items deposited on the ground and items in another player's visible inventory (holsters).
The data for the weapons nests information for the default (current) type of ammunition and number of ammunitions in its magazine(s).
This ammunition data essentially is the weapon's magazines as numbered slots.
An "expected" number of ammunition slot data can be passed into the class for the purposes of validating input.
- data
na; commonly 8
- fire_mode
the current mode of weapon's fire; zero-indexed
- ammo
data regarding the currently loaded ammunition type(s)
- Source
- WeaponData.scala
- See also
AmmoBoxData
- Alphabetic
- By Inheritance
- WeaponData
- Serializable
- Product
- Equals
- ConstructorData
- StreamBitSize
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new WeaponData(data: CommonFieldData, fire_mode: Int, ammo: List[InternalSlot], unk: Boolean = false)
- data
na; commonly 8
- fire_mode
the current mode of weapon's fire; zero-indexed
- ammo
data regarding the currently loaded ammunition type(s)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val ammo: List[InternalSlot]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bitsize: Long
Performs a "sizeof()" analysis of the given object.
The calculation reflects thescodec Codec
definition rather than the explicit parameter fields.Performs a "sizeof()" analysis of the given object.
The calculation reflects thescodec Codec
definition rather than the explicit parameter fields. For example, a traditionalInt
is normally a 32-bit number, often rendered as a32u
number. When parsed with auintL(7)
, it's length will be considered 7 bits (7u
). (Note: being permanently signed, anscodec
value of32u
or longer must fit into aLong
type.)- returns
the number of bits necessary to measure an object of this class; defaults to
0L
- Definition Classes
- WeaponData → StreamBitSize
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val data: CommonFieldData
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val fire_mode: Int
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val unk: Boolean
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()