|
有N个错误.... 我找了好久了.....哭.....
[jass]function overfear takes nothing returns nothing
local integer playernumber = GetStoredInteger(udg_gc,I2S(H2I(GetEnumUnit())),"PlayerNumber")
call UnitRemoveAbility( GetEnumUnit(), 'Atwa' )
call SetUnitOwner( GetEnumUnit(), Player(playernumber), false )
endfunction
function overtime takes group fearedgroup returns nothing
call TriggerSleepAction(4.00)
call ForGroup(fearedgroup, function overfear )
endfunction
function StoreHarm takes nothing returns nothing
local real harm = GetEventDamage()
local real lastharm = GetStoredReal(udg_gc,I2S(H2I(GetTriggerUnit())),"harm")
local integer playernumber = GetStoredInteger(udg_gc,I2S(H2I(GetTriggerUnit())),"PlayerNumber")
set harm = harm + lastharm
if (harm < GetStoredReal(udg_gc,"Fear","FearHarmMax")) then
call StoreReal(udg_gc,I2S(H2I(GetTriggerUnit())),"harm",harm)
else
call UnitRemoveAbility( GetTriggerUnit(), 'Atwa' )
call SetUnitOwner( GetTriggerUnit(), Player(playernumber), false )
endif
endfunction
function IfUnitHasBuff takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BNht') == true )
endfunction
function FearUnit takes nothing returns nothing
local trigger FearedUnitHarm = CreateTrigger()
local integer playernumber = GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))
if ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) <= 5 ) then
call SetUnitOwner( GetEnumUnit(), Player(0), false )
endif
if ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) == 12 ) then
call DoNothing()
else
call SetUnitOwner( GetEnumUnit(), Player(11), false )
endif
call TriggerRegisterUnitEvent( FearedUnitHarm, GetEnumUnit(), EVENT_UNIT_DAMAGED )
call TriggerAddAction( FearedUnitHarm, function StoreHarm )
call UnitAddAbility( GetEnumUnit(), 'Atwa' )
call StoreInteger(udg_gc,I2S(H2I(GetEnumUnit())), "PlayerNumber" , playernumber)
endfunction
function FearedGroup takes nothing returns nothing
local real fearharmmax = I2R(GetUnitAbilityLevel(GetTriggerUnit(), 'ANht'))
local location point = GetUnitLoc(GetTriggerUnit())
local group fearedgroup = CreateGroup()
set fearharmmax = fearharmmax * 55
call StoreReal(udg_gc,"fear","fearharmmax",fearharmmax)
call TriggerSleepAction(0.01)
call ForGroup( GroupEnumUnitsInRangeOfLoc(fearedgroup, point, 375, Condition(function IfUnitHasBuff)),function FearUnit)
call overtime(fearedgroup)
endfunction
//===========================================================================
function InitTrig_fear takes nothing returns nothing
set gg_trg_fear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_fear, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddAction( gg_trg_fear, function FearedGroup )
endfunction [/jass]
改了N-1个错误 |
|