fix(Scripts/ICC): Don't show Heroic Attempts on Normal difficulty (#3336)
This commit is contained in:
@@ -1069,8 +1069,10 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
|||||||
_introDone = true;
|
_introDone = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
me->SetVisible(true);
|
me->SetVisible(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who)
|
void MoveInLineOfSight(Unit* who)
|
||||||
{
|
{
|
||||||
@@ -1078,7 +1080,9 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (who->GetTypeId() != TYPEID_PLAYER || me->GetExactDist2d(who) > 100.0f)
|
if (who->GetTypeId() != TYPEID_PLAYER || me->GetExactDist2d(who) > 100.0f)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_introDone = true;
|
_introDone = true;
|
||||||
Talk(SAY_INTRO_1);
|
Talk(SAY_INTRO_1);
|
||||||
@@ -1097,13 +1101,17 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
|||||||
void MovementInform(uint32 type, uint32 id)
|
void MovementInform(uint32 type, uint32 id)
|
||||||
{
|
{
|
||||||
if (type == POINT_MOTION_TYPE && id == POINT_INTRO_DESPAWN)
|
if (type == POINT_MOTION_TYPE && id == POINT_INTRO_DESPAWN)
|
||||||
|
{
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff)
|
void UpdateAI(uint32 diff)
|
||||||
{
|
{
|
||||||
if (!_events.GetPhaseMask())
|
if (!_events.GetPhaseMask())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_events.Update(diff);
|
_events.Update(diff);
|
||||||
|
|
||||||
@@ -1114,13 +1122,19 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
|||||||
_events.Reset();
|
_events.Reset();
|
||||||
|
|
||||||
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_KELESETH_GUID)))
|
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_KELESETH_GUID)))
|
||||||
|
{
|
||||||
keleseth->AI()->DoAction(ACTION_STAND_UP);
|
keleseth->AI()->DoAction(ACTION_STAND_UP);
|
||||||
|
}
|
||||||
if (Creature* taldaram = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_TALDARAM_GUID)))
|
if (Creature* taldaram = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_TALDARAM_GUID)))
|
||||||
|
{
|
||||||
taldaram->AI()->DoAction(ACTION_STAND_UP);
|
taldaram->AI()->DoAction(ACTION_STAND_UP);
|
||||||
|
}
|
||||||
if (Creature* valanar = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_VALANAR_GUID)))
|
if (Creature* valanar = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_PRINCE_VALANAR_GUID)))
|
||||||
|
{
|
||||||
valanar->AI()->DoAction(ACTION_STAND_UP);
|
valanar->AI()->DoAction(ACTION_STAND_UP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
@@ -1181,12 +1195,15 @@ class npc_dark_nucleus : public CreatureScript
|
|||||||
void UpdateAI(uint32 diff)
|
void UpdateAI(uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (timer <= diff)
|
if (timer <= diff)
|
||||||
{
|
{
|
||||||
timer = 1000;
|
timer = 1000;
|
||||||
if (Unit* victim = me->GetVictim())
|
if (Unit* victim = me->GetVictim())
|
||||||
|
{
|
||||||
if (me->GetDistance(victim) < 15.0f && !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
|
if (me->GetDistance(victim) < 15.0f && !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
|
||||||
{
|
{
|
||||||
me->InterruptNonMeleeSpells(true, 0, true);
|
me->InterruptNonMeleeSpells(true, 0, true);
|
||||||
@@ -1194,9 +1211,12 @@ class npc_dark_nucleus : public CreatureScript
|
|||||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
timer -= diff;
|
timer -= diff;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
@@ -1258,12 +1278,20 @@ class npc_ball_of_flame : public CreatureScript
|
|||||||
void DoAction(int32 action)
|
void DoAction(int32 action)
|
||||||
{
|
{
|
||||||
if (action != ACTION_FLAME_BALL_CHASE || me->IsInCombat())
|
if (action != ACTION_FLAME_BALL_CHASE || me->IsInCombat())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Player* target = nullptr;
|
Player* target = nullptr;
|
||||||
|
|
||||||
if (_chaseGUID)
|
if (_chaseGUID)
|
||||||
|
{
|
||||||
target = ObjectAccessor::GetPlayer(*me, _chaseGUID);
|
target = ObjectAccessor::GetPlayer(*me, _chaseGUID);
|
||||||
|
}
|
||||||
if (!target)
|
if (!target)
|
||||||
|
{
|
||||||
target = ScriptedAI::SelectTargetFromPlayerList(150.0f, 0, true);
|
target = ScriptedAI::SelectTargetFromPlayerList(150.0f, 0, true);
|
||||||
|
}
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
// need to clear states now because this call is before AuraEffect is fully removed
|
// need to clear states now because this call is before AuraEffect is fully removed
|
||||||
@@ -1286,11 +1314,15 @@ class npc_ball_of_flame : public CreatureScript
|
|||||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/)
|
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/)
|
||||||
{
|
{
|
||||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
||||||
|
{
|
||||||
_instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, 0);
|
_instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
@@ -1319,9 +1351,13 @@ class npc_kinetic_bomb : public CreatureScript
|
|||||||
void IsSummonedBy(Unit* /*summoner*/)
|
void IsSummonedBy(Unit* /*summoner*/)
|
||||||
{
|
{
|
||||||
if (InstanceScript* instance = me->GetInstanceScript())
|
if (InstanceScript* instance = me->GetInstanceScript())
|
||||||
|
{
|
||||||
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PRINCE_VALANAR_GUID)))
|
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PRINCE_VALANAR_GUID)))
|
||||||
|
{
|
||||||
valanar->AI()->JustSummoned(me);
|
valanar->AI()->JustSummoned(me);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -1394,8 +1430,10 @@ class spell_blood_council_shadow_prison : public SpellScriptLoader
|
|||||||
void HandleDummyTick(AuraEffect const* aurEff)
|
void HandleDummyTick(AuraEffect const* aurEff)
|
||||||
{
|
{
|
||||||
if (GetTarget()->GetTypeId() == TYPEID_PLAYER && GetTarget()->isMoving())
|
if (GetTarget()->GetTypeId() == TYPEID_PLAYER && GetTarget()->isMoving())
|
||||||
|
{
|
||||||
GetTarget()->CastSpell(GetTarget(), SPELL_SHADOW_PRISON_DAMAGE, true, NULL, aurEff);
|
GetTarget()->CastSpell(GetTarget(), SPELL_SHADOW_PRISON_DAMAGE, true, NULL, aurEff);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
@@ -1421,9 +1459,13 @@ class spell_blood_council_shadow_prison_damage : public SpellScriptLoader
|
|||||||
void AddExtraDamage()
|
void AddExtraDamage()
|
||||||
{
|
{
|
||||||
if (Aura* aur = GetHitUnit()->GetAura(GetSpellInfo()->Id))
|
if (Aura* aur = GetHitUnit()->GetAura(GetSpellInfo()->Id))
|
||||||
|
{
|
||||||
if (AuraEffect const* eff = aur->GetEffect(EFFECT_1))
|
if (AuraEffect const* eff = aur->GetEffect(EFFECT_1))
|
||||||
|
{
|
||||||
SetHitDamage(GetHitDamage() + eff->GetAmount());
|
SetHitDamage(GetHitDamage() + eff->GetAmount());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
@@ -1476,7 +1518,9 @@ class spell_taldaram_summon_flame_ball : public SpellScriptLoader
|
|||||||
bool Load()
|
bool Load()
|
||||||
{
|
{
|
||||||
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
GetCaster()->CastSpell(GetCaster(), uint32(GetSpellInfo()->Effects[0].CalcValue()), true);
|
GetCaster()->CastSpell(GetCaster(), uint32(GetSpellInfo()->Effects[0].CalcValue()), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,6 +211,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket& data)
|
void FillInitialWorldStates(WorldPacket& data)
|
||||||
|
{
|
||||||
|
if (instance->IsHeroic())
|
||||||
{
|
{
|
||||||
data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS);
|
data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS);
|
||||||
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(BloodQuickeningMinutes);
|
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(BloodQuickeningMinutes);
|
||||||
@@ -218,6 +220,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(HeroicAttempts);
|
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(HeroicAttempts);
|
||||||
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts);
|
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnPlayerAreaUpdate(Player* player, uint32 /*oldArea*/, uint32 newArea)
|
void OnPlayerAreaUpdate(Player* player, uint32 /*oldArea*/, uint32 newArea)
|
||||||
{
|
{
|
||||||
@@ -230,8 +233,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
player->SendInitWorldStates(player->GetZoneId(), player->GetAreaId());
|
player->SendInitWorldStates(player->GetZoneId(), player->GetAreaId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
player->SendUpdateWorldState(WORLDSTATE_SHOW_ATTEMPTS, 0);
|
player->SendUpdateWorldState(WORLDSTATE_SHOW_ATTEMPTS, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnPlayerEnter(Player* player)
|
void OnPlayerEnter(Player* player)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user