aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-14 21:07:52 -0500
committermegamage <none@none>2009-04-14 21:07:52 -0500
commitceae9b8e0f48f3961884fa40be71915f3b8df851 (patch)
tree7c76e30e6cddf4624d4b5aae6714f47c5a473a0c /src/game/SpellAuras.cpp
parent3a658002180e30de4e7037a14e2b4fc0788b5d40 (diff)
[7668] Cleanup In CreatureAI function descriptions and AttackStart/AttackedBy use. Author: VladimirMangos
* Use AI::AttackStart calls only in case explicit request creature attack from core or AI code "attack it if can". Like taunt, pet handler attack command. * Use AI::AttackedBy for reaction at hostile action "do something at hostile action" Like non-dot damage, swing, negative spell landing, or fade fear/etc. And provided by default call AttackStart if no current target. This fix some problems, like: * Civilian will react propertly at attack by another creature (not pet or player). * Will not cases (at least triggred by core) when attack target start run to attacker before any real hostile action apply. *Note: AttackBy is still disabled until proved useful to TC. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 9e5906cecf8..08ce7a59844 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3425,7 +3425,7 @@ void AuraEffect::HandleAuraModScale(bool apply, bool Real)
((Creature*)m_target)->AIM_Initialize();
if (((Creature*)m_target)->AI())
- ((Creature*)m_target)->AI()->AttackStart(caster);
+ ((Creature*)m_target)->AI()->AttackedBy(caster);
}
}
}
@@ -3581,7 +3581,7 @@ void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real)
{
((Creature*)m_target)->AIM_Initialize();
if (((Creature*)m_target)->AI())
- ((Creature*)m_target)->AI()->AttackStart(caster);
+ ((Creature*)m_target)->AI()->AttackedBy(caster);
}
}
}