Scripts/Quest: Rework Mystery of the Infinite & Mystery of the Infinite, Redux
Port From (https://github.com/TrinityCore/TrinityCore/commit/a2236616ccf6c5cb778933e7bf808b387e29fded)
This commit is contained in:
@@ -3670,6 +3670,47 @@ namespace Scripts.Spells.Generic
|
||||
OnEffectHit.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||
}
|
||||
}
|
||||
|
||||
// BasePoints of spells is ID of npc_text used to group texts, it's not implemented so texts are grouped the old way
|
||||
// 50037 - Mystery of the Infinite: Future You's Whisper to Controller - Random
|
||||
// 50287 - Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random
|
||||
// 60709 - MOTI, Redux: Past You's Whisper to Controller - Random
|
||||
[Script("spell_future_you_whisper_to_controller_random", 2u)]
|
||||
[Script("spell_wyrmrest_defender_whisper_to_controller_random", 1u)]
|
||||
[Script("spell_past_you_whisper_to_controller_random", 2u)]
|
||||
class spell_gen_whisper_to_controller_random : SpellScript
|
||||
{
|
||||
uint _text;
|
||||
|
||||
public spell_gen_whisper_to_controller_random(uint text)
|
||||
{
|
||||
_text = text;
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
{
|
||||
// Same for all spells
|
||||
if (!RandomHelper.randChance(20))
|
||||
return;
|
||||
|
||||
Creature target = GetHitCreature();
|
||||
if (target != null)
|
||||
{
|
||||
TempSummon targetSummon = target.ToTempSummon();
|
||||
if (targetSummon != null)
|
||||
{
|
||||
Player player = targetSummon.GetSummonerUnit().ToPlayer();
|
||||
if (player != null)
|
||||
targetSummon.GetAI().Talk(_text, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_gen_eject_all_passengers : SpellScript
|
||||
|
||||
@@ -255,7 +255,6 @@ namespace Scripts.Spells.Quest
|
||||
|
||||
//Quest12372
|
||||
public const uint WyrmrestTempleCredit = 27698;
|
||||
public const uint WyrmrestDefender = 27629;
|
||||
|
||||
//Quest11010 11102 11023
|
||||
public const uint FelCannon2 = 23082;
|
||||
@@ -838,22 +837,6 @@ namespace Scripts.Spells.Quest
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 50287 - Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random (cast from Azure Dragons and Azure Drakes on death)
|
||||
class spell_q12372_azure_on_death_force_whisper : SpellScript
|
||||
{
|
||||
void HandleScript(uint effIndex)
|
||||
{
|
||||
Creature defender = GetHitCreature();
|
||||
if (defender != null && defender.GetEntry() == CreatureIds.WyrmrestDefender)
|
||||
defender.GetAI().Talk(Misc.WhisperOnHitByForceWhisper, defender.GetCharmerOrOwner());
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 40113 Knockdown Fel Cannon: The Aggro Check Aura
|
||||
class spell_q11010_q11102_q11023_aggro_check_aura : AuraScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user