mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
fix(core): Null check the helpers (#11476)
* fix (core): move helper * Update Spell.cpp * Update Unit.cpp
This commit is contained in:
@@ -6036,7 +6036,8 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (m_pathFinder->GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE) || target->GetExactDistSq(endPos.x, endPos.y, endPos.z) > maxdist * maxdist || m_pathFinder->getPathLength() > (40.0f + (m_caster->HasAura(58097) ? 5.0f : 0.0f)))
|
||||
return SPELL_FAILED_NOPATH;
|
||||
}
|
||||
m_caster->ToPlayer()->SetCanTeleport(true);
|
||||
if (Player* player = m_caster->ToPlayer())
|
||||
player->SetCanTeleport(true);
|
||||
break;
|
||||
}
|
||||
case SPELL_EFFECT_SKINNING:
|
||||
|
||||
Reference in New Issue
Block a user