Core/Movement: Prevent calling _updateSpeed for pets during a maptransfer
Closes #8998
This commit is contained in:
1 parent
1eab850cab
commit
4372d24a7c
1 file changed
+6
-5
@@ -273,15 +273,16 @@ void FollowMovementGenerator<Player>::_updateSpeed(Player &/*u*/)
|
||||
}
|
||||
|
||||
template<>
|
||||
void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u)
|
||||
void FollowMovementGenerator<Creature>::_updateSpeed(Creature& owner)
|
||||
{
|
||||
// pet only sync speed with owner
|
||||
if (!((Creature&)u).isPet() || !i_target.isValid() || i_target->GetGUID() != u.GetOwnerGUID())
|
||||
/// Make sure we are not in the process of a map change
|
||||
if (!owner.isPet() || !owner.IsInWorld() || !i_target.isValid() || i_target->GetGUID() != owner.GetOwnerGUID())
|
||||
return;
|
||||
|
||||
u.UpdateSpeed(MOVE_RUN, true);
|
||||
u.UpdateSpeed(MOVE_WALK, true);
|
||||
u.UpdateSpeed(MOVE_SWIM, true);
|
||||
owner.UpdateSpeed(MOVE_RUN, true);
|
||||
owner.UpdateSpeed(MOVE_WALK, true);
|
||||
owner.UpdateSpeed(MOVE_SWIM, true);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in new issue
Block a user