Make sure that "guardians" also gain the owner's speed

This commit is contained in:
Valcorb
2013-01-06 22:35:25 +01:00
parent 6f19129a4a
commit 8d9476fd9c

View File

@@ -12716,7 +12716,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
if (GetTypeId() == TYPEID_UNIT)
{
Unit* pOwner = GetCharmerOrOwner();
if (isPet() && !isInCombat() && pOwner) // Must check for owner or crash on "Tame Beast"
if (isPet() || isGuardian() && !isInCombat() && pOwner) // Must check for owner or crash on "Tame Beast"
{
// For every yard over 5, increase speed by 0.01
// to help prevent pet from lagging behind and despawning