*Update to Mangos 6880. Source: Mangos.

*Skip 6878, 6871.
*Main change: change cell size, add is3dDistance for IsWithinDistInMap and isVisibleForOrDetect.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-12-06 14:01:44 -06:00
1 parent 72edfea129
commit c5593ef779
18 files changed
+105 -49

No files matched your search

+7 -6
View File
@@ -2902,14 +2902,14 @@ void Spell::finish(bool ok)
if(!m_caster->IsNonMeleeSpellCasted(false, false, true))
m_caster->clearUnitState(UNIT_STAT_CASTING);
//remove spell mods
if (m_caster->GetTypeId() == TYPEID_PLAYER)
((Player*)m_caster)->RemoveSpellMods(this);
// other code related only to successfully finished spells
if(!ok)
return;
//remove spell mods
if (m_caster->GetTypeId() == TYPEID_PLAYER)
((Player*)m_caster)->RemoveSpellMods(this);
//handle SPELL_AURA_ADD_TARGET_TRIGGER auras
Unit::AuraList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER);
for(Unit::AuraList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)
@@ -2958,10 +2958,11 @@ void Spell::finish(bool ok)
// Clear combo at finish state
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
{
// Not drop combopoints if any miss exist
// Not drop combopoints if negative spell and if any miss on enemy exist
bool needDrop = true;
if (!IsPositiveSpell(m_spellInfo->Id))
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
if (ihit->missCondition != SPELL_MISS_NONE)
if (ihit->missCondition != SPELL_MISS_NONE && ihit->targetGUID!=m_caster->GetGUID())
{
needDrop = false;
break;