|
发表于 2007-1-4 12:55:25
|
显示全部楼层
[jass]
//***************************************************************************
//*
//* Rescuable Unit Utility Functions
//*
//***************************************************************************
//===========================================================================
// Rescues a unit for a player. This performs the default rescue behavior,
// including a rescue sound, flashing selection circle, ownership change,
// and optionally a unit color change.
//
function RescueUnitBJ takes unit whichUnit, player rescuer, boolean changeColor returns nothing
if IsUnitDeadBJ(whichUnit) or (GetOwningPlayer(whichUnit) == rescuer) then
return
endif
call StartSound(bj_rescueSound)
call SetUnitOwner(whichUnit, rescuer, changeColor)
call UnitAddIndicator(whichUnit, 0, 255, 0, 255)
call PingMinimapForPlayer(rescuer, GetUnitX(whichUnit), GetUnitY(whichUnit), bj_RESCUE_PING_TIME)
endfunction
[/jass] |
|