mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[10730] Check if Pet's target is a valid target (isTargetableForAttack)
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
8140ff20d9
commit
cfbfae7f40
2 changed files with 4 additions and 1 deletions
|
|
@ -5383,6 +5383,9 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||||
if(!_target->isAlive())
|
if(!_target->isAlive())
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
|
||||||
|
if (!_target->isTargetableForAttack())
|
||||||
|
return SPELL_FAILED_BAD_TARGETS; // guessed error
|
||||||
|
|
||||||
if(IsPositiveSpell(m_spellInfo->Id))
|
if(IsPositiveSpell(m_spellInfo->Id))
|
||||||
{
|
{
|
||||||
if(m_caster->IsHostileTo(_target))
|
if(m_caster->IsHostileTo(_target))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10729"
|
#define REVISION_NR "10730"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue