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;
|
_under25PercentTalkDone = false;
|
||||||
_over75PercentTalkDone = false;
|
_over75PercentTalkDone = false;
|
||||||
_justDied = false;
|
_justDied = false;
|
||||||
|
_done = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* /*target*/)
|
void AttackStart(Unit* /*target*/)
|
||||||
@@ -331,9 +332,11 @@ class boss_valithria_dreamwalker : public CreatureScript
|
|||||||
void HealReceived(Unit* /*healer*/, uint32& heal)
|
void HealReceived(Unit* /*healer*/, uint32& heal)
|
||||||
{
|
{
|
||||||
// encounter complete
|
// encounter complete
|
||||||
if (me->HealthAbovePctHealed(100, heal))
|
if (me->HealthAbovePctHealed(100, heal) && !_done)
|
||||||
{
|
{
|
||||||
|
_done = true;
|
||||||
Talk(SAY_VALITHRIA_SUCCESS);
|
Talk(SAY_VALITHRIA_SUCCESS);
|
||||||
|
_instance->SendEncounterUnit(ENCOUNTER_FRAME_REMOVE, me);
|
||||||
me->RemoveAurasDueToSpell(SPELL_CORRUPTION_VALITHRIA);
|
me->RemoveAurasDueToSpell(SPELL_CORRUPTION_VALITHRIA);
|
||||||
DoCast(me, SPELL_ACHIEVEMENT_CHECK);
|
DoCast(me, SPELL_ACHIEVEMENT_CHECK);
|
||||||
DoCast(me, SPELL_DREAMWALKERS_RAGE);
|
DoCast(me, SPELL_DREAMWALKERS_RAGE);
|
||||||
@@ -462,6 +465,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
|||||||
bool _under25PercentTalkDone;
|
bool _under25PercentTalkDone;
|
||||||
bool _over75PercentTalkDone;
|
bool _over75PercentTalkDone;
|
||||||
bool _justDied;
|
bool _justDied;
|
||||||
|
bool _done;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
@@ -498,10 +502,15 @@ class npc_green_dragon_combat_trigger : public CreatureScript
|
|||||||
|
|
||||||
void AttackStart(Unit* target)
|
void AttackStart(Unit* target)
|
||||||
{
|
{
|
||||||
if (target->GetEntry() != NPC_VALITHRIA_DREAMWALKER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
BossAI::AttackStart(target);
|
BossAI::AttackStart(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CanAIAttack(Unit const* target) const
|
||||||
|
{
|
||||||
|
return target->GetTypeId() == TYPEID_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
void JustReachedHome()
|
void JustReachedHome()
|
||||||
{
|
{
|
||||||
BossAI::JustReachedHome();
|
BossAI::JustReachedHome();
|
||||||
|
|||||||
@@ -676,8 +676,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
--HeroicAttempts;
|
--HeroicAttempts;
|
||||||
DoUpdateWorldState(WORLDSTATE_ATTEMPTS_REMAINING, HeroicAttempts);
|
DoUpdateWorldState(WORLDSTATE_ATTEMPTS_REMAINING, HeroicAttempts);
|
||||||
if (!HeroicAttempts)
|
if (!HeroicAttempts)
|
||||||
if (Creature* sindra = instance->GetCreature(SindragosaGUID))
|
if (Creature* theLichKing = instance->GetCreature(TheLichKingGUID))
|
||||||
sindra->DespawnOrUnsummon();
|
theLichKing->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -962,8 +962,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
return false;
|
return false;
|
||||||
// no break
|
// no break
|
||||||
case DATA_SINDRAGOSA:
|
case DATA_SINDRAGOSA:
|
||||||
//if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE)
|
if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE)
|
||||||
// return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user