mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11930] Fix Pet behaviour for environmental damage
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
a8c5ba581c
commit
af47f39a4e
2 changed files with 5 additions and 1 deletions
|
|
@ -5686,6 +5686,10 @@ void Unit::AttackedBy(Unit* attacker)
|
|||
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->AI())
|
||||
((Creature*)this)->AI()->AttackedBy(attacker);
|
||||
|
||||
// do not pet reaction for self inflicted damage (like environmental)
|
||||
if (attacker == this)
|
||||
return;
|
||||
|
||||
// trigger pet AI reaction
|
||||
if (Pet* pet = GetPet())
|
||||
pet->AttackedBy(attacker);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11929"
|
||||
#define REVISION_NR "11930"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue