if (GetItemType(UnitItemInSlot(data.u, slot)) == ITEM_TYPE_ARTIFACT) then
if (GetUnitAbilityLevel(data.u, WEAPON_SLOT) >= 1) then
call UnitRemoveAbility( data.u, WEAPON_SLOT)
call UnitRemoveItem( data.u, EQUIP_ITEM)
call UnitAddAbility( data.u, EQUIPPED_ITEM)
endif
endif
call data.destroy()
return data
endmethod
I have a bit of a problem on this part ._.
apparently it was something about these:
+Comparing variables of differing primitive types
+Cannot convert integer to item