Packages

o

net.psforever.login

WorldSession

object WorldSession

Source
WorldSession.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WorldSession
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def BuyNewEquipmentPutInInventory(obj: PlanetSideServerObject with Container, player: Player, term: PlanetSideGUID)(item: Equipment): TaskBundle

    Used for purchasing new equipment from a terminal and placing it somewhere in a player's loadout.

    Used for purchasing new equipment from a terminal and placing it somewhere in a player's loadout. Two levels of query are performed here based on the behavior expected of the item. First, an attempt is made to place the item anywhere in the target container as long as it does not cause swap items to be generated. Second, if it fails admission to the target container, an attempt is made to place it into the target player's free hand. If the container and the suggested player are the same, it will skip the second attempt. As a terminal operation, the player must receive a report regarding whether the transaction was successful.

    obj

    the container

    player

    na

    term

    na

    item

    the item being manipulated

    returns

    a TaskBundle object

    See also

    ask

    Containable.CanNotPutItemInSlot

    Containable.PutItemInSlotOnly

    GUIDTask.registerEquipment

    GUIDTask.unregisterEquipment

    Future.onComplete

    PutEquipmentInInventorySlot

    TerminalMessageOnTimeout

  5. def CallBackForTask(task: TaskBundle, sendTo: ActorRef, pass: Any): TaskBundle
  6. def ContainableMoveItem(toChannel: String, source: PlanetSideServerObject with Container, destination: PlanetSideServerObject with Container, item: Equipment, dest: Int): Unit

    Move an item from one container to another.

    Move an item from one container to another. If the source or if the destination is a kind of container called a LockerContainer, then a special procedure for the movement of the item must be respected. If the source and the destination are both LockerContainer objects, however, the normal operations for moving an item may be executed.

    toChannel

    broadcast channel name for a manual packet callback

    source

    the container in which the item is to be removed

    destination

    the container into which the item is to be placed

    item

    the item

    dest

    where in the destination container the item is being placed

    See also

    ActorRef

    Containable.MoveItem

    Container

    Equipment

    LockerContainer

    RemoveEquipmentFromLockerContainer

    StowEquipmentInLockerContainer

    TaskBundle

  7. def CountAmmunition(e: Equipment): Int

    The counting function for an item of AmmoBox.

    The counting function for an item of AmmoBox. Counts the Capacity of the ammunition.

    e

    the Equipment object

    returns

    the quantity

  8. def CountGrenades(e: Equipment): Int

    The counting function for an item of Tool where the item is also a grenade.

    The counting function for an item of Tool where the item is also a grenade. Counts the number of grenades.

    e

    the Equipment object

    returns

    the quantity

    See also

    GlobalDefinitions.isGrenade

  9. def DefaultCount(e: Equipment): Int

    The default counting function for an item.

    The default counting function for an item. Counts the number of item(s).

    e

    the Equipment object

    returns

    the quantity; always one

  10. def DropEquipmentFromInventory(obj: PlanetSideServerObject with Container)(item: Equipment, pos: Option[Vector3] = None): Future[Any]

    Remove an item from a container and drop it on the ground.

    Remove an item from a container and drop it on the ground.

    obj

    the container to search

    item

    the item to find and remove from the container

    pos

    an optional position where to drop the item on the ground; expected override from original container's position

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    AvatarAction.ObjectDelete

    Containable.ItemFromSlot

    Containable.RemoveItemFromSlot

    Future.onComplete

    Future.recover

    tell

    Zone.AvatarEvents

    Zone.Ground.DropItem

  11. def DropLeftovers(container: PlanetSideServerObject with Container)(drops: Iterable[InventoryItem]): Unit

    Drop some items on the ground is a given location.

    Drop some items on the ground is a given location. The location corresponds to the previous container for those items.

    container

    the original object that contained the items

    drops

    the items to be dropped on the ground

    See also

    Zone.Ground.DropItem

  12. def FindAmmoBoxThatUses(ammo: objects.equipment.Ammo.Value)(e: Equipment): Boolean

    Flag an AmmoBox object that matches for the given ammunition type.

    Flag an AmmoBox object that matches for the given ammunition type.

    ammo

    the type of Ammo to check

    e

    the Equipment object

    returns

    true, if the object is an AmmoBox of the correct ammunition type; false, otherwise

  13. def FindEquipmentStock(obj: Container, filterTest: (Equipment) => Boolean, desiredAmount: Int, counting: (Equipment) => Int = DefaultCount): List[InventoryItem]

    Within a specified Container, find the smallest number of Equipment objects of a certain qualifying type whose sum count is greater than, or equal to, a desiredAmount based on an accumulator method.

    In an occupied List of returned Inventory entries, all but the last entry is typically considered "emptied." For objects with contained quantities, the last entry may require having that quantity be set to a non-zero number.

    Within a specified Container, find the smallest number of Equipment objects of a certain qualifying type whose sum count is greater than, or equal to, a desiredAmount based on an accumulator method.

    In an occupied List of returned Inventory entries, all but the last entry is typically considered "emptied." For objects with contained quantities, the last entry may require having that quantity be set to a non-zero number.

    obj

    the Container to search

    filterTest

    test used to determine inclusivity of Equipment collection

    desiredAmount

    how much is requested

    counting

    test used to determine value of found Equipment; defaults to one per entry

    returns

    a List of all discovered entries totaling approximately the amount requested

  14. def FindToolThatUses(ammo: objects.equipment.Ammo.Value)(e: Equipment): Boolean

    Flag a Tool object that matches for loading the given ammunition type.

    Flag a Tool object that matches for loading the given ammunition type.

    ammo

    the type of Ammo to check

    e

    the Equipment object

    returns

    true, if the object is a Tool that loads the correct ammunition type; false, otherwise

  15. def HoldNewEquipmentUp(player: Player)(item: Equipment, slot: Int): TaskBundle

    The primary use is to register new mechanized assault exo-suit armaments, place the newly registered weapon in hand, and then raise that hand (draw that slot) so that the weapon is active.

    The primary use is to register new mechanized assault exo-suit armaments, place the newly registered weapon in hand, and then raise that hand (draw that slot) so that the weapon is active. (Players in MAX suits can not manipulate their drawn slot manually.) In general, this can be used for any equipment that is to be equipped to a player's hand then immediately drawn. Do not allow the item to be (mis)placed in any available slot. Item swapping during the placement is not allowed and the possibility should be proactively avoided.

    player

    the player whose visible slot will be equipped and drawn

    item

    the item to equip

    slot

    the slot in which the item will be equipped

    returns

    a TaskBundle object

    Exceptions thrown

    `RuntimeException` if slot is not a player visible slot (holsters)

    See also

    ask

    AvatarAction.ObjectDelete

    AvatarAction.SendResponse

    Containable.CanNotPutItemInSlot

    Containable.PutItemInSlotOnly

    GUIDTask.registerEquipment

    GUIDTask.unregisterEquipment

    Future.onComplete

    ObjectHeldMessage

    Player.DrawnSlot

    Player.LastDrawnSlot

    Service.defaultPlayerGUID

    TaskBundle

    Zone.AvatarEvents

  16. def PickUpEquipmentFromGround(obj: PlanetSideServerObject with Container)(item: Equipment): Future[Any]

    Get an item from the ground and put it into the given container.

    Get an item from the ground and put it into the given container. The zone in which the item is found is expected to be the same in which the container object is located. If the object can not be placed into the container, it is put back on the ground. The item that was collected off the ground, if it is placed back on the ground, will be positioned with respect to the container object rather than its original location.

    obj

    the container into which the item will be placed

    item

    the item being collected from off the ground of the container's zone

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    AvatarAction.ObjectDelete

    Future.onComplete

    Zone.AvatarEvents

    Zone.Ground.CanNotPickUpItem

    Zone.Ground.ItemInHand

    Zone.Ground.PickUpItem

    PutEquipmentInInventoryOrDrop

  17. def PutEquipmentInInventoryOrDrop(obj: PlanetSideServerObject with Container)(item: Equipment): Future[Any]

    Use this for placing equipment that has already been registered into a container, such as in support of changing ammunition types in Tool objects (weapons).

    Use this for placing equipment that has already been registered into a container, such as in support of changing ammunition types in Tool objects (weapons). If the object can not be placed into the container, it will be dropped onto the ground. It will also be dropped if it takes too long to be placed. Item swapping during the placement is not allowed.

    obj

    the container

    item

    the item being manipulated

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    ChangeAmmoMessage

    Containable.CanNotPutItemInSlot

    Containable.PutItemAway

    Future.onComplete

    Future.recover

    tell

    Zone.Ground.DropItem

  18. def PutEquipmentInInventorySlot(obj: PlanetSideServerObject with Container)(item: Equipment, slot: Int): Future[Any]

    Use this for obtaining new equipment from a loadout specification.

    Use this for obtaining new equipment from a loadout specification. The loadout specification contains a specific slot position for placing the item. This request will (probably) be coincidental with a number of other such requests based on that loadout so items must be rigidly placed else cascade into a chaostic order. Item swapping during the placement is not allowed.

    obj

    the container

    item

    the item being manipulated

    slot

    na

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    AvatarAction.ObjectDelete

    ChangeAmmoMessage

    Containable.CanNotPutItemInSlot

    Containable.PutItemAway

    Future.onComplete

    Future.recover

    GUIDTask.unregisterEquipment

    tell

    Zone.AvatarEvents

  19. def PutLoadoutEquipmentInInventory(obj: PlanetSideServerObject with Container)(item: Equipment, slot: Int): TaskBundle

    Use this for obtaining new equipment from a loadout specification.

    Use this for obtaining new equipment from a loadout specification. The loadout specification contains a specific slot position for placing the item. This request will (probably) be coincidental with a number of other such requests based on that loadout so items must be rigidly placed else cascade into a chaostic order. Item swapping during the placement is not allowed.

    obj

    the container

    item

    the item being manipulated

    slot

    where the item will be placed in the container

    returns

    a TaskBundle object

    See also

    GUIDTask.registerEquipment

    PutEquipmentInInventorySlot

    Task

    TaskBundle

  20. def PutNewEquipmentInInventoryOrDrop(obj: PlanetSideServerObject with Container)(item: Equipment): TaskBundle

    Use this for placing equipment that has yet to be registered into a container, such as in support of changing ammunition types in Tool objects (weapons).

    Use this for placing equipment that has yet to be registered into a container, such as in support of changing ammunition types in Tool objects (weapons). Equipment will go wherever it fits in containing object, or be dropped if it fits nowhere. Item swapping during the placement is not allowed.

    obj

    the container

    item

    the item being manipulated

    returns

    a TaskBundle object

    See also

    ChangeAmmoMessage

    GUIDTask.registerEquipment

    PutEquipmentInInventoryOrDrop

    Task

    TaskBundle

  21. def PutNewEquipmentInInventorySlot(obj: PlanetSideServerObject with Container)(item: Equipment, slot: Int): TaskBundle

    Use this for placing equipment that has yet to be registered into a container, such as in support of changing ammunition types in Tool objects (weapons).

    Use this for placing equipment that has yet to be registered into a container, such as in support of changing ammunition types in Tool objects (weapons). Equipment will go wherever it fits in containing object, or be dropped if it fits nowhere. Item swapping during the placement is not allowed.

    obj

    the container

    item

    the item being manipulated

    returns

    a TaskBundle object

    See also

    ChangeAmmoMessage

    GUIDTask.registerEquipment

    PutEquipmentInInventoryOrDrop

    Task

    TaskBundle

  22. def QuickSwapToAGrenade(tplayer: Player, equipSlot: Int, log: Logger): Boolean

    Quickly draw a grenade from anywhere on the player's person and place it into a certain hand at the ready to be used as a weapon.

    Quickly draw a grenade from anywhere on the player's person and place it into a certain hand at the ready to be used as a weapon. Soldiers in mechanized assault exo-suits can not perform this action.

    This is not vanilla behavior.

    Search for a grenade of either fragmentation- or plasma-type in the hands (holsters) or backpack (inventory) and bring it to hand and draw that grenade as a weapon as quickly as possible. If the player has a weapon already drawn, remove it from his active hand quickly. It may be placed back into the slot once the hand is / will be occupied by a grenade. For anything in the first sidearm weapon slot, where the grenade will be placed, either find room in the backpack for it or drop it on the ground. If the player's already-drawn hand is the same as the one that will hold the grenade (first sidearm holster), treat it like the sidearm occupier rather than the already-drawn weapon - the old weapon goes into the backpack or onto the ground.

    tplayer

    player who wants to draw a grenade

    equipSlot

    slot being used as the final destination for any discovered grenade

    log

    reference to the messaging protocol

    returns

    if there was a discovered grenade

    See also

    AvatarAction.ObjectHeld

    AvatarServiceMessage

    Containable.RemoveItemFromSlot

    countRestrictAttempts

    forcedTolowerRaisedArm

    GlobalDefinitions.isGrenade

    InventoryItem

    Player.DrawnSlot

    Player.HandsDownSlot

    Player.Holsters

    Player.ResistArmMotion

    Player.Slot

    PutEquipmentInInventoryOrDrop

    PutEquipmentInInventorySlot

    TaskBundle

    TaskToHoldEquipmentUp

    TaskWorkflow.execute

  23. def RemoveEquipmentFromLockerContainer(toChannel: String, source: PlanetSideServerObject with Container, destination: PlanetSideServerObject with Container, item: Equipment, dest: Int): Unit

    Remove an item from a player's locker inventory.

    Remove an item from a player's locker inventory. Failure of this process is not supported and may lead to irregular behavior.

    toChannel

    broadcast channel name for a manual packet callback

    source

    the container in which the item is to be removed

    destination

    the container into which the item is to be placed

    item

    the item

    dest

    where in the destination container the item is being placed

    See also

    ActorRef

    AvatarAction.ObjectDelete

    AvatarServiceMessage

    Containable.MoveItem

    Container

    Equipment

    GridInventory.CheckCollisionsVar

    GUIDTask.registerEquipment

    GUIDTask.unregisterEquipment

    IdentifiableEntity.Invalidate

    LockerContainer

    Service

    Task

    TaskBundle

    TaskBundle

    Zone.AvatarEvents

  24. def RemoveOldEquipmentFromInventory(obj: PlanetSideServerObject with Container)(item: Equipment): Future[Any]

    Remove an item from a container and delete it.

    Remove an item from a container and delete it.

    obj

    the container to search

    item

    the item to find and remove from the container

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    AvatarAction.ObjectDelete

    Containable.ItemFromSlot

    Containable.RemoveItemFromSlot

    Future.onComplete

    Future.recover

    GUIDTask.unregisterEquipment

    Zone.AvatarEvents

  25. def SellEquipmentFromInventory(obj: PlanetSideServerObject with Container, player: Player, term: PlanetSideGUID)(slot: Int): Future[Any]

    Primarily, remove an item from a container and delete it.

    Primarily, remove an item from a container and delete it. As a terminal operation, the player must receive a report regarding whether the transaction was successful. At the end of a successful transaction, and only a successful transaction, the item that was removed is no longer considered a valid game object. Contrasting RemoveOldEquipmentFromInventory which identifies the actual item to be eliminated, this function uses the slot where the item is (should be) located.

    obj

    the container to search

    player

    the player who used the terminal

    term

    the unique identifier number of the terminal

    slot

    from which slot the equipment is to be removed

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    ask

    Containable.ItemFromSlot

    Containable.RemoveItemFromSlot

    Future.onComplete

    Future.recover

    GUIDTask.unregisterEquipment

    RemoveOldEquipmentFromInventory

    TerminalMessageOnTimeout

    TerminalResult

  26. def StowEquipmentInLockerContainer(toChannel: String, source: PlanetSideServerObject with Container, destination: PlanetSideServerObject with Container, item: Equipment, dest: Int): Unit

    Move an item into a player's locker inventory.

    Move an item into a player's locker inventory. Handle any swap item that might become involved in the transfer. Failure of this process is not supported and may lead to irregular behavior.

    toChannel

    broadcast channel name for a manual packet callback

    source

    the container in which the item is to be removed

    destination

    the container into which the item is to be placed

    item

    the item

    dest

    where in the destination container the item is being placed

    See also

    ActorRef

    AvatarAction.ObjectDelete

    AvatarServiceMessage

    Containable.MoveItem

    Container

    Equipment

    GridInventory.CheckCollisionsVar

    GUIDTask.registerEquipment

    GUIDTask.unregisterEquipment

    IdentifiableEntity.Invalidate

    LockerContainer

    Service

    Task

    TaskBundle

    TaskBundle

    Zone.AvatarEvents

  27. def TaskToHoldEquipmentUp(player: Player)(item: Equipment, slot: Int): Task
  28. def TerminalMessageOnTimeout(future: Future[Any], terminalMessage: (Boolean) => Unit): Future[Any]

    If a timeout occurs on the manipulation, declare a terminal transaction failure.

    If a timeout occurs on the manipulation, declare a terminal transaction failure.

    future

    the item manipulation's Future object

    terminalMessage

    how to call the terminal message

    returns

    a Future that anticipates the resolution to this manipulation

    See also

    AskTimeoutException

    recover

  29. def TerminalResult(guid: PlanetSideGUID, player: Player, transaction: types.TransactionType.Value)(result: Boolean): Unit

    Announced the result of this player's terminal use, to the player that used the terminal.

    Announced the result of this player's terminal use, to the player that used the terminal. This is a necessary step for regaining terminal use which is naturally blocked by the client after a transaction request.

    guid

    the terminal's unique identifier

    player

    the player who used the terminal

    transaction

    what kind of transaction was involved in terminal use

    result

    the result of that transaction

    See also

    AvatarAction.TerminalOrderResult

    ItemTransactionResultMessage

    TransactionType

  30. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  31. implicit def boolToInt(b: Boolean): Int

    Convert a boolean value into an integer value.

    Convert a boolean value into an integer value. Use: true:Int or false:Int

    b

    true or false (or null)

    returns

    1 for true; 0 for false

  32. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  33. def countRestrictAttempts(count: Int)(player: Player, slot: Int): Boolean

    Restriction logic that stops the player from lowering or raising any drawn equipment a certain number of times.

    Restriction logic that stops the player from lowering or raising any drawn equipment a certain number of times. Reset to default restriction behavior when no longer valid.

    count

    number of times to stop the player from adjusting their arm

    player

    target player

    slot

    slot being switched to (unused here)

    returns

    if the motion is restricted

    See also

    Player.neverRestrict

    Player.ResistArmMotion

  34. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  35. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  36. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  37. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  38. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  39. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  44. def toString(): String
    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped