Skip to content

Commit

Permalink
Core/Pit of Saron: Fixed crash in spell_exploding_orb_hasty_grow spel…
Browse files Browse the repository at this point in the history
…l script, fixed player name in Mark of Rimefang announcement
  • Loading branch information
Shauren committed Jan 3, 2011
1 parent 64ea69a commit 77af7ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Expand Up @@ -599,12 +599,14 @@ class spell_exploding_orb_hasty_grow : public SpellScriptLoader
{
if (GetStackAmount() == 15)
{
GetTarget()->CastSpell(GetTarget(), SPELL_EXPLOSIVE_BARRAGE_DAMAGE, false);
GetTarget()->RemoveAurasDueToSpell(SPELL_HASTY_GROW);
GetTarget()->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
GetTarget()->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB);
if (Creature* creature = GetTarget()->ToCreature())
creature->DespawnOrUnsummon(1000);
Unit* target = GetTarget(); // store target because aura gets removed
PreventDefaultAction();
target->CastSpell(target, SPELL_EXPLOSIVE_BARRAGE_DAMAGE, false);
target->RemoveAurasDueToSpell(SPELL_HASTY_GROW);
target->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
target->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB);
if (Creature* creature = target->ToCreature())
creature->DespawnOrUnsummon();
}
}

Expand Down
Expand Up @@ -204,7 +204,7 @@ class boss_tyrannus : public CreatureScript

while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
switch (eventId)
{
case EVENT_INTRO_1:
//DoScriptText(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
Expand All @@ -219,12 +219,11 @@ class boss_tyrannus : public CreatureScript
case EVENT_COMBAT_START:
if (Creature* rimefang = me->GetCreature(*me, instance->GetData64(DATA_RIMEFANG)))
rimefang->AI()->DoAction(ACTION_START_RIMEFANG); //set rimefang also infight

events.SetPhase(PHASE_COMBAT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_AGGRESSIVE);
DoCast(me, SPELL_FULL_HEAL);
me->SetInCombatWithZone();
DoZoneInCombat();
events.ScheduleEvent(EVENT_OVERLORD_BRAND, urand(5000, 7000));
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(14000, 16000));
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(25000, 27000));
Expand All @@ -246,9 +245,11 @@ class boss_tyrannus : public CreatureScript
break;
case EVENT_MARK_OF_RIMEFANG:
DoScriptText(SAY_MARK_RIMEFANG_1, me);
DoScriptText(SAY_MARK_RIMEFANG_2, me);
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
DoScriptText(SAY_MARK_RIMEFANG_2, me, target);
DoCast(target, SPELL_MARK_OF_RIMEFANG);
}
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(24000, 26000));
break;
}
Expand Down Expand Up @@ -297,7 +298,7 @@ class boss_rimefang : public CreatureScript
if (actionId == ACTION_START_RIMEFANG)
{
_events.SetPhase(PHASE_COMBAT);
me->SetInCombatWithZone();
DoZoneInCombat();
_events.ScheduleEvent(EVENT_MOVE_NEXT, 500, 0, PHASE_COMBAT);
_events.ScheduleEvent(EVENT_ICY_BLAST, 15000, 0, PHASE_COMBAT);
}
Expand Down

1 comment on commit 77af7ba

@VincentVanclef
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :)! bring in more crashe fixes :D!! <3 +1!

Please sign in to comment.