UnitGiveAllItemsToUnit
not ratedTransfers all items from one unit to another without taking care of the distance between the units
function UnitGiveAllItemsToUnit takes unit fromUnit, unit toUnit returns integer
local integer given = 0
local integer itemSlot = 0
loop
exitwhen itemSlot > 6
if (UnitAddItem(toUnit,UnitRemoveItemFromSlot(fromUnit, itemSlot)) == true) then
set given = given + 1
endif
set itemSlot = itemSlot + 1
endloop
return given
endfunctionNo comments.