Make summoned creatures go back to summoner on evade if summoner is alive. This should take care of most (all?) errors about controlled creatures trying to target home.
--HG-- branch : trunk
This commit is contained in:
@@ -1038,7 +1038,15 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
|
||||
m_creature->CombatStop();
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if( m_creature->isAlive() )
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
{
|
||||
if (Unit* owner = m_creature->GetOwner())
|
||||
{
|
||||
if (owner->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveFollow(owner,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE);
|
||||
}
|
||||
else
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user