Skip to content

[Bug] UNIT_FIELD_FLAG_IMMUNE_TO_NPC causes creature to not attack #366

Description

@tikki100

Hi there!

TrinityCore here.

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

local function Brain_GhoulOnSpawn(event, pUnit)
	pUnit:SetUInt32Value(59, 512)
	pUnit:SendUnitSay("Spawned",0)
end

RegisterCreatureEvent(50302, 5,Brain_GhoulOnSpawn)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions