Core/Scripts: Moved DamageDealt and DamageTaken down from CreatureAI to UnitAI

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-10-24 22:12:35 +02:00
parent 6d849ca34c
commit 4f5a60c487
2 changed files with 8 additions and 8 deletions
+8
View File
@@ -66,6 +66,14 @@ class UnitAI
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
void SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
// Called at any Damage to any victim (before damage apply)
virtual void DamageDealt(Unit* /*victim*/, uint32& /*damage*/, DamageEffectType /*damageType*/) { }
// Called at any Damage from any attacker (before damage apply)
// Note: it for recalculation damage or special reaction at damage
// for attack reaction use AttackedBy called for not DOT damage in Unit::DealDamage also
virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) {}
// Select the targets satifying the predicate.
// predicate shall extend std::unary_function<Unit *, bool>
template<class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE predicate)
-8
View File
@@ -93,14 +93,6 @@ class CreatureAI : public UnitAI
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
virtual void EnterCombat(Unit* /*enemy*/) {}
// Called at any Damage to any victim (before damage apply)
virtual void DamageDealt(Unit * /*done_to*/, uint32 & /*damage*/, DamageEffectType /*damagetype*/) { }
// Called at any Damage from any attacker (before damage apply)
// Note: it for recalculation damage or special reaction at damage
// for attack reaction use AttackedBy called for not DOT damage in Unit::DealDamage also
virtual void DamageTaken(Unit * /*done_by*/, uint32 & /*damage*/) {}
// Called when the creature receives heal
virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {}