diff --git a/src/main/scala/net/psforever/actors/session/normal/AvatarHandlerLogic.scala b/src/main/scala/net/psforever/actors/session/normal/AvatarHandlerLogic.scala index 042a3551e..890cd27be 100644 --- a/src/main/scala/net/psforever/actors/session/normal/AvatarHandlerLogic.scala +++ b/src/main/scala/net/psforever/actors/session/normal/AvatarHandlerLogic.scala @@ -310,6 +310,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 @@ -381,7 +382,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 @@ -393,6 +394,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 diff --git a/src/main/scala/net/psforever/objects/avatar/PlayerControl.scala b/src/main/scala/net/psforever/objects/avatar/PlayerControl.scala index 2ef4fa023..f0b36413a 100644 --- a/src/main/scala/net/psforever/objects/avatar/PlayerControl.scala +++ b/src/main/scala/net/psforever/objects/avatar/PlayerControl.scala @@ -642,7 +642,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 @@ -653,6 +656,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) val (dropFromUnplaced, deleteFromUnplaced) = unplacedInventory.map(InventoryItem(_, -1)).partition(dropPred)