mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
[svn] Merge from mangos:
Do not check LOS for triggered spells. Fri Nov 07 16:08:30 apoc Fix reset combopoints on miss/parry/immune and etc. Sat Nov 08 14:53:03 DiSlord --HG-- branch : trunk
This commit is contained in:
@@ -2729,7 +2729,18 @@ void Spell::finish(bool ok)
|
||||
|
||||
// Clear combo at finish state
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
|
||||
((Player*)m_caster)->ClearComboPoints();
|
||||
{
|
||||
// Not drop combopoints if any miss exist
|
||||
bool needDrop = true;
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
if (ihit->missCondition != SPELL_MISS_NONE)
|
||||
{
|
||||
needDrop = false;
|
||||
break;
|
||||
}
|
||||
if (needDrop)
|
||||
((Player*)m_caster)->ClearComboPoints();
|
||||
}
|
||||
|
||||
// call triggered spell only at successful cast (after clear combo points -> for add some if need)
|
||||
if(!m_TriggerSpells.empty())
|
||||
@@ -3411,7 +3422,7 @@ uint8 Spell::CanCast(bool strict)
|
||||
if (target->isInFlight())
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
if(VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
|
||||
if(!m_IsTriggeredSpell && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
|
||||
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||
|
||||
// auto selection spell rank implemented in WorldSession::HandleCastSpellOpcode
|
||||
|
||||
Reference in New Issue
Block a user