[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:
+13
-2
@@ -2729,7 +2729,18 @@ void Spell::finish(bool ok)
|
|||||||
|
|
||||||
// Clear combo at finish state
|
// Clear combo at finish state
|
||||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
|
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)
|
// call triggered spell only at successful cast (after clear combo points -> for add some if need)
|
||||||
if(!m_TriggerSpells.empty())
|
if(!m_TriggerSpells.empty())
|
||||||
@@ -3411,7 +3422,7 @@ uint8 Spell::CanCast(bool strict)
|
|||||||
if (target->isInFlight())
|
if (target->isInFlight())
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
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;
|
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||||
|
|
||||||
// auto selection spell rank implemented in WorldSession::HandleCastSpellOpcode
|
// auto selection spell rank implemented in WorldSession::HandleCastSpellOpcode
|
||||||
|
|||||||
Reference in New Issue
Block a user