Merge remote-tracking branch 'upstream/master' into core/update_2025_09_18
This commit is contained in:
@@ -126,9 +126,36 @@ class spell_azjol_nerub_web_wrap_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum DrainPowerSpells
|
||||
{
|
||||
SPELL_DRAIN_POWER_AURA = 54315
|
||||
};
|
||||
|
||||
// 54314, 59354 - Drain Power
|
||||
class spell_azjol_drain_power : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_azjol_drain_power);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_DRAIN_POWER_AURA });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_DRAIN_POWER_AURA, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_azjol_drain_power::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_azjol_nerub()
|
||||
{
|
||||
new instance_azjol_nerub();
|
||||
RegisterSpellScript(spell_azjol_nerub_fixate);
|
||||
RegisterSpellScript(spell_azjol_nerub_web_wrap_aura);
|
||||
RegisterSpellScript(spell_azjol_drain_power);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "InstanceMapScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "gundrak.h"
|
||||
#include "GameObjectAI.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
@@ -211,6 +212,9 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(_bridgeGUIDs[i]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
}
|
||||
if (GameObject* collision = instance->GetGameObject(_bridgeGUIDs[4]))
|
||||
if (collision->AI())
|
||||
collision->AI()->SetData(0, 1);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2143,6 +2143,34 @@ class spell_necropolis_beam: public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum SoulDeflectionSpells
|
||||
{
|
||||
SPELL_SOUL_DEFLECTION_DAMAGE = 51011
|
||||
};
|
||||
|
||||
class spell_soul_deflection : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_soul_deflection);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_SOUL_DEFLECTION_DAMAGE });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (!eventInfo.GetDamageInfo() || !eventInfo.GetDamageInfo()->GetDamage() || !GetTarget())
|
||||
return;
|
||||
|
||||
GetCaster()->CastCustomSpell(SPELL_SOUL_DEFLECTION_DAMAGE, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), GetTarget(), true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_soul_deflection::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_borean_tundra()
|
||||
{
|
||||
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
|
||||
@@ -2168,4 +2196,5 @@ void AddSC_borean_tundra()
|
||||
new npc_bloodmage_laurith();
|
||||
RegisterCreatureAI(npc_jenny);
|
||||
RegisterSpellScript(spell_necropolis_beam);
|
||||
RegisterSpellScript(spell_soul_deflection);
|
||||
}
|
||||
|
||||
@@ -2261,6 +2261,41 @@ class spell_handover_reins : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum FlameFurySpells
|
||||
{
|
||||
SPELL_FLAME_FURY_1 = 50351,
|
||||
SPELL_FLAME_FURY_2 = 50353,
|
||||
SPELL_FLAME_FURY_3 = 50354,
|
||||
SPELL_FLAME_FURY_4 = 50355,
|
||||
SPELL_FLAME_FURY_5 = 50357
|
||||
};
|
||||
|
||||
// 50348 - Flame Fury
|
||||
class spell_dragonblight_flame_fury : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dragonblight_flame_fury);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(spellIds);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* owner = GetUnitOwner())
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && !owner->IsAlive())
|
||||
owner->CastSpell(owner, Acore::Containers::SelectRandomContainerElement(spellIds), true);
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<uint32, 5> const spellIds = { SPELL_FLAME_FURY_1, SPELL_FLAME_FURY_2, SPELL_FLAME_FURY_3, SPELL_FLAME_FURY_4, SPELL_FLAME_FURY_5 };
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_dragonblight_flame_fury::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_dragonblight()
|
||||
{
|
||||
new npc_conversing_with_the_depths_trigger();
|
||||
@@ -2289,4 +2324,5 @@ void AddSC_dragonblight()
|
||||
new npc_torturer_lecraft();
|
||||
RegisterSpellScript(spell_dragonblight_corrosive_spit);
|
||||
RegisterSpellScript(spell_handover_reins);
|
||||
RegisterSpellScript(spell_dragonblight_flame_fury);
|
||||
}
|
||||
|
||||
@@ -394,6 +394,38 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum RodinLightningSpells
|
||||
{
|
||||
SPELL_RODIN_LIGHTNING_START = 44787,
|
||||
SPELL_RODIN_LIGHTNING_END = 44791,
|
||||
|
||||
NPC_RODIN = 24876
|
||||
};
|
||||
|
||||
struct npc_rodin_lightning_enabler : public ScriptedAI
|
||||
{
|
||||
npc_rodin_lightning_enabler(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_scheduler.Schedule(1s, [this](TaskContext context)
|
||||
{
|
||||
if (Creature* rodin = me->FindNearestCreature(NPC_RODIN, 10.0f))
|
||||
DoCast(rodin, urand(SPELL_RODIN_LIGHTNING_START, SPELL_RODIN_LIGHTNING_END));
|
||||
|
||||
context.Repeat(2s, 8s);
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
_scheduler.Update();
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
enum HawkHunting
|
||||
{
|
||||
SPELL_HAWK_HUNTING_ITEM = 44408
|
||||
@@ -431,5 +463,6 @@ void AddSC_howling_fjord()
|
||||
new npc_apothecary_hanes();
|
||||
new npc_plaguehound_tracker();
|
||||
new npc_razael_and_lyana();
|
||||
RegisterCreatureAI(npc_rodin_lightning_enabler);
|
||||
RegisterSpellScript(spell_hawk_hunting);
|
||||
}
|
||||
|
||||
@@ -923,6 +923,21 @@ class spell_dru_starfall_dummy : public SpellScript
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
// Get caster object
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
// Remove targets if they are outside line of sight with respect to caster
|
||||
targets.remove_if([caster](WorldObject const* target)
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
if (!caster->IsWithinLOS(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Take 2 random targets from remaining within line of sight targets
|
||||
Acore::Containers::RandomResize(targets, 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -5492,6 +5492,42 @@ class spell_gen_cooldown_all : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 29007 - Drink (Freshly-Squeezed Lemonade)
|
||||
// 29008 - Food (Friendship Bread)
|
||||
enum HeartFood
|
||||
{
|
||||
SPELL_VISUAL_KIT_HEART_EMOTE = 6552
|
||||
};
|
||||
|
||||
class spell_gen_food_heart_emote : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_food_heart_emote);
|
||||
|
||||
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
||||
{
|
||||
isPeriodic = true;
|
||||
amplitude = 5 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->SendPlaySpellVisual(SPELL_VISUAL_KIT_HEART_EMOTE);
|
||||
}
|
||||
|
||||
void HandleUpdatePeriodic(AuraEffect* /*aurEff*/)
|
||||
{
|
||||
GetUnitOwner()->SendPlaySpellVisual(SPELL_VISUAL_KIT_HEART_EMOTE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AuraType effName = (m_scriptSpellId == 29007) ? SPELL_AURA_MOD_POWER_REGEN : SPELL_AURA_MOD_REGEN;
|
||||
OnEffectApply += AuraEffectApplyFn(spell_gen_food_heart_emote::OnApply, EFFECT_0, effName, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_food_heart_emote::CalcPeriodic, EFFECT_0, effName);
|
||||
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_food_heart_emote::HandleUpdatePeriodic, EFFECT_0, effName);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5656,4 +5692,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
||||
RegisterSpellScript(spell_gen_cooldown_all);
|
||||
RegisterSpellScript(spell_gen_food_heart_emote);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ enum WarriorSpells
|
||||
SPELL_WARRIOR_VIGILANCE_PROC = 50725,
|
||||
SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT = 59665,
|
||||
SPELL_WARRIOR_WHIRLWIND_MAIN = 50622,
|
||||
SPELL_WARRIOR_WHIRLWIND_OFF = 44949
|
||||
SPELL_WARRIOR_WHIRLWIND_OFF = 44949,
|
||||
SPELL_WARRIOR_EXECUTE_R1 = 5308,
|
||||
};
|
||||
|
||||
enum WarriorSpellIcons
|
||||
@@ -959,6 +960,26 @@ class spell_warr_heroic_strike : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_war_sudden_death_aura : public AuraScript
|
||||
{ PrepareAuraScript(spell_war_sudden_death_aura);
|
||||
|
||||
bool AfterCheckProc(ProcEventInfo& eventInfo, bool isTriggeredAtSpellProcEvent)
|
||||
{
|
||||
// Check PROC_SPELL_PHASE_FINISH only for Execute
|
||||
if (eventInfo.GetSpellPhaseMask() != PROC_SPELL_PHASE_FINISH)
|
||||
return isTriggeredAtSpellProcEvent;
|
||||
if (Spell const* procSpell = eventInfo.GetProcSpell())
|
||||
if (procSpell->GetSpellInfo()->GetFirstRankSpell()->Id == SPELL_WARRIOR_EXECUTE_R1)
|
||||
return isTriggeredAtSpellProcEvent;
|
||||
return false;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoAfterCheckProc += AuraAfterCheckProcFn(spell_war_sudden_death_aura::AfterCheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warrior_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_warr_mocking_blow);
|
||||
@@ -986,4 +1007,5 @@ void AddSC_warrior_spell_scripts()
|
||||
RegisterSpellScript(spell_warr_vigilance_trigger);
|
||||
RegisterSpellScript(spell_warr_t3_prot_8p_bonus);
|
||||
RegisterSpellScript(spell_warr_heroic_strike);
|
||||
RegisterSpellScript(spell_war_sudden_death_aura);
|
||||
}
|
||||
|
||||
@@ -20,27 +20,6 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
class AreaTrigger_at_voltarus_middle : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
AreaTrigger_at_voltarus_middle()
|
||||
: AreaTriggerScript("at_voltarus_middle")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*trigger*/) override
|
||||
{
|
||||
if (player->IsAlive() && !player->IsInCombat())
|
||||
if (player->HasItemCount(39319)) // Scepter of Domination
|
||||
{
|
||||
player->TeleportTo(MAP_NORTHREND, 6242.67f, -1972.10f, 484.783f, 0.6f);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## at_coilfang_waterfall
|
||||
######*/
|
||||
@@ -416,7 +395,6 @@ private:
|
||||
|
||||
void AddSC_areatrigger_scripts()
|
||||
{
|
||||
new AreaTrigger_at_voltarus_middle();
|
||||
new AreaTrigger_at_coilfang_waterfall();
|
||||
new AreaTrigger_at_legion_teleporter();
|
||||
new AreaTrigger_at_stormwright_shelf();
|
||||
|
||||
Reference in New Issue
Block a user