Exemple #1
0
        /// <summary>
        /// Toggle taunt mode on/off.
        /// </summary>
        private void ToggleTauntMode()
        {
            TauntEffect tauntEffect = EffectList.GetOfType <TauntEffect>();
            GamePlayer  owner       = (Brain as IControlledBrain).Owner as GamePlayer;

            if (tauntEffect != null)
            {
                // It's on, so let's switch it off.

                tauntEffect.Stop();
                if (owner != null)
                {
                    owner.Out.SendMessage(String.Format("{0} seems to be less aggressive than before.",
                                                        GetName(0, true)), eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
            }
            else
            {
                // It's off, so let's turn it on.

                if (owner != null)
                {
                    owner.Out.SendMessage(String.Format("{0} enters an aggressive stance.",
                                                        GetName(0, true)), eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }

                new TauntEffect().Start(this);
            }
        }