Esempio n. 1
0
		/// <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);
			}
		}
Esempio n. 2
0
        /// <summary>
        /// Select the first Text whose english version starts with the given string
        /// </summary>
        /// <param name="englishPrefix">String preposition</param>
        public static NPCAiText GetFirstTextByEnglishPrefix(string englishPrefix, bool warnIfNotFound = true)
        {
            NPCAiText npcAiText = NPCAiTextMgr.Entries.Values.FirstOrDefault <NPCAiText>(
                (Func <NPCAiText, bool>)(entry =>
                                         entry.Texts.Localize(ClientLocale.English).StartsWith(englishPrefix)));

            if (npcAiText == null && warnIfNotFound)
            {
                LogManager.GetCurrentClassLogger().Warn("Could not find AIText which starts with: {0}", englishPrefix);
            }
            return(npcAiText);
        }
Esempio n. 3
0
		public void PlayTextAndSound(NPCAiText text)
		{
			PlaySound((uint)text.Sound);
			Yell(text.Texts);
		}