Merge branch 'master' of github.com:joschiwald/TrinityCore into spellscripts

Conflicts:
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/Spells/spell_paladin.cpp
This commit is contained in:
joschiwald committed 2012-05-28 04:27:51 +02:00
commit cd7ab6f3a5
385 files changed
+3728 -1813

No files matched your search

+18 -13
View File
@@ -2466,9 +2466,10 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim, procEx);
}
caster->DealSpellDamage(&damageInfo, true);
m_damage = damageInfo.damage;
caster->DealSpellDamage(&damageInfo, true);
}
// Passive spell hits/misses or active spells only misses (only triggers)
else
@@ -2489,7 +2490,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
}
}
if (missInfo != SPELL_MISS_EVADE && m_caster && !m_caster->IsFriendlyTo(unit) && !m_spellInfo->IsPositive())
if (missInfo != SPELL_MISS_EVADE && m_caster && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
{
m_caster->CombatStart(unit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_NO_INITIAL_AGGRO));
@@ -3412,6 +3413,20 @@ void Spell::_handle_immediate_phase()
// process items
for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
if (!m_originalCaster)
return;
// Handle procs on cast
// TODO: finish new proc system:P
if (m_UniqueTargetInfo.empty() && m_targets.HasDst())
{
uint32 procAttacker = m_procAttacker;
if (!procAttacker)
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS;
// Proc the spells that have DEST target
m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell);
}
}
void Spell::_handle_finish_phase()
@@ -4947,17 +4962,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
case SPELL_EFFECT_DUMMY:
{
if (m_spellInfo->Id == 51582) // Rocket Boots Engaged
{
if (m_caster->IsInWater())
return SPELL_FAILED_ONLY_ABOVEWATER;
}
else if (m_spellInfo->Id == 52264) // Deliver Stolen Horse
{
if (!m_caster->FindNearestCreature(28653, 5))
return SPELL_FAILED_OUT_OF_RANGE;
}
else if (m_spellInfo->Id == 31789) // Righteous Defense
if (m_spellInfo->Id == 31789) // Righteous Defense
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return SPELL_FAILED_DONT_REPORT;