aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-04-29 19:04:19 +0200
committerTrazom62 <none@none>2010-04-29 19:04:19 +0200
commit946ded461927ddb352d2f20041b70ecb7f568cf6 (patch)
tree388d4018aa370c5c5a216cd630babf4653f019de
parent78244e37334fabeab30a01bab2e9b0fc84dc1020 (diff)
Fix FoS/Bronjham script.
Fixes issue #1895. - summon corrupted soul fragment when Corrupt Soul completes. - update corrupted soul fragment script. - remove Heroic spell definition. They are defined in SpellDifficulty.dbc. --HG-- branch : trunk
-rw-r--r--src/game/Spell.cpp3
-rw-r--r--src/game/SpellAuraEffects.cpp3
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp51
3 files changed, 40 insertions, 17 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index fb871a789e9..f0947a66e5d 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3164,6 +3164,9 @@ void Spell::_handle_immediate_phase()
// process ground
for (uint32 j = 0; j < 3; ++j)
{
+ if (m_spellInfo->Effect[j] == 0)
+ continue;
+
if (EffectTargetType[m_spellInfo->Effect[j]] == SPELL_REQUIRE_DEST)
{
if (!m_targets.HasDst()) // FIXME: this will ignore dest set in effect
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index 69bda20fd05..63b339444af 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -5673,6 +5673,9 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
case 60244: // Blood Parrot Despawn Aura
target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
break;
+ case 68839: // Corrupt Soul
+ target->CastSpell(target, 68846, true, NULL, this, GetCasterGUID());
+ break;
}
break;
case SPELLFAMILY_MAGE:
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
index e63c3757d94..17fc1459751 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
@@ -35,15 +35,12 @@ enum Yells
enum Spells
{
SPELL_MAGIC_S_BANE = 68793,
- H_SPELL_MAGIC_S_BANE = 69050,
SPELL_CORRUPT_SOUL = 68839,
SPELL_CONSUME_SOUL = 68858,
- H_SPELL_CONSUME_SOUL = 69047,
SPELL_TELEPORT = 68988,
SPELL_FEAR = 68950,
SPELL_SOULSTORM = 68872,
SPELL_SOULSTORM_AURA = 68921,
- H_SPELL_SOULSTORM_AURA = 69049,
SPELL_SHADOW_BOLT = 70043,
};
@@ -84,7 +81,7 @@ struct boss_bronjahmAI : public ScriptedAI
events.Reset();
events.ScheduleEvent(EVENT_SHADOW_BOLT, 2000);
events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000,15000));
- events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(15000,25000));
+ events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000,35000));
if (pInstance)
pInstance->SetData(DATA_BRONJAHM_EVENT, NOT_STARTED);
@@ -124,7 +121,7 @@ struct boss_bronjahmAI : public ScriptedAI
{
Unit* pUnit = (*itr);
if (pUnit && pUnit->isAlive())
- me->CastSpell(pUnit, DUNGEON_MODE(SPELL_SOULSTORM_AURA,H_SPELL_SOULSTORM_AURA), true);
+ me->CastSpell(pUnit, SPELL_SOULSTORM_AURA, true);
}
}
@@ -161,7 +158,7 @@ struct boss_bronjahmAI : public ScriptedAI
DoScriptText(SAY_CORRUPT_SOUL, me);
DoCast(pTarget,SPELL_CORRUPT_SOUL);
}
- events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(15000,25000));
+ events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000,35000));
break;
case EVENT_SOUL_STORM:
DoScriptText(SAY_SOUL_STORM, me);
@@ -206,23 +203,43 @@ struct mob_corrupted_soul_fragmentAI : public ScriptedAI
ScriptedInstance* pInstance;
+ uint32 uiCheckTimer;
+
void Reset()
{
- SetCombatMovement(false);
- if (pInstance)
- if (Creature* pBronjham = Unit::GetCreature(*me,pInstance->GetData64(DATA_BRONJAHM)))
- me->GetMotionMaster()->MoveChase(pBronjham);
-
+ uiCheckTimer = 0; // first check is immediate
}
- void MovementInform(uint32 /*type*/, uint32 /*id*/)
+ void UpdateAI(const uint32 diff)
{
- if (pInstance)
- if (Creature* pBronjham = Unit::GetCreature(*me,pInstance->GetData64(DATA_BRONJAHM)))
- DoCast(pBronjham,SPELL_CONSUME_SOUL);
+ if (uiCheckTimer <= diff)
+ {
+ if (pInstance)
+ {
+ Creature* pBronjham = Unit::GetCreature(*me, pInstance->GetData64(DATA_BRONJAHM));
+ if (pBronjham && pBronjham->isAlive())
+ {
+ if (me->GetDistance(pBronjham) < 2.0f) // TODO: how close should it be?
+ {
+ pBronjham->CastSpell(pBronjham, SPELL_CONSUME_SOUL, true);
+ me->ForcedDespawn();
+ }
+ else
+ {
+ Position pos;
+ pBronjham->GetPosition(&pos);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MovePoint(0, pos);
+ }
+ }
+ else
+ me->ForcedDespawn();
+ }
+ uiCheckTimer = 500;
+ }
+ else
+ uiCheckTimer -= diff;
}
-
- void UpdateAI(const uint32 /*diff*/) {}
};
CreatureAI* GetAI_mob_corrupted_soul_fragment(Creature* pCreature)