From 16afb63b3447ed847b347e7e93f44f65d5d08342 Mon Sep 17 00:00:00 2001 From: FateJH Date: Mon, 14 Oct 2019 16:20:51 -0400 Subject: [PATCH] removed redundant subscription; made sure to publish waypoint events properly --- .../scala/services/teamwork/SquadService.scala | 15 +++++++++++---- pslogin/src/main/scala/WorldSessionActor.scala | 1 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common/src/main/scala/services/teamwork/SquadService.scala b/common/src/main/scala/services/teamwork/SquadService.scala index aba14c73..0f2ac6a6 100644 --- a/common/src/main/scala/services/teamwork/SquadService.scala +++ b/common/src/main/scala/services/teamwork/SquadService.scala @@ -955,11 +955,18 @@ class SquadService extends Actor { }) match { case (Some(squad), Some(_)) => //waypoint added or updated - SquadServiceResponse(s"/${squadFeatures(squad.GUID).ToChannel}/Squad", tplayer.CharId, SquadResponse.WaypointEvent(WaypointEventAction.Add, playerCharId, wtype, None, info, 1)) - + Publish( + s"${squadFeatures(squad.GUID).ToChannel}", + SquadResponse.WaypointEvent(WaypointEventAction.Add, playerCharId, wtype, None, info, 1), + Seq(tplayer.CharId) + ) case (Some(squad), None) => - //waypoint removed? - SquadServiceResponse(s"/${squadFeatures(squad.GUID).ToChannel}/Squad", tplayer.CharId, SquadResponse.WaypointEvent(WaypointEventAction.Remove, playerCharId, wtype, None, None, 0)) + //waypoint removed + Publish( + s"${squadFeatures(squad.GUID).ToChannel}", + SquadResponse.WaypointEvent(WaypointEventAction.Remove, playerCharId, wtype, None, None, 0), + Seq(tplayer.CharId) + ) case msg => log.warn(s"Unsupported squad waypoint behavior: $msg") diff --git a/pslogin/src/main/scala/WorldSessionActor.scala b/pslogin/src/main/scala/WorldSessionActor.scala index ce21779b..5ea8dabd 100644 --- a/pslogin/src/main/scala/WorldSessionActor.scala +++ b/pslogin/src/main/scala/WorldSessionActor.scala @@ -1057,7 +1057,6 @@ class WorldSessionActor extends Actor with MDCContextAware { galaxyService ! Service.Join(s"${avatar.faction}") //for hotspots squadService ! Service.Join(s"${avatar.faction}") //channel will be player.Faction squadService ! Service.Join(s"${avatar.CharId}") //channel will be player.CharId (in order to work with packets) - squadService ! Service.Join(s"${avatar.faction}") //channel will be player.Faction cluster ! InterstellarCluster.GetWorld("home3") case InterstellarCluster.GiveWorld(zoneId, zone) =>