Skip to content

Commit

Permalink
[c13104] Allow dying creatures to deal damage when casting spells
Browse files Browse the repository at this point in the history
This will fix damage spells casts on creature death

(based on commit [12891] - 662622c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information
xfurry committed Jul 9, 2015
1 parent 978afa4 commit 1edab6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,9 @@ void Unit::CalculateSpellDamage(SpellNonMeleeDamage* damageInfo, int32 damage, S

if (!this || !pVictim)
return;
if (!this->isAlive() || !pVictim->isAlive())

// units which are not alive cannot deal damage except for dying creatures
if ((!this->isAlive() || !pVictim->isAlive()) && (this->GetTypeId() != TYPEID_UNIT && this->getDeathState() != DEAD))
return;

// Check spell crit chance
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "13103"
#define REVISION_NR "13104"
#endif // __REVISION_NR_H__

0 comments on commit 1edab6f

Please sign in to comment.