* Add better check for hitting dead object with spells (ie skinning and players can be skinned), this looks like its fix's dieing as a ghost, more testing needed

--HG--
branch : trunk
This commit is contained in:
Biglad
2009-10-05 15:23:25 +01:00
parent 46061f1b71
commit 7bbb292352

View File

@@ -2782,7 +2782,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
{
// Can`t miss on dead target (on skinning for example)
if (!pVictim->isAlive())
if (!pVictim->isAlive() && pVictim->GetTypeId() != TYPEID_PLAYER)
return SPELL_MISS_NONE;
SpellSchoolMask schoolMask = GetSpellSchoolMask(spell);