aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-10 08:44:10 +0200
committerMachiavelli <none@none>2009-06-10 08:44:10 +0200
commitf137dc02ecadb515928655dd6603f33187731fec (patch)
tree4c8891a31ae7fe4d034fb2c0e03c596a5eed746d /src/game/Unit.cpp
parentd065bbf410429371bbd4b3f60cfac02fec28a473 (diff)
* Better fix for issue that players are unable to loot creatures when the HP of the creature is changed via a script. Do not use rev before this.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 79e31ce6dce..7704e4e0daa 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -586,8 +586,10 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss)
{
if(pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsAIEnabled)
+ {
((Creature*)pVictim)->AI()->DamageTaken(this, damage);
-
+ ((Creature*)pVictim)->AddDamageByPlayers(damage);
+ }
if (damagetype != NODAMAGE)
{
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)