Misc stuff

This commit is contained in:
hondacrx
2022-05-30 15:09:02 -04:00
parent 2472177ef6
commit af29d3158e
5 changed files with 36 additions and 26 deletions
+29
View File
@@ -3398,6 +3398,35 @@ namespace Scripts.Spells.Generic
}
}
[Script]
class spell_gen_whisper_to_controller : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return CliDB.BroadcastTextStorage.HasRecord((uint)spellInfo.GetEffect(0).CalcValue());
}
void HandleScript(uint effIndex)
{
Unit caster = GetCaster();
if (caster != null)
{
TempSummon casterSummon = caster.ToTempSummon();
if (casterSummon != null)
{
Player target = casterSummon.GetSummonerUnit().ToPlayer();
if (target != null)
casterSummon.Whisper((uint)GetEffectValue(), target, false);
}
}
}
public override void Register()
{
OnEffectHit.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
}
}
[Script]
class spell_gen_eject_all_passengers : SpellScript
{
-20
View File
@@ -544,26 +544,6 @@ namespace Scripts.World.GameObjects
}
}
[Script]
class go_frostblade_shrine : GameObjectAI
{
public go_frostblade_shrine(GameObject go) : base(go) { }
public override bool OnGossipHello(Player player)
{
me.UseDoorOrButton(10);
if (!player.HasAura(SpellIds.RecentMeditation))
{
if (player.GetQuestStatus(QuestIds.TheCleansingHorde) == QuestStatus.Incomplete || player.GetQuestStatus(QuestIds.TheCleansingAlliance) == QuestStatus.Incomplete)
{
player.CastSpell(player, SpellIds.CleansingSoul);
player.SetStandState(UnitStandStateType.Sit);
}
}
return true;
}
}
[Script]
class go_midsummer_bonfire : GameObjectAI
{