You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a creatures unit_flags in either creature_template to 512 or through pUnit:SetUInt32Value(59, 512) the creature no longer attacks players. Instead, it just stands passively and takes damage.
When the creature is immune to NPC, it is supposed to ignore all NPCs around it but not players. My best bet is that this is caused by an error in the Eluna AI
This is not a Eluna issue but a core issue. That function you do just calls the core to set unit's flags and the core handles it from there onwards. Eluna does not have an "AI" by itself.
Not entirely true. As it is now, registering a creature event will override the creature's AI with Eluna specific C++ AI class that has the hooks for different events.
So it is possible that the Eluna AI class needs to be modified / updated if the AI handles the interactions. See https://github.com/ElunaLuaEngine/Eluna/blob/master/ElunaCreatureAI.h
Moving away from the AI class would be nice though.
Need to investigate more on what is the default behavior and if eluna affects that. It is possible that the core should just handle it. But its also possible that the AI class Eluna uses is bypassing that check for example.
We're currently not updating the AI of the creature at all when the immune to npc flag is set. Logic needs to be revised, or like rochet said, possibly remove the AI class entirely.
Hi there!
TrinityCore here.
When setting a creatures
unit_flags
in eithercreature_template
to 512 or throughpUnit:SetUInt32Value(59, 512)
the creature no longer attacks players. Instead, it just stands passively and takes damage.When the creature is immune to NPC, it is supposed to ignore all NPCs around it but not players. My best bet is that this is caused by an error in the Eluna AI
The text was updated successfully, but these errors were encountered: