parent
8dbde7a588
commit
e77f5d63da
1 changed files with 6 additions and 0 deletions
|
|
@ -193,6 +193,9 @@ SpellCastResult UnitAI::DoCast(uint32 spellId)
|
|||
{
|
||||
DefaultTargetSelector targetSelector(me, spellInfo->GetMaxRange(false), false, true, 0);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* target) {
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (target->IsPlayer())
|
||||
{
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR5_NOT_ON_PLAYER))
|
||||
|
|
@ -225,6 +228,9 @@ SpellCastResult UnitAI::DoCast(uint32 spellId)
|
|||
|
||||
DefaultTargetSelector defaultTargetSelector(me, range, false, true, -(int32)spellId);
|
||||
auto targetSelector = [&](Unit* target) {
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (target->IsPlayer())
|
||||
{
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR5_NOT_ON_PLAYER))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue