/// <summary> /// Will let the Caster play the given text and sound after casting /// </summary> public void AddTextAndSoundEvent(NPCAiText text) { if (text != null) { Casted += cast => cast.CasterObject.PlayTextAndSound(text); } }
public override void OnEnterCombat() { NPCAiText[] texts = NPCAiTextMgr.GetEntries("I am the serpent king, I can do anything."); NPCAiText currentNpcText = texts[0]; m_owner.PlaySound((uint)currentNpcText.Sound); var npc = m_owner as NPC; if (npc != null) { npc.Yell(currentNpcText.Texts); } m_owner.SpellCast.Start(SpellHandler.Get(SpellId.LightningBolt), false, m_owner.GetNearbyRandomHostileCharacter()); base.OnEnterCombat(); }
public void PlayTextAndSound(NPCAiText text) { PlaySound((uint)text.Sound); Yell(text.Texts); }