mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-06-25 06:44:19 +00:00
removed event system implied instances of MessageEnvelope overloaded constructors and replaced them directly with MessageEnvelope; included additional places where SendResponse could combine dispatch; support actors have both constructor classes and custom envelopes stored in the same file as the actor itself for better readability
This commit is contained in:
parent
dbd90e6eb1
commit
cbf6aa5ebb
124 changed files with 851 additions and 1518 deletions
|
|
@ -75,26 +75,22 @@ ignore:
|
|||
- "src/main/scala/net/psforever/services/account/StoreIPAddress.scala"
|
||||
- "src/main/scala/net/psforever/services/avatar/AvatarAction.scala"
|
||||
- "src/main/scala/net/psforever/services/avatar/AvatarService.scala"
|
||||
- "src/main/scala/net/psforever/services/avatar/AvatarServiceMessage.scala"
|
||||
- "src/main/scala/net/psforever/services/avatar/AvatarServiceResponse.scala"
|
||||
- "src/main/scala/net/psforever/services/base/bus"
|
||||
- "src/main/scala/net/psforever/services/base/envelope"
|
||||
- "src/main/scala/net/psforever/services/chat/ChatChannel.scala"
|
||||
- "src/main/scala/net/psforever/services/galaxy/GalaxyAction"
|
||||
- "src/main/scala/net/psforever/services/galaxy/GalaxyService"
|
||||
- "src/main/scala/net/psforever/services/galaxy/GalaxyServiceMessage.scala"
|
||||
- "src/main/scala/net/psforever/services/galaxy/GalaxyServiceResponse.scala"
|
||||
- "src/main/scala/net/psforever/services/hart/HartEvent.scala"
|
||||
- "src/main/scala/net/psforever/services/hart/HartTimerActions.scala"
|
||||
- "src/main/scala/net/psforever/services/local/LocalAction"
|
||||
- "src/main/scala/net/psforever/services/local/LocalService"
|
||||
- "src/main/scala/net/psforever/services/local/LocalServiceMessage.scala"
|
||||
- "src/main/scala/net/psforever/services/local/LocalServiceResponse.scala"
|
||||
- "src/main/scala/net/psforever/services/teamwork/SquadServiceMessage.scala"
|
||||
- "src/main/scala/net/psforever/services/teamwork/SquadServiceResponse.scala"
|
||||
- "src/main/scala/net/psforever/services/vehicle/VehicleAction"
|
||||
- "src/main/scala/net/psforever/services/vehicle/VehicleService"
|
||||
- "src/main/scala/net/psforever/services/vehicle/VehicleServiceMessage.scala"
|
||||
- "src/main/scala/net/psforever/services/vehicle/VehicleServiceResponse.scala"
|
||||
- "src/main/scala/net/psforever/services/Service.scala"
|
||||
- "src/main/scala/net/psforever/types"
|
||||
|
|
|
|||
|
|
@ -1,657 +0,0 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package actor.service
|
||||
|
||||
import akka.actor.Props
|
||||
import akka.testkit.TestProbe
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import actor.base.{ActorTest, FreedContextActorTest}
|
||||
import net.psforever.objects._
|
||||
import net.psforever.objects.avatar.Avatar
|
||||
import net.psforever.objects.guid.NumberPoolHub
|
||||
import net.psforever.objects.guid.source.MaxNumberSource
|
||||
import net.psforever.objects.zones.{Zone, ZoneMap}
|
||||
import net.psforever.packet.game.objectcreate.{DroppedItemData, ObjectClass, ObjectCreateMessageParent, PlacementData}
|
||||
import net.psforever.packet.game.{ObjectCreateMessage, PlayerStateMessageUpstream}
|
||||
import net.psforever.types._
|
||||
import net.psforever.services.{RemoverActor, Service, ServiceManager}
|
||||
import net.psforever.services.avatar._
|
||||
import net.psforever.services.avatar.support.{CorpseEnvelope, DropItemEnvelope, PickupItemEnvelope, ReleaseEnvelope}
|
||||
import net.psforever.services.base.message.{ChangeAmmo, ChangeFireState_Start, ChangeFireState_Stop, ConcealPlayer, ObjectDelete, PlanetsideAttribute, ReloadTool, WeaponDryFire}
|
||||
|
||||
class AvatarService1Test extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"construct" in {
|
||||
ServiceManager.boot(system)
|
||||
system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
assert(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarService2Test extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"subscribe" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
assert(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarService3Test extends ActorTest {
|
||||
"AvatarService" should {
|
||||
ServiceManager.boot(system)
|
||||
"subscribe to a specific channel" in {
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! Service.LeaveAll
|
||||
assert(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarService4Test extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"subscribe" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! Service.LeaveAll
|
||||
assert(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarService5Test extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass an unhandled message" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! "hello"
|
||||
expectNoMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ArmorChangedTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ArmorChanged" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), AvatarAction.ArmorChanged(ExoSuitType.Reinforced, 0))
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.ArmorChanged(ExoSuitType.Reinforced, 0)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ConcealPlayerTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ConcealPlayer" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", ConcealPlayer(PlanetSideGUID(10)))
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), ConcealPlayer(PlanetSideGUID(10))))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class EquipmentInHandTest extends ActorTest {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), "release-test-service")
|
||||
val toolDef = GlobalDefinitions.beamer
|
||||
val tool = Tool(toolDef)
|
||||
tool.GUID = PlanetSideGUID(40)
|
||||
tool.AmmoSlots.head.Box.GUID = PlanetSideGUID(41)
|
||||
val pkt = ObjectCreateMessage(
|
||||
toolDef.ObjectId,
|
||||
tool.GUID,
|
||||
ObjectCreateMessageParent(PlanetSideGUID(11), 2),
|
||||
toolDef.Packet.ConstructorData(tool).get
|
||||
)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass EquipmentInHand" in {
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.EquipmentInHand(PlanetSideGUID(11), 2, tool)
|
||||
)
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarAction.EquipmentCreatedInHand(pkt)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DroptItemTest extends ActorTest {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), "release-test-service")
|
||||
val toolDef = GlobalDefinitions.beamer
|
||||
val tool = Tool(toolDef)
|
||||
tool.Position = Vector3(1, 2, 3)
|
||||
tool.Orientation = Vector3(4, 5, 6)
|
||||
tool.GUID = PlanetSideGUID(40)
|
||||
tool.AmmoSlots.head.Box.GUID = PlanetSideGUID(41)
|
||||
val pkt = ObjectCreateMessage(
|
||||
toolDef.ObjectId,
|
||||
tool.GUID,
|
||||
DroppedItemData(
|
||||
PlacementData(tool.Position, tool.Orientation),
|
||||
toolDef.Packet.ConstructorData(tool).get
|
||||
)
|
||||
)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass DropItem" in {
|
||||
service ! Service.Join("test")
|
||||
service ! DropItemEnvelope("test", PlanetSideGUID(10), AvatarAction.DropItem(tool), Zone.Nowhere)
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarAction.DropCreatedItem(pkt)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LoadPlayerTest extends ActorTest {
|
||||
val obj = Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.VS, CharacterSex.Female, 1, CharacterVoice.Voice1))
|
||||
obj.GUID = PlanetSideGUID(10)
|
||||
obj.Slot(5).Equipment.get.GUID = PlanetSideGUID(11)
|
||||
val c1data = obj.Definition.Packet.DetailedConstructorData(obj).get
|
||||
val pkt1 = ObjectCreateMessage(ObjectClass.avatar, PlanetSideGUID(10), c1data)
|
||||
val parent = ObjectCreateMessageParent(PlanetSideGUID(12), 0)
|
||||
obj.VehicleSeated = PlanetSideGUID(12)
|
||||
val c2data = obj.Definition.Packet.DetailedConstructorData(obj).get
|
||||
val pkt2 = ObjectCreateMessage(ObjectClass.avatar, PlanetSideGUID(10), parent, c2data)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass LoadPlayer" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
//no parent data
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(20),
|
||||
AvatarAction.LoadPlayer(ObjectClass.avatar, PlanetSideGUID(10), c1data, None)
|
||||
)
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(20), AvatarAction.LoadCreatedPlayer(pkt1)))
|
||||
//parent data
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(20),
|
||||
AvatarAction.LoadPlayer(ObjectClass.avatar, PlanetSideGUID(10), c2data, Some(parent))
|
||||
)
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(20), AvatarAction.LoadCreatedPlayer(pkt2)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ObjectDeleteTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ObjectDelete" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), ObjectDelete(PlanetSideGUID(11)))
|
||||
expectMsg(
|
||||
AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), ObjectDelete(PlanetSideGUID(11), 0))
|
||||
)
|
||||
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), ObjectDelete(PlanetSideGUID(11), 55))
|
||||
expectMsg(
|
||||
AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), ObjectDelete(PlanetSideGUID(11), 55))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ObjectHeldTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ObjectHeld" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), AvatarAction.ObjectHeld(1, 2))
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarAction.ObjectHeld(1, 2)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PutDownFDUTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass PutDownFDU" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", AvatarAction.PutDownFDU(PlanetSideGUID(10)))
|
||||
expectMsg(
|
||||
AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarAction.PutDownFDU(PlanetSideGUID(10)))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PlanetsideAttributeTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass PlanetsideAttribute" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), PlanetsideAttribute(PlanetSideGUID(10), 5, 1200L))
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), PlanetsideAttribute(PlanetSideGUID(10), 5, 1200L)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PlayerStateTest extends ActorTest {
|
||||
val msg = PlayerStateMessageUpstream(
|
||||
PlanetSideGUID(75),
|
||||
Vector3(3694.1094f, 2735.4531f, 90.84375f),
|
||||
Some(Vector3(4.375f, 2.59375f, 0.0f)),
|
||||
61.875f,
|
||||
351.5625f,
|
||||
0.0f,
|
||||
136,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
112,
|
||||
0
|
||||
)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass PlayerState" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.PlayerState(
|
||||
Vector3(3694.1094f, 2735.4531f, 90.84375f),
|
||||
Some(Vector3(4.375f, 2.59375f, 0.0f)),
|
||||
61.875f,
|
||||
351.5625f,
|
||||
0.0f,
|
||||
136,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
)
|
||||
)
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.PlayerState(
|
||||
Vector3(3694.1094f, 2735.4531f, 90.84375f),
|
||||
Some(Vector3(4.375f, 2.59375f, 0.0f)),
|
||||
61.875f,
|
||||
351.5625f,
|
||||
0.0f,
|
||||
136,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PickupItemTest extends ActorTest {
|
||||
val obj = Player(Avatar(0, "TestCharacter", PlanetSideEmpire.VS, CharacterSex.Female, 1, CharacterVoice.Voice1))
|
||||
val tool = Tool(GlobalDefinitions.beamer)
|
||||
tool.GUID = PlanetSideGUID(40)
|
||||
|
||||
"pass PickUpItem" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! PickupItemEnvelope("test", AvatarAction.PickupItem(tool), Zone.Nowhere)
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), ObjectDelete(tool.GUID, 0)))
|
||||
}
|
||||
}
|
||||
|
||||
class ReloadTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass Reload" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), ReloadTool(PlanetSideGUID(40)))
|
||||
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), ReloadTool(PlanetSideGUID(40))))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeAmmoTest extends ActorTest {
|
||||
val ammoDef = GlobalDefinitions.energy_cell
|
||||
val ammoBox = AmmoBox(ammoDef)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass ChangeAmmo" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(10),
|
||||
ChangeAmmo(
|
||||
PlanetSideGUID(40),
|
||||
0,
|
||||
PlanetSideGUID(40),
|
||||
ammoDef.ObjectId,
|
||||
PlanetSideGUID(41),
|
||||
ammoDef.Packet.ConstructorData(ammoBox).get
|
||||
)
|
||||
)
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
ChangeAmmo(
|
||||
PlanetSideGUID(40),
|
||||
0,
|
||||
PlanetSideGUID(40),
|
||||
ammoDef.ObjectId,
|
||||
PlanetSideGUID(41),
|
||||
ammoDef.Packet.ConstructorData(ammoBox).get
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeFireModeTest extends ActorTest {
|
||||
val ammoDef = GlobalDefinitions.energy_cell
|
||||
val ammoBox = AmmoBox(ammoDef)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass ChangeFireMode" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), AvatarAction.ChangeFireMode(PlanetSideGUID(40), 0))
|
||||
expectMsg(
|
||||
AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarAction.ChangeFireMode(PlanetSideGUID(40), 0))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeFireStateStartTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ChangeFireState_Start" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), ChangeFireState_Start(PlanetSideGUID(40)))
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
ChangeFireState_Start(PlanetSideGUID(40))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeFireStateStopTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass ChangeFireState_Stop" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), ChangeFireState_Stop(PlanetSideGUID(40)))
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
ChangeFireState_Stop(PlanetSideGUID(40))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class WeaponDryFireTest extends ActorTest {
|
||||
"AvatarService" should {
|
||||
"pass WeaponDryFire" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage("test", PlanetSideGUID(10), WeaponDryFire(PlanetSideGUID(40)))
|
||||
expectMsg(
|
||||
AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), WeaponDryFire(PlanetSideGUID(40)))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarStowEquipmentTest extends ActorTest {
|
||||
val tool = Tool(GlobalDefinitions.beamer)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass StowEquipment" in {
|
||||
ServiceManager.boot(system)
|
||||
val service = system.actorOf(AvatarService(), AvatarServiceTest.TestName)
|
||||
service ! Service.Join("test")
|
||||
service ! AvatarServiceMessage(
|
||||
"test",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.StowEquipment(PlanetSideGUID(11), 2, tool)
|
||||
)
|
||||
expectMsg(
|
||||
AvatarServiceResponse(
|
||||
"/test/Avatar",
|
||||
PlanetSideGUID(10),
|
||||
AvatarAction.StowEquipment(PlanetSideGUID(11), 2, tool)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Preparation for these three Release tests is involved.
|
||||
The ServiceManager must be set up correctly.
|
||||
The Zone needs to be set up and initialized properly with a ZoneActor.
|
||||
The ZoneActor builds the GUID Actor and the ZonePopulationActor.
|
||||
|
||||
ALL of these Actors will talk to each other.
|
||||
The lines of communication can short circuit if the next Actor does not have the correct information.
|
||||
Putting Actor startup in the main class, outside of the body of the test, helps.
|
||||
Frequent pauses to allow everything to sort their messages also helps.
|
||||
Even with all this work, the tests have a high chance of failure just due to being asynchronous.
|
||||
*/
|
||||
class AvatarReleaseTest extends FreedContextActorTest {
|
||||
val guid: NumberPoolHub = new NumberPoolHub(new MaxNumberSource(15))
|
||||
val zone = new Zone("test", new ZoneMap("test-map"), 0) {
|
||||
override def SetupNumberPools() : Unit = { }
|
||||
GUID(guid)
|
||||
}
|
||||
zone.init(context)
|
||||
val obj = Player(Avatar(0, "TestCharacter", PlanetSideEmpire.VS, CharacterSex.Female, 1, CharacterVoice.Voice1))
|
||||
guid.register(obj)
|
||||
guid.register(obj.Slot(5).Equipment.get)
|
||||
obj.Zone = zone
|
||||
obj.Release
|
||||
val subscriber = new TestProbe(system)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass Release" in {
|
||||
expectNoMessage(100 milliseconds) //spacer
|
||||
|
||||
zone.AvatarEvents.tell(Service.Join("test"), subscriber.ref)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
zone.Population ! Zone.Corpse.Add(obj)
|
||||
subscriber.expectNoMessage(200 milliseconds) //spacer
|
||||
|
||||
assert(zone.Corpses.size == 1)
|
||||
assert(obj.HasGUID)
|
||||
val guid = obj.GUID
|
||||
zone.AvatarEvents ! ReleaseEnvelope("test", AvatarAction.Release(obj, zone, Some(1 second))) //alive for one second
|
||||
|
||||
val reply1 = subscriber.receiveOne(200 milliseconds)
|
||||
assert(reply1.isInstanceOf[AvatarServiceResponse])
|
||||
val reply1msg = reply1.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply1msg.channel == "/test/Avatar")
|
||||
assert(reply1msg.filter == guid)
|
||||
assert(reply1msg.reply.isInstanceOf[AvatarAction.Release])
|
||||
assert(reply1msg.reply.asInstanceOf[AvatarAction.Release].player == obj)
|
||||
|
||||
val reply2 = subscriber.receiveOne(2 seconds)
|
||||
assert(reply2.isInstanceOf[AvatarServiceResponse])
|
||||
val reply2msg = reply2.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply2msg.channel.equals("/test/Avatar"))
|
||||
assert(reply2msg.filter == Service.defaultPlayerGUID)
|
||||
assert(reply2msg.reply.isInstanceOf[ObjectDelete])
|
||||
assert(reply2msg.reply.asInstanceOf[ObjectDelete].obj_guid == guid)
|
||||
|
||||
subscriber.expectNoMessage(1 seconds)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
assert(!obj.HasGUID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarReleaseEarly1Test extends FreedContextActorTest {
|
||||
val guid: NumberPoolHub = new NumberPoolHub(new MaxNumberSource(15))
|
||||
val zone = new Zone("test", new ZoneMap("test-map"), 0) {
|
||||
override def SetupNumberPools() : Unit = { }
|
||||
GUID(guid)
|
||||
}
|
||||
zone.init(context)
|
||||
val obj = Player(Avatar(0, "TestCharacter", PlanetSideEmpire.VS, CharacterSex.Female, 1, CharacterVoice.Voice1))
|
||||
guid.register(obj)
|
||||
guid.register(obj.Slot(5).Equipment.get)
|
||||
obj.Zone = zone
|
||||
obj.Release
|
||||
val subscriber = new TestProbe(system)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass Release" in {
|
||||
expectNoMessage(100 milliseconds) //spacer
|
||||
|
||||
zone.AvatarEvents.tell(Service.Join("test"), subscriber.ref)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
zone.Population ! Zone.Corpse.Add(obj)
|
||||
subscriber.expectNoMessage(200 milliseconds) //spacer
|
||||
|
||||
assert(zone.Corpses.size == 1)
|
||||
assert(obj.HasGUID)
|
||||
val guid = obj.GUID
|
||||
zone.AvatarEvents ! ReleaseEnvelope("test", AvatarAction.Release(obj, zone)) //3+ minutes!
|
||||
|
||||
val reply1 = subscriber.receiveOne(200 milliseconds)
|
||||
assert(reply1.isInstanceOf[AvatarServiceResponse])
|
||||
val reply1msg = reply1.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply1msg.channel == "/test/Avatar")
|
||||
assert(reply1msg.filter == guid)
|
||||
assert(reply1msg.reply.isInstanceOf[AvatarAction.Release])
|
||||
assert(reply1msg.reply.asInstanceOf[AvatarAction.Release].player == obj)
|
||||
|
||||
zone.AvatarEvents ! CorpseEnvelope(RemoverActor.HurrySpecific(List(obj), zone)) //IMPORTANT: ONE ENTRY
|
||||
val reply2 = subscriber.receiveOne(200 milliseconds)
|
||||
assert(reply2.isInstanceOf[AvatarServiceResponse])
|
||||
val reply2msg = reply2.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply2msg.channel.equals("/test/Avatar"))
|
||||
assert(reply2msg.filter == Service.defaultPlayerGUID)
|
||||
assert(reply2msg.reply.isInstanceOf[ObjectDelete])
|
||||
assert(reply2msg.reply.asInstanceOf[ObjectDelete].obj_guid == guid)
|
||||
|
||||
subscriber.expectNoMessage(1 seconds)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
assert(!obj.HasGUID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarReleaseEarly2Test extends FreedContextActorTest {
|
||||
val guid: NumberPoolHub = new NumberPoolHub(new MaxNumberSource(15))
|
||||
val zone = new Zone("test", new ZoneMap("test-map"), 0) {
|
||||
override def SetupNumberPools() : Unit = { }
|
||||
GUID(guid)
|
||||
}
|
||||
zone.init(context)
|
||||
val obj = Player(Avatar(0, "TestCharacter", PlanetSideEmpire.VS, CharacterSex.Female, 1, CharacterVoice.Voice1))
|
||||
guid.register(obj)
|
||||
guid.register(obj.Slot(5).Equipment.get)
|
||||
obj.Zone = zone
|
||||
obj.Release
|
||||
val objAlt = Player(
|
||||
Avatar(0, "TestCharacter2", PlanetSideEmpire.NC, CharacterSex.Male, 1, CharacterVoice.Voice1)
|
||||
) //necessary clutter
|
||||
objAlt.GUID = PlanetSideGUID(3)
|
||||
objAlt.Slot(5).Equipment.get.GUID = PlanetSideGUID(4)
|
||||
objAlt.Zone = zone
|
||||
val subscriber = new TestProbe(system)
|
||||
|
||||
"AvatarService" should {
|
||||
"pass Release" in {
|
||||
expectNoMessage(100 milliseconds) //spacer
|
||||
|
||||
zone.AvatarEvents.tell(Service.Join("test"), subscriber.ref)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
zone.Population ! Zone.Corpse.Add(obj)
|
||||
subscriber.expectNoMessage(200 milliseconds) //spacer
|
||||
|
||||
assert(zone.Corpses.size == 1)
|
||||
assert(obj.HasGUID)
|
||||
val guid = obj.GUID
|
||||
zone.AvatarEvents ! ReleaseEnvelope("test", AvatarAction.Release(obj, zone)) //3+ minutes!
|
||||
|
||||
val reply1 = subscriber.receiveOne(200 milliseconds)
|
||||
assert(reply1.isInstanceOf[AvatarServiceResponse])
|
||||
val reply1msg = reply1.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply1msg.channel == "/test/Avatar")
|
||||
assert(reply1msg.filter == guid)
|
||||
assert(reply1msg.reply.isInstanceOf[AvatarAction.Release])
|
||||
assert(reply1msg.reply.asInstanceOf[AvatarAction.Release].player == obj)
|
||||
|
||||
zone.AvatarEvents ! CorpseEnvelope(
|
||||
RemoverActor.HurrySpecific(List(objAlt, obj), zone)
|
||||
) //IMPORTANT: TWO ENTRIES
|
||||
val reply2 = subscriber.receiveOne(100 milliseconds)
|
||||
assert(reply2.isInstanceOf[AvatarServiceResponse])
|
||||
val reply2msg = reply2.asInstanceOf[AvatarServiceResponse]
|
||||
assert(reply2msg.channel.equals("/test/Avatar"))
|
||||
assert(reply2msg.filter == Service.defaultPlayerGUID)
|
||||
assert(reply2msg.reply.isInstanceOf[AvatarAction.ObjectDelete])
|
||||
assert(reply2msg.reply.asInstanceOf[AvatarAction.ObjectDelete].item_guid == guid)
|
||||
|
||||
subscriber.expectNoMessage(1 seconds)
|
||||
assert(zone.Corpses.isEmpty)
|
||||
assert(!obj.HasGUID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object AvatarServiceTest {
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
private val number = new AtomicInteger(1)
|
||||
|
||||
def TestName: String = {
|
||||
s"service${number.getAndIncrement()}"
|
||||
}
|
||||
}
|
||||
|
|
@ -48,8 +48,9 @@ import net.psforever.objects.vital.{DamagingActivity, HealFromImplant, HealingAc
|
|||
import net.psforever.packet.game.objectcreate.{BasicCharacterData, ObjectClass, RibbonBars}
|
||||
import net.psforever.packet.game.{Friend => GameFriend, _}
|
||||
import net.psforever.persistence
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{SendResponse, PlanetsideAttribute}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.types.{
|
||||
CharacterSex,
|
||||
CharacterVoice,
|
||||
|
|
@ -584,7 +585,7 @@ object AvatarActor {
|
|||
|
||||
def displayLookingForSquad(session: Session, state: Int): Unit = {
|
||||
val player = session.player
|
||||
session.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Faction.toString,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 53, state)
|
||||
|
|
@ -1383,7 +1384,7 @@ class AvatarActor(
|
|||
case SetLookingForSquad(lfs) =>
|
||||
avatarCopy(avatar.copy(lookingForSquad = lfs))
|
||||
sessionActor ! SessionActor.SendResponse(PlanetsideAttributeMessage(session.get.player.GUID, 53, 0))
|
||||
session.get.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.get.zone.AvatarEvents ! MessageEnvelope(
|
||||
avatar.faction.toString,
|
||||
session.get.player.GUID,
|
||||
PlanetsideAttribute(session.get.player.GUID, 53, if (lfs) 1 else 0)
|
||||
|
|
@ -1795,7 +1796,7 @@ class AvatarActor(
|
|||
)
|
||||
val player = session.get.player
|
||||
val zone = player.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(DisplayedAwardMessage(player.GUID, ribbon, bar))
|
||||
)
|
||||
|
|
@ -2074,7 +2075,7 @@ class AvatarActor(
|
|||
case Success(_) =>
|
||||
val zone = session.get.zone
|
||||
avatarCopy(avatar.copy(decoration = avatar.decoration.copy(cosmetics = Some(cosmetics))))
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(
|
||||
session.get.player.GUID,
|
||||
|
|
@ -3001,13 +3002,13 @@ class AvatarActor(
|
|||
val next = BattleRank.withExperience(newBep).value
|
||||
val br24 = BattleRank.BR24.value
|
||||
sessionActor ! SessionActor.SendResponse(BattleExperienceMessage(pguid, newBep, localModifier))
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(pguid, 17, newBep))
|
||||
events ! MessageEnvelope(zoneId, PlanetsideAttribute(pguid, 17, newBep))
|
||||
if (current < br24 && next >= br24 || current >= br24 && next < br24) {
|
||||
setCosmetics(Set()).onComplete { _ =>
|
||||
val evts = events
|
||||
val name = player.Name
|
||||
val guid = pguid
|
||||
evts ! AvatarServiceMessage(name, PlanetsideAttribute(guid, 106, 1)) //set to no helmet
|
||||
evts ! MessageEnvelope(name, PlanetsideAttribute(guid, 106, 1)) //set to no helmet
|
||||
}
|
||||
}
|
||||
// when the level is reduced, take away any implants over the implant slot limit
|
||||
|
|
@ -3052,7 +3053,7 @@ class AvatarActor(
|
|||
val sess = session.get
|
||||
val zone = sess.zone
|
||||
avatar = avatar.copy(cep = cep)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, PlanetsideAttribute(sess.player.GUID, 18, cep))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, PlanetsideAttribute(sess.player.GUID, 18, cep))
|
||||
case Failure(exception) =>
|
||||
log.error(exception)("db failure")
|
||||
}
|
||||
|
|
@ -3150,7 +3151,7 @@ class AvatarActor(
|
|||
if (exp > 0L) {
|
||||
setBep(exp, msg)
|
||||
zone.actor ! ZoneActor.RewardOurSupporters(playerSource, historyTranscript, killStat, exp)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name, AvatarAction.ShareKillExperienceWithSquad(player, exp))
|
||||
}
|
||||
}
|
||||
|
|
@ -3161,7 +3162,7 @@ class AvatarActor(
|
|||
val _session = session.get
|
||||
val zone = _session.zone
|
||||
val player = _session.player
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(AvatarStatisticsMessage(DeathStatistic(ScoreCard.deathCount(avatar.scorecard))))
|
||||
)
|
||||
|
|
@ -3649,7 +3650,7 @@ class AvatarActor(
|
|||
// Start client-side initialization timer, visible on the character screen
|
||||
// Progress accumulates according to the client's knowledge of the implant initialization time
|
||||
// What is normally a 60s timer that is set to 120s on the server will still visually update as if 60s
|
||||
session.get.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.get.zone.AvatarEvents ! MessageEnvelope(
|
||||
avatar.name,
|
||||
SendResponse(ActionProgressMessage(slot + 6, actionProgress))
|
||||
)
|
||||
|
|
@ -3698,7 +3699,7 @@ class AvatarActor(
|
|||
def stopImplantInitializationTimer(implant: Implant, slot: Int): Implant = {
|
||||
cancelImplantInitializedTimer(slot)
|
||||
//can not formally stop the initialization time on the character information window; set it to 100 to make it look blank
|
||||
session.get.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.get.zone.AvatarEvents ! MessageEnvelope(
|
||||
avatar.name,
|
||||
SendResponse(ActionProgressMessage(slot + 6, 100))
|
||||
)
|
||||
|
|
@ -3768,7 +3769,7 @@ class AvatarActor(
|
|||
private def deactivateImplant(implant: Implant, slot: Int): Implant = {
|
||||
cancelImplantInitializedTimer(slot)
|
||||
// Deactivation sound / effect
|
||||
session.get.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.get.zone.AvatarEvents ! MessageEnvelope(
|
||||
session.get.zone.id,
|
||||
session.get.player.GUID,
|
||||
PlanetsideAttribute(session.get.player.GUID, 28, implant.definition.implantType.value * 2)
|
||||
|
|
@ -3848,7 +3849,7 @@ class AvatarActor(
|
|||
val newHealth = player.Health = originalHealth + 1
|
||||
val events = zone.AvatarEvents
|
||||
player.LogActivity(HealFromImplant(implant.definition.implantType, 1))
|
||||
events ! AvatarServiceMessage(zone.id, PlanetsideAttribute(guid, 0, newHealth))
|
||||
events ! MessageEnvelope(zone.id, PlanetsideAttribute(guid, 0, newHealth))
|
||||
false
|
||||
} else {
|
||||
!aliveAndWounded
|
||||
|
|
@ -3860,7 +3861,7 @@ class AvatarActor(
|
|||
// Activation sound / effect
|
||||
val sess = session.get
|
||||
val zone = sess.zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
sess.player.GUID,
|
||||
PlanetsideAttribute(
|
||||
|
|
@ -3886,7 +3887,7 @@ class AvatarActor(
|
|||
case (implantOpt @ Some(implant), slot) =>
|
||||
//update ongoing progress
|
||||
val actionProgress = calculateImplantTimerStats(implant, AvatarActor.initializationTime(implant))._3
|
||||
session.get.zone.AvatarEvents ! AvatarServiceMessage(
|
||||
session.get.zone.AvatarEvents ! MessageEnvelope(
|
||||
avatar.name,
|
||||
SendResponse(ActionProgressMessage(slot + 6, actionProgress))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ import net.psforever.objects.serverobject.structures.Building
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.{ChatMsg, SetChatFilterMessage}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, SetEmpire}
|
||||
import net.psforever.services.chat.{ChatChannel, DefaultChannel, SpectatorChannel, SquadChannel}
|
||||
import net.psforever.types.ChatMessageType.{CMT_TOGGLESPECTATORMODE, CMT_TOGGLE_GM}
|
||||
|
|
@ -319,7 +320,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
|||
.foreach { spectator =>
|
||||
val guid = spectator.GUID
|
||||
val definition = spectator.Definition
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
guid,
|
||||
AvatarAction.LoadPlayer(definition.ObjectId, guid, definition.Packet.ConstructorData(spectator).get, None)
|
||||
|
|
@ -338,7 +339,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
|||
.filter(_.spectator)
|
||||
.foreach { spectator =>
|
||||
val guid = spectator.GUID
|
||||
events ! AvatarServiceMessage(channel, guid, ObjectDelete(guid))
|
||||
events ! MessageEnvelope(channel, guid, ObjectDelete(guid))
|
||||
}
|
||||
true
|
||||
}
|
||||
|
|
@ -391,7 +392,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
|||
true
|
||||
case o: Deployable =>
|
||||
o.Faction = foundFaction
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SetEmpire(o.GUID, foundFaction)
|
||||
)
|
||||
|
|
@ -404,7 +405,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
|||
true
|
||||
case o: PlanetSideGameObject with FactionAffinity =>
|
||||
o.Faction = foundFaction
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SetEmpire(o.GUID, foundFaction)
|
||||
)
|
||||
|
|
@ -511,7 +512,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
|||
.foreach {
|
||||
case (_, false, _) => ()
|
||||
case (faction, true, _) =>
|
||||
//events ! AvatarServiceMessage(s"$faction", reloadZoneMsg)
|
||||
//events ! MessageEnvelope(s"$faction", reloadZoneMsg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import net.psforever.objects.vital.Vitality
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.{ChatMsg, ObjectCreateDetailedMessage, PlanetsideAttributeMessage}
|
||||
import net.psforever.packet.game.objectcreate.RibbonBars
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.chat.{CustomerServiceChannel, SpectatorChannel}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.types.{ChatMessageType, MeritCommendation, PlanetSideGUID}
|
||||
|
||||
class CustomerServiceRepresentativeMode(data: SessionData) extends ModeLogic {
|
||||
|
|
@ -149,7 +149,7 @@ case object CustomerServiceRepresentativeMode extends PlayerMode {
|
|||
packet.DetailedConstructorData(player).get
|
||||
))
|
||||
data.zoning.spawn.HandleSetCurrentAvatar(player)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
pguid,
|
||||
AvatarAction.LoadPlayer(
|
||||
|
|
@ -182,14 +182,14 @@ case object CustomerServiceRepresentativeMode extends PlayerMode {
|
|||
player.Health = maxHealthOfPlayer.toInt
|
||||
player.LogActivity(player.ClearHistory().head)
|
||||
data.sendResponse(PlanetsideAttributeMessage(guid, 0, maxHealthOfPlayer))
|
||||
data.continent.AvatarEvents ! AvatarServiceMessage(zoneid, PlanetsideAttribute(guid, 0, maxHealthOfPlayer))
|
||||
data.continent.AvatarEvents ! MessageEnvelope(zoneid, PlanetsideAttribute(guid, 0, maxHealthOfPlayer))
|
||||
}
|
||||
//below half armor, full armor
|
||||
val maxArmor = player.MaxArmor.toLong
|
||||
if (player.Armor < maxArmor) {
|
||||
player.Armor = maxArmor.toInt
|
||||
data.sendResponse(PlanetsideAttributeMessage(guid, 4, maxArmor))
|
||||
data.continent.AvatarEvents ! AvatarServiceMessage(zoneid, PlanetsideAttribute(guid, 4, maxArmor))
|
||||
data.continent.AvatarEvents ! MessageEnvelope(zoneid, PlanetsideAttribute(guid, 4, maxArmor))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ case object CustomerServiceRepresentativeMode extends PlayerMode {
|
|||
val guid = vehicle.GUID
|
||||
vehicle.Shields = maxShieldsOfVehicle.toInt
|
||||
data.sendResponse(PlanetsideAttributeMessage(guid, shieldsUi, maxShieldsOfVehicle))
|
||||
data.continent.VehicleEvents ! VehicleServiceMessage(
|
||||
data.continent.VehicleEvents ! MessageEnvelope(
|
||||
data.continent.id,
|
||||
PlanetsideAttribute(guid, shieldsUi, maxShieldsOfVehicle)
|
||||
)
|
||||
|
|
@ -216,7 +216,7 @@ case object CustomerServiceRepresentativeMode extends PlayerMode {
|
|||
if (obj.Health < maxHealthOf) {
|
||||
obj.Health = maxHealthOf.toInt
|
||||
data.sendResponse(PlanetsideAttributeMessage(guid, 0, maxHealthOf))
|
||||
data.continent.VehicleEvents ! VehicleServiceMessage(
|
||||
data.continent.VehicleEvents ! MessageEnvelope(
|
||||
data.continent.id,
|
||||
PlanetsideAttribute(guid, 0, maxHealthOf)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,10 +33,11 @@ import net.psforever.objects.zones.{ZoneProjectile, Zoning}
|
|||
import net.psforever.packet.PlanetSideGamePacket
|
||||
import net.psforever.packet.game.OutfitEventAction.{Initial, OutfitInfo, OutfitRankNames, Unk1}
|
||||
import net.psforever.packet.game.{ActionCancelMessage, AvatarFirstTimeEventMessage, AvatarImplantMessage, AvatarJumpMessage, BattleplanMessage, BindPlayerMessage, BugReportMessage, ChangeFireModeMessage, ChangeShortcutBankMessage, CharacterCreateRequestMessage, CharacterRequestMessage, ChatMsg, CollisionIs, ConnectToWorldRequestMessage, CreateShortcutMessage, DeadState, DeployObjectMessage, DisplayedAwardMessage, DropItemMessage, EmoteMsg, FacilityBenefitShieldChargeRequestMessage, FriendsRequest, GenericAction, GenericActionMessage, GenericCollisionMsg, GenericObjectActionAtPositionMessage, GenericObjectActionMessage, GenericObjectStateMsg, HitHint, InvalidTerrainMessage, LootItemMessage, MoveItemMessage, ObjectDetectedMessage, ObjectHeldMessage, OutfitEvent, OutfitMemberEvent, OutfitMembershipRequest, OutfitMembershipResponse, OutfitRequest, OutfitRequestAction, PickupItemMessage, PlanetsideAttributeMessage, PlayerStateMessageUpstream, RequestDestroyMessage, TargetingImplantRequest, TerrainCondition, TradeMessage, UnuseItemMessage, UseItemMessage, VoiceHostInfo, VoiceHostRequest, ZipLineMessage}
|
||||
import net.psforever.services.RemoverActor
|
||||
import net.psforever.services.avatar.support.CorpseEnvelope
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.base.support.RemoverActor
|
||||
import net.psforever.types.{CapacitorStateType, ChatMessageType, Cosmetic, ExoSuitType, PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -133,7 +134,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
val eagleEye: Boolean = ops.canSeeReallyFar
|
||||
val isNotVisible: Boolean = sessionLogic.zoning.zoningStatus == Zoning.Status.Deconstructing ||
|
||||
(player.isAlive && sessionLogic.zoning.spawn.deadState == DeadState.RespawnTime)
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
channel,
|
||||
avatarGuid,
|
||||
AvatarAction.PlayerState(
|
||||
|
|
@ -433,7 +434,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
ops.dropSpecialSlotItem()
|
||||
case GenericAction.MaxAnchorsExtend_RCV =>
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Anchored
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 1)
|
||||
|
|
@ -454,7 +455,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
}
|
||||
case GenericAction.MaxAnchorsRelease_RCV =>
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Normal
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 0)
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import net.psforever.objects.serverobject.turret.{FacilityTurret, WeaponTurret}
|
|||
import net.psforever.objects.vehicles.AccessPermissionGroup
|
||||
import net.psforever.objects.vital.InGameHistory
|
||||
import net.psforever.packet.game.{ChatMsg, DelayedPathMountMsg, DismountVehicleCargoMsg, DismountVehicleMsg, GenericObjectActionMessage, MountVehicleCargoMsg, MountVehicleMsg, ObjectDetachMessage, PlanetsideAttributeMessage, PlayerStasisMessage, PlayerStateShiftMessage, ShiftState}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{SendResponse, SetEmpire}
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{BailType, ChatMessageType, DriveState, PlanetSideGUID, Vector3}
|
||||
|
||||
object MountHandlerLogic {
|
||||
|
|
@ -160,7 +160,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
case Mountable.CanMount(obj: FacilityTurret, seatNumber, _)
|
||||
if obj.Definition == GlobalDefinitions.vanu_sentry_turret =>
|
||||
sessionLogic.zoning.CancelZoningProcess()
|
||||
obj.Zone.LocalEvents ! LocalServiceMessage(obj.Zone.id, SetEmpire(obj.GUID, player.Faction))
|
||||
obj.Zone.LocalEvents ! MessageEnvelope(obj.Zone.id, SetEmpire(obj.GUID, player.Faction))
|
||||
sendResponse(PlanetsideAttributeMessage(obj.GUID, attribute_type=0, obj.Health))
|
||||
ops.updateWeaponAtSeatPosition(obj, seatNumber)
|
||||
ops.MountingAction(tplayer, obj, seatNumber)
|
||||
|
|
@ -199,7 +199,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
val (pos, zang) = Vehicles.dismountShuttle(obj, mountPoint)
|
||||
tplayer.Position = pos
|
||||
sendResponse(DelayedPathMountMsg(pguid, sguid, u1=60, u2=true))
|
||||
continent.LocalEvents ! LocalServiceMessage(
|
||||
continent.LocalEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SendResponse(ObjectDetachMessage(sguid, pguid, pos, roll=0, pitch=0, zang))
|
||||
)
|
||||
|
|
@ -213,7 +213,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
ops.DismountAction(tplayer, obj, seatNum)
|
||||
continent.actor ! ZoneActor.RemoveFromBlockMap(player) //character doesn't need it
|
||||
//DismountAction(...) uses vehicle service, so use that service to coordinate the remainder of the messages
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(PlayerStasisMessage(pguid)) //the stasis message
|
||||
)
|
||||
|
|
@ -221,11 +221,11 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
//the player will fall to the ground and is perfectly vulnerable in this state
|
||||
//additionally, our player must exist in the current zone
|
||||
//having no in-game avatar target will throw us out of the map screen when deploying and cause softlock
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(PlayerStateShiftMessage(ShiftState(unk=0, obj.Position, obj.Orientation.z, vel=None)))
|
||||
)
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
SendResponse(GenericObjectActionMessage(pguid, code=9)) //conceal the player
|
||||
|
|
@ -254,7 +254,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
ops.DismountVehicleAction(tplayer, obj, seatNum)
|
||||
|
||||
case Mountable.CanDismount(obj: Vehicle, seat_num, _) =>
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(seat_num, unk2=true, obj.GUID)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import net.psforever.objects.serverobject.mount.Mountable
|
|||
import net.psforever.objects.{Player, Session, Vehicle}
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.PlanetSidePacket
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.ObjectDelete
|
||||
import net.psforever.services.chat.SpectatorChannel
|
||||
import net.psforever.services.teamwork.{SquadAction, SquadServiceMessage}
|
||||
|
|
@ -46,7 +47,7 @@ class SpectatorCSRModeLogic(data: SessionData) extends ModeLogic {
|
|||
//
|
||||
player.spectator = true
|
||||
data.chat.JoinChannel(SpectatorChannel)
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, pguid, ObjectDelete(pguid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, pguid, ObjectDelete(pguid))
|
||||
sendResponse(ChatMsg(ChatMessageType.CMT_TOGGLESPECTATORMODE, "on"))
|
||||
sendResponse(ChatMsg(ChatMessageType.UNK_225, "CSR SPECTATOR MODE ON"))
|
||||
}
|
||||
|
|
@ -60,7 +61,7 @@ class SpectatorCSRModeLogic(data: SessionData) extends ModeLogic {
|
|||
//
|
||||
player.spectator = false
|
||||
data.chat.LeaveChannel(SpectatorChannel)
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
AvatarAction.LoadPlayer(avatarId, pguid, player.Definition.Packet.ConstructorData(player).get, None)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.packet.game.{ChildObjectStateMessage, DeployRequestMessage, FrameVehicleStateMessage, VehicleStateMessage, VehicleSubStateMessage}
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{DriveState, Vector3}
|
||||
|
||||
object VehicleLogic {
|
||||
|
|
@ -77,7 +78,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
obj.Position = position
|
||||
obj.Orientation = angle
|
||||
//
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.VehicleState(
|
||||
|
|
@ -165,7 +166,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
obj.Position = position
|
||||
obj.Orientation = angle
|
||||
obj.DeploymentState = if (is_crouched || !notMountedState) DriveState.Kneeling else DriveState.Mobile
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.FrameVehicleState(vehicle_guid, unk1, position, angle, velocity, unk2, unk3, unk4, is_crouched, is_airborne, ascending_flight, flight_time, unk9, unkA)
|
||||
|
|
@ -220,7 +221,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
val angle = Vector3(0f, pitch, yaw)
|
||||
tool.Orientation = angle
|
||||
player.Orientation = angle
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.ChildObjectState(object_guid, pitch, yaw)
|
||||
|
|
@ -303,7 +304,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
if (obj.DeploymentState != DriveState.Mobile) {
|
||||
obj.DeploymentState = DriveState.Mobile
|
||||
sendResponse(DeployRequestMessage(player.GUID, obj.GUID, DriveState.Mobile, 0, unk3=false, Vector3.Zero))
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.DeployRequest(obj.GUID, DriveState.Mobile, 0, unk2=false, Vector3.Zero)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ import net.psforever.objects.sourcing.PlayerSource
|
|||
import net.psforever.objects.vital.RevivingActivity
|
||||
import net.psforever.objects.vital.interaction.Adversarial
|
||||
import net.psforever.packet.game.{AvatarImplantMessage, CreateShortcutMessage, ImplantAction, PlanetsideStringAttributeMessage}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ChangeAmmo, ChangeFireState_Start, ChangeFireState_Stop, ConcealPlayer, EventResponse, GenericObjectAction, HintsAtAttacker, ObjectDelete, PlanetsideAttribute, ReloadTool, SendResponse, SetEmpire, WeaponDryFire}
|
||||
import net.psforever.types.ImplantType
|
||||
|
||||
|
|
@ -506,12 +507,12 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
}.flatten
|
||||
} match {
|
||||
case Some(adversarial) =>
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneChannel,
|
||||
AvatarAction.DestroyDisplay(adversarial.attacker, pentry, adversarial.implement)
|
||||
)
|
||||
case _ =>
|
||||
events ! AvatarServiceMessage(zoneChannel, AvatarAction.DestroyDisplay(pentry, pentry, 0))
|
||||
events ! MessageEnvelope(zoneChannel, AvatarAction.DestroyDisplay(pentry, pentry, 0))
|
||||
}
|
||||
//events chat and log
|
||||
val excuse = player.LastDamage.flatMap { damage =>
|
||||
|
|
@ -689,8 +690,8 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
val events = continent.AvatarEvents
|
||||
ops.killedWhileMounted(obj, playerGuid)
|
||||
//make player invisible on client
|
||||
events ! AvatarServiceMessage(player.Name, PlanetsideAttribute(playerGuid, 29, 1))
|
||||
events ! MessageEnvelope(player.Name, PlanetsideAttribute(playerGuid, 29, 1))
|
||||
//only the dead player should "see" their own body, so that the death camera has something to focus on
|
||||
events ! AvatarServiceMessage(continent.id, playerGuid, ObjectDelete(playerGuid))
|
||||
events ! MessageEnvelope(continent.id, playerGuid, ObjectDelete(playerGuid))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ import akka.actor.{ActorContext, ActorRef, typed}
|
|||
import net.psforever.actors.session.AvatarActor
|
||||
import net.psforever.actors.session.support.{GalaxyHandlerFunctions, SessionData, SessionGalaxyHandlers}
|
||||
import net.psforever.packet.game.{BroadcastWarpgateUpdateMessage, FriendsResponse, HotSpotUpdateMessage, ZoneInfoMessage, ZonePopulationUpdateMessage, HotSpotInfo => PacketHotSpotInfo}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{EventResponse, SendResponse}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.types.{MemberAction, PlanetSideEmpire}
|
||||
|
||||
object GalaxyHandlerLogic {
|
||||
|
|
@ -27,7 +28,7 @@ class GalaxyHandlerLogic(val ops: SessionGalaxyHandlers, implicit val context: A
|
|||
def handleUpdateIgnoredPlayers(pkt: FriendsResponse): Unit = {
|
||||
sendResponse(pkt)
|
||||
pkt.friends.foreach { f =>
|
||||
galaxyService ! GalaxyServiceMessage(GalaxyAction.LogStatusChange(f.name))
|
||||
galaxyService ! MessageEnvelope("", GalaxyAction.LogStatusChange(f.name))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ import net.psforever.objects.zones.{ZoneProjectile, Zoning}
|
|||
import net.psforever.packet.PlanetSideGamePacket
|
||||
import net.psforever.packet.game.{ActionCancelMessage, ActionResultMessage, AvatarFirstTimeEventMessage, AvatarImplantMessage, AvatarJumpMessage, BattleplanMessage, BindPlayerMessage, BugReportMessage, ChangeFireModeMessage, ChangeShortcutBankMessage, CharacterCreateRequestMessage, CharacterRequestAction, CharacterRequestMessage, ChatMsg, CollisionIs, ConnectToWorldRequestMessage, CreateShortcutMessage, DeadState, DeployObjectMessage, DisplayedAwardMessage, DropItemMessage, EmoteMsg, FacilityBenefitShieldChargeRequestMessage, FriendsRequest, GenericAction, GenericActionMessage, GenericCollisionMsg, GenericObjectActionAtPositionMessage, GenericObjectActionMessage, GenericObjectStateMsg, HitHint, InvalidTerrainMessage, LootItemMessage, MoveItemMessage, ObjectDetectedMessage, ObjectHeldMessage, OutfitMembershipRequest, OutfitMembershipRequestAction, OutfitMembershipResponse, OutfitRequest, OutfitRequestAction, PickupItemMessage, PlanetsideAttributeMessage, PlayerStateMessageUpstream, RequestDestroyMessage, TargetingImplantRequest, TerrainCondition, TradeMessage, UnuseItemMessage, UseItemMessage, VoiceHostInfo, VoiceHostRequest, ZipLineMessage}
|
||||
import net.psforever.services.account.{AccountPersistenceService, RetrieveAccountData}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.local.support.CaptureFlagManager
|
||||
import net.psforever.types.{CapacitorStateType, ChatMessageType, Cosmetic, ExoSuitType, ImplantType, PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
|
|
@ -180,7 +181,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
case _ =>
|
||||
false
|
||||
})
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
avatarGuid,
|
||||
AvatarAction.PlayerState(
|
||||
|
|
@ -519,7 +520,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
case GenericAction.MaxAnchorsExtend_RCV =>
|
||||
log.info(s"${player.Name} has anchored ${player.Sex.pronounObject}self to the ground")
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Anchored
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 1)
|
||||
|
|
@ -541,7 +542,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
case GenericAction.MaxAnchorsRelease_RCV =>
|
||||
log.info(s"${player.Name} has released the anchors")
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Normal
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 0)
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ import net.psforever.objects.serverobject.turret.{FacilityTurret, WeaponTurret}
|
|||
import net.psforever.objects.vehicles.AccessPermissionGroup
|
||||
import net.psforever.objects.vital.InGameHistory
|
||||
import net.psforever.packet.game.{ChatMsg, DelayedPathMountMsg, DismountVehicleCargoMsg, DismountVehicleMsg, GenericObjectActionMessage, MountVehicleCargoMsg, MountVehicleMsg, ObjectDetachMessage, PlanetsideAttributeMessage, PlayerStasisMessage, PlayerStateShiftMessage, ShiftState}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{SendResponse, SetEmpire}
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{BailType, ChatMessageType, DriveState, PlanetSideGUID, Vector3}
|
||||
|
||||
object MountHandlerLogic {
|
||||
|
|
@ -191,7 +191,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
if obj.Definition == GlobalDefinitions.vanu_sentry_turret =>
|
||||
log.info(s"${player.Name} mounts the ${obj.Definition.Name}")
|
||||
sessionLogic.zoning.CancelZoningProcessWithDescriptiveReason("cancel_mount")
|
||||
obj.Zone.LocalEvents ! LocalServiceMessage(obj.Zone.id, SetEmpire(obj.GUID, player.Faction))
|
||||
obj.Zone.LocalEvents ! MessageEnvelope(obj.Zone.id, SetEmpire(obj.GUID, player.Faction))
|
||||
sendResponse(PlanetsideAttributeMessage(obj.GUID, attribute_type=0, obj.Health))
|
||||
ops.updateWeaponAtSeatPosition(obj, seatNumber)
|
||||
ops.MountingAction(tplayer, obj, seatNumber)
|
||||
|
|
@ -234,7 +234,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
val (pos, zang) = Vehicles.dismountShuttle(obj, mountPoint)
|
||||
tplayer.Position = pos
|
||||
sendResponse(DelayedPathMountMsg(pguid, sguid, u1=60, u2=true))
|
||||
continent.LocalEvents ! LocalServiceMessage(
|
||||
continent.LocalEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SendResponse(ObjectDetachMessage(sguid, pguid, pos, roll=0, pitch=0, zang))
|
||||
)
|
||||
|
|
@ -253,11 +253,11 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
//the player will fall to the ground and is perfectly vulnerable in this state
|
||||
//additionally, our player must exist in the current zone
|
||||
//having no in-game avatar target will throw us out of the map screen when deploying and cause softlock
|
||||
events ! VehicleServiceMessage(player.Name, SendResponse(Seq(
|
||||
events ! MessageEnvelope(player.Name, SendResponse(Seq(
|
||||
PlayerStasisMessage(pguid),
|
||||
PlayerStateShiftMessage(ShiftState(unk=0, obj.Position, obj.Orientation.z, vel=None))
|
||||
)))
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
SendResponse(GenericObjectActionMessage(pguid, code=9)) //conceal the player
|
||||
|
|
@ -287,7 +287,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
ops.DismountVehicleAction(tplayer, obj, seatNum)
|
||||
|
||||
case Mountable.CanDismount(obj: Vehicle, seat_num, _) =>
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(seat_num, unk2=true, obj.GUID)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.packet.game.{ChatMsg, ChildObjectStateMessage, DeployRequestMessage, FrameVehicleStateMessage, VehicleStateMessage, VehicleSubStateMessage}
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{ChatMessageType, DriveState, Vector3}
|
||||
|
||||
object VehicleLogic {
|
||||
|
|
@ -321,7 +322,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
val mobileShift: String = if (obj.DeploymentState != DriveState.Mobile) {
|
||||
obj.DeploymentState = DriveState.Mobile
|
||||
sendResponse(DeployRequestMessage(player.GUID, obj.GUID, DriveState.Mobile, 0, unk3=false, Vector3.Zero))
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.DeployRequest(obj.GUID, DriveState.Mobile, 0, unk2=false, Vector3.Zero)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import net.psforever.objects.Players
|
|||
import net.psforever.objects.avatar.scoring.Kill
|
||||
import net.psforever.objects.sourcing.PlayerSource
|
||||
import net.psforever.packet.game.{AvatarImplantMessage, ImplantAction}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ChangeAmmo, ChangeFireState_Start, ChangeFireState_Stop, ConcealPlayer, EventResponse, GenericObjectAction, HintsAtAttacker, ObjectDelete, PlanetsideAttribute, ReloadTool, SendResponse, SetEmpire, WeaponDryFire}
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -24,7 +25,7 @@ import net.psforever.objects.vital.etc.ExplodingEntityReason
|
|||
import net.psforever.objects.zones.Zoning
|
||||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.packet.game.{ArmorChangedMessage, AvatarDeadStateMessage, ChangeAmmoMessage, ChangeFireModeMessage, ChangeFireStateMessage_Start, ChangeFireStateMessage_Stop, ChatMsg, DeadState, DestroyMessage, DrowningTarget, GenericActionMessage, GenericObjectActionMessage, HitHint, ItemTransactionResultMessage, ObjectCreateDetailedMessage, ObjectCreateMessage, ObjectDeleteMessage, ObjectHeldMessage, OxygenStateMessage, PlanetsideAttributeMessage, PlayerStateMessage, ProjectileStateMessage, ReloadMessage, SetEmpireMessage, UseItemMessage, WeaponDryFireMessage}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.types.{ChatMessageType, PlanetSideGUID, TransactionType, Vector3}
|
||||
import net.psforever.util.Config
|
||||
|
|
@ -482,7 +483,7 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
val health = player.Health
|
||||
sendResponse(PlanetsideAttributeMessage(revivalTargetGuid, attribute_type=0, health))
|
||||
sendResponse(AvatarDeadStateMessage(DeadState.Alive, timer_max=0, timer=0, player.Position, player.Faction, unk5=true))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
PlanetsideAttribute(revivalTargetGuid, attribute_type=0, health)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ import net.psforever.objects.zones.ZoneProjectile
|
|||
import net.psforever.packet.PlanetSideGamePacket
|
||||
import net.psforever.packet.game.{ActionCancelMessage, AvatarFirstTimeEventMessage, AvatarImplantMessage, AvatarJumpMessage, BattleplanMessage, BindPlayerMessage, BugReportMessage, ChangeFireModeMessage, ChangeShortcutBankMessage, CharacterCreateRequestMessage, CharacterRequestMessage, CollisionIs, ConnectToWorldRequestMessage, CreateShortcutMessage, DeployObjectMessage, DisplayedAwardMessage, DropItemMessage, EmoteMsg, FacilityBenefitShieldChargeRequestMessage, FriendsRequest, GenericAction, GenericActionMessage, GenericCollisionMsg, GenericObjectActionAtPositionMessage, GenericObjectActionMessage, GenericObjectStateMsg, HitHint, ImplantAction, InvalidTerrainMessage, LootItemMessage, MoveItemMessage, ObjectDetectedMessage, ObjectHeldMessage, OutfitMembershipRequest, OutfitMembershipResponse, OutfitRequest, PickupItemMessage, PlanetsideAttributeMessage, PlayerStateMessageUpstream, RequestDestroyMessage, TargetingImplantRequest, TradeMessage, UnuseItemMessage, UseItemMessage, VoiceHostInfo, VoiceHostRequest, ZipLineMessage}
|
||||
import net.psforever.services.account.AccountPersistenceService
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.types.{ExoSuitType, Vector3}
|
||||
|
||||
|
|
@ -229,7 +230,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
case GenericAction.MaxAnchorsExtend_RCV =>
|
||||
log.info(s"${player.Name} has anchored ${player.Sex.pronounObject}self to the ground")
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Anchored
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 1)
|
||||
|
|
@ -251,7 +252,7 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
|||
case GenericAction.MaxAnchorsRelease_RCV =>
|
||||
log.info(s"${player.Name} has released the anchors")
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Normal
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 19, 0)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import net.psforever.objects.serverobject.mount.Mountable
|
|||
import net.psforever.objects.serverobject.terminals.implant.ImplantTerminalMech
|
||||
import net.psforever.objects.vital.InGameHistory
|
||||
import net.psforever.packet.game.{DelayedPathMountMsg, DismountVehicleCargoMsg, DismountVehicleMsg, GenericObjectActionMessage, MountVehicleCargoMsg, MountVehicleMsg, ObjectDetachMessage, PlayerStasisMessage, PlayerStateShiftMessage, ShiftState}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
object MountHandlerLogic {
|
||||
def apply(ops: SessionMountHandlers): MountHandlerLogic = {
|
||||
|
|
@ -61,7 +61,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
val (pos, zang) = Vehicles.dismountShuttle(obj, mountPoint)
|
||||
tplayer.Position = pos
|
||||
sendResponse(DelayedPathMountMsg(pguid, sguid, u1=60, u2=true))
|
||||
continent.LocalEvents ! LocalServiceMessage(
|
||||
continent.LocalEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SendResponse(ObjectDetachMessage(sguid, pguid, pos, roll=0, pitch=0, zang))
|
||||
)
|
||||
|
|
@ -80,11 +80,11 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
//the player will fall to the ground and is perfectly vulnerable in this state
|
||||
//additionally, our player must exist in the current zone
|
||||
//having no in-game avatar target will throw us out of the map screen when deploying and cause softlock
|
||||
events ! VehicleServiceMessage(player.Name, SendResponse(Seq(
|
||||
events ! MessageEnvelope(player.Name, SendResponse(Seq(
|
||||
PlayerStasisMessage(pguid),
|
||||
PlayerStateShiftMessage(ShiftState(unk=0, obj.Position, obj.Orientation.z, vel=None))
|
||||
)))
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
SendResponse(GenericObjectActionMessage(pguid, code=9)) //conceal the player
|
||||
|
|
@ -105,7 +105,7 @@ class MountHandlerLogic(val ops: SessionMountHandlers, implicit val context: Act
|
|||
ops.DismountVehicleAction(tplayer, obj, seatNum)
|
||||
|
||||
case Mountable.CanDismount(obj: Vehicle, seat_num, _) =>
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(seat_num, unk2=true, obj.GUID)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import net.psforever.packet.PlanetSidePacket
|
|||
import net.psforever.packet.game.{DeployableInfo, DeployableObjectsInfoMessage, DeploymentAction, ObjectCreateDetailedMessage, ObjectDeleteMessage}
|
||||
import net.psforever.packet.game.objectcreate.{ObjectClass, ObjectCreateMessageParent, RibbonBars}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.ObjectDelete
|
||||
import net.psforever.services.chat.SpectatorChannel
|
||||
import net.psforever.services.teamwork.{SquadAction, SquadServiceMessage}
|
||||
|
|
@ -69,7 +69,7 @@ class SpectatorModeLogic(data: SessionData) extends ModeLogic {
|
|||
player.Inventory.Items
|
||||
.foreach { entry => sendResponse(ObjectDeleteMessage(entry.GUID, 0)) }
|
||||
sendResponse(ObjectDeleteMessage(player.avatar.locker.GUID, 0))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, pguid, ObjectDelete(pguid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, pguid, ObjectDelete(pguid))
|
||||
player.Holsters()
|
||||
.collect { case slot if slot.Equipment.nonEmpty => sendResponse(ObjectDeleteMessage(slot.Equipment.get.GUID, 0)) }
|
||||
val vehicleAndSeat = data.vehicles.GetMountableAndSeat(None, player, continent) match {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import net.psforever.objects.Vehicle
|
|||
import net.psforever.objects.serverobject.deploy.Deployment
|
||||
import net.psforever.packet.game.{ChildObjectStateMessage, DeployRequestMessage, FrameVehicleStateMessage, VehicleStateMessage, VehicleSubStateMessage}
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{DriveState, Vector3}
|
||||
|
||||
object VehicleLogic {
|
||||
|
|
@ -81,7 +82,7 @@ class VehicleLogic(val ops: VehicleOperations, implicit val context: ActorContex
|
|||
val mobileShift: String = if (obj.DeploymentState != DriveState.Mobile) {
|
||||
obj.DeploymentState = DriveState.Mobile
|
||||
sendResponse(DeployRequestMessage(player.GUID, obj.GUID, DriveState.Mobile, 0, unk3=false, Vector3.Zero))
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
VehicleAction.DeployRequest(obj.GUID, DriveState.Mobile, 0, unk2=false, Vector3.Zero)
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ import net.psforever.objects.sourcing.{DeployableSource, PlayerSource, VehicleSo
|
|||
import net.psforever.objects.vehicles.Utility.InternalTelepad
|
||||
import net.psforever.objects.zones.blockmap.BlockMapEntity
|
||||
import net.psforever.objects.zones.exp.ToDatabase
|
||||
import net.psforever.services.RemoverActor
|
||||
import net.psforever.services.avatar.support.GroundEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.base.support.RemoverActor
|
||||
import net.psforever.services.local.support.{CaptureEnvelope, HackCaptureActor}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.collection.mutable
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -51,9 +52,9 @@ import net.psforever.packet.game.PlanetsideAttributeEnum.PlanetsideAttributeEnum
|
|||
import net.psforever.packet.game.objectcreate._
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.account.AccountPersistenceService
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.local.support.CaptureFlagManager
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.types._
|
||||
import net.psforever.util.Config
|
||||
|
|
@ -206,7 +207,7 @@ class GeneralOperations(
|
|||
.livePlayerList
|
||||
.filter(_.GUID != guid)
|
||||
.foreach { p =>
|
||||
events ! LocalServiceMessage(p.Name, msg)
|
||||
events ! MessageEnvelope(p.Name, msg)
|
||||
}
|
||||
//todo better way to collect csr players while utilizing the aforementioned benefit of localSector
|
||||
val position = player.Position
|
||||
|
|
@ -218,7 +219,7 @@ class GeneralOperations(
|
|||
.AllPlayers
|
||||
.filter { p => !p.allowInteraction && p.GUID != guid && Vector3.DistanceSquared(p.Position, position) < rangeSq }
|
||||
.foreach { p =>
|
||||
events ! LocalServiceMessage(p.Name, msg)
|
||||
events ! MessageEnvelope(p.Name, msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -405,7 +406,7 @@ class GeneralOperations(
|
|||
val detectedTargets = sessionLogic.shooting.FindDetectedProjectileTargets(targets)
|
||||
val mode = 7 + (if (weapon.Projectile == GlobalDefinitions.wasp_rocket_projectile) 1 else 0)
|
||||
detectedTargets.foreach { target =>
|
||||
continent.AvatarEvents ! AvatarServiceMessage(target, AvatarAction.ProjectileAutoLockAwareness(mode))
|
||||
continent.AvatarEvents ! MessageEnvelope(target, AvatarAction.ProjectileAutoLockAwareness(mode))
|
||||
}
|
||||
case _ => ()
|
||||
}
|
||||
|
|
@ -485,7 +486,7 @@ class GeneralOperations(
|
|||
case attacker
|
||||
if attacker.Faction != player.Faction &&
|
||||
System.currentTimeMillis() - llu.LastCollectionTime >= Config.app.game.experience.cep.lluSlayerCreditDuration.toMillis =>
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
attacker.Name,
|
||||
AvatarAction.AwardCep(attacker.CharId, Config.app.game.experience.cep.lluSlayerCredit)
|
||||
)
|
||||
|
|
@ -1028,7 +1029,7 @@ class GeneralOperations(
|
|||
sendResponse(ChatMsg(ChatMessageType.UNK_227, "@ArmorShieldOff"))
|
||||
}
|
||||
player.UsingSpecial = SpecialExoSuitDefinition.Mode.Normal
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
PlanetsideAttribute(player.GUID, 8, 0)
|
||||
)
|
||||
|
|
@ -1037,7 +1038,7 @@ class GeneralOperations(
|
|||
}
|
||||
|
||||
private def activateMaxSpecialStateMessage(): Unit = {
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
PlanetsideAttribute(player.GUID, 8, 1)
|
||||
)
|
||||
|
|
@ -1052,7 +1053,7 @@ class GeneralOperations(
|
|||
case (Some(obj), Some(seatNum)) =>
|
||||
tplayer.VehicleSeated = None
|
||||
obj.Seats(seatNum).unmount(tplayer)
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(seatNum, unk2=false, obj.GUID)
|
||||
|
|
@ -1475,19 +1476,19 @@ class GeneralOperations(
|
|||
val events = continent.AvatarEvents
|
||||
val zoneid = continent.id
|
||||
val destinationPosition = dest.Position
|
||||
events ! AvatarServiceMessage(zoneid, pguid, AvatarAction.ObjectDelete(pguid))
|
||||
events ! AvatarServiceMessage(player.Name,
|
||||
AvatarAction.SendResponse(PlayerStateShiftMessage(ShiftState(0, destinationPosition, player.Orientation.z)))
|
||||
events ! MessageEnvelope(zoneid, pguid, ObjectDelete(pguid))
|
||||
events ! MessageEnvelope(player.Name,
|
||||
SendResponse(PlayerStateShiftMessage(ShiftState(0, destinationPosition, player.Orientation.z)))
|
||||
)
|
||||
player.Position = destinationPosition
|
||||
events ! AvatarServiceMessage(zoneid, pguid, AvatarAction.LoadPlayer(
|
||||
events ! MessageEnvelope(zoneid, pguid, AvatarAction.LoadPlayer(
|
||||
player.Definition.ObjectId,
|
||||
pguid,
|
||||
player.Definition.Packet.ConstructorData(player).get,
|
||||
None
|
||||
))
|
||||
useRouterTelepadEffect(pguid, sguid, dguid)
|
||||
continent.LocalEvents ! LocalServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
LocalAction.RouterTelepadTransport(pguid, sguid, dguid)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import net.psforever.objects.sourcing.{PlayerSource, SourceEntry, UniquePlayer}
|
|||
import net.psforever.packet.game.objectcreate.ConstructorData
|
||||
import net.psforever.objects.zones.exp
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage, AvatarServiceResponse}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceResponse}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{EventResponse, SendResponse}
|
||||
import net.psforever.services.chat.OutfitChannel
|
||||
|
||||
|
|
@ -140,7 +141,7 @@ class SessionAvatarHandlers(
|
|||
val playersInZone = killer.Zone.Players.map { avatar => (avatar.id, avatar.basic.name) }
|
||||
val squadMembersHere = playersInZone.filter(member => squadMembers.contains(member._2))
|
||||
squadMembersHere.foreach { member =>
|
||||
killer.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
killer.Zone.AvatarEvents ! MessageEnvelope(
|
||||
member._2,
|
||||
AvatarAction.AwardBep(member._1, expSplit, ExperienceType.Normal))
|
||||
}
|
||||
|
|
@ -155,7 +156,7 @@ class SessionAvatarHandlers(
|
|||
val playersInZone = vehicle.Zone.Players.map { avatar => (avatar.id, avatar.basic.name) }
|
||||
val squadMembersHere = playersInZone.filter(member => squadMembers.contains(member._2))
|
||||
squadMembersHere.foreach { member =>
|
||||
vehicle.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
vehicle.Zone.AvatarEvents ! MessageEnvelope(
|
||||
member._2,
|
||||
AvatarAction.AwardBep(member._1, exp, ExperienceType.Normal))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package net.psforever.actors.session.support
|
|||
import akka.actor.typed.receptionist.Receptionist
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.actor.{ActorContext, ActorRef, typed}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.chat.ChatService
|
||||
|
||||
import scala.collection.mutable
|
||||
|
|
@ -31,7 +32,7 @@ import net.psforever.packet._
|
|||
import net.psforever.packet.game._
|
||||
import net.psforever.services.account.AccountPersistenceService
|
||||
import net.psforever.services.ServiceManager.LookupResult
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.services.{Service, InterstellarClusterService => ICS}
|
||||
import net.psforever.types._
|
||||
import net.psforever.util.Config
|
||||
|
|
@ -567,7 +568,7 @@ class SessionData(
|
|||
case (Some(obj), Some(seatNum)) =>
|
||||
tplayer.VehicleSeated = None
|
||||
obj.Seats(seatNum).unmount(tplayer)
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(seatNum, unk2=false, obj.GUID)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ import net.psforever.objects.vehicles.{CargoBehavior, MountableWeapons}
|
|||
import net.psforever.objects.vital.InGameHistory
|
||||
import net.psforever.packet.game.{DismountVehicleCargoMsg, GenericObjectActionMessage, InventoryStateMessage, MountVehicleCargoMsg, MountVehicleMsg, ObjectAttachMessage, ObjectDetachMessage, PlanetsideAttributeMessage}
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{BailType, PlanetSideGUID, Vector3}
|
||||
//
|
||||
import net.psforever.actors.session.AvatarActor
|
||||
|
|
@ -186,7 +187,7 @@ class SessionMountHandlers(
|
|||
avatarActor ! AvatarActor.DeactivateActiveImplants
|
||||
avatarActor ! AvatarActor.SuspendStaminaRegeneration(3.seconds)
|
||||
sendResponse(ObjectAttachMessage(objGuid, playerGuid, seatNum))
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
playerGuid,
|
||||
VehicleAction.MountVehicle(objGuid, seatNum)
|
||||
|
|
@ -204,13 +205,12 @@ class SessionMountHandlers(
|
|||
if (tplayer.BailProtection) {
|
||||
tplayer.ContributionFrom(obj)
|
||||
sessionLogic.keepAliveFunc = sessionLogic.zoning.NormalKeepAlive
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SendResponse(PlanetsideAttributeMessage(obj.GUID, 81, 1))
|
||||
)
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.id,
|
||||
SendResponse(ObjectDetachMessage(obj.GUID, tplayer.GUID, tplayer.Position, obj.Orientation))
|
||||
SendResponse(List(
|
||||
PlanetsideAttributeMessage(obj.GUID, 81, 1),
|
||||
ObjectDetachMessage(obj.GUID, tplayer.GUID, tplayer.Position, obj.Orientation))
|
||||
)
|
||||
)
|
||||
}
|
||||
else {
|
||||
|
|
@ -250,7 +250,7 @@ class SessionMountHandlers(
|
|||
BailType.Normal
|
||||
}
|
||||
sendResponse(DismountVehicleMsg(playerGuid, bailType, wasKickedByDriver = false))
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
playerGuid,
|
||||
VehicleAction.DismountVehicle(bailType, unk2 = false)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import net.psforever.objects.Player
|
|||
import net.psforever.packet.game.OutfitEventAction.{Initial, Leaving, OutfitInfo, OutfitRankNames, Unk1, Update, UpdateMemberCount}
|
||||
import net.psforever.packet.game.OutfitMembershipResponse.PacketType.CreateResponse
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.chat.OutfitChannel
|
||||
import net.psforever.types.ChatMessageType
|
||||
|
|
@ -84,12 +85,12 @@ object SessionOutfitHandlers {
|
|||
player.outfit_id = outfit.id
|
||||
player.outfit_name = outfit.name
|
||||
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Zone.id,
|
||||
PlanetsideAttribute(player.GUID, 39, outfit.id)
|
||||
)
|
||||
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Zone.id,
|
||||
player.GUID,
|
||||
AvatarAction.PlanetsideStringAttribute(0, outfit.name)
|
||||
|
|
@ -174,12 +175,12 @@ object SessionOutfitHandlers {
|
|||
invited.outfit_id = outfit.id
|
||||
invited.outfit_name = outfit.name
|
||||
|
||||
invited.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
invited.Zone.AvatarEvents ! MessageEnvelope(
|
||||
invited.Zone.id,
|
||||
PlanetsideAttribute(invited.GUID, 39, outfit.id)
|
||||
)
|
||||
|
||||
invited.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
invited.Zone.AvatarEvents ! MessageEnvelope(
|
||||
invited.Zone.id,
|
||||
invited.GUID,
|
||||
AvatarAction.PlanetsideStringAttribute(0, outfit.name)
|
||||
|
|
@ -241,12 +242,12 @@ object SessionOutfitHandlers {
|
|||
OutfitMemberEvent(outfit_id, kickedId, OutfitMemberEventAction.Kicked()))
|
||||
)
|
||||
|
||||
kickedBy.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kickedBy.Zone.AvatarEvents ! MessageEnvelope(
|
||||
kickedBy.Zone.id,
|
||||
PlanetsideAttribute(kickedBy.GUID, 39, 0)
|
||||
)
|
||||
|
||||
kickedBy.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kickedBy.Zone.AvatarEvents ! MessageEnvelope(
|
||||
kickedBy.Zone.id,
|
||||
kickedBy.GUID,
|
||||
AvatarAction.PlanetsideStringAttribute(0, "")
|
||||
|
|
@ -270,18 +271,18 @@ object SessionOutfitHandlers {
|
|||
OutfitMembershipResponse(OutfitMembershipResponse.PacketType.YouGotKicked, 0, 1,
|
||||
kickedBy.CharId, kicked.CharId, kickedBy.Name, kicked.Name, flag = false))
|
||||
|
||||
kicked.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kicked.Zone.AvatarEvents ! MessageEnvelope(
|
||||
kicked.Zone.id,
|
||||
PlanetsideAttribute(kicked.GUID, 39, 0)
|
||||
)
|
||||
|
||||
kicked.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kicked.Zone.AvatarEvents ! MessageEnvelope(
|
||||
kicked.Zone.id,
|
||||
kicked.GUID,
|
||||
AvatarAction.PlanetsideStringAttribute(0, "")
|
||||
)
|
||||
|
||||
kicked.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kicked.Zone.AvatarEvents ! MessageEnvelope(
|
||||
kicked.Name, AvatarAction.RemoveFromOutfitChat(kickedBy.outfit_id))
|
||||
|
||||
kicked.outfit_id = 0
|
||||
|
|
@ -634,12 +635,12 @@ object SessionOutfitHandlers {
|
|||
player.outfit_id = outfit.id
|
||||
player.outfit_name = outfit.name
|
||||
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Zone.id,
|
||||
PlanetsideAttribute(player.GUID, 39, outfit.id)
|
||||
)
|
||||
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Zone.id,
|
||||
player.GUID,
|
||||
AvatarAction.PlanetsideStringAttribute(0, outfit.name)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
package net.psforever.actors.session.support
|
||||
|
||||
import akka.actor.{ActorContext, ActorRef, typed}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.teamwork.SquadServiceResponse
|
||||
|
||||
|
|
@ -11,7 +12,6 @@ import net.psforever.actors.session.AvatarActor
|
|||
import net.psforever.objects.teamwork.Squad
|
||||
import net.psforever.objects.{Default, Player}
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.teamwork.{SquadResponse, SquadServiceMessage, SquadAction => SquadServiceAction}
|
||||
import net.psforever.types.{PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ class SessionSquadHandlers(
|
|||
squadUI.get(player.CharId) match {
|
||||
case Some(elem) =>
|
||||
sendResponse(PlanetsideAttributeMessage(player.GUID, 31, squad_supplement_id))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
s"${player.Faction}",
|
||||
player.GUID,
|
||||
PlanetsideAttribute(player.GUID, 31, squad_supplement_id)
|
||||
|
|
@ -288,7 +288,7 @@ class SessionSquadHandlers(
|
|||
* @param value value to associate the player
|
||||
*/
|
||||
def GiveSquadColorsForOthers(guid: PlanetSideGUID, factionChannel: String, value: Long): Unit = {
|
||||
continent.AvatarEvents ! AvatarServiceMessage(factionChannel, guid, PlanetsideAttribute(guid, 31, value))
|
||||
continent.AvatarEvents ! MessageEnvelope(factionChannel, guid, PlanetsideAttribute(guid, 31, value))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import net.psforever.objects.zones.exp.ToDatabase
|
|||
import net.psforever.packet.game.UplinkRequest
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.CachedEnvelope
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ChangeAmmo, ChangeFireState_Start, ChangeFireState_Stop, ReloadTool, SendResponse, WeaponDryFire}
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.types.{ChatMessageType, PlanetSideEmpire, ValidPlanetSideGUID, Vector3}
|
||||
import net.psforever.util.Config
|
||||
|
||||
|
|
@ -48,8 +48,8 @@ import net.psforever.objects.serverobject.mount.Mountable
|
|||
import net.psforever.objects.serverobject.turret.FacilityTurret
|
||||
import net.psforever.objects._
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{ExoSuitType, PlanetSideGUID}
|
||||
|
||||
trait WeaponAndProjectileFunctions extends CommonSessionInterfacingFunctionality {
|
||||
|
|
@ -284,9 +284,9 @@ class WeaponAndProjectileOperations(
|
|||
.orElse { continent.GUID(weapon_guid) }
|
||||
.collect {
|
||||
case _: Equipment if containerOpt.exists(_.isInstanceOf[Player]) =>
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, player.GUID, WeaponDryFire(weapon_guid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, player.GUID, WeaponDryFire(weapon_guid))
|
||||
case _: Equipment =>
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
WeaponDryFire(weapon_guid)
|
||||
|
|
@ -349,7 +349,7 @@ class WeaponAndProjectileOperations(
|
|||
sendResponse(UplinkResponse(code.value, 0))
|
||||
sendResponse(PlanetsideAttributeMessage(player.GUID, 59, 1200000))
|
||||
avatarActor ! AvatarActor.UpdateCUDTime("emp_blast")
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(
|
||||
player.Zone.LocalEvents ! MessageEnvelope(
|
||||
s"${player.Zone.id}",
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(TriggerEffectMessage(Service.defaultPlayerGUID, empColor, None, Some(TriggeredEffectLocation(player.Position, Vector3(0, 0, 90)))))
|
||||
|
|
@ -359,7 +359,7 @@ class WeaponAndProjectileOperations(
|
|||
ExplosiveDeployableControl.detectionForExplosiveSource(player), Zone.findAllTargets)
|
||||
}
|
||||
case UplinkRequestType.OrbitalStrike =>
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(
|
||||
player.Zone.LocalEvents ! MessageEnvelope(
|
||||
s"$playerFaction",
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(OrbitalStrikeWaypointMessage(player.GUID, pos.get.x, pos.get.y))
|
||||
|
|
@ -388,12 +388,12 @@ class WeaponAndProjectileOperations(
|
|||
sendResponse(PlanetsideAttributeMessage(player.GUID, 60, 10800000))
|
||||
avatarActor ! AvatarActor.UpdateCUDTime("orbital_strike")
|
||||
context.system.scheduler.scheduleOnce(delay = 5 seconds) {
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(
|
||||
player.Zone.LocalEvents ! MessageEnvelope(
|
||||
s"${player.Zone.id}",
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(TriggerEffectMessage(ValidPlanetSideGUID(0), strikeType, None, Some(TriggeredEffectLocation(orbitalStrikePos.get, Vector3(0, 0, 90)))))
|
||||
)
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(
|
||||
player.Zone.LocalEvents ! MessageEnvelope(
|
||||
s"$playerFaction",
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(OrbitalStrikeWaypointMessage(player.GUID, None))
|
||||
|
|
@ -472,7 +472,7 @@ class WeaponAndProjectileOperations(
|
|||
log.info(s"${player.Name} changed ${player.Sex.possessive} ${obj.Definition.Name}'s fire mode to #$modeIndex")
|
||||
}
|
||||
sendResponse(ChangeFireModeMessage(item_guid, modeIndex))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
sessionLogic.zoning.zoneChannel,
|
||||
player.GUID,
|
||||
AvatarAction.ChangeFireMode(item_guid, modeIndex)
|
||||
|
|
@ -758,7 +758,7 @@ class WeaponAndProjectileOperations(
|
|||
(target.GUID, (target, proxyCopy, proxyCopy.shot_origin, target.Position))
|
||||
}.unzip
|
||||
//chain lash effect
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
SendResponse(ChainLashMessage(hitPos, projectile.profile.ObjectId, guidRefs.toList))
|
||||
)
|
||||
|
|
@ -944,9 +944,9 @@ class WeaponAndProjectileOperations(
|
|||
tool.Magazine = 0
|
||||
sendResponse(InventoryStateMessage(tool.AmmoSlot.Box.GUID, weapon_guid, 0))
|
||||
sendResponse(ChangeFireStateMessage_Stop(weapon_guid))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, player.GUID, ChangeFireState_Stop(weapon_guid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, player.GUID, ChangeFireState_Stop(weapon_guid))
|
||||
sendResponse(WeaponDryFireMessage(weapon_guid))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, player.GUID, WeaponDryFire(weapon_guid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, player.GUID, WeaponDryFire(weapon_guid))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -962,7 +962,7 @@ class WeaponAndProjectileOperations(
|
|||
.map { sessionLogic.validObject(_, decorator="FindDetectedProjectileTargets") }
|
||||
.flatMap {
|
||||
case Some(obj: Vehicle) if !obj.Cloaked =>
|
||||
//TODO hint: vehicleService ! VehicleServiceMessage(s"${obj.Actor}", VehicleAction.ProjectileAutoLockAwareness(mode))
|
||||
//TODO hint: vehicleService ! MessageEnvelope(s"${obj.Actor}", VehicleAction.ProjectileAutoLockAwareness(mode))
|
||||
obj.Seats.values.flatMap { seat => seat.occupants.map(_.Name) }
|
||||
case Some(obj: Mountable) =>
|
||||
obj.Seats.values.flatMap { seat => seat.occupants.map(_.Name) }
|
||||
|
|
@ -1087,7 +1087,7 @@ class WeaponAndProjectileOperations(
|
|||
}
|
||||
|
||||
def fireStateStartPlayerMessages(itemGuid: PlanetSideGUID): Unit = {
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
sessionLogic.zoning.zoneChannel,
|
||||
player.GUID,
|
||||
ChangeFireState_Start(itemGuid)
|
||||
|
|
@ -1099,7 +1099,7 @@ class WeaponAndProjectileOperations(
|
|||
case turret: FacilityTurret if continent.map.cavern =>
|
||||
turret.Actor ! VanuSentry.ChangeFireStart
|
||||
}
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
ChangeFireState_Start(itemGuid)
|
||||
|
|
@ -1128,7 +1128,7 @@ class WeaponAndProjectileOperations(
|
|||
}
|
||||
|
||||
def fireStateStopPlayerMessages(itemGuid: PlanetSideGUID): Unit = {
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
sessionLogic.zoning.zoneChannel,
|
||||
player.GUID,
|
||||
ChangeFireState_Stop(itemGuid)
|
||||
|
|
@ -1140,7 +1140,7 @@ class WeaponAndProjectileOperations(
|
|||
case turret: FacilityTurret if continent.map.cavern =>
|
||||
turret.Actor ! VanuSentry.ChangeFireStop
|
||||
}
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
ChangeFireState_Stop(itemGuid)
|
||||
|
|
@ -1200,11 +1200,11 @@ class WeaponAndProjectileOperations(
|
|||
used by ReloadMessage handling
|
||||
*/
|
||||
def reloadPlayerMessages(itemGuid: PlanetSideGUID): Unit = {
|
||||
continent.AvatarEvents ! AvatarServiceMessage(sessionLogic.zoning.zoneChannel, player.GUID, ReloadTool(itemGuid))
|
||||
continent.AvatarEvents ! MessageEnvelope(sessionLogic.zoning.zoneChannel, player.GUID, ReloadTool(itemGuid))
|
||||
}
|
||||
|
||||
def reloadVehicleMessages(itemGuid: PlanetSideGUID): Unit = {
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player.GUID,
|
||||
ReloadTool(itemGuid)
|
||||
|
|
@ -1381,7 +1381,7 @@ class WeaponAndProjectileOperations(
|
|||
val previous_box_guid = previousBox.GUID
|
||||
val boxDef = box.Definition
|
||||
sendResponse(ChangeAmmoMessage(tool_guid, box.Capacity))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
sessionLogic.zoning.zoneChannel,
|
||||
player.GUID,
|
||||
ChangeAmmo(
|
||||
|
|
@ -1482,7 +1482,7 @@ class WeaponAndProjectileOperations(
|
|||
def modifyAmmunitionInMountable(obj: PlanetSideServerObject with Container)(box: AmmoBox, reloadValue: Int): Unit = {
|
||||
modifyAmmunition(obj)(box, reloadValue)
|
||||
obj.Find(box).collect { index =>
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
s"${obj.Actor}",
|
||||
player.GUID,
|
||||
VehicleAction.InventoryState(box, obj.GUID, index, box.Definition.Packet.DetailedConstructorData(box).get)
|
||||
|
|
@ -1589,7 +1589,7 @@ class WeaponAndProjectileOperations(
|
|||
shootingStop.clear()
|
||||
(prefire ++ shooting).foreach { guid =>
|
||||
sendResponse(ChangeFireStateMessage_Stop(guid))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, player.GUID, ChangeFireState_Stop(guid))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, player.GUID, ChangeFireState_Stop(guid))
|
||||
}
|
||||
prefire.clear()
|
||||
shooting.clear()
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import net.psforever.objects.zones.blockmap.BlockMapEntity
|
|||
import net.psforever.packet.game.GenericAction.FirstPersonViewWithEffect
|
||||
import net.psforever.packet.game.{CampaignStatistic, ChangeFireStateMessage_Start, CloudInfo, GenericActionMessage, GenericObjectActionEnum, HackState7, MailMessage, ObjectDetectedMessage, SessionStatistic, StormInfo, TriggeredSound, TrainingZoneMessage, WeatherMessage}
|
||||
import net.psforever.services.avatar.support.{CorpseEnvelope, ReleaseEnvelope}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{GenericObjectAction, ObjectDelete, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.chat.DefaultChannel
|
||||
|
||||
|
|
@ -64,16 +65,16 @@ import net.psforever.packet.game.objectcreate.{DroppedItemData, ObjectCreateMess
|
|||
import net.psforever.packet.game.objectcreate.ObjectClass
|
||||
import net.psforever.packet.{PlanetSideGamePacket, game}
|
||||
import net.psforever.persistence.Savedplayer
|
||||
import net.psforever.services.RemoverActor
|
||||
import net.psforever.services.ServiceManager.{Lookup, LookupResult}
|
||||
import net.psforever.services.account.{AccountPersistenceService, PlayerToken}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.support.RemoverActor
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.services.hart.HartTimer
|
||||
import net.psforever.services.local.support.HackCaptureActor
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.services.properties.PropertyOverrideManager
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.services.{CavernRotationService, Service, ServiceManager, InterstellarClusterService => ICS}
|
||||
import net.psforever.types._
|
||||
import net.psforever.util.{Config, DefinitionUtil}
|
||||
|
|
@ -128,7 +129,7 @@ object ZoningOperations {
|
|||
.filter(p => Sidedness.equals(side, p.WhichSide))
|
||||
.map(_.Name) ++ additionalChannels)
|
||||
.foreach { target =>
|
||||
events ! LocalServiceMessage(target, effectMessage)
|
||||
events ! MessageEnvelope(target, effectMessage)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -156,11 +157,11 @@ object ZoningOperations {
|
|||
}
|
||||
val effectMessage = LocalAction.TriggerEffectLocation(s"respawn_$faction", position, orientation)
|
||||
(effectTargets.map(_.Name) ++ additionalChannels).foreach { target =>
|
||||
events ! LocalServiceMessage(target, effectMessage)
|
||||
events ! MessageEnvelope(target, effectMessage)
|
||||
}
|
||||
val soundMessage = LocalAction.TriggerSound(TriggeredSound.SpawnInTube, position, 50, 0.69803923f)
|
||||
(soundTargets.map(_.Name) ++ additionalChannels).foreach { target =>
|
||||
events ! LocalServiceMessage(target, soundMessage)
|
||||
events ! MessageEnvelope(target, soundMessage)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -549,7 +550,7 @@ class ZoningOperations(
|
|||
sendResponse(OCM.apply(projectile))
|
||||
}
|
||||
//spawn point update request
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
VehicleAction.UpdateAmsSpawnPoint(continent)
|
||||
)
|
||||
|
|
@ -597,7 +598,7 @@ class ZoningOperations(
|
|||
context.self
|
||||
)
|
||||
LivePlayerList.Add(avatar.id, avatar)
|
||||
galaxyService.tell(GalaxyServiceMessage(GalaxyAction.LogStatusChange(avatar.name)), context.parent)
|
||||
galaxyService.tell(MessageEnvelope("", GalaxyAction.LogStatusChange(avatar.name)), context.parent)
|
||||
//PropertyOverrideMessage
|
||||
ServiceManager.serviceManager ! Lookup("propertyOverrideManager")
|
||||
sendResponse(PlanetsideAttributeMessage(PlanetSideGUID(0), 112, 0)) // disable festive backpacks
|
||||
|
|
@ -853,7 +854,7 @@ class ZoningOperations(
|
|||
case None =>
|
||||
spawn.deadState = DeadState.Release // cancel movement updates
|
||||
player.Position = position
|
||||
// continent.AvatarEvents ! AvatarServiceMessage(continent.Id, ObjectDelete(player.GUID, player.GUID))
|
||||
// continent.AvatarEvents ! MessageEnvelope(continent.Id, ObjectDelete(player.GUID, player.GUID))
|
||||
spawn.LoadZonePhysicalSpawnPoint(zoneId, position, Vector3.Zero, 0 seconds, None)
|
||||
case _ => // seated in something that is not a vehicle or the vehicle is cargo, in which case we can't move
|
||||
}
|
||||
|
|
@ -1207,7 +1208,7 @@ class ZoningOperations(
|
|||
sendResponse(OCM.apply(llu))
|
||||
// Attach it to a player if it has a carrier
|
||||
if (llu.Carrier.nonEmpty) {
|
||||
continent.LocalEvents ! LocalServiceMessage(
|
||||
continent.LocalEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(ObjectAttachMessage(llu.Carrier.get.GUID, llu.GUID, 252))
|
||||
|
|
@ -1352,7 +1353,7 @@ class ZoningOperations(
|
|||
val pguid = player.GUID
|
||||
val toChannel = manifest.file
|
||||
val topLevel = interstellarFerryTopLevelGUID.getOrElse(vehicle.GUID)
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
s"${vehicle.Actor}",
|
||||
pguid,
|
||||
VehicleAction.TransferPassengerChannel(s"${vehicle.Actor}", toChannel, vehicle, topLevel)
|
||||
|
|
@ -1366,7 +1367,7 @@ class ZoningOperations(
|
|||
cargo.Actor ! CargoBehavior.StartCargoDismounting(bailed = false)
|
||||
case entry =>
|
||||
val cargo = vehicle.CargoHolds(entry.mount).occupant.get
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
entry.name,
|
||||
pguid,
|
||||
VehicleAction.TransferPassengerChannel(s"${cargo.Actor}", toChannel, cargo, topLevel)
|
||||
|
|
@ -1398,7 +1399,7 @@ class ZoningOperations(
|
|||
interstellarFerryTopLevelGUID =
|
||||
if (manifest.passengers.isEmpty && manifest.cargo.count { !_.name.equals("MISSING_DRIVER") } == 0) {
|
||||
//do not delete if vehicle has passengers or cargo
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
VehicleAction.UnloadVehicle(vehicle, topLevel)
|
||||
|
|
@ -1476,14 +1477,14 @@ class ZoningOperations(
|
|||
case Some(manifest) =>
|
||||
val toChannel = manifest.file
|
||||
val topLevel = interstellarFerryTopLevelGUID.getOrElse(vehicle.GUID)
|
||||
galaxyService ! GalaxyServiceMessage(toChannel, GalaxyAction.TransferPassenger(player_guid, toChannel, vehicle, topLevel, manifest))
|
||||
galaxyService ! MessageEnvelope(toChannel, GalaxyAction.TransferPassenger(player_guid, toChannel, vehicle, topLevel, manifest))
|
||||
vehicle.CargoHolds.values
|
||||
.collect {
|
||||
case hold if hold.isOccupied =>
|
||||
val cargo = hold.occupant.get
|
||||
cargo.Continent = toZoneId
|
||||
//point to the cargo vehicle to instigate cargo vehicle driver transportation
|
||||
// galaxyService ! GalaxyServiceMessage(
|
||||
// galaxyService ! MesdsageEnvelope(
|
||||
// toChannel,
|
||||
// GalaxyAction.TransferPassenger(player_guid, toChannel, vehicle, topLevel, manifest)
|
||||
// )
|
||||
|
|
@ -2194,7 +2195,7 @@ class ZoningOperations(
|
|||
log.info(s"RestoreInfo: player $name is already logged in zone ${inZone.id}; rejoining that character")
|
||||
sessionLogic.persistFunc = UpdatePersistence(from)
|
||||
//tell the old WorldSessionActor to kill itself by using its own subscriptions against itself
|
||||
inZone.AvatarEvents ! AvatarServiceMessage(name, AvatarAction.TeardownConnection())
|
||||
inZone.AvatarEvents ! MessageEnvelope(name, AvatarAction.TeardownConnection())
|
||||
spawn.switchAvatarStatisticsFieldToRefreshAfterRespawn()
|
||||
//find and reload previous player
|
||||
(
|
||||
|
|
@ -2597,7 +2598,7 @@ class ZoningOperations(
|
|||
vehicle.CargoHolds.values
|
||||
.collect { case hold if hold.isOccupied => hold.occupant.get }
|
||||
.foreach { _.MountedIn = vguid }
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneid,
|
||||
player.GUID,
|
||||
VehicleAction.LoadVehicle(vehicle, vObjectId, vguid, data)
|
||||
|
|
@ -2625,7 +2626,7 @@ class ZoningOperations(
|
|||
//do not dispatch delete action if any hierarchical occupant has not gotten this far through the summoning process
|
||||
val vehicleToDelete = interstellarFerryTopLevelGUID.orElse(originalSeated).getOrElse(PlanetSideGUID(0))
|
||||
val zone = vehicle.PreviousGatingManifest().get.origin
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
player.GUID,
|
||||
VehicleAction.UnloadVehicle(vehicle, vehicleToDelete)
|
||||
|
|
@ -2643,7 +2644,7 @@ class ZoningOperations(
|
|||
val definition = player.avatar.definition
|
||||
val guid = player.GUID
|
||||
sendResponse(OCM.detailed(player))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
s"spectator",
|
||||
guid,
|
||||
AvatarAction.LoadPlayer(definition.ObjectId, guid, definition.Packet.ConstructorData(player).get, None)
|
||||
|
|
@ -2655,7 +2656,7 @@ class ZoningOperations(
|
|||
val guid = player.GUID
|
||||
usingSpawnTubeAnimation()
|
||||
sendResponse(OCM.detailed(player))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
guid,
|
||||
AvatarAction.LoadPlayer(definition.ObjectId, guid, definition.Packet.ConstructorData(player).get, None)
|
||||
|
|
@ -2728,7 +2729,7 @@ class ZoningOperations(
|
|||
interimUngunnedVehicle = Some(vguid)
|
||||
interimUngunnedVehicleSeat = Some(seat)
|
||||
}
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
pguid,
|
||||
AvatarAction.LoadPlayer(
|
||||
|
|
@ -2887,7 +2888,7 @@ class ZoningOperations(
|
|||
case _ => ()
|
||||
}
|
||||
if (player.VisibleSlots.contains(index)) {
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
ObjectDelete(obj.GUID)
|
||||
)
|
||||
|
|
@ -2905,7 +2906,6 @@ class ZoningOperations(
|
|||
* To the game, that is a backpack (or some pastry, festive graphical modification allowing).
|
||||
* @see `AvatarAction.ObjectDelete`
|
||||
* @see `AvatarAction.Release`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `FriskDeadBody`
|
||||
* @see `GUIDTask.unregisterPlayer`
|
||||
* @see `ObjectDeleteMessage`
|
||||
|
|
@ -2923,7 +2923,7 @@ class ZoningOperations(
|
|||
val pguid = tplayer.GUID
|
||||
zone.Population ! Zone.Population.Release(avatar)
|
||||
sendResponse(ObjectDeleteMessage(pguid, 0))
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, pguid, ObjectDelete(pguid))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, pguid, ObjectDelete(pguid))
|
||||
TaskWorkflow.execute(GUIDTask.unregisterPlayer(zone.GUID, tplayer))
|
||||
}
|
||||
}
|
||||
|
|
@ -2933,7 +2933,6 @@ class ZoningOperations(
|
|||
* To the game, that is a backpack (or some pastry, festive graphical modification allowing).
|
||||
* A player who has been kicked may not turn into a corpse.
|
||||
* @see `AvatarAction.Release`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `CorpseConverter.converter`
|
||||
* @see `DepictPlayerAsCorpse`
|
||||
* @see `Player.Release`
|
||||
|
|
@ -3179,7 +3178,7 @@ class ZoningOperations(
|
|||
// entering or exiting VR zones uses a fade-out effect for the player instead of the usual green cloud deconstruction effect
|
||||
val effect = if (player.IsInVRZone || zoneId.startsWith("tz")) 2 else 1
|
||||
sendResponse(ObjectDeleteMessage(player_guid, unk1=effect))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(
|
||||
continent.AvatarEvents ! MessageEnvelope(
|
||||
continent.id,
|
||||
player_guid,
|
||||
ObjectDelete(player_guid, unk=effect)
|
||||
|
|
@ -3346,7 +3345,7 @@ class ZoningOperations(
|
|||
//looking for squad (members)
|
||||
if (tplayer.avatar.lookingForSquad) {
|
||||
sendResponse(PlanetsideAttributeMessage(guid, 53, 1))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, guid, PlanetsideAttribute(guid, 53, 1))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, guid, PlanetsideAttribute(guid, 53, 1))
|
||||
}
|
||||
sendResponse(AvatarSearchCriteriaMessage(guid, List(0, 0, 0, 0, 0, 0)))
|
||||
//these are facilities and towers and bunkers in the zone, but not necessarily all of them for some reason
|
||||
|
|
@ -3372,7 +3371,7 @@ class ZoningOperations(
|
|||
if (tplayer.ExoSuit == ExoSuitType.MAX) {
|
||||
sendResponse(PlanetsideAttributeMessage(guid, 7, tplayer.Capacitor.toLong))
|
||||
sendResponse(PlanetsideAttributeMessage(guid, 4, tplayer.Armor))
|
||||
continent.AvatarEvents ! AvatarServiceMessage(continent.id, PlanetsideAttribute(guid, 4, tplayer.Armor))
|
||||
continent.AvatarEvents ! MessageEnvelope(continent.id, PlanetsideAttribute(guid, 4, tplayer.Armor))
|
||||
}
|
||||
// for issue #1269
|
||||
continent.AllPlayers.filter(_.ExoSuit == ExoSuitType.MAX).foreach(max => sendResponse(PlanetsideAttributeMessage(max.GUID, 4, max.Armor)))
|
||||
|
|
@ -3396,7 +3395,7 @@ class ZoningOperations(
|
|||
continent.GUID(tplayer.avatar.vehicle) match {
|
||||
case Some(vehicle: Vehicle) if vehicle.OwnerName.contains(tplayer.Name) =>
|
||||
vehicle.OwnerGuid = guid
|
||||
continent.VehicleEvents ! VehicleServiceMessage(
|
||||
continent.VehicleEvents ! MessageEnvelope(
|
||||
s"${tplayer.Faction}",
|
||||
guid,
|
||||
VehicleAction.Ownership(vehicle.GUID)
|
||||
|
|
@ -3500,8 +3499,10 @@ class ZoningOperations(
|
|||
val zone = tplayer.Zone
|
||||
val channel = zone.id
|
||||
val events = zone.AvatarEvents
|
||||
events ! AvatarServiceMessage(channel, PlanetsideAttribute(guid, 0, 120))
|
||||
events ! AvatarServiceMessage(channel, PlanetsideAttribute(guid, 1, 120))
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(List(PlanetsideAttributeMessage(guid, 0, 120), PlanetsideAttributeMessage(guid, 1, 120)))
|
||||
)
|
||||
case _ => ()
|
||||
}
|
||||
doorsThatShouldBeOpenInRange(pos, range = 100f)
|
||||
|
|
@ -4005,14 +4006,14 @@ class ZoningOperations(
|
|||
val pZone = player.Zone
|
||||
sendResponse(GenericActionMessage(FirstPersonViewWithEffect))
|
||||
pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID =>
|
||||
pZone.LocalEvents ! LocalServiceMessage(
|
||||
pZone.LocalEvents ! MessageEnvelope(
|
||||
t.Name,
|
||||
t.GUID,
|
||||
GenericObjectAction(player.GUID, GenericObjectActionEnum.PlayerDeconstructs.id)
|
||||
)
|
||||
}
|
||||
pZone.AllPlayers.collect { case t if t.GUID != player.GUID && !t.allowInteraction =>
|
||||
pZone.LocalEvents ! LocalServiceMessage(
|
||||
pZone.LocalEvents ! MessageEnvelope(
|
||||
t.Name,
|
||||
t.GUID,
|
||||
GenericObjectAction(player.GUID, GenericObjectActionEnum.PlayerDeconstructs.id)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.packet.PlanetSideGamePacket
|
||||
import net.psforever.packet.game.ContinentalLockUpdateMessage
|
||||
import net.psforever.persistence
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{SendResponse, SetEmpire}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.services.{InterstellarClusterService, ServiceManager}
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
import net.psforever.util.Database.ctx
|
||||
|
|
@ -168,7 +168,7 @@ object BuildingActor {
|
|||
val building = details.building
|
||||
val zone = building.Zone
|
||||
building.Faction = faction
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, SetEmpire(building.GUID, faction))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, SetEmpire(building.GUID, faction))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -232,8 +232,8 @@ class BuildingActor(
|
|||
Behaviors.same
|
||||
|
||||
case MapUpdate() =>
|
||||
details.galaxyService ! GalaxyServiceMessage(GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
details.galaxyService ! GalaxyServiceMessage(SendResponse(details.building.densityLevelUpdateMessage(building)))
|
||||
details.galaxyService ! MessageEnvelope("", GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
details.galaxyService ! MessageEnvelope("", SendResponse(details.building.densityLevelUpdateMessage(building)))
|
||||
Behaviors.same
|
||||
|
||||
case AmenityStateChange(amenity, data) =>
|
||||
|
|
@ -255,15 +255,15 @@ class BuildingActor(
|
|||
logic.ntu(details, msg)
|
||||
|
||||
case DensityLevelUpdate(building) =>
|
||||
details.galaxyService ! GalaxyServiceMessage(SendResponse(details.building.densityLevelUpdateMessage(building)))
|
||||
details.galaxyService ! MessageEnvelope("", SendResponse(details.building.densityLevelUpdateMessage(building)))
|
||||
Behaviors.same
|
||||
|
||||
case ContinentalLock(zone) =>
|
||||
details.galaxyService ! GalaxyServiceMessage(SendResponse(ContinentalLockUpdateMessage(zone.Number, zone.lockedBy)))
|
||||
details.galaxyService ! MessageEnvelope("", SendResponse(ContinentalLockUpdateMessage(zone.Number, zone.lockedBy)))
|
||||
Behaviors.same
|
||||
|
||||
case HomeLockBenefits(msg) =>
|
||||
details.galaxyService ! GalaxyServiceMessage(SendResponse(msg))
|
||||
details.galaxyService ! MessageEnvelope("", SendResponse(msg))
|
||||
Behaviors.same
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import net.psforever.objects.zones.exp.{ExperienceCalculator, SupportExperienceC
|
|||
import net.psforever.packet.game.{BuildingInfoUpdateMessage, PlanetsideAttributeMessage}
|
||||
import net.psforever.util.Database._
|
||||
import net.psforever.persistence
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
|
||||
import scala.collection.mutable
|
||||
import scala.util.{Failure, Success}
|
||||
|
|
@ -235,24 +235,24 @@ class ZoneActor(
|
|||
}
|
||||
buildingOpt.foreach { building =>
|
||||
if (msg.generator_state == PlanetSideGeneratorState.Normal && building.hasCavernLockBenefit) {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(PlanetsideAttributeMessage(building.GUID, 67, 1))
|
||||
)
|
||||
}
|
||||
msg.is_hacked match {
|
||||
case true if building.BuildingType == StructureType.Facility && !zone.map.cavern =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(PlanetsideAttributeMessage(building.GUID, 67, 0))
|
||||
)
|
||||
case false if building.hasCavernLockBenefit =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(PlanetsideAttributeMessage(building.GUID, 67, 1))
|
||||
)
|
||||
case false if building.BuildingType == StructureType.Facility && !zone.map.cavern && !building.hasCavernLockBenefit =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(PlanetsideAttributeMessage(building.GUID, 67, 0))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import net.psforever.actors.commands.NtuCommand
|
|||
import net.psforever.actors.zone.{BuildingActor, BuildingControlDetails, ZoneActor}
|
||||
import net.psforever.objects.serverobject.structures.{Amenity, Building, StructureType}
|
||||
import net.psforever.objects.serverobject.terminals.capture.{CaptureTerminal, CaptureTerminalAware, CaptureTerminalAwareBehavior}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.services.local.support.{HackClearActor, HackClearEnvelope}
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ case object CavernFacilityLogic
|
|||
})
|
||||
// No map update needed - will be sent by `HackCaptureActor` when required
|
||||
case _ =>
|
||||
details.galaxyService ! GalaxyServiceMessage(GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
details.galaxyService ! MessageEnvelope("", GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
}
|
||||
Behaviors.same
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import net.psforever.actors.commands.NtuCommand
|
|||
import net.psforever.actors.zone.{BuildingActor, BuildingControlDetails}
|
||||
import net.psforever.objects.serverobject.structures.{Amenity, Building}
|
||||
import net.psforever.objects.serverobject.terminals.capture.{CaptureTerminal, CaptureTerminalAware, CaptureTerminalAwareBehavior}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.services.local.support.{HackClearActor, HackClearEnvelope}
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ case object FacilityLogic
|
|||
})
|
||||
// No map update needed - will be sent by `HackCaptureActor` when required
|
||||
case _ =>
|
||||
details.galaxyService ! GalaxyServiceMessage(GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
details.galaxyService ! MessageEnvelope("", GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
}
|
||||
Behaviors.same
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ import net.psforever.objects.serverobject.resourcesilo.ResourceSiloControl
|
|||
import net.psforever.objects.serverobject.structures.{Amenity, Building}
|
||||
import net.psforever.objects.serverobject.terminals.capture.{CaptureTerminal, CaptureTerminalAware, CaptureTerminalAwareBehavior}
|
||||
import net.psforever.objects.sourcing.PlayerSource
|
||||
import net.psforever.packet.game.PlanetsideAttributeMessage
|
||||
import net.psforever.packet.game.{GenericObjectActionMessage, PlanetsideAttributeMessage}
|
||||
import net.psforever.services.InterstellarClusterService
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{GenericObjectAction, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.services.local.support.{CaptureEnvelope, HackCaptureActor, HackClearActor, HackClearEnvelope}
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.types.{PlanetSideEmpire, PlanetSideGeneratorState}
|
||||
|
||||
/**
|
||||
* A package class that conveys the important information for handling facility updates.
|
||||
|
|
@ -119,7 +119,7 @@ case object MajorFacilityLogic
|
|||
.filter(amenity => applicable.contains(amenity.Definition))
|
||||
.foreach { _.Actor ! msg }
|
||||
case _ =>
|
||||
details.galaxyService ! GalaxyServiceMessage(GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
details.galaxyService ! MessageEnvelope("", GalaxyAction.MapUpdate(details.building.infoUpdateMessage()))
|
||||
}
|
||||
Behaviors.same
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ case object MajorFacilityLogic
|
|||
val guid = building.GUID
|
||||
val msg = GenericObjectAction(guid, 15)
|
||||
building.PlayersInSOI.foreach { player =>
|
||||
events ! AvatarServiceMessage(player.Name, msg)
|
||||
events ! MessageEnvelope(player.Name, msg)
|
||||
}
|
||||
false
|
||||
case Some(GeneratorControl.Event.Critical) =>
|
||||
|
|
@ -214,7 +214,7 @@ case object MajorFacilityLogic
|
|||
val guid = building.GUID
|
||||
val msg = PlanetsideAttribute(guid, 46, 1)
|
||||
building.PlayersInSOI.foreach { player =>
|
||||
events ! AvatarServiceMessage(player.Name, msg)
|
||||
events ! MessageEnvelope(player.Name, msg)
|
||||
}
|
||||
true
|
||||
case Some(GeneratorControl.Event.Destabilized) =>
|
||||
|
|
@ -222,10 +222,10 @@ case object MajorFacilityLogic
|
|||
val guid = building.GUID
|
||||
val msg = GenericObjectAction(guid, 16)
|
||||
building.PlayersInSOI.foreach { player =>
|
||||
events ! AvatarServiceMessage(player.Name, msg)
|
||||
events ! MessageEnvelope(player.Name, msg)
|
||||
}
|
||||
if (building.hasCavernLockBenefit) {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(PlanetsideAttributeMessage(building.GUID, 67, 0))
|
||||
)
|
||||
|
|
@ -238,7 +238,7 @@ case object MajorFacilityLogic
|
|||
val zone = building.Zone
|
||||
val msg = PlanetsideAttribute(building.GUID, 46, 2)
|
||||
building.PlayersInSOI.foreach { player =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(player.Name, msg)
|
||||
zone.AvatarEvents ! MessageEnvelope(player.Name, msg)
|
||||
} //???
|
||||
true
|
||||
case Some(GeneratorControl.Event.Normal) =>
|
||||
|
|
@ -248,12 +248,14 @@ case object MajorFacilityLogic
|
|||
powerRestored(details)
|
||||
val events = zone.AvatarEvents
|
||||
val guid = building.GUID
|
||||
val msg1 = PlanetsideAttribute(guid, 46, 0)
|
||||
val msg2 = GenericObjectAction(guid, 17)
|
||||
//1. reset ???; might be global?
|
||||
//2. This facility's generator is back on line
|
||||
val list = SendResponse(List(
|
||||
PlanetsideAttributeMessage(guid, 46, 0),
|
||||
GenericObjectActionMessage(guid, 17)
|
||||
))
|
||||
building.PlayersInSOI.foreach { player =>
|
||||
val name = player.Name
|
||||
events ! AvatarServiceMessage(name, msg1) //reset ???; might be global?
|
||||
events ! AvatarServiceMessage(name, msg2) //This facility's generator is back on line
|
||||
events ! MessageEnvelope(player.Name, list)
|
||||
}
|
||||
true
|
||||
case _ =>
|
||||
|
|
@ -304,10 +306,12 @@ case object MajorFacilityLogic
|
|||
building.Amenities.foreach { amenity =>
|
||||
amenity.Actor ! powerMsg
|
||||
}
|
||||
//amenities disabled; red warning lights
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(guid, 48, 1))
|
||||
//disable spawn target on deployment map
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(guid, 38, 0))
|
||||
//1. amenities disabled; red warning lights
|
||||
//2 .disable spawn target on deployment map
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(guid, 48, 1), PlanetsideAttributeMessage(guid, 38, 0)))
|
||||
)
|
||||
Behaviors.same
|
||||
}
|
||||
|
||||
|
|
@ -327,10 +331,12 @@ case object MajorFacilityLogic
|
|||
building.Amenities.foreach { amenity =>
|
||||
amenity.Actor ! powerMsg
|
||||
}
|
||||
//amenities enabled; normal lights
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(guid, 48, 0))
|
||||
//enable spawn target on deployment map
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(guid, 38, 1))
|
||||
//1. amenities enabled; normal lights
|
||||
//2. enable spawn target on deployment map
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(guid, 48, 0), PlanetsideAttributeMessage(guid, 38, 1)))
|
||||
)
|
||||
Behaviors.same
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import akka.actor.typed.scaladsl.Behaviors
|
|||
import net.psforever.actors.commands.NtuCommand
|
||||
import net.psforever.actors.zone.BuildingActor
|
||||
import net.psforever.objects.serverobject.structures.{Amenity, Building, WarpGate}
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
import net.psforever.util.Config
|
||||
|
||||
|
|
@ -182,7 +183,7 @@ case object WarpGateLogic
|
|||
val pairedWgFaction = pairedWg.Faction
|
||||
if (pairedWgFaction != terminalWgFaction) {
|
||||
pairedWg.Faction = terminalWgFaction
|
||||
details.galaxyService ! GalaxyServiceMessage(GalaxyAction.MapUpdate(pairedWg.infoUpdateMessage()))
|
||||
details.galaxyService ! MessageEnvelope("", GalaxyAction.MapUpdate(pairedWg.infoUpdateMessage()))
|
||||
}
|
||||
//the terminal warpgate can not be considered broadcast for other faction
|
||||
if (terminalWg.AllowBroadcastFor.contains(pairedWgFaction)) {
|
||||
|
|
@ -209,7 +210,7 @@ case object WarpGateLogic
|
|||
)
|
||||
warpgate.AllowBroadcastFor = setBroadcastTo
|
||||
(setBroadcastTo ++ previousAllowances).foreach { faction =>
|
||||
events ! GalaxyServiceMessage(faction.toString, msg)
|
||||
events ! MessageEnvelope(faction.toString, msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ import net.psforever.objects.sourcing.AmenitySource
|
|||
import net.psforever.objects.vital.TerminalUsedActivity
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.types.{ExoSuitType, PlanetSideGUID, TransactionType, Vector3}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.ObjectDelete
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -326,7 +327,7 @@ object WorldSession {
|
|||
case _ =>
|
||||
forcedTolowerRaisedArm(localPlayer, localPlayer.GUID, localZone)
|
||||
localPlayer.DrawnSlot = localSlot
|
||||
localZone.AvatarEvents ! AvatarServiceMessage(localZone.id, localGUID, AvatarAction.ObjectHeld(localSlot, localSlot))
|
||||
localZone.AvatarEvents ! MessageEnvelope(localZone.id, localGUID, AvatarAction.ObjectHeld(localSlot, localSlot))
|
||||
}
|
||||
Future(this)
|
||||
}
|
||||
|
|
@ -367,7 +368,7 @@ object WorldSession {
|
|||
localZone.GUID(item_guid) match {
|
||||
case Some(_) => ()
|
||||
case None => //acting on old data?
|
||||
localZone.AvatarEvents ! AvatarServiceMessage(localZone.id, ObjectDelete(item_guid))
|
||||
localZone.AvatarEvents ! MessageEnvelope(localZone.id, ObjectDelete(item_guid))
|
||||
}
|
||||
case _ => ()
|
||||
}
|
||||
|
|
@ -526,7 +527,6 @@ object WorldSession {
|
|||
* Failure of this process is not supported and may lead to irregular behavior.
|
||||
* @see `ActorRef`
|
||||
* @see `AvatarAction.ObjectDelete`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `Containable.MoveItem`
|
||||
* @see `Container`
|
||||
* @see `Equipment`
|
||||
|
|
@ -591,7 +591,7 @@ object WorldSession {
|
|||
localGUID match {
|
||||
case Some(guid) =>
|
||||
//see LockerContainerControl.RemoveItemFromSlotCallback
|
||||
localSource.Zone.AvatarEvents ! AvatarServiceMessage(localChannel, ObjectDelete(guid))
|
||||
localSource.Zone.AvatarEvents ! MessageEnvelope(localChannel, ObjectDelete(guid))
|
||||
case None => ()
|
||||
}
|
||||
val moveResult = ask(localDestination.Actor, Containable.PutItemInSlotOrAway(localItem, Some(localDestSlot)))
|
||||
|
|
@ -616,8 +616,7 @@ object WorldSession {
|
|||
* Remove an item from a player's locker inventory.
|
||||
* Failure of this process is not supported and may lead to irregular behavior.
|
||||
* @see `ActorRef`
|
||||
* @see `AvatarAction.ObjectDelete`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `ObjectDelete`
|
||||
* @see `Containable.MoveItem`
|
||||
* @see `Container`
|
||||
* @see `Equipment`
|
||||
|
|
@ -693,7 +692,7 @@ object WorldSession {
|
|||
localGUID match {
|
||||
case Some(guid) =>
|
||||
//see LockerContainerControl.RemoveItemFromSlotCallback
|
||||
localSource.Zone.AvatarEvents ! AvatarServiceMessage(localChannel, ObjectDelete(guid))
|
||||
localSource.Zone.AvatarEvents ! MessageEnvelope(localChannel, ObjectDelete(guid))
|
||||
case None => ()
|
||||
}
|
||||
val moveResult = ask(localDestination.Actor, Containable.PutItemInSlotOrAway(localItem, Some(localDestSlot)))
|
||||
|
|
@ -730,8 +729,7 @@ object WorldSession {
|
|||
* 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.
|
||||
* @see `AvatarAction.ObjectHeld`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `ObjectHeld`
|
||||
* @see `Containable.RemoveItemFromSlot`
|
||||
* @see `countRestrictAttempts`
|
||||
* @see `forcedTolowerRaisedArm`
|
||||
|
|
@ -783,7 +781,7 @@ object WorldSession {
|
|||
}
|
||||
//put up hand with grenade in it
|
||||
tplayer.DrawnSlot = slotNum
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, guid, AvatarAction.ObjectHeld(slotNum, slotNum))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, guid, AvatarAction.ObjectHeld(slotNum, slotNum))
|
||||
log.info(s"${tplayer.Name} has quickly drawn a ${grenade.Definition.Name}")
|
||||
None
|
||||
case None =>
|
||||
|
|
@ -857,8 +855,7 @@ object WorldSession {
|
|||
/**
|
||||
* If the player has a raised arm, lower it.
|
||||
* Do it manually, bypassing the checks in the normal procedure.
|
||||
* @see `AvatarAction.ObjectHeld`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `ObjectHeld`
|
||||
* @see `Player.DrawnSlot`
|
||||
* @see `Player.HandsDownSlot`
|
||||
* @param tplayer the player
|
||||
|
|
@ -870,7 +867,7 @@ object WorldSession {
|
|||
val slot = tplayer.DrawnSlot
|
||||
if (slot != Player.HandsDownSlot) {
|
||||
tplayer.DrawnSlot = Player.HandsDownSlot
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, guid, AvatarAction.ObjectHeld(Player.HandsDownSlot, slot))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, guid, AvatarAction.ObjectHeld(Player.HandsDownSlot, slot))
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
|
@ -933,7 +930,7 @@ object WorldSession {
|
|||
player.ContributionFrom(term)
|
||||
}
|
||||
}
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.TerminalOrderResult(guid, transaction, result)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import net.psforever.objects.vital.Vitality
|
|||
import net.psforever.objects.vital.etc.TriggerUsedReason
|
||||
import net.psforever.objects.vital.interaction.DamageInteraction
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.ObjectDelete
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
|
||||
import scala.annotation.unused
|
||||
|
|
@ -87,9 +87,9 @@ class BoomerDeployableControl(mine: BoomerDeployable)
|
|||
val events = mine.Zone.LocalEvents
|
||||
val msg = LocalAction.DeployItem(mine)
|
||||
originalOwner.collect { name =>
|
||||
events ! LocalServiceMessage(name, msg)
|
||||
events ! MessageEnvelope(name, msg)
|
||||
}
|
||||
events ! LocalServiceMessage(player.Name, msg)
|
||||
events ! MessageEnvelope(player.Name, msg)
|
||||
}
|
||||
|
||||
override def dismissDeployable() : Unit = {
|
||||
|
|
@ -107,7 +107,7 @@ class BoomerDeployableControl(mine: BoomerDeployable)
|
|||
zone.Ground ! Zone.Ground.RemoveItem(guid)
|
||||
case _ => ()
|
||||
}
|
||||
zone.AvatarEvents! AvatarServiceMessage(
|
||||
zone.AvatarEvents! MessageEnvelope(
|
||||
zone.id,
|
||||
ObjectDelete(guid)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ import net.psforever.objects.ce.{Deployable, DeployedItem}
|
|||
import net.psforever.objects.sourcing.{PlayerSource, SourceEntry}
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
object Deployables {
|
||||
//private val log = org.log4s.getLogger("Deployables")
|
||||
|
|
@ -92,7 +93,7 @@ object Deployables {
|
|||
}
|
||||
target.AssignOwnership(None)
|
||||
}
|
||||
events ! LocalServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
s"${target.Faction}",
|
||||
LocalAction.DeployableMapIcon(DeploymentAction.Dismiss, DeployableInfo(target.GUID, Deployable.Icon(item), target.Position, PlanetSideGUID(0)))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@ import net.psforever.objects.vital.projectile.ProjectileReason
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.types.Vector3
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.annotation.unused
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -182,7 +183,7 @@ object ExplosiveDeployableControl {
|
|||
target.Health = 1 // short-circuit logic in DestructionAwareness
|
||||
val zone = target.Zone
|
||||
zone.Activity ! Zone.HotSpot.Activity(cause)
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, LocalAction.Detonate(target.GUID, target))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, LocalAction.Detonate(target.GUID, target))
|
||||
Zone.serverSideDamage(
|
||||
zone,
|
||||
target,
|
||||
|
|
@ -210,12 +211,12 @@ object ExplosiveDeployableControl {
|
|||
Some(if (target.Jammed || target.Destroyed) 0 seconds else 500 milliseconds)
|
||||
)
|
||||
target.Destroyed = true
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
AvatarAction.Destroy(target.GUID, attribution, Service.defaultPlayerGUID, target.Position)
|
||||
)
|
||||
if (target.Health == 0) {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffect("detonate_damaged_mine", target.GUID)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import net.psforever.objects.serverobject.{CommonMessages, PlanetSideServerObjec
|
|||
import net.psforever.objects.sourcing.{PlayerSource, SourceEntry, TurretSource}
|
||||
import net.psforever.objects.vital.{DismountingActivity, InGameActivity, MountingActivity, ShieldCharge}
|
||||
import net.psforever.packet.game.HackState1
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
|
||||
import scala.annotation.unused
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class FieldTurretControl(turret: TurretDeployable)
|
|||
if (canChargeShields) {
|
||||
turret.LogActivity(ShieldCharge(amount, motivator))
|
||||
turret.Shields = turret.Shields + amount
|
||||
turret.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
turret.Zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${turret.Actor}",
|
||||
PlanetsideAttribute(turret.GUID, turret.Definition.shieldUiAttribute, turret.Shields)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.packet.game._
|
||||
import net.psforever.types.{ChatMessageType, ExoSuitType, PlanetSideGUID, Vector3}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, SendResponse}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.annotation.tailrec
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ object Players {
|
|||
) {
|
||||
val events = target.Zone.AvatarEvents
|
||||
val uname = user.Name
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
uname,
|
||||
SendResponse(RepairMessage(target.GUID, progress.toInt))
|
||||
)
|
||||
|
|
@ -317,7 +318,7 @@ object Players {
|
|||
): Boolean = {
|
||||
if (player.Zone == obj.Zone && addFunc(obj)) {
|
||||
obj.Actor ! Deployable.Ownership(player)
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
player.Zone.LocalEvents ! MessageEnvelope(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
|
@ -334,7 +335,7 @@ object Players {
|
|||
//sent to avatar event bus to preempt additional tool management
|
||||
buildCooldownReset(zone, channel, obj.GUID)
|
||||
//sent to local event bus to cooperate with deployable management
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
channel,
|
||||
LocalAction.DeployableUIFor(obj.Definition.Item)
|
||||
)
|
||||
|
|
@ -348,7 +349,7 @@ object Players {
|
|||
*/
|
||||
def buildCooldownReset(zone: Zone, channel: String, guid: PlanetSideGUID): Unit = {
|
||||
//sent to avatar event bus to preempt additional tool management
|
||||
zone.AvatarEvents ! AvatarServiceMessage(channel, SendResponse(GenericObjectActionMessage(guid, 21)))
|
||||
zone.AvatarEvents ! MessageEnvelope(channel, SendResponse(GenericObjectActionMessage(guid, 21)))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -404,7 +405,7 @@ object Players {
|
|||
}
|
||||
}) {
|
||||
val zone = player.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, ObjectDelete(tool.GUID))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, ObjectDelete(tool.GUID))
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
|
@ -442,20 +443,20 @@ object Players {
|
|||
player.Inventory -= x.start
|
||||
obj.FireModeIndex = fireMode
|
||||
//TODO any penalty for being handed an OCM version of the tool?
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zone.id,
|
||||
AvatarAction.EquipmentInHand(pguid, index, obj)
|
||||
)
|
||||
if (obj.AmmoTypeIndex != ammoType) {
|
||||
obj.AmmoTypeIndex = ammoType
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
name,
|
||||
SendResponse(ChangeAmmoMessage(obj.GUID, ammoType))
|
||||
)
|
||||
}
|
||||
if (player.DrawnSlot == Player.HandsDownSlot) {
|
||||
player.DrawnSlot = index
|
||||
events ! AvatarServiceMessage(zone.id, pguid, AvatarAction.ObjectHeld(index, index))
|
||||
events ! MessageEnvelope(zone.id, pguid, AvatarAction.ObjectHeld(index, index))
|
||||
}
|
||||
}
|
||||
case Nil => ; //no replacements found
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import net.psforever.objects.serverobject.hackable.Hackable
|
|||
import net.psforever.objects.serverobject.repair.RepairableEntity
|
||||
import net.psforever.objects.vital.SimpleResolutions
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{PlanetSideGUID, Vector3}
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.annotation.unused
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -75,7 +75,7 @@ class SensorDeployableControl(sensor: SensorDeployable)
|
|||
override def StartJammeredSound(target: Any, dur: Int): Unit =
|
||||
target match {
|
||||
case obj: PlanetSideServerObject if !jammedSound =>
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 54, 1)
|
||||
)
|
||||
|
|
@ -87,7 +87,7 @@ class SensorDeployableControl(sensor: SensorDeployable)
|
|||
target match {
|
||||
case obj: PlanetSideServerObject with JammableUnit =>
|
||||
val zone = obj.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffectInfo(obj.GUID, "on", unk1=false, 1000)
|
||||
)
|
||||
|
|
@ -99,7 +99,7 @@ class SensorDeployableControl(sensor: SensorDeployable)
|
|||
target match {
|
||||
case obj: PlanetSideServerObject if jammedSound =>
|
||||
val zone = obj.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 54, 0)
|
||||
)
|
||||
|
|
@ -112,7 +112,7 @@ class SensorDeployableControl(sensor: SensorDeployable)
|
|||
target match {
|
||||
case obj: PlanetSideServerObject with JammableUnit if obj.Jammed =>
|
||||
val zone = sensor.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffectInfo(obj.GUID, "on", unk1=true, 1000)
|
||||
)
|
||||
|
|
@ -124,7 +124,7 @@ class SensorDeployableControl(sensor: SensorDeployable)
|
|||
override def finalizeDeployable(callback: ActorRef) : Unit = {
|
||||
super.finalizeDeployable(callback)
|
||||
val zone = sensor.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffectInfo(sensor.GUID, "on", unk1=true, 1000)
|
||||
)
|
||||
|
|
@ -141,7 +141,7 @@ object SensorDeployableControl {
|
|||
def DestructionAwareness(target: Deployable, attribution: PlanetSideGUID): Unit = {
|
||||
Deployables.AnnounceDestroyDeployable(target, Some(1 seconds))
|
||||
val zone = target.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffectInfo(target.GUID, "on", unk1=false, 1000)
|
||||
)
|
||||
|
|
@ -157,7 +157,7 @@ object SensorDeployableControl {
|
|||
pos.z + math.cos(yRadians).toFloat * 0.875f
|
||||
)
|
||||
}
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.TriggerEffectLocation("motion_sensor_destroyed", explosionPos, ang)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import net.psforever.objects.serverobject.hackable.Hackable
|
|||
import net.psforever.objects.serverobject.repair.RepairableEntity
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.objects.vital.resolution.ResolutionCalculations
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
|
||||
class ShieldGeneratorDeployable(cdef: ShieldGeneratorDefinition)
|
||||
extends Deployable(cdef)
|
||||
|
|
@ -125,7 +125,7 @@ class ShieldGeneratorControl(gen: ShieldGeneratorDeployable)
|
|||
override def StartJammeredStatus(target: Any, dur: Int): Unit =
|
||||
target match {
|
||||
case obj: PlanetSideServerObject with JammableUnit =>
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 1)
|
||||
)
|
||||
|
|
@ -138,7 +138,7 @@ class ShieldGeneratorControl(gen: ShieldGeneratorDeployable)
|
|||
override def CancelJammeredStatus(target: Any): Unit = {
|
||||
target match {
|
||||
case obj: PlanetSideServerObject with JammableUnit if obj.Jammed =>
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 0)
|
||||
)
|
||||
|
|
@ -160,7 +160,7 @@ object ShieldGeneratorControl {
|
|||
//shields
|
||||
if (damageToShields) {
|
||||
val zone = target.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 68, target.Shields)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ import net.psforever.objects.vehicles.Utility.InternalTelepad
|
|||
import net.psforever.objects.vital.SimpleResolutions
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
|
|
@ -133,6 +134,6 @@ object TelepadControl {
|
|||
}
|
||||
|
||||
def TelepadError(zone: Zone, channel: String, msg: String): Unit = {
|
||||
zone.LocalEvents ! LocalServiceMessage(channel, LocalAction.RouterTelepadMessage(msg))
|
||||
zone.LocalEvents ! MessageEnvelope(channel, LocalAction.RouterTelepadMessage(msg))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package net.psforever.objects
|
|||
|
||||
import net.psforever.objects.equipment.ChargeFireModeDefinition
|
||||
import net.psforever.packet.game.QuantityUpdateMessage
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
object Tools {
|
||||
|
|
@ -22,7 +22,7 @@ object Tools {
|
|||
tool.FireMode match {
|
||||
case mode: ChargeFireModeDefinition if tool.Magazine > 0 =>
|
||||
val magazine = tool.Magazine -= mode.RoundsPerInterval
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(QuantityUpdateMessage(tool.AmmoSlot.Box.GUID, magazine))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ import net.psforever.objects.vital.resistance.StandardResistanceProfile
|
|||
import net.psforever.objects.vital.{SimpleResolutions, StandardVehicleResistance}
|
||||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.packet.game.TriggeredSound
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
|
||||
|
|
@ -109,7 +110,7 @@ abstract class TurretDeployableControl
|
|||
case player: Player =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
player.GUID,
|
||||
VehicleAction.KickPassenger(4, wasKickedByDriver, TurretObject.GUID)
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.packet.game.{ChatMsg, FrameVehicleStateMessage, GenericObjectActionEnum, HackMessage, HackState, HackState1, HackState7, TriggeredSound, VehicleStateMessage}
|
||||
import net.psforever.types.{ChatMessageType, DriveState, PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{GenericObjectAction, PlanetsideAttribute, SendResponse, SetEmpire}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
//import scala.concurrent.duration._
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ object Vehicles {
|
|||
val locked = VehicleLockState.Locked.id
|
||||
Array(0, 3).foreach(group => vehicle.PermissionGroup(group, locked))
|
||||
Vehicles.ReloadAccessPermissions(vehicle, tplayer.Faction.toString)
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
vehicle.Zone.VehicleEvents ! MessageEnvelope(
|
||||
vehicle.Zone.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.Ownership(vehicle.GUID)
|
||||
|
|
@ -90,7 +90,7 @@ object Vehicles {
|
|||
val empire = VehicleLockState.Empire.id
|
||||
(0 to 2).foreach(group => vehicle.PermissionGroup(group, empire))
|
||||
ReloadAccessPermissions(vehicle, vehicle.Faction.toString)
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
VehicleAction.LoseOwnership(ownerGuid.getOrElse(Service.defaultPlayerGUID), guid)
|
||||
)
|
||||
|
|
@ -140,12 +140,12 @@ object Vehicles {
|
|||
val pguid = player.GUID
|
||||
if (vehicle.OwnerGuid.contains(pguid)) {
|
||||
vehicle.AssignOwnership(None)
|
||||
//vehicle.Zone.VehicleEvents ! VehicleServiceMessage(player.Name, pguid, VehicleAction.Ownership(pguid, PlanetSideGUID(0)))
|
||||
//vehicle.Zone.VehicleEvents ! MessageEnvelope(player.Name, pguid, VehicleAction.Ownership(pguid, PlanetSideGUID(0)))
|
||||
//val vguid = vehicle.GUID
|
||||
val empire = VehicleLockState.Empire.id
|
||||
(0 to 2).foreach(group => {
|
||||
vehicle.PermissionGroup(group, empire)
|
||||
/*vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
/*vehicle.Zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${vehicle.Faction}",
|
||||
pguid,
|
||||
VehicleAction.SeatPermissions(pguid, vguid, group, empire)
|
||||
|
|
@ -170,7 +170,7 @@ object Vehicles {
|
|||
def ReloadAccessPermissions(vehicle: Vehicle, toChannel: String): Unit = {
|
||||
val vehicle_guid = vehicle.GUID
|
||||
(0 to 3).foreach(group => {
|
||||
vehicle.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
vehicle.Zone.AvatarEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
PlanetsideAttribute(vehicle_guid, group + 10, vehicle.PermissionGroup(group).get.id)
|
||||
)
|
||||
|
|
@ -252,7 +252,7 @@ object Vehicles {
|
|||
val vehicleEvents = zone.VehicleEvents
|
||||
val localEvents = zone.LocalEvents
|
||||
val previousOwnerName = target.OwnerName.getOrElse("")
|
||||
vehicleEvents ! VehicleServiceMessage(
|
||||
vehicleEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
SendResponse(HackMessage(HackState1.Unk2, tGuid, hGuid, 100, 0f, HackState.Hacked, HackState7.Unk8))
|
||||
)
|
||||
|
|
@ -269,7 +269,7 @@ object Vehicles {
|
|||
player: Player =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
vehicleEvents ! VehicleServiceMessage(
|
||||
vehicleEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
player.GUID,
|
||||
VehicleAction.KickPassenger(4, unk2 = false, tGuid)
|
||||
|
|
@ -277,16 +277,16 @@ object Vehicles {
|
|||
}
|
||||
// In case BFR is occupied and may or may not be crouched
|
||||
if (GlobalDefinitions.isBattleFrameVehicle(target.Definition) && target.Seat(0).isDefined) {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
PlanetSideGUID(-1),
|
||||
GenericObjectAction(target.GUID, GenericObjectActionEnum.BFRShieldsDown.id)
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
SendResponse(
|
||||
FrameVehicleStateMessage(target.GUID, 0, target.Position, target.Orientation, Some(Vector3(0f, 0f, 0f)), unk2=false, 0, 0, is_crouched=true, is_airborne=false, ascending_flight=false, 10, 0, 0)))
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
SendResponse(
|
||||
VehicleStateMessage(target.GUID, 0, target.Position, target.Orientation, Some(Vector3(0f, 0f, 0f)), None, 0, 0, 15, is_decelerating=false, is_cloaked=false)))
|
||||
|
|
@ -314,23 +314,23 @@ object Vehicles {
|
|||
Vehicles.Own(target, hacker)
|
||||
//todo: Send HackMessage -> HackCleared to vehicle? can be found in packet captures. Not sure if necessary.
|
||||
// And broadcast the faction change to other clients
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
SetEmpire(tGuid, hFaction)
|
||||
)
|
||||
}
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
hGuid,
|
||||
LocalAction.TriggerSound(TriggeredSound.HackVehicle, target.Position, 30, 0.49803925f)
|
||||
)
|
||||
if (zone.Players.exists(_.name.equals(previousOwnerName))) {
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
previousOwnerName,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_226, "@JackStolen"))
|
||||
)
|
||||
}
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
hacker.Name,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_226, "@JackVehicleOwned"))
|
||||
)
|
||||
|
|
@ -345,10 +345,10 @@ object Vehicles {
|
|||
util.Actor ! TelepadLike.Activate(util)
|
||||
}
|
||||
case GlobalDefinitions.ams if target.DeploymentState == DriveState.Deployed =>
|
||||
vehicleEvents ! VehicleServiceMessage(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
vehicleEvents ! MessageEnvelope(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
case _ => ()
|
||||
}
|
||||
vehicleEvents ! VehicleServiceMessage(
|
||||
vehicleEvents ! MessageEnvelope(
|
||||
zoneid,
|
||||
SendResponse(HackMessage(HackState1.Unk2, tGuid, tGuid, 0, 1L, HackState.HackCleared, HackState7.Unk8))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import net.psforever.objects.serverobject.containable.{Containable, ContainableB
|
|||
import net.psforever.packet.game.{ObjectAttachMessage, ObjectCreateDetailedMessage, ObjectDetachMessage}
|
||||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, SendResponse}
|
||||
|
||||
class CorpseControl(player: Player) extends Actor with ContainableBehavior {
|
||||
|
|
@ -25,7 +25,7 @@ class CorpseControl(player: Player) extends Actor with ContainableBehavior {
|
|||
val obj = ContainerObject
|
||||
obj.Find(item) match {
|
||||
case Some(slot) =>
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Zone.id,
|
||||
SendResponse(ObjectAttachMessage(obj.GUID, item.GUID, slot))
|
||||
)
|
||||
|
|
@ -40,7 +40,7 @@ class CorpseControl(player: Player) extends Actor with ContainableBehavior {
|
|||
val zone = obj.Zone
|
||||
val events = zone.AvatarEvents
|
||||
item.Faction = PlanetSideEmpire.NEUTRAL
|
||||
events ! AvatarServiceMessage(zone.id, ObjectDelete(item.GUID))
|
||||
events ! MessageEnvelope(zone.id, ObjectDelete(item.GUID))
|
||||
}
|
||||
|
||||
def PutItemInSlotCallback(item: Equipment, slot: Int): Unit = {
|
||||
|
|
@ -48,7 +48,7 @@ class CorpseControl(player: Player) extends Actor with ContainableBehavior {
|
|||
val zone = obj.Zone
|
||||
val events = zone.AvatarEvents
|
||||
val definition = item.Definition
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(
|
||||
ObjectCreateDetailedMessage(
|
||||
|
|
@ -64,7 +64,7 @@ class CorpseControl(player: Player) extends Actor with ContainableBehavior {
|
|||
def SwapItemCallback(item: Equipment, fromSlot: Int): Unit = {
|
||||
val obj = ContainerObject
|
||||
val zone = obj.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(ObjectDetachMessage(obj.GUID, item.GUID, Vector3.Zero, 0f))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ import net.psforever.packet.game._
|
|||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.types._
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.objects.locker.LockerContainerControl
|
||||
import net.psforever.objects.serverobject.environment.interaction.RespondsToZoneEnvironment
|
||||
import net.psforever.objects.serverobject.repair.Repairable
|
||||
|
|
@ -36,6 +36,7 @@ import net.psforever.objects.vital.collision.CollisionReason
|
|||
import net.psforever.objects.vital.etc.{PainboxReason, SuicideReason}
|
||||
import net.psforever.objects.vital.interaction.{DamageInteraction, DamageResult}
|
||||
import net.psforever.packet.PlanetSideGamePacket
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{EventMessage, HintsAtAttacker, ObjectDelete, PlanetsideAttribute, SendResponse}
|
||||
import org.joda.time.{LocalDateTime, Seconds}
|
||||
|
||||
|
|
@ -148,11 +149,11 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
if (!(player.isMoving || user.isMoving)) { //only allow stationary heals
|
||||
val newHealth = player.Health = originalHealth + 10
|
||||
val magazine = item.Discharge()
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
uname,
|
||||
SendResponse(InventoryStateMessage(item.AmmoSlot.Box.GUID, item.GUID, magazine.toLong))
|
||||
)
|
||||
events ! AvatarServiceMessage(zone.id, PlanetsideAttribute(guid, 0, newHealth))
|
||||
events ! MessageEnvelope(zone.id, PlanetsideAttribute(guid, 0, newHealth))
|
||||
player.LogActivity(
|
||||
HealFromEquipment(
|
||||
PlayerSource(user),
|
||||
|
|
@ -172,9 +173,9 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
}
|
||||
if (player != user) {
|
||||
//"Someone is trying to heal you"
|
||||
events ! AvatarServiceMessage(player.Name, PlanetsideAttribute(guid, 55, 1))
|
||||
events ! MessageEnvelope(player.Name, PlanetsideAttribute(guid, 55, 1))
|
||||
//progress bar remains visible for all heal attempts
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
uname,
|
||||
SendResponse(RepairMessage(guid, player.Health * 100 / definition.MaxHealth))
|
||||
)
|
||||
|
|
@ -214,11 +215,11 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
val newArmor = player.Armor =
|
||||
originalArmor + Repairable.applyLevelModifier(user, item, RepairToolValue(item)).toInt + definition.RepairMod
|
||||
val magazine = item.Discharge()
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
uname,
|
||||
SendResponse(InventoryStateMessage(item.AmmoSlot.Box.GUID, item.GUID, magazine.toLong))
|
||||
)
|
||||
events ! AvatarServiceMessage(zone.id, PlanetsideAttribute(guid, 4, player.Armor))
|
||||
events ! MessageEnvelope(zone.id, PlanetsideAttribute(guid, 4, player.Armor))
|
||||
player.LogActivity(
|
||||
RepairFromEquipment(
|
||||
PlayerSource(user),
|
||||
|
|
@ -239,13 +240,13 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
if (player != user) {
|
||||
if (player.isAlive) {
|
||||
//"Someone is trying to repair you" gets strobed twice for visibility
|
||||
val msg = AvatarServiceMessage(player.Name, PlanetsideAttribute(guid, 56, 1))
|
||||
val msg = MessageEnvelope(player.Name, PlanetsideAttribute(guid, 56, 1))
|
||||
events ! msg
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
context.system.scheduler.scheduleOnce(250 milliseconds, events, msg)
|
||||
}
|
||||
//progress bar remains visible for all repair attempts
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
uname,
|
||||
SendResponse(RepairMessage(guid, player.Armor * 100 / player.MaxArmor))
|
||||
)
|
||||
|
|
@ -312,16 +313,16 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
avatarActor ! AvatarActor.UpdateUseTime(kdef)
|
||||
player.Slot(slot).Equipment = None //remove from slot immediately; must exist on client for now
|
||||
TaskWorkflow.execute(GUIDTask.unregisterEquipment(zone.GUID, kit))
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(player.GUID, attribute, value)
|
||||
)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.UseKit(kguid, kdef.ObjectId)
|
||||
)
|
||||
case _ =>
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.KitNotUsed(kit.GUID, msg)
|
||||
)
|
||||
|
|
@ -335,14 +336,14 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
val events = player.Zone.AvatarEvents
|
||||
val resistance = player.TestArmMotion(slot)
|
||||
if (resistance && !updateMyHolsterArm) {
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
player.Name,
|
||||
player.GUID,
|
||||
AvatarAction.ObjectHeld(before, -1)
|
||||
)
|
||||
} else if ((!resistance && before != slot && (player.DrawnSlot = slot) != before) && ItemSwapSlot != before) {
|
||||
val mySlot = if (updateMyHolsterArm) slot else -1 //use as a short-circuit
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
Players.ZoneChannelIfSpectating(player),
|
||||
player.GUID,
|
||||
AvatarAction.ObjectHeld(mySlot, player.LastDrawnSlot)
|
||||
|
|
@ -355,7 +356,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
log.info(s"${player.Name} has drawn a ${unholsteredItem.Definition.Name} from its holster")
|
||||
if (unholsteredItem.Definition == GlobalDefinitions.remote_electronics_kit) {
|
||||
//rek beam/icon colour must match the player's correct hack level
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
Players.ZoneChannelIfSpectating(player),
|
||||
unholsteredItem.GUID,
|
||||
PlanetsideAttribute(unholsteredItem.GUID, 116, player.avatar.hackingSkillLevel())
|
||||
|
|
@ -370,7 +371,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
//make sure the player didn't just initialte an orbital strike. If not (the if below is true), make sure waypoint is removed
|
||||
if (holsteredEquipment.Definition == GlobalDefinitions.command_detonater && player.avatar.cr.value > 3 &&
|
||||
!player.avatar.cooldowns.purchase.exists(os => os._1 == "orbital_strike" && Seconds.secondsBetween(os._2, LocalDateTime.now()).getSeconds < 12)) {
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(
|
||||
player.Zone.LocalEvents ! MessageEnvelope(
|
||||
s"${player.Faction}",
|
||||
PlanetSideGUID(-1),
|
||||
SendResponse(OrbitalStrikeWaypointMessage(player.GUID, None))
|
||||
|
|
@ -398,7 +399,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
if (exosuit == ExoSuitType.MAX) {
|
||||
player.ResistArmMotion(PlayerControl.maxRestriction)
|
||||
}
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result)
|
||||
)
|
||||
|
|
@ -530,7 +531,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
Deployables.initializeConstructionItem(player.avatar.certifications, citem)
|
||||
}
|
||||
val zone = player.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
Players.ZoneChannelIfSpectating(player),
|
||||
AvatarAction.ChangeLoadout(
|
||||
player.GUID,
|
||||
|
|
@ -546,7 +547,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
itemsToDrop
|
||||
)
|
||||
)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result=true)
|
||||
)
|
||||
|
|
@ -575,7 +576,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
case Zone.Ground.CanNotPickupItem(_, item_guid, reason) =>
|
||||
log.warn(s"${player.Name} failed to pick up an item ($item_guid) from the ground because $reason")
|
||||
if (reason.startsWith("@")) {
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_227, reason))
|
||||
)
|
||||
|
|
@ -595,7 +596,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
val trigger = new BoomerTrigger
|
||||
trigger.Companion = obj.GUID
|
||||
obj.Trigger = trigger
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, ObjectDelete(tool.GUID))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, ObjectDelete(tool.GUID))
|
||||
TaskWorkflow.execute(GUIDTask.unregisterEquipment(zone.GUID, tool))
|
||||
player.Find(tool) match {
|
||||
case Some(index) if player.VisibleSlots.contains(index) =>
|
||||
|
|
@ -647,7 +648,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
|
||||
case Player.LoseDeployable(obj) =>
|
||||
if (player.avatar.deployables.Remove(obj)) {
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
player.Zone.LocalEvents ! MessageEnvelope(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
}
|
||||
|
||||
case _ => ;
|
||||
|
|
@ -720,7 +721,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
//insert
|
||||
afterHolsters.foreach(elem => player.Slot(elem.start).Equipment = elem.obj)
|
||||
afterInventory.foreach(elem => player.Inventory.InsertQuickly(elem.start, elem.obj))
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(
|
||||
Players.ZoneChannelIfSpectating(player),
|
||||
AvatarAction.ChangeExosuit(
|
||||
player.GUID,
|
||||
|
|
@ -746,7 +747,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
def loseDeployableOwnership(obj: Deployable): Boolean = {
|
||||
if (player.avatar.deployables.Remove(obj)) {
|
||||
obj.Actor ! Deployable.Ownership(None)
|
||||
player.Zone.LocalEvents ! LocalServiceMessage(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
player.Zone.LocalEvents ! MessageEnvelope(player.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
true
|
||||
}
|
||||
else {
|
||||
|
|
@ -768,14 +769,14 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
case GlobalDefinitions.ace
|
||||
if obj.Definition.deployAnimation == DeployAnimation.Standard =>
|
||||
val ownerGuid = obj.OwnerGuid.getOrElse(Service.defaultPlayerGUID)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
ownerGuid,
|
||||
LocalAction.TriggerEffectLocation("spawn_object_effect", obj.Position, obj.Orientation)
|
||||
)
|
||||
case GlobalDefinitions.advanced_ace
|
||||
if obj.Definition.deployAnimation == DeployAnimation.Fdu =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, AvatarAction.PutDownFDU(player.GUID))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, AvatarAction.PutDownFDU(player.GUID))
|
||||
case _ =>
|
||||
org.log4s
|
||||
.getLogger(name = "Deployables")
|
||||
|
|
@ -878,7 +879,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
//always do armor update
|
||||
if (damageToArmor > 0) {
|
||||
val zone = target.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 4, target.Armor)
|
||||
)
|
||||
|
|
@ -936,7 +937,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
target.LogActivity(cause)
|
||||
//stat changes
|
||||
if (damageToCapacitor > 0) {
|
||||
events ! AvatarServiceMessage(target.Name, PlanetsideAttribute(targetGUID, 7, target.Capacitor.toLong))
|
||||
events ! MessageEnvelope(target.Name, PlanetsideAttribute(targetGUID, 7, target.Capacitor.toLong))
|
||||
announceConfrontation = true //TODO should we?
|
||||
}
|
||||
if (damageToStamina > 0) {
|
||||
|
|
@ -944,13 +945,13 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
announceConfrontation = true //TODO should we?
|
||||
}
|
||||
if (damageToHealth > 0) {
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(targetGUID, 0, health))
|
||||
events ! MessageEnvelope(zoneId, PlanetsideAttribute(targetGUID, 0, health))
|
||||
announceConfrontation = true
|
||||
}
|
||||
val countableDamage = damageToHealth + damageToArmor
|
||||
if(announceConfrontation) {
|
||||
if (aggravated) {
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(AggravatedDamageMessage(targetGUID, countableDamage))
|
||||
)
|
||||
|
|
@ -965,19 +966,19 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
val name = pSource.Name
|
||||
zone.LivePlayers.find(_.Name == name).orElse(zone.Corpses.find(_.Name == name)) match {
|
||||
case Some(tplayer) =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
target.Name,
|
||||
target.GUID,
|
||||
HintsAtAttacker(tplayer.GUID)
|
||||
)
|
||||
case None =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
target.Name,
|
||||
SendResponse(DamageWithPositionMessage(countableDamage, pSource.Position))
|
||||
)
|
||||
}
|
||||
case source =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
target.Name,
|
||||
SendResponse(DamageWithPositionMessage(countableDamage, source.Position))
|
||||
)
|
||||
|
|
@ -985,17 +986,17 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
case None =>
|
||||
cause.interaction.cause match {
|
||||
case o: PainboxReason =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
target.Name,
|
||||
AvatarAction.EnvironmentalDamage(target.GUID, o.entity.GUID, countableDamage)
|
||||
)
|
||||
case _: CollisionReason =>
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(AggravatedDamageMessage(targetGUID, countableDamage))
|
||||
)
|
||||
case _ =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
target.Name,
|
||||
AvatarAction.EnvironmentalDamage(target.GUID, ValidPlanetSideGUID(0), countableDamage)
|
||||
)
|
||||
|
|
@ -1051,14 +1052,14 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
damageLog.info(s"${player.Name} killed ${player.Sex.pronounObject}self")
|
||||
}
|
||||
|
||||
events ! AvatarServiceMessage(nameChannel, player_guid, AvatarAction.Killed(cause, target.VehicleSeated)) //align client interface fields with state
|
||||
events ! AvatarServiceMessage(zoneChannel, PlanetsideAttribute(player_guid, 0, 0)) //health
|
||||
events ! MessageEnvelope(nameChannel, player_guid, AvatarAction.Killed(cause, target.VehicleSeated)) //align client interface fields with state
|
||||
events ! MessageEnvelope(zoneChannel, PlanetsideAttribute(player_guid, 0, 0)) //health
|
||||
if (target.Capacitor > 0) {
|
||||
target.Capacitor = 0
|
||||
events ! AvatarServiceMessage(nameChannel, PlanetsideAttribute(player_guid, 7, 0)) // capacitor
|
||||
events ! MessageEnvelope(nameChannel, PlanetsideAttribute(player_guid, 7, 0)) // capacitor
|
||||
}
|
||||
val attribute = DamageableEntity.attributionTo(cause, target.Zone, player_guid)
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
nameChannel,
|
||||
SendResponse(DestroyMessage(player_guid, attribute, Service.defaultPlayerGUID, pos)) //how many players get this message?
|
||||
)
|
||||
|
|
@ -1089,7 +1090,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
override def StartJammeredSound(target: Any, dur: Int): Unit =
|
||||
target match {
|
||||
case obj: Player if !jammedSound =>
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 1)
|
||||
)
|
||||
|
|
@ -1125,7 +1126,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
override def CancelJammeredSound(target: Any): Unit =
|
||||
target match {
|
||||
case obj: Player if jammedSound =>
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 0)
|
||||
)
|
||||
|
|
@ -1172,7 +1173,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
if (slot == obj.DrawnSlot) {
|
||||
obj.DrawnSlot = Player.HandsDownSlot
|
||||
}
|
||||
events ! AvatarServiceMessage(toChannel, ObjectDelete(item.GUID))
|
||||
events ! MessageEnvelope(toChannel, ObjectDelete(item.GUID))
|
||||
}
|
||||
|
||||
def PutItemInSlotCallback(item: Equipment, slot: Int): Unit = {
|
||||
|
|
@ -1193,7 +1194,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
case Some(obj: BoomerDeployable) =>
|
||||
val deployables = player.avatar.deployables
|
||||
if (!deployables.Contains(obj) && deployables.Valid(obj)) {
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
toChannel,
|
||||
SendResponse(GenericObjectAction2Message(1, player.GUID, trigger.GUID))
|
||||
)
|
||||
|
|
@ -1212,12 +1213,12 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
|
||||
case _ => ()
|
||||
}
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
toChannel,
|
||||
SendResponse(OCM.detailed(item, ObjectCreateMessageParent(guid, slot)))
|
||||
)
|
||||
if (!player.isBackpack && willBeVisible) {
|
||||
events ! AvatarServiceMessage(zone.id, guid, AvatarAction.EquipmentInHand(guid, slot, item))
|
||||
events ! MessageEnvelope(zone.id, guid, AvatarAction.EquipmentInHand(guid, slot, item))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1231,17 +1232,16 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
} else {
|
||||
player.Name
|
||||
}
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
ObjectDelete(item.GUID)
|
||||
)
|
||||
}
|
||||
|
||||
def UpdateAuraEffect(target: AuraEffectBehavior.Target) : Unit = {
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
val zone = target.Zone
|
||||
val value = target.Aura.foldLeft(0)(_ + PlayerControl.auraEffectToAttributeValue(_))
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zone.id, PlanetsideAttribute(target.GUID, 54, value))
|
||||
zone.AvatarEvents ! MessageEnvelope(zone.id, PlanetsideAttribute(target.GUID, 54, value))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1271,11 +1271,11 @@ object PlayerControl {
|
|||
}
|
||||
|
||||
def sendResponse(zone: Zone, channel: String, msg: PlanetSideGamePacket): Unit = {
|
||||
zone.AvatarEvents ! AvatarServiceMessage(channel, SendResponse(msg))
|
||||
zone.AvatarEvents ! MessageEnvelope(channel, SendResponse(msg))
|
||||
}
|
||||
|
||||
def sendResponse(zone: Zone, channel: String, filter: PlanetSideGUID, msg: EventMessage): Unit = {
|
||||
zone.AvatarEvents ! AvatarServiceMessage(channel, filter, msg)
|
||||
zone.AvatarEvents ! MessageEnvelope(channel, filter, msg)
|
||||
}
|
||||
|
||||
def maxRestriction(player: Player, slot: Int): Boolean = {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import net.psforever.objects.serverobject.environment.{EnvironmentAttribute, Env
|
|||
import net.psforever.objects.serverobject.environment.interaction.{InteractionWith, RespondsToZoneEnvironment}
|
||||
import net.psforever.objects.serverobject.interior.{Sidedness, TraditionalInteriorAware}
|
||||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.types.Vector3
|
||||
|
||||
|
|
@ -91,7 +92,6 @@ class WithEntrance()
|
|||
): Sidedness = {
|
||||
import net.psforever.objects.{Player, Vehicle}
|
||||
import net.psforever.packet.game.ChatMsg
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.types.ChatMessageType
|
||||
val channel = obj match {
|
||||
case p: Player => p.Name
|
||||
|
|
@ -99,7 +99,7 @@ class WithEntrance()
|
|||
case _ => ""
|
||||
}
|
||||
if (door.Outwards == Vector3.Zero) {
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_229, "Door not configured."))
|
||||
)
|
||||
|
|
@ -108,14 +108,14 @@ class WithEntrance()
|
|||
val result = Vector3.DotProduct(Vector3.Unit(obj.Position - door.Position), door.Outwards) > 0f
|
||||
if (result && WhichSide != Sidedness.OutsideOf) {
|
||||
//outside
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_229, "You are now outside"))
|
||||
)
|
||||
Sidedness.OutsideOf
|
||||
} else if (!result && WhichSide != Sidedness.InsideOf) {
|
||||
//inside
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_229, "You are now inside"))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import net.psforever.objects.serverobject.environment.{EnvironmentAttribute, Env
|
|||
import net.psforever.objects.serverobject.shuttle.OrbitalShuttlePad
|
||||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.packet.game.{ChatMsg, PlayerStateShiftMessage, ShiftState}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.hart.ShuttleState
|
||||
import net.psforever.types.ChatMessageType
|
||||
|
|
@ -35,10 +35,10 @@ class WithGantry(val channel: String)
|
|||
player.VehicleSeated.isEmpty =>
|
||||
val (pos, ang) = Vehicles.dismountShuttle(shuttle, field.mountPoint)
|
||||
val events = shuttle.Zone.AvatarEvents
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(PlayerStateShiftMessage(ShiftState(0, pos, ang, None))))
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_227, "@Vehicle_OS_PlacedOutsideHallway"))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import net.psforever.objects.serverobject.environment.interaction.common.Watery
|
|||
import net.psforever.objects.serverobject.environment.interaction.common.Watery.OxygenStateTarget
|
||||
import net.psforever.objects.serverobject.environment.{EnvironmentTrait, PieceOfEnvironment, interaction}
|
||||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.OxygenState
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -299,7 +300,7 @@ class WithWater(val channel: String)
|
|||
cond: OxygenStateTarget,
|
||||
data: Option[OxygenStateTarget]
|
||||
): Unit = {
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(channel, AvatarAction.OxygenState(cond, data))
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(channel, AvatarAction.OxygenState(cond, data))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
package net.psforever.objects.avatar.scoring
|
||||
|
||||
/**
|
||||
* Organizes the eight fields one would find in an `AvatarServiceMessage` statistic field.
|
||||
* Organizes the eight fields one would find in an statistic field.
|
||||
* The `_c` fields and the `_s` fields are paired when the values populate the packet
|
||||
* where `c` stands for "campaign" and `s` stands for "session".
|
||||
* "Session" values reflect on the UI as the K in K/D
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import net.psforever.objects._
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SetEmpire
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -199,9 +199,9 @@ trait DeployableBehavior {
|
|||
None
|
||||
}
|
||||
//zone build
|
||||
localEvents ! LocalServiceMessage(zone.id, LocalAction.DeployItem(obj))
|
||||
localEvents ! MessageEnvelope(zone.id, LocalAction.DeployItem(obj))
|
||||
//zone map icon
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
obj.Faction.toString,
|
||||
LocalAction.DeployableMapIcon(DeploymentAction.Build, DeployableInfo(obj.GUID, Deployable.Icon(obj.Definition.Item), obj.Position, obj.OwnerGuid.getOrElse(Service.defaultPlayerGUID)))
|
||||
)
|
||||
|
|
@ -247,7 +247,7 @@ trait DeployableBehavior {
|
|||
//there's no special meaning behind directing any replies from from zone governance straight back to zone governance
|
||||
//this deployable control agency, however, will be expiring and can not be a recipient
|
||||
zone.Deployables ! Zone.Deployable.Dismiss(obj)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
LocalAction.EliminateDeployable(obj, obj.GUID, obj.Position, deletionType)
|
||||
)
|
||||
|
|
@ -283,12 +283,12 @@ object DeployableBehavior {
|
|||
if (originalFaction != toFaction) {
|
||||
obj.Faction = toFaction
|
||||
//visual tells in regards to ownership by faction
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SetEmpire(dGuid, toFaction)
|
||||
)
|
||||
//remove knowledge by the previous owner's faction
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
originalFaction.toString,
|
||||
LocalAction.DeployableMapIcon(DeploymentAction.Dismiss, info)
|
||||
)
|
||||
|
|
@ -296,10 +296,10 @@ object DeployableBehavior {
|
|||
zone.AllPlayers.filter(p => obj.OriginalOwnerName.contains(p.Name))
|
||||
.foreach { originalOwner =>
|
||||
originalOwner.avatar.deployables.Remove(obj)
|
||||
originalOwner.Zone.LocalEvents ! LocalServiceMessage(originalOwner.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
originalOwner.Zone.LocalEvents ! MessageEnvelope(originalOwner.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||
}
|
||||
//display to the given faction
|
||||
localEvents ! LocalServiceMessage(
|
||||
localEvents ! MessageEnvelope(
|
||||
toFaction.toString,
|
||||
LocalAction.DeployableMapIcon(DeploymentAction.Build, info)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ import net.psforever.objects.vehicles.Utility.InternalTelepad
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.{GenericObjectActionMessage, ObjectCreateMessage, ObjectDeleteMessage}
|
||||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
|
||||
trait TelepadLike {
|
||||
|
|
@ -114,7 +115,7 @@ object TelepadLike {
|
|||
normally dispatched while the Router is transitioned into its Deploying state
|
||||
it is safe, however, to perform these actions at any time during and after the Deploying state
|
||||
*/
|
||||
events ! LocalServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(
|
||||
ObjectCreateMessage(
|
||||
|
|
@ -125,7 +126,7 @@ object TelepadLike {
|
|||
)
|
||||
)
|
||||
)
|
||||
events ! LocalServiceMessage(zoneId, SendResponse(Seq(
|
||||
events ! MessageEnvelope(zoneId, SendResponse(Seq(
|
||||
GenericObjectActionMessage(utilityGUID, 27),
|
||||
GenericObjectActionMessage(utilityGUID, 30)
|
||||
)))
|
||||
|
|
@ -135,7 +136,7 @@ object TelepadLike {
|
|||
def LinkTelepad(zone: Zone, telepadGUID: PlanetSideGUID): Unit = {
|
||||
val events = zone.LocalEvents
|
||||
val zoneId = zone.id
|
||||
events ! LocalServiceMessage(zoneId, SendResponse(Seq(
|
||||
events ! MessageEnvelope(zoneId, SendResponse(Seq(
|
||||
GenericObjectActionMessage(telepadGUID, 27),
|
||||
GenericObjectActionMessage(telepadGUID, 28)
|
||||
)))
|
||||
|
|
@ -168,7 +169,7 @@ class TelepadControl(obj: InternalTelepad) extends akka.actor.Actor {
|
|||
oldTpad.Actor ! TelepadLike.SeverLink(obj)
|
||||
}
|
||||
obj.Telepad = None
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, SendResponse(ObjectDeleteMessage(obj.GUID, 0)))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, SendResponse(ObjectDeleteMessage(obj.GUID, 0)))
|
||||
|
||||
case TelepadLike.RequestLink(tpad: TelepadDeployable) =>
|
||||
val zone = obj.Zone
|
||||
|
|
@ -189,7 +190,7 @@ class TelepadControl(obj: InternalTelepad) extends akka.actor.Actor {
|
|||
}
|
||||
} else {
|
||||
val channel = obj.Owner.asInstanceOf[Vehicle].OwnerName.getOrElse("")
|
||||
zone.LocalEvents ! LocalServiceMessage(channel, LocalAction.RouterTelepadMessage("@Teleport_NotDeployed"))
|
||||
zone.LocalEvents ! MessageEnvelope(channel, LocalAction.RouterTelepadMessage("@Teleport_NotDeployed"))
|
||||
tpad.Actor ! TelepadLike.SeverLink(obj)
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +198,7 @@ class TelepadControl(obj: InternalTelepad) extends akka.actor.Actor {
|
|||
if (obj.Telepad.contains(tpad.GUID)) {
|
||||
obj.Telepad = None
|
||||
val zone = obj.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, SendResponse(ObjectDeleteMessage(obj.GUID, 0)))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, SendResponse(ObjectDeleteMessage(obj.GUID, 0)))
|
||||
}
|
||||
|
||||
case _ => ()
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import net.psforever.objects.vital.RepairFromArmorSiphon
|
|||
import net.psforever.objects.vital.etc.{ArmorSiphonModifiers, ArmorSiphonReason}
|
||||
import net.psforever.objects.vital.interaction.DamageInteraction
|
||||
import net.psforever.packet.game.QuantityUpdateMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
|
||||
import scala.collection.mutable
|
||||
|
|
@ -78,7 +78,7 @@ object ArmorSiphonBehavior {
|
|||
if(before < after) {
|
||||
obj.LogActivity(RepairFromArmorSiphon(asr.siphon.Definition, VehicleSource(obj), before - after))
|
||||
val zone = obj.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 0, after)
|
||||
)
|
||||
|
|
@ -97,7 +97,7 @@ object ArmorSiphonBehavior {
|
|||
val siphon = siphonSlot.Equipment.get.asInstanceOf[Tool]
|
||||
val zone = obj.Zone
|
||||
//update current charge level
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Actor.toString,
|
||||
SendResponse(QuantityUpdateMessage(siphon.AmmoSlot.Box.GUID, siphon.Magazine))
|
||||
)
|
||||
|
|
@ -119,7 +119,7 @@ object ArmorSiphonBehavior {
|
|||
val before = siphon.Magazine
|
||||
val after = siphon.Magazine = before + 1
|
||||
if (after > before) {
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Actor.toString,
|
||||
SendResponse(QuantityUpdateMessage(siphon.AmmoSlot.Box.GUID, after))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import net.psforever.objects.vehicles.MountedWeapons
|
|||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.objects.vital.projectile.ProjectileReason
|
||||
import net.psforever.objects.zones.{Zone, ZoneAware}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.types.Vector3
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
|
||||
import scala.collection.mutable
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -234,7 +234,6 @@ trait JammableBehavior {
|
|||
* @see `Service`
|
||||
* @see `VehicleAction`
|
||||
* @see `VehicleService`
|
||||
* @see `VehicleServiceMessage`
|
||||
* @see `Zone.VehicleEvents`
|
||||
*/
|
||||
trait JammableMountedWeapons extends JammableBehavior {
|
||||
|
|
@ -243,7 +242,7 @@ trait JammableMountedWeapons extends JammableBehavior {
|
|||
override def StartJammeredSound(target: Any, dur: Int): Unit = {
|
||||
target match {
|
||||
case obj: PlanetSideServerObject with MountedWeapons with JammableUnit if !jammedSound =>
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 1)
|
||||
)
|
||||
|
|
@ -264,7 +263,7 @@ trait JammableMountedWeapons extends JammableBehavior {
|
|||
override def CancelJammeredSound(target: Any): Unit = {
|
||||
target match {
|
||||
case obj: PlanetSideServerObject if jammedSound =>
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
PlanetsideAttribute(obj.GUID, 27, 0)
|
||||
)
|
||||
|
|
@ -308,7 +307,7 @@ object JammableMountedWeapons {
|
|||
|
||||
def JammedWeaponStatus(zone: Zone, target: Equipment with JammableUnit, statusCode: Int): Unit = {
|
||||
target.Jammed = statusCode == 1
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 27, statusCode)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import net.psforever.objects.equipment.Equipment
|
|||
import net.psforever.objects.serverobject.containable.{Containable, ContainableBehavior}
|
||||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.packet.game.{ObjectAttachMessage, ObjectCreateDetailedMessage, ObjectDetachMessage}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, SendResponse}
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ class LockerContainerControl(locker: LockerContainer, toChannel: String)
|
|||
val obj = ContainerObject
|
||||
obj.Find(item) match {
|
||||
case Some(slot) =>
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
SendResponse(ObjectAttachMessage(obj.GUID, item.GUID, slot))
|
||||
)
|
||||
|
|
@ -46,14 +46,14 @@ class LockerContainerControl(locker: LockerContainer, toChannel: String)
|
|||
|
||||
def RemoveItemFromSlotCallback(item: Equipment, slot: Int): Unit = {
|
||||
val zone = locker.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(toChannel, ObjectDelete(item.GUID))
|
||||
zone.AvatarEvents ! MessageEnvelope(toChannel, ObjectDelete(item.GUID))
|
||||
}
|
||||
|
||||
def PutItemInSlotCallback(item: Equipment, slot: Int): Unit = {
|
||||
val zone = locker.Zone
|
||||
val definition = item.Definition
|
||||
item.Faction = PlanetSideEmpire.NEUTRAL
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
SendResponse(
|
||||
ObjectCreateDetailedMessage(
|
||||
|
|
@ -68,7 +68,7 @@ class LockerContainerControl(locker: LockerContainer, toChannel: String)
|
|||
|
||||
def SwapItemCallback(item: Equipment, fromSlot: Int): Unit = {
|
||||
val zone = locker.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
SendResponse(ObjectDetachMessage(locker.GUID, item.GUID, Vector3.Zero, 0f))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ package net.psforever.objects.serverobject.damage
|
|||
|
||||
import net.psforever.objects.serverobject.structures.Amenity
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.packet.game.PlanetsideAttributeMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
/**
|
||||
* The "control" `Actor` mixin for damage-handling code
|
||||
|
|
@ -27,7 +28,6 @@ object DamageableAmenity {
|
|||
* The common manifestation is a sparking entity that will no longer report being accessible.
|
||||
* These `PlanetSideAttributeMessage` attributes are the same as reported during zone load client configuration.
|
||||
* @see `PlanetsideAttribute`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `Zone.AvatarEvents`
|
||||
* @param target the entity being destroyed
|
||||
* @param cause historical information about the damage
|
||||
|
|
@ -37,7 +37,9 @@ object DamageableAmenity {
|
|||
val zoneId = zone.id
|
||||
val events = zone.AvatarEvents
|
||||
val targetGUID = target.GUID
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(targetGUID, 50, 1))
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(targetGUID, 51, 1))
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(targetGUID, 50, 1), PlanetsideAttributeMessage(targetGUID, 51, 1)))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import net.psforever.objects.vital.resolution.ResolutionCalculations
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
|
||||
/**
|
||||
|
|
@ -143,7 +144,6 @@ object DamageableEntity {
|
|||
* - provide a feedback message regarding the damage.
|
||||
* @see `PlanetsideAttribute`
|
||||
* @see `SendResponse`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `DamageFeedbackMessage`
|
||||
* @see `JammableUnit.Jammered`
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
|
|
@ -166,7 +166,7 @@ object DamageableEntity {
|
|||
def DamageToHealth(target: Damageable.Target, cause: DamageResult, amount: Int): Boolean = {
|
||||
if (amount > 0 && !target.Destroyed) {
|
||||
val zone = target.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 0, target.Health)
|
||||
)
|
||||
|
|
@ -182,8 +182,7 @@ object DamageableEntity {
|
|||
* - reports its adjusted its health; and,
|
||||
* - report about its destruction.
|
||||
* @see `AvatarAction.Destroy`
|
||||
* @see `AvatarAction.PlanetsideAttribute`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `PlanetsideAttribute`
|
||||
* @see `DamageFeedbackMessage`
|
||||
* @see `JammableUnit.ClearJammeredSound`
|
||||
* @see `JammableUnit.ClearJammeredStatus`
|
||||
|
|
@ -200,10 +199,10 @@ object DamageableEntity {
|
|||
val zoneId = zone.id
|
||||
val tguid = target.GUID
|
||||
val attribution = attributionTo(cause, target.Zone)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 0, target.Health))
|
||||
zone.AvatarEvents ! MessageEnvelope(zoneId, PlanetsideAttribute(tguid, 0, target.Health))
|
||||
if (target.isInstanceOf[SpawnTube]) {}//do nothing to prevent issue #1057
|
||||
else {
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zoneId,
|
||||
AvatarAction.Destroy(tguid, attribution, Service.defaultPlayerGUID, target.Position)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import net.psforever.objects.sourcing.{PlayerSource, SourceEntry}
|
|||
import net.psforever.objects.vital.interaction.{DamageInteraction, DamageResult}
|
||||
import net.psforever.packet.game.DamageWithPositionMessage
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{HintsAtAttacker, SendResponse}
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +21,6 @@ object DamageableMountable {
|
|||
*
|
||||
* @see `HitHint`
|
||||
* @see `SendResponse`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `DamageWithPositionMessage`
|
||||
* @see `Mountable.Seats`
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
|
|
@ -62,7 +62,7 @@ object DamageableMountable {
|
|||
List.empty
|
||||
}).foreach {
|
||||
case (channel, filter, msg) =>
|
||||
events ! AvatarServiceMessage(channel, filter, msg)
|
||||
events ! MessageEnvelope(channel, filter, msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ object DamageableMountable {
|
|||
val targets = target.Seats.values.flatMap(_.occupant).filter(_.isAlive)
|
||||
targets.foreach { player =>
|
||||
//make llu visible to others in zone if passenger is carrying one
|
||||
player.Zone.AvatarEvents ! AvatarServiceMessage(player.Name, AvatarAction.DropSpecialItem())
|
||||
player.Zone.AvatarEvents ! MessageEnvelope(player.Name, AvatarAction.DropSpecialItem())
|
||||
//player.LogActivity(cause)
|
||||
player.Actor ! Player.Die(
|
||||
DamageInteraction(interaction.resolution, SourceEntry(player), interaction.cause, interaction.hitPos)
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.objects.zones.exp.ToDatabase
|
||||
import net.psforever.packet.game.DamageWithPositionMessage
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.types.Vector3
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -105,8 +105,7 @@ trait DamageableVehicle
|
|||
* If this vehicle has shields that were affected by previous damage, that is also reported to the clients.
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
* @see `Vehicle.CargoHolds`
|
||||
* @see `VehicleAction.PlanetsideAttribute`
|
||||
* @see `VehicleServiceMessage`
|
||||
* @see `PlanetsideAttribute`
|
||||
* @param target the entity being destroyed
|
||||
* @param cause historical information about the damage
|
||||
* @param amount how much damage was performed
|
||||
|
|
@ -143,14 +142,14 @@ trait DamageableVehicle
|
|||
}
|
||||
//stat changes
|
||||
if (damageToShields > 0) {
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
shieldChannel,
|
||||
PlanetsideAttribute(targetGUID, obj.Definition.shieldUiAttribute, obj.Shields)
|
||||
)
|
||||
announceConfrontation = true
|
||||
}
|
||||
if (damageToHealth > 0) {
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
healthChannel,
|
||||
PlanetsideAttribute(targetGUID, 0, obj.Health)
|
||||
)
|
||||
|
|
@ -163,7 +162,7 @@ trait DamageableVehicle
|
|||
obj.Seats.values
|
||||
.collect { case seat if seat.occupant.nonEmpty => seat.occupant.get.Name }
|
||||
.foreach { channel =>
|
||||
events ! VehicleServiceMessage(channel, msg)
|
||||
events ! MessageEnvelope(channel, msg)
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -183,11 +182,9 @@ trait DamageableVehicle
|
|||
* @see `DriveState.Undeploying`
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
* @see `Vehicle.CargoHolds`
|
||||
* @see `VehicleAction.PlanetsideAttribute`
|
||||
* @see `PlanetsideAttribute`
|
||||
* @see `RemoverActor.AddTask`
|
||||
* @see `RemoverActor.ClearSpecific`
|
||||
* @see `VehicleServiceMessage`
|
||||
* @see `VehicleServiceMessage.Decon`
|
||||
* @see `Zone.VehicleEvents`
|
||||
* @param target the entity being destroyed
|
||||
* @param cause historical information about the damage
|
||||
|
|
@ -218,7 +215,7 @@ trait DamageableVehicle
|
|||
//shields
|
||||
if (obj.Shields > 0) {
|
||||
obj.Shields = 0
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, obj.Definition.shieldUiAttribute, 0)
|
||||
)
|
||||
|
|
@ -251,13 +248,13 @@ trait DamageableVehicle
|
|||
//health to 1, shields to 0
|
||||
obj.Health = 1
|
||||
val guid = obj.GUID
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneid,
|
||||
PlanetsideAttribute(guid, 0, 1)
|
||||
)
|
||||
if (obj.Shields > 0) {
|
||||
obj.Shields = 0
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(obj.GUID, obj.Definition.shieldUiAttribute, 0)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,11 +9,10 @@ import net.psforever.objects.vital.interaction.DamageResult
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.DamageWithPositionMessage
|
||||
import net.psforever.types.Vector3
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.base.support.SupportActor
|
||||
import net.psforever.services.vehicle.support.{TurretEnvelope, TurretUpgrader}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
|
||||
/**
|
||||
* The "control" `Actor` mixin for damage-handling code for `WeaponTurret` objects.
|
||||
|
|
@ -63,7 +62,7 @@ trait DamageableWeaponTurret
|
|||
//TODO some turrets have shields
|
||||
if (damageToHealth > 0) {
|
||||
DamageableMountable.DamageAwareness(DamageableObject, cause, damageToHealth)
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
PlanetsideAttribute(targetGUID, 0, obj.Health)
|
||||
)
|
||||
|
|
@ -76,7 +75,7 @@ trait DamageableWeaponTurret
|
|||
obj.Seats.values
|
||||
.collect { case seat if seat.occupant.nonEmpty => seat.occupant.get.Name }
|
||||
.foreach { channel =>
|
||||
events ! VehicleServiceMessage(channel, msg)
|
||||
events ! MessageEnvelope(channel, msg)
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -104,8 +103,7 @@ object DamageableWeaponTurret {
|
|||
* A destroyed target dispatches a message to conceal (delete) its weapons from users.
|
||||
* If affected by a jammer property, the jammer propoerty will be removed.
|
||||
* If the type of entity is a `WeaponTurret`, the weapons are converted to their "normal" upgrade state.
|
||||
* @see `AvatarAction.DeleteObject`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `DeleteObject`
|
||||
* @see `MountedWeapons`
|
||||
* @see `MountedWeapons.Weapons`
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
|
|
@ -132,7 +130,7 @@ object DamageableWeaponTurret {
|
|||
}
|
||||
.foreach(slot => {
|
||||
val wep = slot.Equipment.get
|
||||
avatarEvents ! AvatarServiceMessage(zoneId, ObjectDelete(wep.GUID))
|
||||
avatarEvents ! MessageEnvelope(zoneId, ObjectDelete(wep.GUID))
|
||||
})
|
||||
target match {
|
||||
case turret: WeaponTurret =>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import akka.actor.{Actor, ActorRef, Cancellable}
|
|||
import net.psforever.objects.Default
|
||||
import net.psforever.types.{DriveState, Vector3}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -104,7 +105,7 @@ trait DeploymentBehavior {
|
|||
prevState
|
||||
} else if (state == DriveState.Deploying) {
|
||||
obj.Velocity = Some(Vector3.Zero) //no velocity
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zoneChannel,
|
||||
VehicleAction.DeployRequest(guid, state, 0, unk2=false, Vector3.Zero)
|
||||
)
|
||||
|
|
@ -115,7 +116,7 @@ trait DeploymentBehavior {
|
|||
state
|
||||
} else if (state == DriveState.Deployed) {
|
||||
obj.Velocity = Some(Vector3.Zero) //no velocity
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zoneChannel,
|
||||
VehicleAction.DeployRequest(guid, state, 0, unk2=false, Vector3.Zero)
|
||||
)
|
||||
|
|
@ -136,7 +137,7 @@ trait DeploymentBehavior {
|
|||
val zoneChannel = zone.id
|
||||
val GUID0 = Service.defaultPlayerGUID
|
||||
if (state == DriveState.Undeploying) {
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zoneChannel,
|
||||
VehicleAction.DeployRequest(guid, state, 0, unk2=false, Vector3.Zero)
|
||||
)
|
||||
|
|
@ -147,7 +148,7 @@ trait DeploymentBehavior {
|
|||
})
|
||||
state
|
||||
} else if (state == DriveState.Mobile) {
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zoneChannel,
|
||||
VehicleAction.DeployRequest(guid, state, 0, unk2=false, Vector3.Zero)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import net.psforever.objects.serverobject.terminals.{GeneratorTerminalDefinition
|
|||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.TriggerEffectMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{PlanetSideGeneratorState, Vector3}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -111,7 +111,7 @@ class GeneratorControl(gen: Generator)
|
|||
super.DestructionAwareness(gen, gen.LastDamage.get)
|
||||
GeneratorControl.UpdateOwner(gen, Some(GeneratorControl.Event.Destroyed))
|
||||
//kaboom
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(TriggerEffectMessage(gen.GUID, "explosion_generator", None, None))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import net.psforever.objects.serverobject.{CommonMessages, PlanetSideServerObjec
|
|||
import net.psforever.objects.zones.blockmap.BlockMapEntity
|
||||
import net.psforever.packet.game.{GenericObjectActionMessage, HackMessage, HackState, HackState1, HackState7, TriggeredSound}
|
||||
import net.psforever.types.{PlanetSideEmpire, PlanetSideGUID}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.support.{HackClearActor, HackClearEnvelope, HackEntityEnvelope}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
import scala.annotation.unused
|
||||
import scala.util.{Failure, Success}
|
||||
|
|
@ -89,7 +89,7 @@ object GenericHackables {
|
|||
} else {
|
||||
(HackState.Ongoing, progress.toInt)
|
||||
}
|
||||
target.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
target.Zone.AvatarEvents ! MessageEnvelope(
|
||||
hacker.Name,
|
||||
SendResponse(
|
||||
HackMessage(progressType, target.GUID, hacker.GUID, progressGrade, 0L, progressState, HackState7.Unk8)
|
||||
|
|
@ -171,7 +171,7 @@ object GenericHackables {
|
|||
val zoneId = zone.id
|
||||
val pguid = tplayer.GUID
|
||||
log.info(s"${user.Name} hacked a ${target.Definition.Name}")
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zoneId,
|
||||
pguid,
|
||||
LocalAction.TriggerSound(target.HackSound, tplayer.Position, 30, 0.49803925f)
|
||||
|
|
@ -207,7 +207,7 @@ object GenericHackables {
|
|||
building.virusId = 8
|
||||
building.virusInstalledBy = None
|
||||
zone.LocalEvents ! HackClearEnvelope(HackClearActor.ObjectIsResecured(target))
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(GenericObjectActionMessage(target.GUID, 60))
|
||||
)
|
||||
|
|
@ -261,7 +261,7 @@ object GenericHackables {
|
|||
val hackState = hackStateMap.getOrElse(virus, HackState7.Unk8)
|
||||
building.virusId = virus
|
||||
building.virusInstalledBy = Some(tplayer.Faction.id)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zoneId,
|
||||
pguid,
|
||||
LocalAction.TriggerSound(TriggeredSound.TREKSuccessful, tplayer.Position, 30, 0.49803925f)
|
||||
|
|
@ -272,13 +272,9 @@ object GenericHackables {
|
|||
LocalAction.HackObject(target.GUID, installedVirusDuration.toLong, hackState),
|
||||
HackClearActor.ObjectIsHacked(target, zone, hackClearValue, hackState, installedVirusDuration)
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(GenericObjectActionMessage(target.GUID, 61))
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.id,
|
||||
SendResponse(GenericObjectActionMessage(target.GUID, 58))
|
||||
SendResponse(List(GenericObjectActionMessage(target.GUID, 61), GenericObjectActionMessage(target.GUID, 58)))
|
||||
)
|
||||
//amenities if applicable
|
||||
virus match {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import net.psforever.objects.sourcing.AmenitySource
|
|||
import net.psforever.objects.vital.TerminalUsedActivity
|
||||
import net.psforever.objects.zones.{Zone, ZoneAware, Zoning}
|
||||
import net.psforever.objects.{Default, PlanetSideGameObject, Player, Vehicle}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{PlanetSideGUID, TransactionType, Vector3}
|
||||
|
||||
import scala.annotation.tailrec
|
||||
|
|
@ -129,7 +129,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
}
|
||||
trackedOrder = None
|
||||
handleOrderFunc = NewTasking
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.ResetSpawnPad(pad)) //cautious animation reset
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.ResetSpawnPad(pad)) //cautious animation reset
|
||||
self ! akka.actor.Kill //should cause the actor to restart, which will abort any trapped messages
|
||||
|
||||
case _ => ()
|
||||
|
|
@ -165,7 +165,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
//first queued order
|
||||
orders = List(order)
|
||||
queueManagementTask()
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Queue, Some(s"@SVCP_PositionInQueue^2~^2~"))
|
||||
)
|
||||
|
|
@ -173,7 +173,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
//new order
|
||||
orders = orders :+ order
|
||||
val size = orders.size + 1
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Queue, Some(s"@SVCP_PositionInQueue^$size~^$size~"))
|
||||
)
|
||||
|
|
@ -184,7 +184,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
val originalVehicle = originalOrder.vehicle.Definition.Name
|
||||
orders = (orders.take(n) :+ order) ++ orders.drop(n+1)
|
||||
VehicleSpawnControl.DisposeVehicle(originalOrder.vehicle, zone)
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Queue, Some(s"@SVCP_ReplacedVehicleWithVehicle^@$originalVehicle~^@${order.vehicle.Definition.Name}~"))
|
||||
)
|
||||
|
|
@ -243,7 +243,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
val newOrder = VehicleSpawnControl.Order(driver, vehicle)
|
||||
recursiveOrderReminder(orders.iterator, size)
|
||||
trace(s"processing next order - a ${vehicle.Definition.Name} for $name")
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Queue, Some(s"@SVCP_PositionInQueue^1~^$size~"))
|
||||
)
|
||||
|
|
@ -321,7 +321,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
private def CancelOrder(vehicle: Vehicle, player: Player, msg: Option[String]): Unit = {
|
||||
if (vehicle.Seats.values.count(_.isOccupied) == 0) {
|
||||
VehicleSpawnControl.DisposeSpawnedVehicle(vehicle, player, pad.Zone)
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Cancelled, msg)
|
||||
)
|
||||
|
|
@ -451,7 +451,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
entry: VehicleSpawnPad.VehicleOrder,
|
||||
cause: Option[Any]
|
||||
): Unit = {
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
entry.player.Name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Blocked, cause)
|
||||
)
|
||||
|
|
@ -464,7 +464,7 @@ class VehicleSpawnControl(pad: VehicleSpawnPad)
|
|||
): Unit = {
|
||||
if (iter.hasNext) {
|
||||
val recipient = iter.next()
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
recipient.player.Name,
|
||||
VehicleSpawnPad.PeriodicReminder(VehicleSpawnPad.Reminders.Queue, Some(s"@SVCP_PositionInQueue^$position~^$size~"))
|
||||
)
|
||||
|
|
@ -562,7 +562,7 @@ object VehicleSpawnControl {
|
|||
*/
|
||||
private def DisposeSpawnedVehicle(vehicle: Vehicle, player: Player, zone: Zone): Unit = {
|
||||
DisposeVehicle(vehicle, zone)
|
||||
zone.VehicleEvents ! VehicleServiceMessage(zone.id, VehicleSpawnPad.RevealPlayer(player.GUID))
|
||||
zone.VehicleEvents ! MessageEnvelope(zone.id, VehicleSpawnPad.RevealPlayer(player.GUID))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package net.psforever.objects.serverobject.pad.process
|
|||
|
||||
import akka.actor.Props
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -29,7 +29,7 @@ class VehicleSpawnControlConcealPlayer(pad: VehicleSpawnPad) extends VehicleSpaw
|
|||
case order @ VehicleSpawnControl.Order(driver, vehicle) =>
|
||||
if (VehicleSpawnControl.validateOrderCredentials(pad, driver, vehicle).isEmpty) {
|
||||
trace(s"hiding ${driver.Name}")
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.ConcealPlayer(driver.GUID))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.ConcealPlayer(driver.GUID))
|
||||
context.system.scheduler.scheduleOnce(2000 milliseconds, loadVehicle, order)
|
||||
} else {
|
||||
trace(s"integral component lost; abort order fulfillment")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package net.psforever.objects.serverobject.pad.process
|
|||
|
||||
import akka.actor.Props
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
|
||||
/**
|
||||
* An `Actor` that handles vehicle spawning orders for a `VehicleSpawnPad`.
|
||||
|
|
@ -25,7 +25,7 @@ class VehicleSpawnControlDriverControl(pad: VehicleSpawnPad) extends VehicleSpaw
|
|||
case order @ VehicleSpawnControl.Order(driver, vehicle) =>
|
||||
trace(s"returning control of ${vehicle.Definition.Name} to its current driver")
|
||||
if (vehicle.PassengerInSeat(driver).nonEmpty) {
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(driver.Name, VehicleSpawnPad.ServerVehicleOverrideEnd(vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(driver.Name, VehicleSpawnPad.ServerVehicleOverrideEnd(vehicle, pad))
|
||||
}
|
||||
finalClear ! order
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ package net.psforever.objects.serverobject.pad.process
|
|||
import akka.actor.Cancellable
|
||||
import net.psforever.objects.Default
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.Vector3
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -35,7 +36,7 @@ class VehicleSpawnControlFinalClearance(pad: VehicleSpawnPad) extends VehicleSpa
|
|||
//ensure the vacant vehicle is above the trench and the doors
|
||||
vehicle.Position = pad.Position + Vector3.z(pad.Definition.VehicleCreationZOffset)
|
||||
val definition = vehicle.Definition
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${pad.Continent}",
|
||||
VehicleAction.LoadVehicle(vehicle, definition.ObjectId, vehicle.GUID, definition.Packet.ConstructorData(vehicle).get)
|
||||
)
|
||||
|
|
@ -64,7 +65,7 @@ class VehicleSpawnControlFinalClearance(pad: VehicleSpawnPad) extends VehicleSpa
|
|||
}
|
||||
|
||||
case VehicleSpawnControlFinalClearance.NextOrder =>
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.ResetSpawnPad(pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.ResetSpawnPad(pad))
|
||||
context.parent ! VehicleSpawnControl.ProcessControl.GetNewOrder
|
||||
|
||||
case _ => ()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import akka.util.Timeout
|
|||
import net.psforever.objects.GlobalDefinitions
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.Vector3
|
||||
import net.psforever.zones.Zones
|
||||
|
||||
|
|
@ -67,7 +68,7 @@ class VehicleSpawnControlLoadVehicle(pad: VehicleSpawnPad) extends VehicleSpawnC
|
|||
val vtype = definition.ObjectId
|
||||
val vguid = v.GUID
|
||||
val vdata = definition.Packet.ConstructorData(v).get
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
VehicleAction.LoadVehicle(v, vtype, vguid, vdata)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import net.psforever.objects.vital.interaction.{DamageInteraction, DamageResult}
|
|||
import net.psforever.objects.vital.prop.DamageProperties
|
||||
import net.psforever.objects.vital.Vitality
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -41,7 +41,7 @@ class VehicleSpawnControlRailJack(pad: VehicleSpawnPad) extends VehicleSpawnCont
|
|||
pad.Definition.killBox(pad, vehicle.Definition.CanFly),
|
||||
Zone.findAllTargets
|
||||
)
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.AttachToRails(vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.AttachToRails(vehicle, pad))
|
||||
context.system.scheduler.scheduleOnce(10 milliseconds, seatDriver, order)
|
||||
|
||||
case msg @ (VehicleSpawnControl.ProcessControl.Reminder | VehicleSpawnControl.ProcessControl.GetNewOrder) =>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package net.psforever.objects.serverobject.pad.process
|
|||
import akka.actor.{ActorRef, Props}
|
||||
import net.psforever.objects.{Default, Vehicle}
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -47,7 +47,7 @@ class VehicleSpawnControlSeatDriver(pad: VehicleSpawnPad) extends VehicleSpawnCo
|
|||
vehicle.Actor ! Vehicle.Deconstruct(Some(pad.Definition.VehicleCreationDeconstructTime.seconds))
|
||||
if (VehicleSpawnControl.validateOrderCredentials(pad, driver, vehicle).isEmpty) {
|
||||
trace("driver to be made seated in vehicle")
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(driver.Name, VehicleSpawnPad.StartPlayerSeatedInVehicle(vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(driver.Name, VehicleSpawnPad.StartPlayerSeatedInVehicle(vehicle, pad))
|
||||
} else {
|
||||
trace("driver lost; vehicle stranded on pad")
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ class VehicleSpawnControlSeatDriver(pad: VehicleSpawnPad) extends VehicleSpawnCo
|
|||
if (VehicleSpawnControl.validateOrderCredentials(pad, driver, vehicle).isEmpty &&
|
||||
entry.vehicle.PassengerInSeat(entry.driver).contains(0)) {
|
||||
trace(s"driver ${entry.driver.Name} has taken the wheel")
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(entry.driver.Name, VehicleSpawnPad.PlayerSeatedInVehicle(entry.vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(entry.driver.Name, VehicleSpawnPad.PlayerSeatedInVehicle(entry.vehicle, pad))
|
||||
} else {
|
||||
trace("driver lost, but operations can continue")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package net.psforever.objects.serverobject.pad.process
|
|||
|
||||
import akka.actor.Props
|
||||
import net.psforever.objects.serverobject.pad.{VehicleSpawnControl, VehicleSpawnPad}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.Vector3
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -32,18 +32,18 @@ class VehicleSpawnControlServerVehicleOverride(pad: VehicleSpawnPad) extends Veh
|
|||
val driverFailState =
|
||||
!driver.isAlive || driver.Continent != pad.Continent || !vehicle.PassengerInSeat(driver).contains(0)
|
||||
vehicle.MountedIn = None
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.DetachFromRails(vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.DetachFromRails(vehicle, pad))
|
||||
if (vehicleFailState || driverFailState) {
|
||||
if (vehicleFailState) {
|
||||
trace(s"vehicle was already destroyed")
|
||||
} else {
|
||||
trace(s"driver is not ready")
|
||||
}
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(pad.Zone.id, VehicleSpawnPad.RevealPlayer(order.DriverGUID))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(pad.Zone.id, VehicleSpawnPad.RevealPlayer(order.DriverGUID))
|
||||
driverControl ! order
|
||||
} else {
|
||||
trace(s"telling ${driver.Name} that the server is assuming control of the ${vehicle.Definition.Name}")
|
||||
pad.Zone.VehicleEvents ! VehicleServiceMessage(driver.Name, VehicleSpawnPad.ServerVehicleOverrideStart(vehicle, pad))
|
||||
pad.Zone.VehicleEvents ! MessageEnvelope(driver.Name, VehicleSpawnPad.ServerVehicleOverrideStart(vehicle, pad))
|
||||
context.system.scheduler.scheduleOnce(4000 milliseconds, driverControl, order)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ import net.psforever.objects.Tool
|
|||
import net.psforever.objects.serverobject.structures.Amenity
|
||||
import net.psforever.objects.sourcing.{SourceEntry, SourceWithHealthEntry}
|
||||
import net.psforever.objects.vital.{DamagingActivity, RepairFromEquipment, SpawningActivity}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.packet.game.PlanetsideAttributeMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
/**
|
||||
* The "control" `Actor` mixin for repair-handling code
|
||||
|
|
@ -29,7 +30,6 @@ object RepairableAmenity {
|
|||
* A restored `Amenity` target dispatches two messages to chance its model and operational states.
|
||||
* These `PlanetSideAttributeMessage` attributes are the same as reported during zone load client configuration.
|
||||
* @see `PlanetsideAttribute`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `Zone.AvatarEvents`
|
||||
* @param target the entity being destroyed
|
||||
*/
|
||||
|
|
@ -38,8 +38,10 @@ object RepairableAmenity {
|
|||
val zoneId = zone.id
|
||||
val events = zone.AvatarEvents
|
||||
val targetGUID = target.GUID
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(targetGUID, 50, 0))
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(targetGUID, 51, 0))
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(targetGUID, 50, 0), PlanetsideAttributeMessage(targetGUID, 51, 0)))
|
||||
)
|
||||
RestorationOfHistory(target)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import net.psforever.objects.vital.RepairFromEquipment
|
|||
import net.psforever.objects.{Player, Tool}
|
||||
import net.psforever.packet.game.{ChatMsg, InventoryStateMessage, RepairMessage}
|
||||
import net.psforever.types.{ChatMessageType, PlanetSideEmpire, Vector3}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
|
||||
/**
|
||||
|
|
@ -89,7 +89,7 @@ trait RepairableEntity extends Repairable {
|
|||
if (!(player.isMoving(test = 1f) || target.isMoving(test = 1f))) { //only allow stationary repairs within margin of error
|
||||
val repairValue = Repairable.applyLevelModifier(player, item, RepairToolValue(item)).toInt + target.Definition.RepairMod
|
||||
val magazine = item.Discharge()
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
player.Name,
|
||||
SendResponse(InventoryStateMessage(item.AmmoSlot.Box.GUID, item.GUID, magazine.toLong))
|
||||
)
|
||||
|
|
@ -105,7 +105,7 @@ trait RepairableEntity extends Repairable {
|
|||
originalHealth
|
||||
}
|
||||
//progress bar remains visible
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
name,
|
||||
SendResponse(RepairMessage(target.GUID, updatedHealth * 100 / definition.MaxHealth))
|
||||
)
|
||||
|
|
@ -140,11 +140,11 @@ trait RepairableEntity extends Repairable {
|
|||
val newHealth = target.Health = target.Health + amount
|
||||
if (target.Destroyed) {
|
||||
if (newHealth >= target.Definition.RepairRestoresAt) {
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 0, newHealth))
|
||||
events ! MessageEnvelope(zoneId, PlanetsideAttribute(tguid, 0, newHealth))
|
||||
Restoration(target)
|
||||
}
|
||||
} else {
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 0, newHealth))
|
||||
events ! MessageEnvelope(zoneId, PlanetsideAttribute(tguid, 0, newHealth))
|
||||
}
|
||||
newHealth
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import net.psforever.objects.Tool
|
|||
import net.psforever.objects.equipment.EquipmentSlot
|
||||
import net.psforever.objects.serverobject.turret.WeaponTurret
|
||||
import net.psforever.objects.vehicles.MountedWeapons
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
/**
|
||||
* The "control" `Actor` mixin for repair-handling code for `WeaponTurret` objects.
|
||||
|
|
@ -29,8 +30,7 @@ object RepairableWeaponTurret {
|
|||
* @see `MountedWeapons.Weapons`
|
||||
* @see `Service.defaultPlayerGUID`
|
||||
* @see `WeaponTurret`
|
||||
* @see `VehicleAction.EquipmentInSlot`
|
||||
* @see `VehicleServiceMessage`
|
||||
* @see `EquipmentInSlot`
|
||||
* @see `Zone.VehicleEvents`
|
||||
* @param target the entity being destroyed;
|
||||
* note: `MountedWeapons` is a parent of `WeaponTurret`
|
||||
|
|
@ -45,7 +45,7 @@ object RepairableWeaponTurret {
|
|||
.map({ case (index, slot: EquipmentSlot) => (index, slot.Equipment) })
|
||||
.collect {
|
||||
case (index: Int, Some(tool: Tool)) =>
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
VehicleAction.EquipmentInSlot(tguid, index, tool)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import net.psforever.objects.zones
|
|||
import net.psforever.objects.{GlobalDefinitions, Ntu, NtuContainer, NtuStorageBehavior, Vehicle}
|
||||
import net.psforever.types.{ExperienceType, PlanetSideEmpire}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.util.Config
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -107,7 +107,7 @@ class ResourceSiloControl(resourceSilo: ResourceSilo)
|
|||
log.trace(s"LowNtuWarning: Silo ${resourceSilo.GUID} low ntu warning set to $enabled")
|
||||
val building = resourceSilo.Owner
|
||||
val zone = building.Zone
|
||||
building.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
building.Zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
building.GUID,
|
||||
PlanetsideAttribute(building.GUID, 47, if (resourceSilo.LowNtuWarningOn) 1 else 0)
|
||||
|
|
@ -131,7 +131,7 @@ class ResourceSiloControl(resourceSilo: ResourceSilo)
|
|||
log.trace(
|
||||
s"UpdateChargeLevel: silo ${resourceSilo.GUID} NTU bar level has changed from $siloDisplayBeforeChange to ${resourceSilo.CapacitorDisplay}"
|
||||
)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
resourceSilo.GUID,
|
||||
PlanetsideAttribute(resourceSilo.GUID, 45, resourceSilo.CapacitorDisplay)
|
||||
|
|
@ -205,11 +205,11 @@ class ResourceSiloControl(resourceSilo: ResourceSilo)
|
|||
(Config.app.game.experience.sep.ntuSiloDepositReward.toFloat *
|
||||
amount * resourceSilo.Definition.ChargeTime.toSeconds.toFloat / resourceSilo.MaxNtuCapacitor
|
||||
).toLong
|
||||
vehicle.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
vehicle.Zone.AvatarEvents ! MessageEnvelope(
|
||||
owner.name,
|
||||
AvatarAction.AwardBep(owner.charId, deposit, ExperienceType.Normal)
|
||||
)
|
||||
vehicle.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
vehicle.Zone.AvatarEvents ! MessageEnvelope(
|
||||
owner.name, AvatarAction.ShareAntExperienceWithSquad(owner, deposit, vehicle))
|
||||
zones.exp.ToDatabase.reportNtuActivity(owner.charId, resourceSilo.Zone.Number, resourceSilo.Owner.GUID.guid, deposit)
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ class ResourceSiloControl(resourceSilo: ResourceSilo)
|
|||
val amount = (if (trigger > 0) {
|
||||
// panel glow & orb particles on
|
||||
val zone = resourceSilo.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(resourceSilo.GUID, 49, 1)
|
||||
)
|
||||
|
|
@ -243,7 +243,7 @@ class ResourceSiloControl(resourceSilo: ResourceSilo)
|
|||
} else {
|
||||
// panel glow & orb particles off
|
||||
val zone = resourceSilo.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(resourceSilo.GUID, 49, 0)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import net.psforever.objects.serverobject.PlanetSideServerObject
|
|||
import net.psforever.objects.serverobject.doors.Door
|
||||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.ChatMsg
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.base.support.SupportActor
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
|
@ -184,7 +184,6 @@ object OrbitalShuttlePadControl {
|
|||
* A message flashes onscreen to explain this reason.
|
||||
* The message will not flash if the door has no expectation of ever opening for a user.
|
||||
* @see `SendResponse`
|
||||
* @see `AvatarServiceMessage`
|
||||
* @see `ChatMessageType`
|
||||
* @see `ChatMsg`
|
||||
* @see `Player`
|
||||
|
|
@ -198,7 +197,7 @@ object OrbitalShuttlePadControl {
|
|||
val zone = door.Zone
|
||||
obj match {
|
||||
case p: Player if p.Faction == door.Faction =>
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
p.Name,
|
||||
SendResponse(
|
||||
ChatMsg(ChatMessageType.UNK_225, wideContents=false, "", "@DoorWillOpenWhenShuttleReturns", None)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ package net.psforever.objects.serverobject.structures.participation
|
|||
import net.psforever.objects.Player
|
||||
import net.psforever.objects.avatar.scoring.Kill
|
||||
import net.psforever.objects.sourcing.UniquePlayer
|
||||
import net.psforever.services.base.message.GenericObjectAction
|
||||
import net.psforever.packet.game.GenericObjectActionMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
|
||||
import scala.collection.mutable
|
||||
|
|
@ -107,14 +109,14 @@ trait FacilityHackParticipation extends ParticipationLogic {
|
|||
if (building.virusId != 8) {
|
||||
import net.psforever.objects.serverobject.terminals.Terminal
|
||||
import net.psforever.objects.GlobalDefinitions
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
val mainTerm = building.Amenities.filter(x => x.isInstanceOf[Terminal] && x.Definition == GlobalDefinitions.main_terminal).head.GUID
|
||||
val msg1 = GenericObjectAction(mainTerm, 61)
|
||||
val msg2 = GenericObjectAction(mainTerm, 58)
|
||||
val pkts = SendResponse(List(
|
||||
GenericObjectActionMessage(mainTerm, 61),
|
||||
GenericObjectActionMessage(mainTerm, 58)
|
||||
))
|
||||
val events = building.Zone.AvatarEvents
|
||||
list.foreach { p =>
|
||||
events ! AvatarServiceMessage(p.Name, msg1)
|
||||
events ! AvatarServiceMessage(p.Name, msg2)
|
||||
events ! MessageEnvelope(p.Name, pkts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package net.psforever.objects.serverobject.structures.participation
|
|||
import net.psforever.objects.serverobject.structures.{Building, StructureType}
|
||||
import net.psforever.objects.sourcing.{PlayerSource, UniquePlayer}
|
||||
import net.psforever.objects.zones.{HotSpotInfo, ZoneHotSpotProjector}
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.types.{ChatMessageType, PlanetSideEmpire, Vector3}
|
||||
import net.psforever.util.Config
|
||||
import akka.pattern.ask
|
||||
|
|
@ -15,8 +15,8 @@ import net.psforever.objects.avatar.scoring.Kill
|
|||
import net.psforever.objects.serverobject.hackable.Hackable
|
||||
import net.psforever.objects.zones.exp.ToDatabase
|
||||
import net.psforever.packet.game.ChatMsg
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
|
||||
import scala.collection.mutable
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -304,7 +304,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
finalCep,
|
||||
expType = "cep"
|
||||
)
|
||||
events ! AvatarServiceMessage(hacker.Name, AvatarAction.AwardCep(hackerId, finalCep))
|
||||
events ! MessageEnvelope(hacker.Name, AvatarAction.AwardCep(hackerId, finalCep))
|
||||
}*/
|
||||
//bystanders (cep if squad leader, bep otherwise)
|
||||
contributingPlayers
|
||||
|
|
@ -313,7 +313,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
val charId = player.CharId
|
||||
val contributionMultiplier = contributionPerPlayerByTime.getOrElse(charId, 1f)
|
||||
val outputValue = (finalCep * contributionMultiplier).toLong
|
||||
events ! AvatarServiceMessage(player.Name, AvatarAction.FacilityCaptureRewards(buildingId, zoneNumber, outputValue))
|
||||
events ! MessageEnvelope(player.Name, AvatarAction.FacilityCaptureRewards(buildingId, zoneNumber, outputValue))
|
||||
}
|
||||
//flag carrier (won't be in soi, but earns cep from capture)
|
||||
flagCarrier.collect {
|
||||
|
|
@ -338,7 +338,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
finalModifiedCep,
|
||||
expType = "llu"
|
||||
)
|
||||
events ! AvatarServiceMessage(player.Name, AvatarAction.AwardCep(charId, finalModifiedCep))
|
||||
events ! MessageEnvelope(player.Name, AvatarAction.AwardCep(charId, finalModifiedCep))
|
||||
}
|
||||
} else {
|
||||
//no need to calculate a fancy score
|
||||
|
|
@ -441,7 +441,7 @@ object MajorFacilityHackParticipation {
|
|||
val events = building.Zone.LocalEvents
|
||||
val message = SendResponse(msg)
|
||||
targets.foreach { player =>
|
||||
events ! LocalServiceMessage(player.Name, message)
|
||||
events ! MessageEnvelope(player.Name, message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ package net.psforever.objects.serverobject.structures.participation
|
|||
import net.psforever.objects.serverobject.structures.Building
|
||||
import net.psforever.objects.sourcing.PlayerSource
|
||||
import net.psforever.objects.zones.exp.ToDatabase
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
import net.psforever.util.Config
|
||||
|
||||
|
|
@ -144,7 +145,7 @@ final case class TowerHackParticipation(building: Building) extends FacilityHack
|
|||
//7. reward participants
|
||||
//Classically, only players in the SOI are rewarded
|
||||
//terminal hacker (always cep)
|
||||
events ! AvatarServiceMessage(hacker.Name, AvatarAction.AwardCep(hacker.CharId, finalCep))
|
||||
events ! MessageEnvelope(hacker.Name, AvatarAction.AwardCep(hacker.CharId, finalCep))
|
||||
ToDatabase.reportFacilityCapture(
|
||||
hackerId,
|
||||
zoneNumber,
|
||||
|
|
@ -160,7 +161,7 @@ final case class TowerHackParticipation(building: Building) extends FacilityHack
|
|||
val contributionTimeMultiplier = contributionPerPlayerByTime.getOrElse(charId, 0.5f)
|
||||
val contributionDistanceMultiplier = contributionPerPlayerByDistanceFromGoal.getOrElse(charId, 0.5f)
|
||||
val outputValue = (finalCep * contributionTimeMultiplier * contributionDistanceMultiplier).toLong
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.FacilityCaptureRewards(buildingId, zoneNumber, outputValue)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import net.psforever.objects.serverobject.damage.Damageable
|
|||
import net.psforever.objects.sourcing.AmenitySource
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.packet.game.HackState1
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.local.support.{HackClearActor, HackClearEnvelope}
|
||||
import org.log4s.Logger
|
||||
|
|
@ -26,9 +27,7 @@ import net.psforever.objects.serverobject.structures.{Building, PoweredAmenityCo
|
|||
import net.psforever.objects.vital.{HealFromTerminal, RepairFromTerminal, Vitality}
|
||||
import net.psforever.objects.zones.ZoneAware
|
||||
import net.psforever.packet.game.InventoryStateMessage
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.services.local.LocalAction
|
||||
|
||||
/**
|
||||
* An `Actor` that handles messages being dispatched to a specific `ProximityTerminal`.
|
||||
|
|
@ -183,7 +182,7 @@ class ProximityTerminalControl(term: Terminal with ProximityUnit)
|
|||
ProximityTerminalControl.TerminalAction()
|
||||
)
|
||||
val zone = TerminalObject.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = true))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = true))
|
||||
}
|
||||
} else {
|
||||
log.warn(s"ProximityTerminal.Use: $target was rejected by unit ${term.Definition.Name}@${term.GUID.guid}")
|
||||
|
|
@ -204,7 +203,7 @@ class ProximityTerminalControl(term: Terminal with ProximityUnit)
|
|||
if (term.NumberUsers == 0 && hadUsers) {
|
||||
terminalAction.cancel()
|
||||
val zone = TerminalObject.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = false))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = false))
|
||||
}
|
||||
} else {
|
||||
log.debug(
|
||||
|
|
@ -220,7 +219,7 @@ class ProximityTerminalControl(term: Terminal with ProximityUnit)
|
|||
if (callbacks.nonEmpty) {
|
||||
callbacks.clear()
|
||||
val zone = TerminalObject.Zone
|
||||
zone.LocalEvents ! LocalServiceMessage(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = true))
|
||||
zone.LocalEvents ! MessageEnvelope(zone.id, LocalAction.ProximityTerminalEffect(TerminalObject.GUID, effectState = true))
|
||||
}
|
||||
//clear hack state
|
||||
if (term.HackedBy.nonEmpty) {
|
||||
|
|
@ -351,7 +350,7 @@ object ProximityTerminalControl {
|
|||
|
||||
if (oldMax < maxHealthCap) {
|
||||
target.MaxHealth = newMax
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 1, newMax)
|
||||
)
|
||||
|
|
@ -366,7 +365,7 @@ object ProximityTerminalControl {
|
|||
|
||||
def PlayerHealthCallback(target: PlanetSideGameObject with Vitality with ZoneAware): Unit = {
|
||||
val zone = target.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 0, target.Health)
|
||||
)
|
||||
|
|
@ -374,7 +373,7 @@ object ProximityTerminalControl {
|
|||
|
||||
def VehicleHealthCallback(target: PlanetSideGameObject with Vitality with ZoneAware): Unit = {
|
||||
val zone = target.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 0, target.Health)
|
||||
)
|
||||
|
|
@ -405,7 +404,7 @@ object ProximityTerminalControl {
|
|||
target.Armor = armor + finalRepairAmount
|
||||
target.LogActivity(RepairFromTerminal(AmenitySource(terminal), finalRepairAmount))
|
||||
val zone = target.Zone
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(target.GUID, 4, target.Armor)
|
||||
)
|
||||
|
|
@ -434,7 +433,7 @@ object ProximityTerminalControl {
|
|||
val channel = target.Name
|
||||
ancient.foreach { case (weapon, slots) =>
|
||||
slots.foreach { slot =>
|
||||
events ! AvatarServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(InventoryStateMessage(slot.Box.GUID, weapon.GUID, slot.Box.Capacity))
|
||||
)
|
||||
|
|
@ -460,7 +459,7 @@ object ProximityTerminalControl {
|
|||
val channel = target.Actor.toString
|
||||
result.foreach { case (weapon, slots) =>
|
||||
slots.foreach { slot =>
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(InventoryStateMessage(slot.Box.GUID, weapon.GUID, slot.Box.Capacity))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@ import net.psforever.objects.serverobject.hackable.GenericHackables
|
|||
import net.psforever.objects.serverobject.structures.{Building, StructureType, WarpGate}
|
||||
import net.psforever.objects.serverobject.{CommonMessages, PlanetSideServerObject}
|
||||
import net.psforever.objects.sourcing.PlayerSource
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.services.local.support.HackCaptureActor
|
||||
import net.psforever.services.local.support.CaptureEnvelope
|
||||
import net.psforever.types.PlanetSideEmpire
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import scala.util.{Failure, Success}
|
||||
|
|
@ -41,7 +42,7 @@ object CaptureTerminals {
|
|||
val zoneid = zone.id
|
||||
val events = zone.LocalEvents
|
||||
val isResecured = hackingPlayer.Faction == target.Faction
|
||||
events ! LocalServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneid,
|
||||
hackingPlayer.GUID,
|
||||
LocalAction.TriggerSound(target.HackSound, hackingPlayer.Position, 30, 0.49803925f)
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ import net.psforever.objects.vital.interaction.DamageResult
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.objects.{GlobalDefinitions, Player, SimpleItem}
|
||||
import net.psforever.packet.game.HackState1
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SetEmpire
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{PlanetSideEmpire, PlanetSideGUID}
|
||||
|
||||
import scala.annotation.unused
|
||||
|
|
@ -150,7 +150,7 @@ class ImplantTerminalMechControl(mech: ImplantTerminalMech)
|
|||
case player =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
events ! VehicleServiceMessage(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2=false, guid))
|
||||
events ! MessageEnvelope(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2=false, guid))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ class ImplantTerminalMechControl(mech: ImplantTerminalMech)
|
|||
if (player.Faction == localFaction) {
|
||||
if (mech.Owner.asInstanceOf[Building].CaptureTerminalIsHacked) {
|
||||
//this is actually futile, as a hacked base does not grant access to the terminal
|
||||
events ! LocalServiceMessage(localFaction.toString, SetEmpire(guid, localFaction))
|
||||
events ! MessageEnvelope(localFaction.toString, SetEmpire(guid, localFaction))
|
||||
}
|
||||
kickAllOccupantsNotOfFaction(zone, guid, mech, localFaction)
|
||||
} else {
|
||||
|
|
@ -226,7 +226,7 @@ class ImplantTerminalMechControl(mech: ImplantTerminalMech)
|
|||
): Unit = {
|
||||
val events = zone.LocalEvents
|
||||
opposingFactionsAre(setToFaction).foreach { faction =>
|
||||
events ! LocalServiceMessage(faction.toString, SetEmpire(guid, faction))
|
||||
events ! MessageEnvelope(faction.toString, SetEmpire(guid, faction))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ class ImplantTerminalMechControl(mech: ImplantTerminalMech)
|
|||
): Unit = {
|
||||
val events = zone.LocalEvents
|
||||
opposingFactionsAre(setToFaction).foreach { faction =>
|
||||
events ! LocalServiceMessage(faction.toString, SetEmpire(guid, setToFaction))
|
||||
events ! MessageEnvelope(faction.toString, SetEmpire(guid, setToFaction))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ class ImplantTerminalMechControl(mech: ImplantTerminalMech)
|
|||
case player if test(player.Faction) =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
events ! VehicleServiceMessage(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2 = false, guid))
|
||||
events ! MessageEnvelope(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2 = false, guid))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@ import net.psforever.objects.serverobject.turret.auto.AutomatedTurret.Target
|
|||
import net.psforever.objects.serverobject.turret.auto.{AffectedByAutomaticTurretFire, AutomatedTurret, AutomatedTurretBehavior}
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.packet.game.{ChangeFireModeMessage, HackState1}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.vehicle.support.TurretUpgrader
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.{BailType, PlanetSideEmpire, PlanetSideGUID}
|
||||
|
||||
/**
|
||||
|
|
@ -179,7 +180,7 @@ class FacilityTurretControl(turret: FacilityTurret)
|
|||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
if (player.HasGUID) {
|
||||
events ! VehicleServiceMessage(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2=false, guid))
|
||||
events ! MessageEnvelope(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2=false, guid))
|
||||
}
|
||||
case None => ()
|
||||
}
|
||||
|
|
@ -237,7 +238,7 @@ class FacilityTurretControl(turret: FacilityTurret)
|
|||
.flatMap(_.Equipment)
|
||||
.collect { case weapon: Tool if weapon.FireModeIndex > 0 =>
|
||||
weapon.FireModeIndex = 0
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneid,
|
||||
SendResponse(ChangeFireModeMessage(weapon.GUID, 0))
|
||||
)
|
||||
|
|
@ -341,7 +342,7 @@ class FacilityTurretControl(turret: FacilityTurret)
|
|||
case player =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
events ! VehicleServiceMessage(zoneId, player.GUID, VehicleAction.KickPassenger(seat_num, unk2=true, guid))
|
||||
events ! MessageEnvelope(zoneId, player.GUID, VehicleAction.KickPassenger(seat_num, unk2=true, guid))
|
||||
}
|
||||
}
|
||||
captureTerminalChanges(terminal, super.captureTerminalIsHacked, actionDelays = 3000L)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ import net.psforever.objects.serverobject.affinity.FactionAffinityBehavior
|
|||
import net.psforever.objects.serverobject.damage.{Damageable, DamageableWeaponTurret}
|
||||
import net.psforever.objects.serverobject.repair.RepairableWeaponTurret
|
||||
import net.psforever.objects.vital.interaction.DamageResult
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.packet.game.PlanetsideAttributeMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
trait TurretControl
|
||||
extends Actor
|
||||
|
|
@ -40,8 +41,10 @@ trait TurretControl
|
|||
val zoneId = zone.id
|
||||
val events = zone.AvatarEvents
|
||||
val tguid = TurretObject.GUID
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 50, 0))
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 51, 0))
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(tguid, 50, 0), PlanetsideAttributeMessage(tguid, 51, 0)))
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,7 +60,9 @@ trait TurretControl
|
|||
val tguid = target.GUID
|
||||
CancelJammeredSound(target)
|
||||
CancelJammeredStatus(target)
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 50, 1))
|
||||
events ! AvatarServiceMessage(zoneId, PlanetsideAttribute(tguid, 51, 1))
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
SendResponse(List(PlanetsideAttributeMessage(tguid, 50, 1), PlanetsideAttributeMessage(tguid, 51, 1)))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ package net.psforever.objects.serverobject.turret
|
|||
import akka.actor.Cancellable
|
||||
import net.psforever.objects.serverobject.ServerObjectControl
|
||||
import net.psforever.objects.{Default, Player, Tool}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.types.Vector3
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -51,7 +52,7 @@ class VanuSentryControl(turret: FacilityTurret)
|
|||
val seat = TurretObject.Seat(0).get
|
||||
seat.occupant.collect {
|
||||
case player: Player =>
|
||||
TurretObject.Zone.LocalEvents ! LocalServiceMessage(
|
||||
TurretObject.Zone.LocalEvents ! MessageEnvelope(
|
||||
TurretObject.Zone.id,
|
||||
player.GUID,
|
||||
LocalAction.RechargeVehicleWeapon(TurretObject.GUID, weapon.GUID)
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import net.psforever.objects.avatar.Certification
|
|||
import net.psforever.objects.ce.Deployable
|
||||
import net.psforever.objects.{Player, Tool, TurretDeployable}
|
||||
import net.psforever.packet.game.{HackMessage, HackState, HackState1, HackState7, InventoryStateMessage}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{SendResponse, SetEmpire}
|
||||
import net.psforever.services.local.{LocalAction, LocalServiceMessage}
|
||||
import net.psforever.services.local.LocalAction
|
||||
import net.psforever.services.vehicle.support.{TurretEnvelope, TurretUpgrader}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
|
||||
object WeaponTurrets {
|
||||
|
|
@ -31,7 +31,7 @@ object WeaponTurrets {
|
|||
upgrade: TurretUpgrade.Value
|
||||
)(): Unit = {
|
||||
tool.Magazine = 0
|
||||
target.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
target.Zone.AvatarEvents ! MessageEnvelope(
|
||||
user.Name,
|
||||
SendResponse(InventoryStateMessage(tool.AmmoSlot.Box.GUID, tool.GUID, 0))
|
||||
)
|
||||
|
|
@ -85,7 +85,7 @@ object WeaponTurrets {
|
|||
turret.UpdateTurretUpgradeTime()
|
||||
(HackState.Ongoing, progress.toInt)
|
||||
}
|
||||
turret.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
turret.Zone.AvatarEvents ! MessageEnvelope(
|
||||
tplayer.Name,
|
||||
SendResponse(
|
||||
HackMessage(progressType, turret.GUID, tplayer.GUID, progressGrade, -1f, progressState, HackState7.Unk8)
|
||||
|
|
@ -105,7 +105,7 @@ object WeaponTurrets {
|
|||
player: Player =>
|
||||
seat.unmount(player)
|
||||
player.VehicleSeated = None
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
player.GUID,
|
||||
VehicleAction.KickPassenger(4, unk2 = false, target.GUID)
|
||||
|
|
@ -116,11 +116,11 @@ object WeaponTurrets {
|
|||
target.OwnerGuid = None
|
||||
target.Actor ! Deployable.Ownership(hacker)
|
||||
//convert faction
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SetEmpire(target.GUID, hacker.Faction)
|
||||
)
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
hacker.GUID,
|
||||
LocalAction.TriggerSound(target.HackSound, target.Position, 30, 0.49803925f)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import net.psforever.objects.zones.interaction.InteractsWithZone
|
|||
import net.psforever.objects.{Default, PlanetSideGameObject, Player}
|
||||
import net.psforever.packet.game.{ChangeFireStateMessage_Start, ChangeFireStateMessage_Stop, ObjectDetectedMessage}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.types.{PlanetSideGUID, Vector3}
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -890,7 +890,7 @@ object AutomatedTurretBehavior {
|
|||
* @param list target's globally unique identifier, in list form
|
||||
*/
|
||||
def startTracking(zone: Zone, channel: String, turretGuid: PlanetSideGUID, list: List[PlanetSideGUID]): Unit = {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ObjectDetectedMessage(turretGuid, turretGuid, 0, list))
|
||||
)
|
||||
|
|
@ -903,7 +903,7 @@ object AutomatedTurretBehavior {
|
|||
* @param turretGuid turret
|
||||
*/
|
||||
def stopTracking(zone: Zone, channel: String, turretGuid: PlanetSideGUID): Unit = {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ObjectDetectedMessage(turretGuid, turretGuid, 0, noTargets))
|
||||
)
|
||||
|
|
@ -916,7 +916,7 @@ object AutomatedTurretBehavior {
|
|||
* @param weaponGuid turret's weapon
|
||||
*/
|
||||
def startShooting(zone: Zone, channel: String, weaponGuid: PlanetSideGUID): Unit = {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChangeFireStateMessage_Start(weaponGuid))
|
||||
)
|
||||
|
|
@ -929,7 +929,7 @@ object AutomatedTurretBehavior {
|
|||
* @param weaponGuid turret's weapon
|
||||
*/
|
||||
def stopShooting(zone: Zone, channel: String, weaponGuid: PlanetSideGUID): Unit = {
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
channel,
|
||||
SendResponse(ChangeFireStateMessage_Stop(weaponGuid))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@ import net.psforever.objects.serverobject.structures.WarpGate
|
|||
import net.psforever.objects.serverobject.transfer.{TransferBehavior, TransferContainer}
|
||||
import net.psforever.objects._
|
||||
import net.psforever.types.DriveState
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import net.psforever.objects.serverobject.transfer.TransferContainer.TransferMaterial
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.packet.game.PlanetsideAttributeMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{PlanetsideAttribute, SendResponse}
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -33,7 +34,7 @@ trait AntTransferBehavior extends TransferBehavior with NtuStorageBehavior {
|
|||
def ActivatePanelsForChargingEvent(vehicle: NtuContainer): Unit = {
|
||||
val obj = ChargeTransferObject
|
||||
val zone = obj.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(vehicle.GUID, 52, 1L)
|
||||
) // panel glow on
|
||||
|
|
@ -43,7 +44,7 @@ trait AntTransferBehavior extends TransferBehavior with NtuStorageBehavior {
|
|||
def StartNtuChargingEvent(vehicle: NtuContainer): Unit = {
|
||||
val obj = ChargeTransferObject
|
||||
val zone = obj.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(vehicle.GUID, 49, 1L)
|
||||
) // orb particle effect on
|
||||
|
|
@ -52,7 +53,7 @@ trait AntTransferBehavior extends TransferBehavior with NtuStorageBehavior {
|
|||
def UpdateNtuUI(vehicle: Vehicle with NtuContainer): Unit = {
|
||||
if (vehicle.Seats.values.exists(_.isOccupied)) {
|
||||
val display = vehicle.NtuCapacitorScaled.toLong
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
vehicle.Zone.VehicleEvents ! MessageEnvelope(
|
||||
vehicle.Actor.toString,
|
||||
PlanetsideAttribute(vehicle.GUID, 45, display)
|
||||
)
|
||||
|
|
@ -158,16 +159,14 @@ trait AntTransferBehavior extends TransferBehavior with NtuStorageBehavior {
|
|||
val zoneId = zone.id
|
||||
val events = zone.VehicleEvents
|
||||
if (transferEvent == TransferBehavior.Event.Charging) {
|
||||
events ! VehicleServiceMessage(
|
||||
//1. panel glow off
|
||||
//2. orb particle effect off
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
PlanetsideAttribute(vguid, 52, 0L)
|
||||
) // panel glow off
|
||||
events ! VehicleServiceMessage(
|
||||
zoneId,
|
||||
PlanetsideAttribute(vguid, 49, 0L)
|
||||
) // orb particle effect off
|
||||
SendResponse(List(PlanetsideAttributeMessage(vguid, 52, 0L), PlanetsideAttributeMessage(vguid, 49, 0L)))
|
||||
)
|
||||
} else if (transferEvent == TransferBehavior.Event.Discharging) {
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zoneId,
|
||||
PlanetsideAttribute(vguid, 52, 0L)
|
||||
) // panel glow off
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ import net.psforever.objects.equipment.EquipmentSlot
|
|||
import net.psforever.objects.serverobject.resourcesilo.ResourceSilo
|
||||
import net.psforever.objects.serverobject.structures.WarpGate
|
||||
import net.psforever.objects.serverobject.transfer.{TransferBehavior, TransferContainer}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.types.{PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -116,7 +117,7 @@ trait BfrTransferBehavior
|
|||
def UpdateNtuUI(vehicle: Vehicle with NtuContainer, siphon: NtuContainer): Unit = {
|
||||
siphon match {
|
||||
case equip: NtuSiphon =>
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
vehicle.Zone.VehicleEvents ! MessageEnvelope(
|
||||
vehicle.Actor.toString,
|
||||
VehicleAction.InventoryState2(equip.storageGUID, siphon.GUID, siphon.NtuCapacitor.toInt)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import net.psforever.objects.sourcing.VehicleSource
|
|||
import net.psforever.objects.vital.VehicleCargoMountActivity
|
||||
import net.psforever.packet.game.{CargoMountPointStatusMessage, ObjectAttachMessage, ObjectDetachMessage, PlanetsideAttributeMessage}
|
||||
import net.psforever.types.{BailType, CargoStatus, PlanetSideGUID, Vector3}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ trait CarrierBehavior {
|
|||
) {
|
||||
if (iteration == 0) {
|
||||
//open the cargo bay door
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
obj.Zone.id,
|
||||
SendResponse(
|
||||
CargoMountPointStatusMessage(
|
||||
|
|
@ -206,7 +206,7 @@ object CarrierBehavior {
|
|||
log.debug(s"HandleCheckCargoMounting: mounting cargo vehicle in carrier at distance of $distance")
|
||||
CargoMountAction(carrier, cargo, hold, carrierGUID)
|
||||
cargo.Velocity = None
|
||||
zone.VehicleEvents ! VehicleServiceMessage(s"${cargo.Actor}", SendResponse(Seq(
|
||||
zone.VehicleEvents ! MessageEnvelope(s"${cargo.Actor}", SendResponse(Seq(
|
||||
PlanetsideAttributeMessage(cargoGUID, 0, cargo.Health),
|
||||
PlanetsideAttributeMessage(cargoGUID, cargo.Definition.shieldUiAttribute, cargo.Shields)
|
||||
)))
|
||||
|
|
@ -220,7 +220,7 @@ object CarrierBehavior {
|
|||
)
|
||||
cargo.Actor ! CargoBehavior.EndCargoMounting(carrierGUID)
|
||||
val cargoDriverGUID = cargo.Seats(0).occupant.get.GUID
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
cargoDriverGUID,
|
||||
SendResponse(CargoMountPointStatusMessage(
|
||||
|
|
@ -320,7 +320,7 @@ object CarrierBehavior {
|
|||
)
|
||||
cargo.Actor ! CargoBehavior.EndCargoDismounting(carrierGUID)
|
||||
val cargoDriverGUID = cargo.Seats(0).occupant.get.GUID
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
cargoDriverGUID,
|
||||
SendResponse(CargoMountPointStatusMessage(
|
||||
|
|
@ -444,7 +444,7 @@ object CarrierBehavior {
|
|||
val zoneId = zone.id
|
||||
val events = zone.VehicleEvents
|
||||
val cargoActor = cargo.Actor
|
||||
events ! VehicleServiceMessage(s"$cargoActor", SendResponse(Seq(
|
||||
events ! MessageEnvelope(s"$cargoActor", SendResponse(Seq(
|
||||
PlanetsideAttributeMessage(cargoGUID, 0, cargo.Health),
|
||||
PlanetsideAttributeMessage(cargoGUID, cargo.Definition.shieldUiAttribute, cargo.Shields)
|
||||
)))
|
||||
|
|
@ -456,7 +456,7 @@ object CarrierBehavior {
|
|||
val detachCargoMsg = ObjectDetachMessage(carrierGUID, cargoGUID, cargoHoldPosition - Vector3.z(1), rotation)
|
||||
val resetCargoMsg =
|
||||
CargoMountPointStatusMessage(carrierGUID, GUID0, GUID0, cargoGUID, mountPoint, CargoStatus.Empty, 0)
|
||||
events ! VehicleServiceMessage(zoneId, SendResponse(Seq(ejectCargoMsg, detachCargoMsg, resetCargoMsg)))
|
||||
events ! MessageEnvelope(zoneId, SendResponse(Seq(ejectCargoMsg, detachCargoMsg, resetCargoMsg)))
|
||||
log.debug(s"HandleVehicleCargoDismount: eject - $ejectCargoMsg, detach - $detachCargoMsg")
|
||||
if (driverOpt.isEmpty) {
|
||||
//TODO cargo should drop like a rock like normal; until then, deconstruct it
|
||||
|
|
@ -469,17 +469,17 @@ object CarrierBehavior {
|
|||
CargoMountPointStatusMessage(carrierGUID, GUID0, cargoGUID, GUID0, mountPoint, CargoStatus.InProgress, 0)
|
||||
val cargoDetachMessage =
|
||||
ObjectDetachMessage(carrierGUID, cargoGUID, cargoHoldPosition + Vector3.z(1f), rotation)
|
||||
events ! VehicleServiceMessage(zoneId, SendResponse(Seq(cargoStatusMessage, cargoDetachMessage)))
|
||||
events ! MessageEnvelope(zoneId, SendResponse(Seq(cargoStatusMessage, cargoDetachMessage)))
|
||||
driverOpt match {
|
||||
case Some(driver) =>
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
s"${driver.Name}",
|
||||
VehicleAction.KickCargo(cargo, cargo.Definition.AutoPilotSpeed2, 2500)
|
||||
)
|
||||
case None =>
|
||||
val resetCargoMsg =
|
||||
CargoMountPointStatusMessage(carrierGUID, GUID0, GUID0, cargoGUID, mountPoint, CargoStatus.Empty, 0)
|
||||
events ! VehicleServiceMessage(zoneId, SendResponse(resetCargoMsg)) //lazy
|
||||
events ! MessageEnvelope(zoneId, SendResponse(resetCargoMsg)) //lazy
|
||||
//TODO cargo should back out like normal; until then, deconstruct it
|
||||
cargoActor ! Vehicle.Deconstruct()
|
||||
}
|
||||
|
|
@ -595,7 +595,7 @@ object CarrierBehavior {
|
|||
attachMessage: ObjectAttachMessage,
|
||||
mountPointStatusMessage: CargoMountPointStatusMessage
|
||||
): Unit = {
|
||||
zone.VehicleEvents ! VehicleServiceMessage(zone.id, exclude, SendResponse(Seq(attachMessage, mountPointStatusMessage)))
|
||||
zone.VehicleEvents ! MessageEnvelope(zone.id, exclude, SendResponse(Seq(attachMessage, mountPointStatusMessage)))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -615,10 +615,7 @@ object CarrierBehavior {
|
|||
val zone = carrier.Zone
|
||||
val zoneId = zone.id
|
||||
val msgs @ (attachMessage, mountPointStatusMessage) = CargoMountMessages(carrier, cargo, mountPoint)
|
||||
zone.VehicleEvents ! VehicleServiceMessage(zoneId, SendResponse(Seq(
|
||||
attachMessage,
|
||||
mountPointStatusMessage
|
||||
)))
|
||||
zone.VehicleEvents ! MessageEnvelope(zoneId, SendResponse(Seq(attachMessage, mountPointStatusMessage)))
|
||||
msgs
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
package net.psforever.objects.vehicles.control
|
||||
|
||||
import net.psforever.objects._
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
import net.psforever.types.DriveState
|
||||
|
||||
/**
|
||||
|
|
@ -29,8 +30,8 @@ class AmsControl(vehicle: Vehicle)
|
|||
case None => ""
|
||||
}
|
||||
val events = zone.VehicleEvents
|
||||
events ! VehicleServiceMessage(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
events ! VehicleServiceMessage(driverChannel, PlanetsideAttribute(vehicle.GUID, 81, 1))
|
||||
events ! MessageEnvelope(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
events ! MessageEnvelope(driverChannel, PlanetsideAttribute(vehicle.GUID, 81, 1))
|
||||
case _ => ;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,8 +50,8 @@ class AmsControl(vehicle: Vehicle)
|
|||
case None => ""
|
||||
}
|
||||
val events = zone.VehicleEvents
|
||||
events ! VehicleServiceMessage(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
events ! VehicleServiceMessage(driverChannel, PlanetsideAttribute(vehicle.GUID, 81, 0))
|
||||
events ! MessageEnvelope(zone.id, VehicleAction.AMSDeploymentChange(zone))
|
||||
events ! MessageEnvelope(driverChannel, PlanetsideAttribute(vehicle.GUID, 81, 0))
|
||||
case _ => ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import net.psforever.objects.vital.prop.DamageWithPosition
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game.{TriggerEffectMessage, TriggeredEffectLocation}
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
|
||||
/**
|
||||
|
|
@ -53,7 +53,7 @@ class ApcControl(vehicle: Vehicle)
|
|||
//drain the capacitor
|
||||
capacitorCharge(-vehicle.Capacitor)
|
||||
//cause the emp
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(TriggerEffectMessage(
|
||||
GUID0,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import net.psforever.objects.vital.interaction.DamageResult
|
|||
import net.psforever.objects.zones.Zone
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{GenericObjectAction, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.types._
|
||||
|
||||
import scala.annotation.unused
|
||||
|
|
@ -270,7 +270,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
|
||||
def disableShield(): Unit = {
|
||||
val zone = vehicle.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${zone.id}",
|
||||
SendResponse(GenericObjectActionMessage(vehicle.GUID, 45))
|
||||
)
|
||||
|
|
@ -284,7 +284,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
|
||||
def enableShield(): Unit = {
|
||||
val zone = vehicle.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${zone.id}",
|
||||
SendResponse(GenericObjectActionMessage(vehicle.GUID, 44))
|
||||
)
|
||||
|
|
@ -335,7 +335,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
val vguid = vehicle.GUID
|
||||
val zone = vehicle.Zone
|
||||
val shields = vehicle.Shields
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
PlanetsideAttribute(vguid, vehicle.Definition.shieldUiAttribute, shields)
|
||||
)
|
||||
|
|
@ -415,7 +415,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
}) match {
|
||||
case Some(useThisGuid) =>
|
||||
val zone = vehicle.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
doNotSendTo,
|
||||
GenericObjectAction(useThisGuid, action)
|
||||
|
|
@ -565,7 +565,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
//cause the emp
|
||||
siphon.equipment.lastDischarge = now
|
||||
//TODO this is the apc emp effect; is there an ntu siphon emp effect?
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(TriggerEffectMessage(
|
||||
GUID0,
|
||||
|
|
@ -587,7 +587,7 @@ class BfrControl(vehicle: Vehicle)
|
|||
//the siphon is not ready to dispatch another emp; chat message borrowed from kit use logic
|
||||
//the client actually enforces a hard limit of 30s before it will react to use of the siphon emp mode
|
||||
//it does not even dispatch the packet before that, making it rare if this precautionary message is seen
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
obj.Seats(0).occupant.get.Name,
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_225, wideContents = false, "", s"@TimeUntilNextUse^${30000 - elapsedWait}", None))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package net.psforever.objects.vehicles.control
|
|||
|
||||
import akka.actor.{Actor, Cancellable}
|
||||
import net.psforever.objects._
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.PlanetsideAttribute
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -59,7 +59,7 @@ trait VehicleCapacitance {
|
|||
|
||||
protected def showCapacitorCharge(): Unit = {
|
||||
val obj = CapacitanceObject
|
||||
obj.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
obj.Zone.VehicleEvents ! MessageEnvelope(
|
||||
self.toString(),
|
||||
PlanetsideAttribute(obj.GUID, 113, obj.Capacitor)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ import net.psforever.packet.PlanetSideGamePacket
|
|||
import net.psforever.packet.game._
|
||||
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
|
||||
import net.psforever.types._
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import net.psforever.services.avatar.AvatarAction
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.{ObjectDelete, PlanetsideAttribute, SendResponse}
|
||||
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
|
||||
import net.psforever.services.vehicle.VehicleAction
|
||||
|
||||
import scala.annotation.unused
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
|
@ -212,7 +213,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
})
|
||||
.flatMap { _.getMessage(vehicle) }
|
||||
.foreach { pkt =>
|
||||
events ! VehicleServiceMessage(toChannel, SendResponse(pkt))
|
||||
events ! MessageEnvelope(toChannel, SendResponse(pkt))
|
||||
}
|
||||
|
||||
case FactionAffinity.ConvertFactionAffinity(faction) =>
|
||||
|
|
@ -243,11 +244,11 @@ class VehicleControl(vehicle: Vehicle)
|
|||
log.info(s"changing vehicle equipment loadout to ${player.Name}'s option #${msg.unk1 + 1}")
|
||||
val (oldWeapons, newWeapons, oldInventory, finalInventory) =
|
||||
handleTerminalMessageVehicleLoadout(player, definition, weapons, inventory)
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
VehicleAction.ChangeLoadout(vehicle.GUID, oldWeapons, newWeapons, oldInventory, finalInventory)
|
||||
)
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result = true)
|
||||
)
|
||||
|
|
@ -255,7 +256,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
case _ => ()
|
||||
}
|
||||
} else {
|
||||
zone.AvatarEvents ! AvatarServiceMessage(
|
||||
zone.AvatarEvents ! MessageEnvelope(
|
||||
player.Name,
|
||||
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result = false)
|
||||
)
|
||||
|
|
@ -329,7 +330,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
.orElse {
|
||||
case VehicleControl.Deletion() =>
|
||||
val zone = vehicle.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
VehicleAction.UnloadVehicle(vehicle, vehicle.GUID)
|
||||
)
|
||||
|
|
@ -450,7 +451,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
zone.actor ! ZoneActor.AddToBlockMap(player, vehicle.Position)
|
||||
}
|
||||
if (player.HasGUID) {
|
||||
events ! VehicleServiceMessage(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2 = true, guid))
|
||||
events ! MessageEnvelope(zoneId, player.GUID, VehicleAction.KickPassenger(4, unk2 = true, guid))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -520,7 +521,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
val obj = ContainerObject
|
||||
obj.Find(item) match {
|
||||
case Some(slot) =>
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
self.toString,
|
||||
SendResponse(ObjectAttachMessage(obj.GUID, item.GUID, slot))
|
||||
)
|
||||
|
|
@ -532,7 +533,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
|
||||
def RemoveItemFromSlotCallback(item: Equipment, slot: Int): Unit = {
|
||||
val zone = ContainerObject.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
self.toString,
|
||||
VehicleAction.UnstowEquipment(item.GUID)
|
||||
)
|
||||
|
|
@ -546,20 +547,20 @@ class VehicleControl(vehicle: Vehicle)
|
|||
val events = zone.VehicleEvents
|
||||
val iguid = item.GUID
|
||||
item.Faction = obj.Faction
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
//TODO when a new weapon, the equipment slot ui goes blank, but the weapon functions; remount vehicle to correct it
|
||||
if (obj.VisibleSlots.contains(slot)) zone.id else channel,
|
||||
SendResponse(OCM.detailed(item, ObjectCreateMessageParent(oguid, slot)))
|
||||
)
|
||||
item match {
|
||||
case box: AmmoBox =>
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
VehicleAction.InventoryState2(iguid, oguid, box.Capacity)
|
||||
)
|
||||
case weapon: Tool =>
|
||||
weapon.AmmoSlots.map { slot => slot.Box }.foreach { box =>
|
||||
events ! VehicleServiceMessage(
|
||||
events ! MessageEnvelope(
|
||||
channel,
|
||||
VehicleAction.InventoryState2(box.GUID, iguid, box.Capacity)
|
||||
)
|
||||
|
|
@ -572,7 +573,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
val obj = ContainerObject
|
||||
val zone = obj.Zone
|
||||
val toChannel = if (obj.VisibleSlots.contains(fromSlot)) zone.id else self.toString
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
toChannel,
|
||||
ObjectDelete(item.GUID)
|
||||
)
|
||||
|
|
@ -635,7 +636,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
if (canChargeShields) {
|
||||
vehicle.LogActivity(ShieldCharge(amount, motivator))
|
||||
vehicle.Shields = vehicle.Shields + amount
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
vehicle.Zone.VehicleEvents ! MessageEnvelope(
|
||||
s"${vehicle.Actor}",
|
||||
PlanetsideAttribute(vehicle.GUID, vehicle.Definition.shieldUiAttribute, vehicle.Shields)
|
||||
)
|
||||
|
|
@ -690,7 +691,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
case Some(allow) =>
|
||||
val group = AccessPermissionGroup(attribute - 10)
|
||||
log.info(s"$dname changed ${vehicle.Definition.Name}'s access permission $group to $allow")
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
dguid,
|
||||
VehicleAction.SeatPermissions(vguid, attribute, value)
|
||||
|
|
@ -704,7 +705,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
if (vehicle.SeatPermissionGroup(seatIndex).contains(group) && !tplayer.Name.equals(dname)) { //can not kick self
|
||||
seat.unmount(tplayer)
|
||||
tplayer.VehicleSeated = None
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
tplayer.GUID,
|
||||
VehicleAction.KickPassenger(4, unk2 = false, vguid)
|
||||
|
|
@ -753,7 +754,7 @@ class VehicleControl(vehicle: Vehicle)
|
|||
|
||||
def vehicleSubsystemMessages(messages: List[PlanetSideGamePacket]): Unit = {
|
||||
val zone = vehicle.Zone
|
||||
zone.VehicleEvents ! VehicleServiceMessage(
|
||||
zone.VehicleEvents ! MessageEnvelope(
|
||||
zone.id,
|
||||
SendResponse(messages)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import net.psforever.objects.avatar.interaction.WithEntrance
|
|||
import net.psforever.objects.serverobject.doors.InteriorDoorPassage
|
||||
import net.psforever.objects.serverobject.environment.PieceOfEnvironment
|
||||
import net.psforever.objects.zones.interaction.InteractsWithZone
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
|
||||
class WithEntranceInVehicle
|
||||
|
|
@ -40,9 +41,8 @@ class WithEntranceInVehicle
|
|||
|
||||
private def warnAboutProximity(obj: InteractsWithZone, msg: String): Unit = {
|
||||
import net.psforever.packet.game.ChatMsg
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.types.ChatMessageType
|
||||
obj.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
obj.Zone.AvatarEvents ! MessageEnvelope(
|
||||
obj.Actor.toString(),
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_227, msg))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ import enumeratum.values.{StringEnum, StringEnumEntry}
|
|||
import net.psforever.objects.{PlanetSideGameObject, Player, Vehicle}
|
||||
import net.psforever.objects.serverobject.environment._
|
||||
import net.psforever.packet.game.{ChatMsg, OffshoreVehicleMessage}
|
||||
import net.psforever.services.avatar.AvatarServiceMessage
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.vehicle.VehicleServiceMessage
|
||||
import net.psforever.types.{ChatMessageType, PlanetSideEmpire, PlanetSideGUID, Vector3}
|
||||
|
||||
sealed abstract class MapInfo(
|
||||
|
|
@ -687,7 +686,7 @@ object MapEnvironment {
|
|||
" will be executed for treason." //TODO for bops, eventually
|
||||
}
|
||||
val warning = s"Do not travel any further $trespass of the battlefield or you$punishment"
|
||||
p.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
p.Zone.AvatarEvents ! MessageEnvelope(
|
||||
p.Name,
|
||||
SendResponse(ChatMsg(ChatMessageType.CMT_QUIT, warning))
|
||||
)
|
||||
|
|
@ -695,7 +694,7 @@ object MapEnvironment {
|
|||
}
|
||||
obj match {
|
||||
case v: Vehicle =>
|
||||
v.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
v.Zone.VehicleEvents ! MessageEnvelope(
|
||||
v.Actor.toString(),
|
||||
SendResponse(OffshoreVehicleMessage(v.Seats(0).occupant.get.GUID, v.GUID, msg))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import net.psforever.objects.sourcing.ObjectSource
|
|||
import net.psforever.objects.vehicles.MountedWeapons
|
||||
import net.psforever.objects.vital.SpawningActivity
|
||||
import net.psforever.packet.game.ChatMsg
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.base.message.SendResponse
|
||||
import net.psforever.services.local.LocalServiceMessage
|
||||
import net.psforever.types.ChatMessageType
|
||||
|
||||
import scala.annotation.tailrec
|
||||
|
|
@ -108,7 +108,7 @@ object ZoneDeployableActor {
|
|||
val position = obj.Position
|
||||
deployableList.find(_ eq obj) match {
|
||||
case _ if Interference.Test(zone, obj).nonEmpty =>
|
||||
zone.LocalEvents ! LocalServiceMessage(
|
||||
zone.LocalEvents ! MessageEnvelope(
|
||||
obj.OwnerName.getOrElse(""),
|
||||
SendResponse(ChatMsg(ChatMessageType.UNK_227, "@nomove_intersecting"))
|
||||
) //may not be the correct message but is sufficient at explaining why the deployable can not be built
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import akka.actor.{Actor, ActorRef, Cancellable, Props}
|
|||
import net.psforever.objects.Default
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
import net.psforever.services.ServiceManager
|
||||
import net.psforever.services.galaxy.{GalaxyAction, GalaxyServiceMessage}
|
||||
import net.psforever.services.base.envelope.MessageEnvelope
|
||||
import net.psforever.services.galaxy.GalaxyAction
|
||||
|
||||
import scala.collection.mutable.ListBuffer
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -305,7 +306,7 @@ class ZoneHotSpotProjector(zone: Zone, hotspots: ListBuffer[HotSpotInfo], blanki
|
|||
val zoneNumber = zone.Number
|
||||
val hotSpotInfoList = hotSpotInfos.toList
|
||||
affectedFactions.foreach(faction =>
|
||||
galaxy ! GalaxyServiceMessage(faction.toString, GalaxyAction.HotSpotUpdate(
|
||||
galaxy ! MessageEnvelope(faction.toString, GalaxyAction.HotSpotUpdate(
|
||||
zoneNumber,
|
||||
1,
|
||||
ZoneHotSpotProjector.SpecificHotSpotInfo(faction, hotSpotInfoList)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue