m
Made more future-safe.
No edit summary |
m (Made more future-safe.) |
||
| Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
Equips the first matching item found in the player's bags. | Equips the first matching item found in the player's bags (including the bank and bank bags).<br /> | ||
Checks the bank first, then carry-ons, then bank bags. | |||
local function EquipItemByLink(link) | local function EquipItemByLink(link) | ||
for bag= | for bag=BANK_CONTAINER, NUM_BAG_SLOTS+NUM_BANKBAGSLOTS do | ||
for slot=1,GetContainerNumSlots(bag) do | for slot=1,GetContainerNumSlots(bag) do | ||
local item = GetContainerItemLink(bag, slot) | local item = GetContainerItemLink(bag, slot) | ||