mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
clear previous virus unlocks
This commit is contained in:
parent
144249bfb3
commit
becd5cf9b5
|
|
@ -195,7 +195,7 @@ class LocalHandlerLogic(val ops: SessionLocalHandlers, implicit val context: Act
|
|||
msg match {
|
||||
case m: GenericObjectActionMessage =>
|
||||
// delay building virus alert if player is dead/respawning
|
||||
if ((m.code == 58 || m.code == 60) && !sessionLogic.zoning.spawn.startEnqueueSquadMessages) {
|
||||
if ((m.code == 58 || m.code == 60 || m.code == 61) && !sessionLogic.zoning.spawn.startEnqueueSquadMessages) {
|
||||
sessionLogic.zoning.spawn.enqueueNewActivity(ActivityQueuedTask(
|
||||
SpawnOperations.delaySendGenericObjectActionMessage(msg), 1))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,29 @@ object GenericHackables {
|
|||
}
|
||||
else {
|
||||
//install virus
|
||||
val currVirus = building.virusId
|
||||
//clear previous virus unlocks to prevent virus stacking
|
||||
currVirus match {
|
||||
case 0L =>
|
||||
if (virus != 0) {
|
||||
building.HackableAmenities.filter(d => d.Definition == GlobalDefinitions.lock_external).foreach { iff =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zoneId,
|
||||
LocalAction.ClearTemporaryHack(PlanetSideGUID(0), iff)
|
||||
)
|
||||
}
|
||||
}
|
||||
case 4L =>
|
||||
if (virus != 4) {
|
||||
building.HackableAmenities.filter(d => d.Definition == GlobalDefinitions.order_terminal).foreach { term =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zoneId,
|
||||
LocalAction.ClearTemporaryHack(PlanetSideGUID(0), term)
|
||||
)
|
||||
}
|
||||
}
|
||||
case _ => ()
|
||||
}
|
||||
val virusLength: Map[Long, Int] = Map(
|
||||
0L -> 3600,
|
||||
1L -> 900,
|
||||
|
|
@ -217,6 +240,10 @@ object GenericHackables {
|
|||
LocalAction
|
||||
.HackTemporarily(pguid, zone, target, installedVirusDuration, hackClearValue, installedVirusDuration, unk2=hackState)
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.id,
|
||||
LocalAction.SendResponse(GenericObjectActionMessage(target.GUID, 61))
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.id,
|
||||
LocalAction.SendResponse(GenericObjectActionMessage(target.GUID, 58))
|
||||
|
|
|
|||
|
|
@ -109,11 +109,13 @@ trait FacilityHackParticipation extends ParticipationLogic {
|
|||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
val mainTerm = building.Amenities.filter(x => x.isInstanceOf[Terminal] && x.Definition == GlobalDefinitions.main_terminal).head.GUID
|
||||
val msg = AvatarAction.GenericObjectAction(Service.defaultPlayerGUID, mainTerm, 58)
|
||||
val msg1 = AvatarAction.GenericObjectAction(Service.defaultPlayerGUID, mainTerm, 61)
|
||||
val msg2 = AvatarAction.GenericObjectAction(Service.defaultPlayerGUID, mainTerm, 58)
|
||||
val events = building.Zone.AvatarEvents
|
||||
list.foreach(p =>
|
||||
events ! AvatarServiceMessage(p.Name, msg)
|
||||
)
|
||||
list.foreach { p =>
|
||||
events ! AvatarServiceMessage(p.Name, msg1)
|
||||
events ! AvatarServiceMessage(p.Name, msg2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ import shapeless.{::, HNil}
|
|||
* 56 - Sets vehicle or player to be black ops<br/>
|
||||
* 57 - Reverts player from black ops<br/>
|
||||
* 58 - Virus installed, changes lighting in facility to green
|
||||
* 60 - Virus purged
|
||||
* 61 - Virus recently installed. Counts down from 2 minutes until a new virus can be uploaded
|
||||
* <br>
|
||||
* What are these values?<br>
|
||||
* 90? - for observed driven BFR's, model pitches up slightly and stops idle animation<br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue