Beispiel #1
0
        /// <summary>
        /// 技能准备或释放过程中打断等
        /// </summary>
        private void OnRecvSpellFailed(MessageReceivedEvent e)
        {
            S2C_SpellFailed ret = MarshalConversion.PtrToStruct <S2C_SpellFailed>(e.MessagePtr);

            if (ret.CasterId == GameEngine.EngineInstance.LocalPlayer.CharacterID)
            {
                GameEngine.EngineInstance.LocalPlayer.OnSpellFailed(ret);

                // 隐藏进度条
                if (currentProgressBarSpellID == ret.SpellId)
                {
                    prepareProgressBar.Hide();
                }
            }
            else
            {
                RemoteCharacterController rcc = GameEngine.EngineInstance.FindCharacterController(ret.CasterId);
                if (rcc != null)
                {
                    rcc.OnSpellFailed(ret);
                }
                else
                {
                    NLogger.Instance.WriteString(LogType.Warning, string.Format("S2C_SpellFailed can not find controller UintID=[{0}]", ret.CasterId));
                }
            }
        }
 /// <summary>
 ///  处理打断
 /// </summary>
 internal virtual void OnSpellFailed(S2C_SpellFailed ret)
 {
     if (ret.ErrorCode != (Byte)SpellCastResult.Success &&
         IsDoingSpellSpecialMove())
     {
         DoSpecialMove(null, false);
     }
 }
        internal override void OnSpellFailed(S2C_SpellFailed ret)
        {
            base.OnSpellFailed(ret);

            BuildSpellErrorCode(ret.SpellId, (SpellCastResult)ret.ErrorCode);
        }