diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2017-06-07 02:33:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-07 02:33:47 +0200 |
| commit | 1660bb7d27d6f42b49012a6b57e3c2b2eab20fd3 (patch) | |
| tree | cf63a9cb6e89e621d7ae8b901684bc98a40a7e08 /src/server/scripts/Kalimdor | |
| parent | 2335b9de1a46a409c714a1dc89cbd0565545e70e (diff) | |
Pet/Guardian AI hook re-organizing (#19824)
* Pet/Guardian AI hook re-organizing:
- Adjust OwnerAttacked/OwnerAttackedBy hooks on CreatureAI to fire for all owned units, not just player pets. This should allow guardians to more reliably recognize valid targets.
- Kill off the AttackedBy hook. While it was defined in CreatureAI.h as virtual, it was only ever invoked for player pets in specific situations. This makes it classic developer bait.
- Adjust PetAI to use DamageTaken instead of AttackedBy.
- Adjust behavior of AttackStart on PetAI to compensate.
Diffstat (limited to 'src/server/scripts/Kalimdor')
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index d743f8ff07d..2c44c1b91aa 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -122,17 +122,6 @@ public: me->RestoreFaction(); } - void AttackedBy(Unit* pAttacker) override - { - if (me->GetVictim()) - return; - - if (me->IsFriendlyTo(pAttacker)) - return; - - AttackStart(pAttacker); - } - void DamageTaken(Unit* pDoneBy, uint32 &Damage) override { if (Damage > me->GetHealth() || me->HealthBelowPctDamaged(20, Damage)) |
