function FLE takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I017')
endfunction
function FME takes nothing returns boolean
return(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex)==GetManipulatedItem())
endfunction
function FPE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),1))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),2))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FQE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),1))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),3))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FSE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),1))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),4))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FTE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),2))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),3))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FUE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),2))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),4))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FWE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),3))==GetItemTypeId(GetManipulatedItem()))and(GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),4))==GetItemTypeId(GetManipulatedItem()))
endfunction
function FYE takes nothing returns boolean
return(FPE())or(FQE())or(FSE())or(FTE())or(FUE())or(FWE())
endfunction
function FZE takes nothing returns boolean
return(FYE())
endfunction
function F_E takes nothing returns nothing
if(FZE())then
call DisplayTimedTextToForce(SY(GetOwningPlayer(GetTriggerUnit())),10.,"|cffff0000YOU CANNOT TAKE TWO OF THE SAME SKILL!!|r")
call RemoveItem(GetManipulatedItem())
call AdjustPlayerStateBJ(1,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_GOLD)
else
call UnitAddAbility(GetTriggerUnit(),'A06C')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FME())then
set udg_integers12[((((1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))-1)*5)+bj_forLoopAIndex)]='A06C'
call SetItemUserData(GetManipulatedItem(),bj_forLoopAIndex)
call SetUnitAbilityLevelSwapped('A02Y',GetTriggerUnit(),bj_forLoopAIndex)
call SetPlayerAbilityAvailableBJ(false,'A06C',GetOwningPlayer(GetTriggerUnit()))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endfunction