mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
Core/Pet: additional check if it's a creature (#1248)
This commit is contained in:
committed by
Viste(Кирилл)
parent
7a3a9a81b4
commit
0be44221d2
@@ -100,12 +100,17 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool ini
|
|||||||
|
|
||||||
float angle = i_angle;
|
float angle = i_angle;
|
||||||
|
|
||||||
if (i_target->GetTypeId() == TYPEID_PLAYER && owner->ToCreature()->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
|
if (i_target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
// fix distance and angle for vanity pets
|
Creature* creature = owner->ToCreature();
|
||||||
dist = 0.3f;
|
|
||||||
angle = PET_FOLLOW_ANGLE + M_PI * 0.2f;
|
if (creature && creature->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
|
||||||
size = i_target->GetCombatReach() - i_target->GetObjectSize();
|
{
|
||||||
|
// fix distance and angle for vanity pets
|
||||||
|
dist = 0.3f;
|
||||||
|
angle = PET_FOLLOW_ANGLE + M_PI * 0.2f;
|
||||||
|
size = i_target->GetCombatReach() - i_target->GetObjectSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Xinef: Fix follow angle for hostile units
|
// Xinef: Fix follow angle for hostile units
|
||||||
|
|||||||
Reference in New Issue
Block a user