Scripts/Icecrown Citadel: Restored Sindragosa check for previously killed bosses (re-enabled Valithria Dreamwalker requirement) and fixed Valithria Dreamwalker encounter ending multiple times
This commit is contained in:
@@ -309,6 +309,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
_under25PercentTalkDone = false;
|
||||
_over75PercentTalkDone = false;
|
||||
_justDied = false;
|
||||
_done = false;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*target*/)
|
||||
@@ -331,9 +332,11 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
void HealReceived(Unit* /*healer*/, uint32& heal)
|
||||
{
|
||||
// encounter complete
|
||||
if (me->HealthAbovePctHealed(100, heal))
|
||||
if (me->HealthAbovePctHealed(100, heal) && !_done)
|
||||
{
|
||||
_done = true;
|
||||
Talk(SAY_VALITHRIA_SUCCESS);
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_REMOVE, me);
|
||||
me->RemoveAurasDueToSpell(SPELL_CORRUPTION_VALITHRIA);
|
||||
DoCast(me, SPELL_ACHIEVEMENT_CHECK);
|
||||
DoCast(me, SPELL_DREAMWALKERS_RAGE);
|
||||
@@ -462,6 +465,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
bool _under25PercentTalkDone;
|
||||
bool _over75PercentTalkDone;
|
||||
bool _justDied;
|
||||
bool _done;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -498,10 +502,15 @@ class npc_green_dragon_combat_trigger : public CreatureScript
|
||||
|
||||
void AttackStart(Unit* target)
|
||||
{
|
||||
if (target->GetEntry() != NPC_VALITHRIA_DREAMWALKER)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
BossAI::AttackStart(target);
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* target) const
|
||||
{
|
||||
return target->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
BossAI::JustReachedHome();
|
||||
|
||||
@@ -676,8 +676,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
--HeroicAttempts;
|
||||
DoUpdateWorldState(WORLDSTATE_ATTEMPTS_REMAINING, HeroicAttempts);
|
||||
if (!HeroicAttempts)
|
||||
if (Creature* sindra = instance->GetCreature(SindragosaGUID))
|
||||
sindra->DespawnOrUnsummon();
|
||||
if (Creature* theLichKing = instance->GetCreature(TheLichKingGUID))
|
||||
theLichKing->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -962,8 +962,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return false;
|
||||
// no break
|
||||
case DATA_SINDRAGOSA:
|
||||
//if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE)
|
||||
// return false;
|
||||
if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user