mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[10696] Avoid selection despawned creatures as spell autoselected targets.
Original patch provided by virusav.
This commit is contained in:
parent
d2b3981631
commit
9508001213
4 changed files with 4 additions and 4 deletions
|
|
@ -4628,7 +4628,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
{
|
||||
if (pTarget->GetTypeId() == TYPEID_UNIT && pTarget->GetEntry() == i_spellST->second.targetEntry)
|
||||
{
|
||||
if (i_spellST->second.type == SPELL_TARGET_TYPE_DEAD && pTarget->isDead())
|
||||
if (i_spellST->second.type == SPELL_TARGET_TYPE_DEAD && ((Creature*)pTarget)->IsCorpse())
|
||||
{
|
||||
// always use spellMaxRange, in case GetLastRange returned different in a previous pass
|
||||
if (pTarget->IsWithinDistInMap(m_caster, GetSpellMaxRange(srange)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue