mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
when you change max exo-suit subtypes, or change into a max exo-suit, the capacitor level is set to zero
This commit is contained in:
parent
a4b7e77d9d
commit
11cb11bd79
|
|
@ -298,6 +298,7 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
delete.foreach { case (obj, _) => TaskWorkflow.execute(GUIDTask.unregisterEquipment(continent.GUID, obj)) }
|
||||
//redraw
|
||||
if (maxhand) {
|
||||
sendResponse(PlanetsideAttributeMessage(target, attribute_type=7, player.Capacitor.toLong))
|
||||
TaskWorkflow.execute(HoldNewEquipmentUp(player)(
|
||||
Tool(GlobalDefinitions.MAXArms(subtype, player.Faction)),
|
||||
0
|
||||
|
|
@ -365,7 +366,7 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
drops
|
||||
) if resolvedPlayerGuid == target =>
|
||||
sendResponse(ArmorChangedMessage(target, exosuit, subtype))
|
||||
sendResponse(PlanetsideAttributeMessage(target, attribute_type = 4, armor))
|
||||
sendResponse(PlanetsideAttributeMessage(target, attribute_type=4, armor))
|
||||
//happening to this player
|
||||
sendResponse(ObjectHeldMessage(target, Player.HandsDownSlot, unk1=true))
|
||||
//cleanup
|
||||
|
|
@ -377,6 +378,7 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
|||
drops.foreach(item => sendResponse(ObjectDeleteMessage(item.obj.GUID, unk1=0)))
|
||||
//redraw
|
||||
if (maxhand) {
|
||||
sendResponse(PlanetsideAttributeMessage(target, attribute_type=7, player.Capacitor.toLong))
|
||||
TaskWorkflow.execute(HoldNewEquipmentUp(player)(
|
||||
Tool(GlobalDefinitions.MAXArms(subtype, player.Faction)),
|
||||
slot = 0
|
||||
|
|
|
|||
|
|
@ -635,7 +635,10 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
//was max
|
||||
val (delete, insert) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Max)
|
||||
if (willBecomeMax) {
|
||||
//changing to a different kind(?) of max
|
||||
if (originalSubtype != subtype) {
|
||||
//changing to a different kind of max
|
||||
player.Capacitor = 0
|
||||
}
|
||||
(delete, Nil, insert, beforeInventory)
|
||||
} else {
|
||||
//changing to a vanilla exo-suit
|
||||
|
|
@ -645,6 +648,7 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
}
|
||||
} else if (willBecomeMax) {
|
||||
//will be max, drop everything but melee slot
|
||||
player.Capacitor = 0
|
||||
val (melee, other) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Melee)
|
||||
val (inventory, unplacedInventory) = GridInventory.recoverInventory(beforeInventory ++ other, player.Inventory)
|
||||
(Nil, unplacedInventory.map(InventoryItem(_, -1)), melee, inventory)
|
||||
|
|
|
|||
Loading…
Reference in a new issue