mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[7128] Cleanup in PetHandler.cpp and little PetAI.cpp
Fixed: pet stop attacking when casts spell by command. Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
9e1b9e56fd
commit
03b7d1006a
3 changed files with 41 additions and 38 deletions
|
|
@ -139,11 +139,11 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
else
|
||||
m_updateAlliesTimer -= diff;
|
||||
|
||||
if (inCombat && i_pet.getVictim() == NULL)
|
||||
if (inCombat && !i_pet.getVictim())
|
||||
_stopAttack();
|
||||
|
||||
// i_pet.getVictim() can't be used for check in case stop fighting, i_pet.getVictim() clear at Unit death etc.
|
||||
if( i_pet.getVictim() != NULL )
|
||||
if( i_pet.getVictim() )
|
||||
{
|
||||
if( _needToStop() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue