mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-07-16 08:55:18 +00:00
purchase another vehicle
This commit is contained in:
parent
93c3463985
commit
da74de288f
1 changed files with 4 additions and 1 deletions
|
|
@ -27,16 +27,19 @@ class SessionTerminalHandlers(
|
|||
) extends CommonSessionInterfacingFunctionality {
|
||||
private[support] var lastTerminalOrderFulfillment: Boolean = true
|
||||
private[support] var usingMedicalTerminal: Option[PlanetSideGUID] = None
|
||||
//player ran too far away from the terminal after ordering. Allows them to purchase another if they return
|
||||
private var wentOutOfRange = false
|
||||
|
||||
/* packets */
|
||||
|
||||
def handleItemTransaction(pkt: ItemTransactionMessage): Unit = {
|
||||
val ItemTransactionMessage(terminalGuid, transactionType, _, itemName, _, _) = pkt
|
||||
continent.GUID(terminalGuid) match {
|
||||
case Some(term: Terminal) if lastTerminalOrderFulfillment =>
|
||||
case Some(term: Terminal) if lastTerminalOrderFulfillment || wentOutOfRange =>
|
||||
val msg: String = if (itemName.nonEmpty) s" of $itemName" else ""
|
||||
log.info(s"${player.Name} is submitting an order - a $transactionType from a ${term.Definition.Name}$msg")
|
||||
lastTerminalOrderFulfillment = false
|
||||
wentOutOfRange = true
|
||||
sessionData.zoning.CancelZoningProcessWithDescriptiveReason("cancel_use")
|
||||
term.Actor ! Terminal.Request(player, pkt)
|
||||
case Some(_: Terminal) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue