diff options
author | Machiavelli <none@none> | 2009-06-10 08:44:10 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2009-06-10 08:44:10 +0200 |
commit | f137dc02ecadb515928655dd6603f33187731fec (patch) | |
tree | 4c8891a31ae7fe4d034fb2c0e03c596a5eed746d /src/game/Unit.cpp | |
parent | d065bbf410429371bbd4b3f60cfac02fec28a473 (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.cpp | 4 |
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) |