Created
January 28, 2012 14:06
-
-
Save Nighoo/1694390 to your computer and use it in GitHub Desktop.
Pet System, self damage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp | |
index 76ab5d9..1bbbc2f 100644 | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -5161,7 +5161,8 @@ void Unit::AttackedBy(Unit* attacker) | |
// trigger pet AI reaction | |
if (Pet* pet = GetPet()) | |
- pet->AttackedBy(attacker); | |
+ if (this != attacker) | |
+ pet->AttackedBy(attacker); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment