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