* 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
This commit is contained in:
1 parent
d065bbf410
commit
f137dc02ec
4 files changed
+12
-6
No files matched your search
+3
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user