fix phantom listed squad

This commit is contained in:
ScrawnyRonnie 2024-01-09 22:11:40 -05:00
parent bcb3c43211
commit 89ac6ec48f

View file

@ -1101,10 +1101,7 @@ class SquadService extends Actor {
GetLeadingSquad(charId, pSquadOpt) match { GetLeadingSquad(charId, pSquadOpt) match {
case Some(_) => case Some(_) =>
//leader of a squad; the squad will be disbanded. Same logic as when a SL uses /leave and the squad is disbanded. //leader of a squad; the squad will be disbanded. Same logic as when a SL uses /leave and the squad is disbanded.
PanicDisbandSquad( DisbandSquad(features)
features,
squad.Membership.collect { case member if member.CharId > 0 && member.CharId != charId => member.CharId }
)
case None => case None =>
//not the leader of a full squad; tell other members that we are leaving //not the leader of a full squad; tell other members that we are leaving
SquadSwitchboard.PanicLeaveSquad( SquadSwitchboard.PanicLeaveSquad(
@ -1118,10 +1115,7 @@ class SquadService extends Actor {
} }
} else { } else {
//with only two members before our leave, the squad will be disbanded //with only two members before our leave, the squad will be disbanded
PanicDisbandSquad( DisbandSquad(features)
features,
squad.Membership.collect { case member if member.CharId > 0 && member.CharId != charId => member.CharId }
)
} }
case None => case None =>
//not a member of any squad; nothing really to do here //not a member of any squad; nothing really to do here