mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-27 15:59:12 +00:00
stop player from inviting himself to own squad; periodic squad updates; fixed squad listing hangup; fixed damage calculation tests
This commit is contained in:
parent
0c105f3826
commit
aa2e0089a4
3 changed files with 26 additions and 11 deletions
|
|
@ -131,6 +131,8 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
var lfs : Boolean = false
|
||||
var squadChannel : Option[String] = None
|
||||
var squadSetup : () => Unit = FirstTimeSquadSetup
|
||||
var squadUpdateCounter : Int = 0
|
||||
val queuedSquadActions : Seq[() => Unit] = Seq(SquadUpdates, NoSquadUpdates, NoSquadUpdates, NoSquadUpdates)
|
||||
|
||||
var amsSpawnPoints : List[SpawnPoint] = Nil
|
||||
var clientKeepAlive : Cancellable = DefaultCancellable.obj
|
||||
|
|
@ -450,7 +452,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
sendResponse(PlanetsideAttributeMessage(playerGuid, 32, ourIndex))
|
||||
//a finalization? what does this do?
|
||||
sendResponse(SquadDefinitionActionMessage(squad.GUID, 0, SquadAction.Unknown(18)))
|
||||
updateSquad = UpdatesWhenEnrolledInSquad
|
||||
updateSquad = PeriodicUpdatesWhenEnrolledInSquad
|
||||
squadChannel = Some(toChannel)
|
||||
case _ =>
|
||||
//other player is joining our squad
|
||||
|
|
@ -494,6 +496,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
//a finalization? what does this do?
|
||||
sendResponse(SquadDefinitionActionMessage(PlanetSideGUID(0), 0, SquadAction.Unknown(18)))
|
||||
squad_supplement_id = 0
|
||||
squadUpdateCounter = 0
|
||||
updateSquad = NoSquadUpdates
|
||||
squadChannel = None
|
||||
case _ =>
|
||||
|
|
@ -9326,7 +9329,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
|
||||
def NoSquadUpdates() : Unit = { }
|
||||
|
||||
def UpdatesWhenEnrolledInSquad() : Unit = {
|
||||
def SquadUpdates() : Unit = {
|
||||
squadService ! SquadServiceMessage(
|
||||
player,
|
||||
continent,
|
||||
|
|
@ -9341,6 +9344,11 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
)
|
||||
}
|
||||
|
||||
def PeriodicUpdatesWhenEnrolledInSquad() : Unit = {
|
||||
queuedSquadActions(squadUpdateCounter)()
|
||||
squadUpdateCounter = (squadUpdateCounter + 1) % queuedSquadActions.length
|
||||
}
|
||||
|
||||
def failWithError(error : String) = {
|
||||
log.error(error)
|
||||
sendResponse(ConnectionClose())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue