aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-20 11:44:38 -0500
committermegamage <none@none>2009-05-20 11:44:38 -0500
commit6473e943581439f57918abfa91a4d5a29e2f343c (patch)
tree01b7419dcc1ac0444375d11b22cd55d72897854a /src/game/Spell.cpp
parentd1d194b4c78aec34d65a15ea68acff5c3a48687c (diff)
*Update Naxx scripts. Now only Kelthuzad is incompleted
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp43
1 files changed, 39 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 424bfd097fe..b1e1549cc5b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1249,8 +1249,43 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
}
// Prayer of Mending (jump animation), we need formal caster instead original for correct animation
- if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags[1] & 0x000020))
- m_caster->CastSpell(unit, 41637, true, NULL, NULL, m_originalCasterGUID);
+ if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST)
+ {
+ if(m_spellInfo->SpellFamilyFlags[1] & 0x000020)
+ m_caster->CastSpell(unit, 41637, true, NULL, NULL, m_originalCasterGUID);
+ }
+ else
+ {
+ // spell is triggered with only stackamount change but no amount change
+ switch(m_spellInfo->Id)
+ {
+ case 28832: // Mark of Korth'azz
+ case 28833: // Mark of Blaumeux
+ case 28834: // Mark of Rivendare
+ case 28835: // Mark of Zeliek
+ {
+ Aura *aur = unit->GetAura(m_spellInfo->Id);
+ if(!aur) break;
+ //int8 stack = GetParentAura()->GetStackAmount();
+ int8 stack = aur->GetStackAmount();
+ ++stack;
+ int32 damage;
+ switch(stack)
+ {
+ case 1: damage = 0; break;
+ case 2: damage = 500; break;
+ case 3: damage = 1000; break;
+ case 4: damage = 1500; break;
+ case 5: damage = 4000; break;
+ case 6: damage = 12000; break;
+ default:damage = 20000 + 1000 * (stack - 7); break;
+ }
+ if(damage)
+ m_caster->CastCustomSpell(28836, SPELLVALUE_BASE_POINT0, damage, unit);
+ break;
+ }
+ }
+ }
}
// Set aura only when successfully applied
if (unit->AddAura(Aur, false))
@@ -4610,9 +4645,9 @@ SpellCastResult Spell::CheckCast(bool strict)
case SPELL_AURA_FLY:
{
// not allow cast fly spells at old maps by players (all spells is self target)
- if(m_caster->GetTypeId()==TYPEID_PLAYER)
+ if(m_originalCaster && m_originalCaster->GetTypeId()==TYPEID_PLAYER)
{
- if( !((Player*)m_caster)->IsAllowUseFlyMountsHere() )
+ if( !((Player*)m_originalCaster)->IsAllowUseFlyMountsHere() )
return SPELL_FAILED_NOT_HERE;
}
break;