mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-04-21 20:35:22 +00:00
force redraw of the whole boomer to assert reassignment of ownership; it's heavy-handed but it works
This commit is contained in:
parent
abfbf1c439
commit
3c4907c107
2 changed files with 15 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ import net.psforever.objects.vital.interaction.DamageInteraction
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
|
||||
import scala.annotation.unused
|
||||
|
|
@ -81,8 +82,14 @@ class BoomerDeployableControl(mine: BoomerDeployable)
|
|||
}
|
||||
|
||||
override def gainOwnership(player: Player): Unit = {
|
||||
mine.Faction = PlanetSideEmpire.NEUTRAL //force map icon redraw
|
||||
val originalOwner = mine.OwnerName
|
||||
super.gainOwnership(player, player.Faction)
|
||||
val events = mine.Zone.LocalEvents
|
||||
val msg = LocalAction.DeployItem(mine)
|
||||
originalOwner.collect { name =>
|
||||
events ! LocalServiceMessage(name, msg)
|
||||
}
|
||||
events ! LocalServiceMessage(player.Name, msg)
|
||||
}
|
||||
|
||||
override def dismissDeployable() : Unit = {
|
||||
|
|
|
|||
|
|
@ -1168,10 +1168,14 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
zone.GUID(trigger.Companion) match {
|
||||
case Some(obj: BoomerDeployable) =>
|
||||
val deployables = player.avatar.deployables
|
||||
if (deployables.Valid(obj)) {
|
||||
if (!deployables.Contains(obj) && deployables.Valid(obj)) {
|
||||
events ! AvatarServiceMessage(toChannel, AvatarAction.SendResponse(
|
||||
Service.defaultPlayerGUID,
|
||||
GenericObjectAction2Message(1, player.GUID, trigger.GUID)
|
||||
))
|
||||
Players.gainDeployableOwnership(player, obj, deployables.AddOverLimit)
|
||||
}
|
||||
case _ => ;
|
||||
case _ => ()
|
||||
}
|
||||
|
||||
case citem: ConstructionItem
|
||||
|
|
@ -1182,7 +1186,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
}
|
||||
Deployables.initializeConstructionItem(player.avatar.certifications, citem)
|
||||
|
||||
case _ => ;
|
||||
case _ => ()
|
||||
}
|
||||
events ! AvatarServiceMessage(
|
||||
toChannel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue