mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-24 00:53:35 +00:00
Fix implant stamina draining permanently when the client tries to activate an already active implant (#415)
This commit is contained in:
parent
70e59effec
commit
8046fbe0ba
1 changed files with 6 additions and 4 deletions
|
|
@ -22,10 +22,7 @@ import scala.concurrent.duration._
|
|||
import scala.collection.mutable
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
||||
/**
|
||||
* na;
|
||||
* stub for future development
|
||||
*/
|
||||
|
||||
class PlayerControl(player : Player) extends Actor
|
||||
with JammableBehavior
|
||||
with Damageable {
|
||||
|
|
@ -58,7 +55,12 @@ class PlayerControl(player : Player) extends Actor
|
|||
implantSlot.Installed match {
|
||||
case Some(implant: ImplantDefinition) =>
|
||||
if(implantSlot.Active) {
|
||||
// Some events such as zoning will reset the implant on the client side without sending a deactivation packet
|
||||
// But the implant will remain in an active state server side. For now, allow reactivation of the implant.
|
||||
// todo: Deactivate implants server side when actions like zoning happen. (Other actions?)
|
||||
log.warn(s"Implant ${slot} is already active, but activating again")
|
||||
implantSlotStaminaDrainTimers(slot).cancel()
|
||||
implantSlotStaminaDrainTimers(slot) = DefaultCancellable.obj
|
||||
}
|
||||
implantSlot.Active = true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue