function Trig_Sell_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A003'
endfunction
function Trig_Sell_Actions takes nothing returns nothing
local effect e
local unit shop = GetTriggerUnit()
set e = AddSpecialEffectLoc( "war3mapImported\\StarfallCaster.mdx" , GetUnitLoc( shop ))
call PauseUnit(shop, true)
call TriggerSleepAction( 2.50 )
call AdjustPlayerStateBJ( GetUnitPointValue(shop), GetOwningPlayer(shop), PLAYER_STATE_RESOURCE_GOLD )
call KillUnit( shop )
call DestroyEffect( e )
set e = null
set shop = null
endfunction
//===========================================================================
function InitTrig_Sell takes nothing returns nothing
set gg_trg_Sell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Sell, Condition( function Trig_Sell_Conditions ) )
call TriggerAddAction( gg_trg_Sell, function Trig_Sell_Actions )
endfunction