Misc stuff
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user