The hostility part does not apply for gameobjects at the moment.
Even though gameobjects have a faction, it is not used in the core for almost anything. And upon summoning a gameobject your faction is not passed to the summoned object from what I can see.
What core actually uses is the owner of the gameobject. The owner's faction is used to determine whether it is hostile or not.
I implemented such a check here: https://github.com/ElunaLuaEngine/El...984bc1391bd752