Collect and equip armor supplies
This commit is contained in:
1 parent
c97e836380
commit
9c0db4e4b0
4 files changed
+111
-6
No files matched your search
@@ -1502,6 +1502,19 @@ class Game(LegacyGame):
|
||||
self.g.connection.write_packet(ClientTickEnd(), force=True)
|
||||
return True
|
||||
|
||||
def quick_move_inventory_slot(self, slot):
|
||||
"""Shift-click a player inventory slot with the inventory window open."""
|
||||
if self.g.get('window') or not 9 <= slot <= 44:
|
||||
return False
|
||||
packet = ContainerClickQuickMovePacket(
|
||||
container_id=0,
|
||||
state_id=self.g.get('inventory_state_ids', {}).get(0, 0),
|
||||
slot=slot,
|
||||
)
|
||||
self.g.connection.write_packet(packet, force=True)
|
||||
self.g.connection.write_packet(ClientTickEnd(), force=True)
|
||||
return True
|
||||
|
||||
def swap_container_slot_with_hotbar(self, container_slot, inventory_slot):
|
||||
window = self.g.get('window')
|
||||
if not window or not 36 <= inventory_slot <= 44:
|
||||
|
||||
Reference in new issue
Block a user