diff options
| author | Shauren <none@none> | 2010-08-21 20:50:38 +0200 |
|---|---|---|
| committer | Shauren <none@none> | 2010-08-21 20:50:38 +0200 |
| commit | 73d3f210a9df46d3725575663538a69cf58f0fda (patch) | |
| tree | 59dd52cdd7b1e6a099e5ef28aea8aa61f7914c2e /src/server/game/Spells | |
| parent | 97f98e9bbdb1a4c64738306eaca300b937e3c97c (diff) | |
Scripts/Icecrown Citadel: Add script for Deathbringer Saurfang (only missing alliance outro due to need of spawning and moving a transport)
Scripts/Icecrown Citadel: Corrected Lord Marrowgar, should no longer target tanks with Bone Spike Graveyard, his Coldflame should now spread properly
Core/Scripts: Moved Lady Deathwhisper Mana Barrier handler to scripts
Core/Scripts: Allow AuraScript to prevent default effects by effect index
Core/Scripts: Added Is25ManRaid() method to ScriptedAI, obviously used to check if raid is 25man
Core/Achievements: Pass m_caster to UpdateAchievementCriteria for ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 14 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 10 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellScript.h | 8 |
4 files changed, 24 insertions, 16 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 43e1febeaed..ad19e45b170 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2268,14 +2268,6 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const case 39857: triggerSpellId = 39856; break; // Personalized Weather case 46736: triggerSpellId = 46737; break; - // Mana Barrier - Lady Deathwhisper - case 70842: - { - int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth(); - caster->ModifyHealth(missingHealth); - caster->ModifyPower(POWER_MANA, -missingHealth); - return; - } } break; } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9b53c31b814..6e3aa21e258 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1413,7 +1413,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool if (unit->GetTypeId() == TYPEID_PLAYER) { unit->ToPlayer()->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, m_spellInfo->Id); - unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, m_spellInfo->Id); + unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, m_spellInfo->Id, 0, m_caster); unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, m_spellInfo->Id); } @@ -2805,6 +2805,18 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) case 59725: // Improved Spell Reflection - aoe aura unitList.remove(m_caster); break; + case 72255: // Mark of the Fallen Champion (Deathbringer Saurfang) + case 72444: + case 72445: + case 72446: + for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();) + { + if (!(*itr)->HasAura(72293)) + itr = unitList.erase(itr); + else + ++itr; + } + break; } // Death Pact if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 7bd4924c8a6..7980ad125af 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1847,8 +1847,10 @@ void Spell::EffectForceCast(uint32 i) case 52349: // Overtake unitTarget->CastCustomSpell(unitTarget, spellInfo->Id, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID); return; - //case 72378: // Blood Nova - //case 73058: // Blood Nova + case 72378: // Blood Nova + case 73058: // Blood Nova + spellInfo = sSpellMgr.GetSpellForDifficultyFromSpell(spellInfo, m_caster); + break; } } Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget); @@ -2629,7 +2631,9 @@ void Spell::EffectHealthLeech(uint32 i) // Do not apply multiplier to damage if it's Death Coil int32 new_damage; - if (m_spellInfo->SpellFamilyFlags[0] & 0x80000) + if (m_spellInfo->SpellFamilyFlags[0] & 0x80000 || + m_spellInfo->Id == 72409 || m_spellInfo->Id == 72447 || // ...or Deathbringer Saurfang's Rune of Blood + m_spellInfo->Id == 72448 || m_spellInfo->Id == 72449) new_damage = damage; else new_damage = int32(damage * multiplier); diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 6912cb18787..7a030614469 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -280,12 +280,12 @@ class AuraScript : public _SpellScript public: bool _Validate(SpellEntry const * entry, const char * scriptname); bool _Load(Aura * aura); - void _ResetDefault() { m_default = true; } - bool _IsDefaultActionPrevented(SpellEffIndex /*effIndex*/) {return !m_default;}; - void PreventDefaultAction() { m_default = false; }; + void _ResetDefault() { m_defaultPreventedEffectsMask = 0; } + bool _IsDefaultActionPrevented(SpellEffIndex effIndex) { return m_defaultPreventedEffectsMask & (1 << effIndex); } + void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; } private: Aura * m_aura; - bool m_default; + uint8 m_defaultPreventedEffectsMask; public: // // AuraScript interface |
