WoW:API PickupContainerItem: Difference between revisions

m
Move page script moved page API PickupContainerItem to WoW:API PickupContainerItem without leaving a redirect
(found flaw in swap items example; marked it as dangerous; added example that is actually safe)
m (Move page script moved page API PickupContainerItem to WoW:API PickupContainerItem without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Wildcard function usually called when a player clicks on a slot in their bags. Functionality includes picking up the item from a specific bag slot, putting the item into a specific bag slot, and applying enchants (including poisons and sharpening stones) to the item in a specific bag slot.
Wildcard function usually called when a player left clicks on a slot in their bags. Functionality includes picking up the item from a specific bag slot, putting the item into a specific bag slot, and applying enchants (including poisons and sharpening stones) to the item in a specific bag slot, except if one of the Modifier Keys is pressed.


  PickupContainerItem(bagID, slot);
  PickupContainerItem(bagID, slot);
Line 39: Line 39:
     until not locked1 and not locked2
     until not locked1 and not locked2
   
   
     [[API PickupContainerItem|PickupContainerItem]](bag1, slot1)
     '''PickupContainerItem'''(bag1, slot1)
     [[API PickupContainerItem|PickupContainerItem]](bag2, slot2)
     '''PickupContainerItem'''(bag2, slot2)
  end
  end
   
   
Line 63: Line 63:
     end
     end
   
   
     [[API PickupContainerItem|PickupContainerItem]](bag1, slot1)
     '''PickupContainerItem'''(bag1, slot1)
     [[API PickupContainerItem|PickupContainerItem]](bag2, slot2)
     '''PickupContainerItem'''(bag2, slot2)
  end
  end
   
   
Line 73: Line 73:
                             -- it will be false when the coroutine is actually finished
                             -- it will be false when the coroutine is actually finished
  end
  end
You can also use the event "ITEM_LOCK_CHANGED" instead of OnUpdate.
Anonymous user