function Trig_pickupweapon_Conditions takes nothing returns boolean
????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then
????????return false
????endif
????return true
endfunction
function Trig_pickupweapon_Func002Func002C takes nothing returns boolean
????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then
????????return false
????endif
????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then
????????return false
????endif
????return true
endfunction
function Trig_pickupweapon_Func002C takes nothing returns boolean
????if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_ARTIFACT ) ) then
????????return false
????endif
????if ( not ( udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then
????????return false
????endif
????return true
endfunction
function Trig_pickupweapon_Actions takes nothing returns nothing
????if ( Trig_pickupweapon_Func002C() ) then
????????set udg_WeaponHand[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
????else
????????if ( Trig_pickupweapon_Func002Func002C() ) then
????????????call DisableTrigger( gg_trg_DropWeapon )
????????????call SetItemPositionLoc( GetManipulatedItem(), GetItemLoc(GetManipulatedItem()) )
????????????call EnableTrigger( gg_trg_DropWeapon )
????????else
????????endif
????endif
endfunction
//===========================================================================
function InitTrig_pickupweapon takes nothing returns nothing
????set gg_trg_pickupweapon = CreateTrigger(??)
????call TriggerRegisterAnyUnitEventBJ( gg_trg_pickupweapon, EVENT_PLAYER_UNIT_PICKUP_ITEM )
????call TriggerAddCondition( gg_trg_pickupweapon, Condition( function Trig_pickupweapon_Conditions ) )
????call TriggerAddAction( gg_trg_pickupweapon, function Trig_pickupweapon_Actions )
endfunction