|
发表于 2007-11-8 06:57:54
|
显示全部楼层
function Heroking_Conditions takes nothing returns boolean
local location yy = GetUnitLoc(GetSpellTargetUnit())
local integer re = GetSpellAbilityId()
local string xx = GetAbilitySoundBJ(GetSpellAbilityId(), SOUND_TYPE_EFFECT_LOOPED)
if UnitHasItemOfTypeBJ(GetSpellTargetUnit(), 'iwbr') == true then
call CreateNUnitsAtLoc( 1, 'hpxe', GetOwningPlayer(GetSpellTargetUnit()), yy, bj_UNIT_FACING )
call UnitAddAbilityBJ( re, GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), xx, GetSpellAbilityUnit() )
call RemoveLocation(yy)
set yy = null
set xx = null
endif
return false
endfunction
//===========================================================================
function InitTrig_Worldtree takes nothing returns nothing
set gg_trg_Worldtree = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Worldtree, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Worldtree, Condition( function Heroking_Conditions ) )
endfunction
物体会麻烦些
不过指向性技能并不那么多
而且改起来也不难 |
|