removed redundant subscription; made sure to publish waypoint events properly

This commit is contained in:
FateJH 2019-10-14 16:20:51 -04:00
parent 7d9d5105f6
commit 16afb63b34
2 changed files with 11 additions and 5 deletions

View file

@ -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")

View file

@ -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) =>