summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortalamortis <talamortis@gmail.com>2017-07-01 23:28:17 +0100
committertalamortis <talamortis@gmail.com>2017-07-01 23:28:17 +0100
commit3561d52b109a566d4300e8b87ec4e4fc99a4d2ad (patch)
tree6952eefb32ae4f7fa15511288bc867094b2f784d
parentef7d1c39372a717889b707abc6801aa6b4e67761 (diff)
PetAI update
-rw-r--r--src/game/AI/CoreAI/PetAI.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/AI/CoreAI/PetAI.cpp b/src/game/AI/CoreAI/PetAI.cpp
index be2d536b9a..2ff2422ebb 100644
--- a/src/game/AI/CoreAI/PetAI.cpp
+++ b/src/game/AI/CoreAI/PetAI.cpp
@@ -99,6 +99,13 @@ void PetAI::UpdateAI(uint32 diff)
Unit* owner = me->GetCharmerOrOwner();
+ //if Pet is in combat put player in combat
+ if (owner->HasAuraType(SPELL_AURA_MOD_STEALTH) || owner->HasAuraType(SPELL_AURA_FEIGN_DEATH))
+ return;
+ else
+ if (me->IsInCombat())
+ owner->IsInCombat();
+
if (m_updateAlliesTimer <= diff)
// UpdateAllies self set update timer
UpdateAllies();
@@ -307,13 +314,6 @@ void PetAI::UpdateAllies()
else if (owner->GetTypeId() == TYPEID_PLAYER)
group = owner->ToPlayer()->GetGroup();
- //if Pet is in combat put player in combat
- if (owner->HasAuraType(SPELL_AURA_MOD_STEALTH) || owner->HasAuraType(SPELL_AURA_FEIGN_DEATH))
- return;
- else
- if (me->IsInCombat())
- owner->IsInCombat();
-
//only pet and owner/not in group->ok
if (m_AllySet.size() == 2 && !group)
return;