mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-20 02:24:45 +00:00
sddum delivery and squad chat
This commit is contained in:
parent
065f84231b
commit
5353323aee
|
|
@ -139,6 +139,12 @@ object MiddlewareActor {
|
||||||
packet.isInstanceOf[KeepAliveMessage]
|
packet.isInstanceOf[KeepAliveMessage]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** `SquadDetailDefinitionUpdateMessage` [sometimes] doesn't make for a good travel partner
|
||||||
|
* as seen in issue #1176 and PR #1290 so deliver it alone */
|
||||||
|
private def squadDetailDefinitionMessageGuard(packet: PlanetSidePacket): Boolean = {
|
||||||
|
packet.isInstanceOf[SquadDetailDefinitionUpdateMessage]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A function for blanking tasks related to inbound packet resolution.
|
* A function for blanking tasks related to inbound packet resolution.
|
||||||
* Do nothing.
|
* Do nothing.
|
||||||
|
|
@ -246,7 +252,8 @@ class MiddlewareActor(
|
||||||
*/
|
*/
|
||||||
private val packetsBundledByThemselves: List[PlanetSidePacket => Boolean] = List(
|
private val packetsBundledByThemselves: List[PlanetSidePacket => Boolean] = List(
|
||||||
MiddlewareActor.keepAliveMessageGuard,
|
MiddlewareActor.keepAliveMessageGuard,
|
||||||
MiddlewareActor.characterInfoMessageGuard
|
MiddlewareActor.characterInfoMessageGuard,
|
||||||
|
MiddlewareActor.squadDetailDefinitionMessageGuard
|
||||||
)
|
)
|
||||||
|
|
||||||
private val smpHistoryLength: Int = 100
|
private val smpHistoryLength: Int = 100
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import net.psforever.objects.zones.Zone
|
||||||
import net.psforever.packet.game.{ChatMsg, SetChatFilterMessage}
|
import net.psforever.packet.game.{ChatMsg, SetChatFilterMessage}
|
||||||
import net.psforever.services.Service
|
import net.psforever.services.Service
|
||||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||||
import net.psforever.services.chat.{ChatChannel, DefaultChannel, SpectatorChannel}
|
import net.psforever.services.chat.{ChatChannel, DefaultChannel, SpectatorChannel, SquadChannel}
|
||||||
import net.psforever.types.ChatMessageType.{CMT_TOGGLESPECTATORMODE, CMT_TOGGLE_GM}
|
import net.psforever.types.ChatMessageType.{CMT_TOGGLESPECTATORMODE, CMT_TOGGLE_GM}
|
||||||
import net.psforever.types.{ChatMessageType, PlanetSideEmpire}
|
import net.psforever.types.{ChatMessageType, PlanetSideEmpire}
|
||||||
import net.psforever.zones.Zones
|
import net.psforever.zones.Zones
|
||||||
|
|
@ -131,7 +131,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
||||||
ops.commandSend(session, message, comms)
|
ops.commandSend(session, message, comms)
|
||||||
|
|
||||||
case (CMT_SQUAD, _, _) =>
|
case (CMT_SQUAD, _, _) =>
|
||||||
ops.commandSquad(session, message, comms) //todo SquadChannel, but what is the guid
|
ops.commandSquad(session, message, SquadChannel(sessionLogic.squad.squad_guid))
|
||||||
|
|
||||||
case (CMT_WHO | CMT_WHO_CSR | CMT_WHO_CR | CMT_WHO_PLATOONLEADERS | CMT_WHO_SQUADLEADERS | CMT_WHO_TEAMS, _, _) =>
|
case (CMT_WHO | CMT_WHO_CSR | CMT_WHO_CR | CMT_WHO_PLATOONLEADERS | CMT_WHO_SQUADLEADERS | CMT_WHO_TEAMS, _, _) =>
|
||||||
ops.commandWho(session)
|
ops.commandWho(session)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import net.psforever.actors.session.spectator.SpectatorMode
|
||||||
import net.psforever.actors.session.support.{ChatFunctions, ChatOperations, SessionData}
|
import net.psforever.actors.session.support.{ChatFunctions, ChatOperations, SessionData}
|
||||||
import net.psforever.objects.Session
|
import net.psforever.objects.Session
|
||||||
import net.psforever.packet.game.{ChatMsg, ServerType, SetChatFilterMessage}
|
import net.psforever.packet.game.{ChatMsg, ServerType, SetChatFilterMessage}
|
||||||
import net.psforever.services.chat.DefaultChannel
|
import net.psforever.services.chat.{DefaultChannel, SquadChannel}
|
||||||
import net.psforever.types.ChatMessageType
|
import net.psforever.types.ChatMessageType
|
||||||
import net.psforever.types.ChatMessageType.{CMT_TOGGLESPECTATORMODE, CMT_TOGGLE_GM}
|
import net.psforever.types.ChatMessageType.{CMT_TOGGLESPECTATORMODE, CMT_TOGGLE_GM}
|
||||||
import net.psforever.util.Config
|
import net.psforever.util.Config
|
||||||
|
|
@ -77,7 +77,7 @@ class ChatLogic(val ops: ChatOperations, implicit val context: ActorContext) ext
|
||||||
ops.commandSend(session, message, DefaultChannel)
|
ops.commandSend(session, message, DefaultChannel)
|
||||||
|
|
||||||
case (CMT_SQUAD, _, _) =>
|
case (CMT_SQUAD, _, _) =>
|
||||||
ops.commandSquad(session, message, DefaultChannel) //todo SquadChannel, but what is the guid
|
ops.commandSquad(session, message, SquadChannel(sessionLogic.squad.squad_guid))
|
||||||
|
|
||||||
case (CMT_WHO | CMT_WHO_CSR | CMT_WHO_CR | CMT_WHO_PLATOONLEADERS | CMT_WHO_SQUADLEADERS | CMT_WHO_TEAMS, _, _) =>
|
case (CMT_WHO | CMT_WHO_CSR | CMT_WHO_CR | CMT_WHO_PLATOONLEADERS | CMT_WHO_SQUADLEADERS | CMT_WHO_TEAMS, _, _) =>
|
||||||
ops.commandWho(session)
|
ops.commandWho(session)
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ class SquadHandlerLogic(val ops: SessionSquadHandlers, implicit val context: Act
|
||||||
case Some((ourMember, ourIndex)) =>
|
case Some((ourMember, ourIndex)) =>
|
||||||
//we are joining the squad
|
//we are joining the squad
|
||||||
//load each member's entry (our own too)
|
//load each member's entry (our own too)
|
||||||
|
ops.squad_guid = squad.GUID
|
||||||
ops.squad_supplement_id = squad.GUID.guid + 1
|
ops.squad_supplement_id = squad.GUID.guid + 1
|
||||||
membershipPositions.foreach {
|
membershipPositions.foreach {
|
||||||
case (member, index) =>
|
case (member, index) =>
|
||||||
|
|
@ -300,6 +301,7 @@ class SquadHandlerLogic(val ops: SessionSquadHandlers, implicit val context: Act
|
||||||
avatarActor ! AvatarActor.SetLookingForSquad(false)
|
avatarActor ! AvatarActor.SetLookingForSquad(false)
|
||||||
//a finalization? what does this do?
|
//a finalization? what does this do?
|
||||||
sendResponse(SquadDefinitionActionMessage(PlanetSideGUID(0), 0, SquadAction.Unknown(18)))
|
sendResponse(SquadDefinitionActionMessage(PlanetSideGUID(0), 0, SquadAction.Unknown(18)))
|
||||||
|
ops.squad_guid = PlanetSideGUID(0)
|
||||||
ops.squad_supplement_id = 0
|
ops.squad_supplement_id = 0
|
||||||
ops.squadUpdateCounter = 0
|
ops.squadUpdateCounter = 0
|
||||||
ops.updateSquad = ops.NoSquadUpdates
|
ops.updateSquad = ops.NoSquadUpdates
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ class SessionSquadHandlers(
|
||||||
|
|
||||||
private[session] val squadUI: mutable.LongMap[SquadUIElement] = new mutable.LongMap[SquadUIElement]()
|
private[session] val squadUI: mutable.LongMap[SquadUIElement] = new mutable.LongMap[SquadUIElement]()
|
||||||
private[session] var squad_supplement_id: Int = 0
|
private[session] var squad_supplement_id: Int = 0
|
||||||
|
private[session] var squad_guid: PlanetSideGUID = PlanetSideGUID(0)
|
||||||
/**
|
/**
|
||||||
* When joining or creating a squad, the original state of the avatar's internal LFS variable is blanked.
|
* When joining or creating a squad, the original state of the avatar's internal LFS variable is blanked.
|
||||||
* This `WorldSessionActor`-local variable is then used to indicate the ongoing state of the LFS UI component,
|
* This `WorldSessionActor`-local variable is then used to indicate the ongoing state of the LFS UI component,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue