If event pokemon like Shaymin, Darkrai, Arceus, mew, etc. do not have the "Fateful Encounter" tag on their information page on their summary, then the game recognizes them as hacked. This is the reason why you can't use a hacked Shaymin to get the Gracidea Flower from the girl in Lacunosa town. For other non event pokemon, I do not believe the game can recognize them.