mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states. --HG-- branch : trunk
This commit is contained in:
@@ -120,7 +120,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
|
||||
if(pet->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if (((Creature*)pet)->AI())
|
||||
if (((Creature*)pet)->IsAIEnabled)
|
||||
((Creature*)pet)->AI()->AttackStart(TargetUnit);
|
||||
|
||||
//10% chance to play special pet attack talk, else growl
|
||||
@@ -165,7 +165,8 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
case REACT_PASSIVE: //passive
|
||||
case REACT_DEFENSIVE: //recovery
|
||||
case REACT_AGGRESSIVE: //activete
|
||||
charmInfo->SetReactState( ReactStates(spellid) );
|
||||
if(pet->GetTypeId() == TYPEID_UNIT)
|
||||
((Creature*)pet)->SetReactState( ReactStates(spellid) );
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -241,7 +242,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
if(pet->getVictim())
|
||||
pet->AttackStop();
|
||||
pet->GetMotionMaster()->Clear();
|
||||
if (((Creature*)pet)->AI())
|
||||
if (((Creature*)pet)->IsAIEnabled)
|
||||
((Creature*)pet)->AI()->AttackStart(unit_target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user