mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9461] Some another cases when movegen can be lost while updating.
This commit is contained in:
parent
01e05f5d7e
commit
c179c45087
5 changed files with 16 additions and 3 deletions
|
|
@ -177,8 +177,13 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
|||
creature.SetUInt32Value(UNIT_NPC_EMOTESTATE, behavior->emote);
|
||||
|
||||
if (behavior->spell != 0)
|
||||
{
|
||||
creature.CastSpell(&creature, behavior->spell, false);
|
||||
|
||||
if (!IsActive(creature)) // force stop processing (cast can change movegens list)
|
||||
return true; // not expire now, but already lost
|
||||
}
|
||||
|
||||
if (behavior->model1 != 0)
|
||||
creature.SetDisplayId(behavior->model1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue