*Update to HG 957.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-23 14:23:25 -06:00
95 changed files with 5196 additions and 1229 deletions
+10 -3
View File
@@ -2058,7 +2058,7 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura)
}
}
void Spell::cancel()
void Spell::cancel(bool report)
{
if(m_spellState == SPELL_STATE_FINISHED)
return;
@@ -2088,7 +2088,7 @@ void Spell::cancel()
m_caster->RemoveAurasDueToCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
SendChannelUpdate(0);
SendInterrupted(0);
SendCastResult(SPELL_FAILED_INTERRUPTED);
SendCastResult(report ? SPELL_FAILED_INTERRUPTED : SPELL_FAILED_DONT_REPORT);
} break;
default:
@@ -3687,7 +3687,8 @@ uint8 Spell::CanCast(bool strict)
// check correctness positive/negative cast target (pet cast real check and cheating check)
if(IsPositiveSpell(m_spellInfo->Id))
{
if(m_caster->IsHostileTo(target))
//dispel positivity is dependant on target, don't check it
if(m_caster->IsHostileTo(target) && !IsDispel(m_spellInfo))
return SPELL_FAILED_BAD_TARGETS;
}
else
@@ -3932,6 +3933,12 @@ uint8 Spell::CanCast(bool strict)
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI, target ))
return SPELL_FAILED_UNIT_NOT_INFRONT;
}
else if (m_spellInfo->Id == 19938) // Awaken Peon
{
Unit *unit = m_targets.getUnitTarget();
if(!unit || !unit->HasAura(17743, 0))
return SPELL_FAILED_BAD_TARGETS;
}
break;
}
case SPELL_EFFECT_SCHOOL_DAMAGE: