diff options
author | Kobert-P <kassiaK@yahoo.de> | 2018-06-07 12:04:01 +0200 |
---|---|---|
committer | Kobert-P <kassiaK@yahoo.de> | 2018-06-07 12:04:01 +0200 |
commit | fd35fc7a0853527c6ab84714446be2644b40d3aa (patch) | |
tree | 2eea2886edadc5395a46d1a7eb18b81b79416825 /DiscoBot/DSA_Game/Characters/Character.cs | |
parent | a14f901b0b53ddbdd04468a6186d47a9554efb9b (diff) | |
parent | c1d0851ec35c410733da53b919541b8fab491407 (diff) |
Merge branch 'master' of https://github.com/TrueDoctor/DiscoBot
Diffstat (limited to 'DiscoBot/DSA_Game/Characters/Character.cs')
-rw-r--r-- | DiscoBot/DSA_Game/Characters/Character.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index d92fc63..5c39fc5 100644 --- a/DiscoBot/DSA_Game/Characters/Character.cs +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -118,7 +118,12 @@ var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { - SoundEffects.Play(Sound.Wrong); + try + { + SoundEffects.Play(Sound.Wrong); + } + catch { } + return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } @@ -142,7 +147,11 @@ if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { - SoundEffects.Play(Sound.Wrong); + try + { + SoundEffects.Play(Sound.Wrong); + } + catch { } return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } @@ -166,7 +175,11 @@ var attack = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { - SoundEffects.Play(Sound.Wrong); + try + { + SoundEffects.Play(Sound.Wrong); + } + catch { } return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } |