|
function GetItem takes unit master , integer lv returns nothing
local integer i = 1
local integer j = 1
local integer itemx
local integer itemy
loop
set itemx = ChooseRandomItemExBJ(lv, ITEM_TYPE_PERMANENT)
call UnitAddItemByIdSwapped( itemx, master )
set i = i + 1
exitwhen i > 4
endloop
loop
set itemy = ChooseRandomItemExBJ(lv, ITEM_TYPE_CHARGED)
call UnitAddItemByIdSwapped( itemy, master )
set j = j + 1
exitwhen j > 2
endloop
endfunction
//==========================================================//
local integer GetItemlv = ( udg_I_Choose + 5 )
call GetItem(udg_Master4 , GetItemlv)
这次调用只创建了itemy2样物品... |
|