fix(Core/Combat): Restrict NullCreatureAI combat disallow to triggers only (#25289)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-29 04:28:33 -05:00
committed by GitHub
parent 74988d3452
commit 2b56061cb7
3 changed files with 6 additions and 9 deletions

View File

@@ -0,0 +1,2 @@
-- Fix Ashtongue Channeler saved health (was incorrectly 1)
UPDATE `creature` SET `curhealth` = 87973 WHERE `id1` = 23421;

View File

@@ -23,8 +23,9 @@ PossessedAI::PossessedAI(Creature* c) : CreatureAI(c) { me->SetReactState(REACT_
NullCreatureAI::NullCreatureAI(Creature* c) : CreatureAI(c)
{
me->SetReactState(REACT_PASSIVE);
// TODO: Remove once WorldObject casting is ported (triggers won't create combat refs from spell casts)
me->SetIsCombatDisallowed(true);
// TODO: Remove once WorldObject spell casting is ported (triggers won't create combat refs from spell casts)
if (me->IsTrigger())
me->SetIsCombatDisallowed(true);
}
int32 NullCreatureAI::Permissible(Creature const* creature)

View File

@@ -314,11 +314,7 @@ public:
struct npc_training_dummy : NullCreatureAI
{
npc_training_dummy(Creature* creature) : NullCreatureAI(creature)
{
// TODO: Remove once WorldObject casting is ported
me->SetIsCombatDisallowed(false);
}
npc_training_dummy(Creature* creature) : NullCreatureAI(creature) { }
void JustEnteredCombat(Unit* who) override
{
@@ -363,8 +359,6 @@ struct npc_target_dummy : NullCreatureAI
{
npc_target_dummy(Creature* creature) : NullCreatureAI(creature)
{
// TODO: Remove once WorldObject casting is ported
me->SetIsCombatDisallowed(false);
_deathTimer = 15s;
}