Core/Misc: Fixed some duplicate checks for player typeid in Unit::Kill and Spell::EffectSummonDeadPet. Also some random cleanup
This commit is contained in:
@@ -6432,14 +6432,15 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
|
||||
return;
|
||||
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
Player* _player = m_caster->ToPlayer()
|
||||
|
||||
if (!_player)
|
||||
return;
|
||||
Player* _player = m_caster->ToPlayer();
|
||||
|
||||
Pet* pet = _player->GetPet();
|
||||
if (!pet)
|
||||
return;
|
||||
if (pet->isAlive())
|
||||
if (!pet || pet->isAlive())
|
||||
return;
|
||||
|
||||
if (damage < 0)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user