fix(Core/Unit): Fix Guardian Pets clearing combat state (#2619)
This commit is contained in:
@@ -384,7 +384,7 @@ void Unit::Update(uint32 p_time)
|
|||||||
SendThreatListUpdate();
|
SendThreatListUpdate();
|
||||||
|
|
||||||
// update combat timer only for players and pets (only pets with PetAI)
|
// update combat timer only for players and pets (only pets with PetAI)
|
||||||
if (IsInCombat() && (GetTypeId() == TYPEID_PLAYER || (IsPet() && IsControlledByPlayer())))
|
if (IsInCombat() && (GetTypeId() == TYPEID_PLAYER || ((IsPet() || HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) && IsControlledByPlayer())))
|
||||||
{
|
{
|
||||||
// Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away
|
// Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away
|
||||||
// targets without stopping half way there and running off.
|
// targets without stopping half way there and running off.
|
||||||
|
|||||||
Reference in New Issue
Block a user