Scripts/Icecrown Citadel

* Call EnterEvadeMode before teleporting players to entrance - prevents players being stuck in combat
* Fixed Gaseous Blight stacking damage
* Properly initialize phase for Professor Putricide when entering combat
* Fixed Blood Nova and Boiling Blood abilities of Deathbringer Saurfang
This commit is contained in:
Shauren
2011-01-12 22:50:51 +01:00
parent 52499b03ea
commit 8d59953f93
11 changed files with 125 additions and 88 deletions
+24
View File
@@ -2794,6 +2794,30 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
case 59725: // Improved Spell Reflection - aoe aura
unitList.remove(m_caster);
break;
case 72378: // Blood Nova (Deathbringer Saurfang)
case 73058:
{
// select one random target, with preference of ranged targets
uint32 targetsAtRange = 0;
uint32 const minTargets = m_caster->GetMap()->GetSpawnMode() & 1 ? 10 : 4;
unitList.sort(Trinity::ObjectDistanceOrderPred(m_caster, false));
// get target count at range
for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr, ++targetsAtRange)
if ((*itr)->GetDistance(m_caster) < 12.0f)
break;
// set the upper cap
if (targetsAtRange < minTargets)
targetsAtRange = std::min<uint32>(unitList.size()-1, minTargets);
std::list<Unit*>::iterator itr = unitList.begin();
std::advance(itr, urand(0, targetsAtRange));
Unit* target = *itr;
unitList.clear();
unitList.push_back(target);
break;
}
case 72255: // Mark of the Fallen Champion (Deathbringer Saurfang)
case 72444:
case 72445:
+2 -2
View File
@@ -1624,7 +1624,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
if (damage)
{
switch(m_spellInfo->Id)
switch (m_spellInfo->Id)
{
case 52588: // Skeletal Gryphon Escape
case 48598: // Ride Flamebringer Cue
@@ -1636,7 +1636,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
return;
case 72378: // Blood Nova
case 73058: // Blood Nova
spellInfo = sSpellMgr->GetSpellForDifficultyFromSpell(spellInfo, m_caster);
m_caster->CastSpell(unitTarget, 72380, true); // additional spell cast
break;
}
}
+85 -70
View File
@@ -3875,18 +3875,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesEx |= SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY;
count++;
break;
case 69055: // Saber Lash
case 70814: // Saber Lash
spellInfo->EffectRadiusIndex[0] = 8;
count++;
break;
case 69075: // Bone Storm
case 70834: // Bone Storm
case 70835: // Bone Storm
case 70836: // Bone Storm
spellInfo->EffectRadiusIndex[0] = 12;
count++;
break;
case 18500: // Wing Buffet
case 33086: // Wild Bite
case 49749: // Piercing Blow
@@ -3910,19 +3898,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->StackAmount = 4;
count++;
break;
// THESE SPELLS ARE WORKING CORRECTLY EVEN WITHOUT THIS HACK
// THE ONLY REASON ITS HERE IS THAT CURRENT GRID SYSTEM
// DOES NOT ALLOW FAR OBJECT SELECTION (dist > 333)
case 70781: // Light's Hammer Teleport
case 70856: // Oratory of the Damned Teleport
case 70857: // Rampart of Skulls Teleport
case 70858: // Deathbringer's Rise Teleport
case 70859: // Upper Spire Teleport
case 70860: // Frozen Throne Teleport
case 70861: // Sindragosa's Lair Teleport
spellInfo->EffectImplicitTargetA[0] = TARGET_DST_DB;
count++;
break;
case 63675: // Improved Devouring Plague
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS;
count++;
@@ -3935,11 +3910,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectSpellClassMask[0] = flag96(423937, 276955137, 2049);
count++;
break;
// this is here until targetAuraSpell and alike support SpellDifficulty.dbc
case 70459: // Ooze Eruption Search Effect
spellInfo->targetAuraSpell = 0;
count++;
break;
case 70728: // Exploit Weakness
case 70840: // Devious Minds
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
@@ -3951,45 +3921,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_MASTER;
count++;
break;
case 71413: // Green Ooze Summon
case 71414: // Orange Ooze Summon
spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
count++;
break;
// THIS IS HERE BECAUSE COOLDOWN ON CREATURE PROCS IS NOT IMPLEMENTED
case 71604: // Mutated Strength
case 72673: // Mutated Strength
case 72674: // Mutated Strength
case 72675: // Mutated Strength
spellInfo->Effect[1] = 0;
count++;
break;
case 70447: // Volatile Ooze Adhesive
case 72836: // Volatile Ooze Adhesive
case 72837: // Volatile Ooze Adhesive
case 72838: // Volatile Ooze Adhesive
case 70672: // Gaseous Bloat
case 72455: // Gaseous Bloat
case 72832: // Gaseous Bloat
case 72833: // Gaseous Bloat
spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
spellInfo->EffectImplicitTargetB[1] = TARGET_UNIT_TARGET_ENEMY;
spellInfo->EffectImplicitTargetB[2] = TARGET_UNIT_TARGET_ENEMY;
count++;
break;
case 70911: // Unbound Plague
case 72854: // Unbound Plague
case 72855: // Unbound Plague
case 72856: // Unbound Plague
spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
count++;
break;
case 71518: // Unholy Infusion Quest Credit
case 72934: // Blood Infusion Quest Credit
case 72289: // Frost Infusion Quest Credit
spellInfo->EffectRadiusIndex[0] = 28; // another missing radius
count++;
break;
case 71708: // Empowered Flare
case 72785: // Empowered Flare
case 72786: // Empowered Flare
@@ -3997,10 +3928,94 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS;
count++;
break;
case 71340: // Pact of the Darkfallen
// ICECROWN CITADEL SPELLS
// THESE SPELLS ARE WORKING CORRECTLY EVEN WITHOUT THIS HACK
// THE ONLY REASON ITS HERE IS THAT CURRENT GRID SYSTEM
// DOES NOT ALLOW FAR OBJECT SELECTION (dist > 333)
case 70781: // Light's Hammer Teleport
case 70856: // Oratory of the Damned Teleport
case 70857: // Rampart of Skulls Teleport
case 70858: // Deathbringer's Rise Teleport
case 70859: // Upper Spire Teleport
case 70860: // Frozen Throne Teleport
case 70861: // Sindragosa's Lair Teleport
spellInfo->EffectImplicitTargetA[0] = TARGET_DST_DB;
count++;
break;
case 69055: // Saber Lash (Lord Marrowgar)
case 70814: // Saber Lash (Lord Marrowgar)
spellInfo->EffectRadiusIndex[0] = 8;
count++;
break;
case 69075: // Bone Storm (Lord Marrowgar)
case 70834: // Bone Storm (Lord Marrowgar)
case 70835: // Bone Storm (Lord Marrowgar)
case 70836: // Bone Storm (Lord Marrowgar)
case 72378: // Blood Nova (Deathbringer Saurfang)
case 73058: // Blood Nova (Deathbringer Saurfang)
spellInfo->EffectRadiusIndex[0] = 12;
count++;
break;
case 72385: // Boiling Blood (Deathbringer Saurfang)
case 72441: // Boiling Blood (Deathbringer Saurfang)
case 72442: // Boiling Blood (Deathbringer Saurfang)
case 72443: // Boiling Blood (Deathbringer Saurfang)
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_TARGET_ENEMY;
spellInfo->EffectImplicitTargetB[0] = 0;
count++;
break;
case 71413: // Green Ooze Summon (Professor Putricide)
case 71414: // Orange Ooze Summon (Professor Putricide)
spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
count++;
break;
// this is here until targetAuraSpell and alike support SpellDifficulty.dbc
case 70459: // Ooze Eruption Search Effect (Professor Putricide)
spellInfo->targetAuraSpell = 0;
count++;
break;
// THIS IS HERE BECAUSE COOLDOWN ON CREATURE PROCS IS NOT IMPLEMENTED
case 71604: // Mutated Strength (Professor Putricide)
case 72673: // Mutated Strength (Professor Putricide)
case 72674: // Mutated Strength (Professor Putricide)
case 72675: // Mutated Strength (Professor Putricide)
spellInfo->Effect[1] = 0;
count++;
break;
case 70447: // Volatile Ooze Adhesive (Professor Putricide)
case 72836: // Volatile Ooze Adhesive (Professor Putricide)
case 72837: // Volatile Ooze Adhesive (Professor Putricide)
case 72838: // Volatile Ooze Adhesive (Professor Putricide)
case 70672: // Gaseous Bloat (Professor Putricide)
case 72455: // Gaseous Bloat (Professor Putricide)
case 72832: // Gaseous Bloat (Professor Putricide)
case 72833: // Gaseous Bloat (Professor Putricide)
spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
spellInfo->EffectImplicitTargetB[1] = TARGET_UNIT_TARGET_ENEMY;
spellInfo->EffectImplicitTargetB[2] = TARGET_UNIT_TARGET_ENEMY;
count++;
break;
case 70911: // Unbound Plague (Professor Putricide)
case 72854: // Unbound Plague (Professor Putricide)
case 72855: // Unbound Plague (Professor Putricide)
case 72856: // Unbound Plague (Professor Putricide)
spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
count++;
break;
case 71518: // Unholy Infusion Quest Credit (Professor Putricide)
case 72934: // Blood Infusion Quest Credit (Blood-Queen Lana'thel)
case 72289: // Frost Infusion Quest Credit (Sindragosa)
spellInfo->EffectRadiusIndex[0] = 28; // another missing radius
count++;
break;
case 71340: // Pact of the Darkfallen (Blood-Queen Lana'thel)
spellInfo->DurationIndex = 21;
count++;
break;
case 71266: // Swarming Shadows
spellInfo->AreaGroupId = 0;
count++;
break;
default:
break;
}