|
楼主 |
发表于 2008-1-7 17:10:49
|
显示全部楼层
[codes=jass]
function I2U takes item i returns unit
return i
endfunction
[/codes]
Unit Group里可以直接沿用到Item Group的CJ函数有以下几个:
[codes=jass]
native CreateGroup takes nothing returns group
native DestroyGroup takes group whichGroup returns nothing
native GroupAddUnit takes group whichGroup, unit whichUnit returns nothing
native GroupRemoveUnit takes group whichGroup, unit whichUnit returns nothing
native GroupClear takes group whichGroup returns nothing
native ForGroup takes group whichGroup, code callback returns nothing
native FirstOfGroup takes group whichGroup returns unit
[/codes]
其中GroupAddUnit和GroupRemoveUnit需要用I2U进行一次转换才能操作~~
而CJ中唯一一个对物品集合操作的函数是
[codes=jass]
native EnumItemsInRect takes rect r, boolexpr filter, code actionFunc returns nothing
[/codes] |
|