mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Movement: interrupt a creature's current cast when fleeing for assistance, and (if spell is not castable while moving) when running random/fleeing movement generators. (#17271)
Also make sure the creature is alive before updating. Fixes #12823.
This commit is contained in:
@@ -531,6 +531,7 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z)
|
||||
TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
|
||||
_owner->GetEntry(), _owner->GetGUID().GetCounter(), x, y, z);
|
||||
_owner->AttackStop();
|
||||
_owner->CastStop();
|
||||
_owner->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
Mutate(new AssistanceMovementGenerator(x, y, z), MOTION_SLOT_ACTIVE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user