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
|
||||
|
||||
Reference in New Issue
Block a user