mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 13:35:08 +00:00
PetAI update
This commit is contained in:
@@ -99,6 +99,13 @@ void PetAI::UpdateAI(uint32 diff)
|
|||||||
|
|
||||||
Unit* owner = me->GetCharmerOrOwner();
|
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)
|
if (m_updateAlliesTimer <= diff)
|
||||||
// UpdateAllies self set update timer
|
// UpdateAllies self set update timer
|
||||||
UpdateAllies();
|
UpdateAllies();
|
||||||
@@ -307,13 +314,6 @@ void PetAI::UpdateAllies()
|
|||||||
else if (owner->GetTypeId() == TYPEID_PLAYER)
|
else if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||||
group = owner->ToPlayer()->GetGroup();
|
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
|
//only pet and owner/not in group->ok
|
||||||
if (m_AllySet.size() == 2 && !group)
|
if (m_AllySet.size() == 2 && !group)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user