mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-16 08:55:16 +00:00
armor value updated (#533)
This commit is contained in:
parent
d46110874e
commit
89a30ae6f6
5 changed files with 16 additions and 5 deletions
|
|
@ -2086,6 +2086,7 @@ class SessionActor extends Actor with MDCContextAware {
|
||||||
|
|
||||||
case AvatarResponse.ChangeExosuit(
|
case AvatarResponse.ChangeExosuit(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
@ -2099,7 +2100,7 @@ class SessionActor extends Actor with MDCContextAware {
|
||||||
) =>
|
) =>
|
||||||
StartBundlingPackets()
|
StartBundlingPackets()
|
||||||
sendResponse(ArmorChangedMessage(target, exosuit, subtype))
|
sendResponse(ArmorChangedMessage(target, exosuit, subtype))
|
||||||
sendResponse(PlanetsideAttributeMessage(target, 4, player.Armor))
|
sendResponse(PlanetsideAttributeMessage(target, 4, armor))
|
||||||
if (tplayer_guid == target) {
|
if (tplayer_guid == target) {
|
||||||
//happening to this player
|
//happening to this player
|
||||||
//cleanup
|
//cleanup
|
||||||
|
|
@ -2167,6 +2168,7 @@ class SessionActor extends Actor with MDCContextAware {
|
||||||
|
|
||||||
case AvatarResponse.ChangeLoadout(
|
case AvatarResponse.ChangeLoadout(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
@ -2179,7 +2181,7 @@ class SessionActor extends Actor with MDCContextAware {
|
||||||
) =>
|
) =>
|
||||||
StartBundlingPackets()
|
StartBundlingPackets()
|
||||||
sendResponse(ArmorChangedMessage(target, exosuit, subtype))
|
sendResponse(ArmorChangedMessage(target, exosuit, subtype))
|
||||||
sendResponse(PlanetsideAttributeMessage(target, 4, player.Armor))
|
sendResponse(PlanetsideAttributeMessage(target, 4, armor))
|
||||||
if (tplayer_guid == target) {
|
if (tplayer_guid == target) {
|
||||||
//happening to this player
|
//happening to this player
|
||||||
sendResponse(ObjectHeldMessage(target, Player.HandsDownSlot, false))
|
sendResponse(ObjectHeldMessage(target, Player.HandsDownSlot, false))
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
val originalArmor = player.Armor
|
val originalArmor = player.Armor
|
||||||
player.ExoSuit = exosuit //changes the value of MaxArmor to reflect the new exo-suit
|
player.ExoSuit = exosuit //changes the value of MaxArmor to reflect the new exo-suit
|
||||||
val toMaxArmor = player.MaxArmor
|
val toMaxArmor = player.MaxArmor
|
||||||
if (originalSuit != exosuit || originalSubtype != subtype || originalArmor > toMaxArmor) {
|
val toArmor = if (originalSuit != exosuit || originalSubtype != subtype || originalArmor > toMaxArmor) {
|
||||||
player.History(HealFromExoSuitChange(PlayerSource(player), exosuit))
|
player.History(HealFromExoSuitChange(PlayerSource(player), exosuit))
|
||||||
player.Armor = toMaxArmor
|
player.Armor = toMaxArmor
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -274,6 +274,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
player.Zone.id,
|
player.Zone.id,
|
||||||
AvatarAction.ChangeExosuit(
|
AvatarAction.ChangeExosuit(
|
||||||
player.GUID,
|
player.GUID,
|
||||||
|
toArmor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
player.LastDrawnSlot,
|
player.LastDrawnSlot,
|
||||||
|
|
@ -365,7 +366,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
val originalArmor = player.Armor
|
val originalArmor = player.Armor
|
||||||
player.ExoSuit = nextSuit
|
player.ExoSuit = nextSuit
|
||||||
val toMaxArmor = player.MaxArmor
|
val toMaxArmor = player.MaxArmor
|
||||||
if (originalSuit != nextSuit || originalSubtype != nextSubtype || originalArmor > toMaxArmor) {
|
val toArmor = if (originalSuit != nextSuit || originalSubtype != nextSubtype || originalArmor > toMaxArmor) {
|
||||||
player.History(HealFromExoSuitChange(PlayerSource(player), nextSuit))
|
player.History(HealFromExoSuitChange(PlayerSource(player), nextSuit))
|
||||||
player.Armor = toMaxArmor
|
player.Armor = toMaxArmor
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -411,6 +412,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
player.Zone.id,
|
player.Zone.id,
|
||||||
AvatarAction.ChangeLoadout(
|
AvatarAction.ChangeLoadout(
|
||||||
player.GUID,
|
player.GUID,
|
||||||
|
toArmor,
|
||||||
nextSuit,
|
nextSuit,
|
||||||
nextSubtype,
|
nextSubtype,
|
||||||
player.LastDrawnSlot,
|
player.LastDrawnSlot,
|
||||||
|
|
@ -430,7 +432,6 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
}
|
}
|
||||||
|
|
||||||
case Zone.Ground.ItemOnGround(item, _, _) =>
|
case Zone.Ground.ItemOnGround(item, _, _) =>
|
||||||
;
|
|
||||||
val name = player.Name
|
val name = player.Name
|
||||||
val zone = player.Zone
|
val zone = player.Zone
|
||||||
val avatarEvents = zone.AvatarEvents
|
val avatarEvents = zone.AvatarEvents
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,7 @@ class AvatarService(zone: Zone) extends Actor {
|
||||||
)
|
)
|
||||||
case AvatarAction.ChangeExosuit(
|
case AvatarAction.ChangeExosuit(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
@ -363,6 +364,7 @@ class AvatarService(zone: Zone) extends Actor {
|
||||||
Service.defaultPlayerGUID,
|
Service.defaultPlayerGUID,
|
||||||
AvatarResponse.ChangeExosuit(
|
AvatarResponse.ChangeExosuit(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
@ -378,6 +380,7 @@ class AvatarService(zone: Zone) extends Actor {
|
||||||
)
|
)
|
||||||
case AvatarAction.ChangeLoadout(
|
case AvatarAction.ChangeLoadout(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
@ -394,6 +397,7 @@ class AvatarService(zone: Zone) extends Actor {
|
||||||
Service.defaultPlayerGUID,
|
Service.defaultPlayerGUID,
|
||||||
AvatarResponse.ChangeLoadout(
|
AvatarResponse.ChangeLoadout(
|
||||||
target,
|
target,
|
||||||
|
armor,
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
slot,
|
slot,
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ object AvatarAction {
|
||||||
extends Action
|
extends Action
|
||||||
final case class ChangeExosuit(
|
final case class ChangeExosuit(
|
||||||
target_guid: PlanetSideGUID,
|
target_guid: PlanetSideGUID,
|
||||||
|
armor: Int,
|
||||||
exosuit: ExoSuitType.Value,
|
exosuit: ExoSuitType.Value,
|
||||||
subtype: Int,
|
subtype: Int,
|
||||||
last_drawn_slot: Int,
|
last_drawn_slot: Int,
|
||||||
|
|
@ -135,6 +136,7 @@ object AvatarAction {
|
||||||
) extends Action
|
) extends Action
|
||||||
final case class ChangeLoadout(
|
final case class ChangeLoadout(
|
||||||
target_guid: PlanetSideGUID,
|
target_guid: PlanetSideGUID,
|
||||||
|
armor: Int,
|
||||||
exosuit: ExoSuitType.Value,
|
exosuit: ExoSuitType.Value,
|
||||||
subtype: Int,
|
subtype: Int,
|
||||||
last_drawn_slot: Int,
|
last_drawn_slot: Int,
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ object AvatarResponse {
|
||||||
extends Response
|
extends Response
|
||||||
final case class ChangeExosuit(
|
final case class ChangeExosuit(
|
||||||
target_guid: PlanetSideGUID,
|
target_guid: PlanetSideGUID,
|
||||||
|
armor: Int,
|
||||||
exosuit: ExoSuitType.Value,
|
exosuit: ExoSuitType.Value,
|
||||||
subtype: Int,
|
subtype: Int,
|
||||||
last_drawn_slot: Int,
|
last_drawn_slot: Int,
|
||||||
|
|
@ -103,6 +104,7 @@ object AvatarResponse {
|
||||||
) extends Response
|
) extends Response
|
||||||
final case class ChangeLoadout(
|
final case class ChangeLoadout(
|
||||||
target_guid: PlanetSideGUID,
|
target_guid: PlanetSideGUID,
|
||||||
|
armor: Int,
|
||||||
exosuit: ExoSuitType.Value,
|
exosuit: ExoSuitType.Value,
|
||||||
subtype: Int,
|
subtype: Int,
|
||||||
last_drawn_slot: Int,
|
last_drawn_slot: Int,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue