|
本帖最后由 evenxn007 于 2012-11-22 17:51 编辑
保存时说我缺少代码声明不通 发现是13行写错了
- function Trig_Worker_Actions takes nothing returns nothing
- local integer typ
- local integer n
- ¡¡¡¡local integer m
- call DisableTrigger( GetTriggeringTrigger() )
- set typ = GetItemTypeId(GetManipulatedItem())
- set n = GetItemCharges(GetManipulatedItem())
- call RemoveItem( GetManipulatedItem() )
- if ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), typ)) == true ) then
- set m = GetItemCharges(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), typ))
- if ( m + n > 8 ) then
- call SetItemCharges( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), typ), 8 )
- call UnitAddItemByIdSwapped( GetItemTypeId(typ), GetTriggerUnit() )
- call SetItemCharges( GetLastCreatedItem(), ( ( n + m ) - 8 ) )
- else
- call SetItemCharges( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), typ), ( n + m ) )
- endif
- else
- call UnitAddItemByIdSwapped( typ, GetTriggerUnit() )
- call SetItemCharges( GetLastCreatedItem(), n )
- endif
- set typ = null
- call EnableTrigger( GetTriggeringTrigger() )
- endfunction
复制代码 |
|