mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
kicked player leaves outfit chat
This commit is contained in:
parent
0ce5e1ab0c
commit
036d226de1
|
|
@ -482,6 +482,9 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
case AvatarResponse.ShareAntExperienceWithSquad(owner, exp, vehicle) =>
|
||||
ops.shareAntExperienceWithSquad(owner, exp, vehicle)
|
||||
|
||||
case AvatarResponse.RemoveFromOutfitChat(outfit_id) =>
|
||||
ops.removeFromOutfitChat(outfit_id)
|
||||
|
||||
case AvatarResponse.SendResponse(msg) =>
|
||||
sendResponse(msg)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import net.psforever.packet.game.objectcreate.ConstructorData
|
|||
import net.psforever.objects.zones.exp
|
||||
import net.psforever.services.Service
|
||||
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage, AvatarServiceResponse}
|
||||
import net.psforever.services.chat.OutfitChannel
|
||||
|
||||
import scala.collection.mutable
|
||||
//
|
||||
|
|
@ -237,6 +238,10 @@ class SessionAvatarHandlers(
|
|||
}
|
||||
player.VehicleSeated = None
|
||||
}
|
||||
|
||||
def removeFromOutfitChat(outfit_id: Long): Unit = {
|
||||
sessionLogic.chat.LeaveChannel(OutfitChannel(outfit_id))
|
||||
}
|
||||
}
|
||||
|
||||
object SessionAvatarHandlers {
|
||||
|
|
|
|||
|
|
@ -260,6 +260,9 @@ object SessionOutfitHandlers {
|
|||
kicked.Zone.AvatarEvents ! AvatarServiceMessage(kicked.Zone.id,
|
||||
AvatarAction.PlanetsideStringAttribute(kicked.GUID, 0, ""))
|
||||
|
||||
kicked.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||
kicked.Name, AvatarAction.RemoveFromOutfitChat(kickedBy.outfit_id))
|
||||
|
||||
kicked.outfit_id = 0
|
||||
kicked.outfit_name = ""
|
||||
PlayerControl.sendResponse(kicked.Zone, kicked.Name,
|
||||
|
|
|
|||
|
|
@ -484,6 +484,15 @@ class AvatarService(zone: Zone) extends Actor {
|
|||
)
|
||||
)
|
||||
|
||||
case AvatarAction.RemoveFromOutfitChat(outfit_id) =>
|
||||
AvatarEvents.publish(
|
||||
AvatarServiceResponse(
|
||||
s"/$forChannel/Avatar",
|
||||
Service.defaultPlayerGUID,
|
||||
AvatarResponse.RemoveFromOutfitChat(outfit_id)
|
||||
)
|
||||
)
|
||||
|
||||
case _ => ()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ object AvatarAction {
|
|||
final case class FacilityCaptureRewards(building_id: Int, zone_number: Int, exp: Long) extends Action
|
||||
final case class ShareKillExperienceWithSquad(killer: Player, exp: Long) extends Action
|
||||
final case class ShareAntExperienceWithSquad(owner: UniquePlayer, exp: Long, vehicle: Vehicle) extends Action
|
||||
final case class RemoveFromOutfitChat(outfit_id: Long) extends Action
|
||||
|
||||
final case class TeardownConnection() extends Action
|
||||
// final case class PlayerStateShift(killer : PlanetSideGUID, victim : PlanetSideGUID) extends Action
|
||||
|
|
|
|||
|
|
@ -135,4 +135,5 @@ object AvatarResponse {
|
|||
final case class FacilityCaptureRewards(building_id: Int, zone_number: Int, exp: Long) extends Response
|
||||
final case class ShareKillExperienceWithSquad(killer: Player, exp: Long) extends Response
|
||||
final case class ShareAntExperienceWithSquad(owner: UniquePlayer, exp: Long, vehicle: Vehicle) extends Response
|
||||
final case class RemoveFromOutfitChat(outfit_id: Long) extends Response
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue