示例#1
0
        /// <summary>
        /// Process the GameServer requests.
        /// This method fires the <see cref="OnProcessPacket"/> event to be hooked up by plugins.
        /// </summary>
        public DBResult ProcessPlayerRequest(pServer GameServer)
        {
            DBResult result = DBResult.NO_ERROR;

            foreach (DProcessPacket target in OnProcessPacket.GetInvocationList())
            {
                result = target(this, GameServer);

                if (result != DBResult.NO_ERROR && result != DBResult.PACKET_NOT_HANDLED && result != DBResult.WAIT)
                {
                    W2Log.Write("CRITICAL ERROR", ELogType.CRITICAL_ERROR);
                    break;
                }
            }
            return(result);
        }
示例#2
0
        /// <summary>
        /// Process the player requests.
        /// This method fires the <see cref="OnProcessPacket"/> event to be hooked up by plugins.
        /// </summary>
        public EPlayerRequestResult ProcessPlayerRequest(CPlayer player)
        {
            EPlayerRequestResult result = EPlayerRequestResult.NO_ERROR;

            foreach (DProcessPacket target in OnProcessPacket.GetInvocationList())
            {
                result = target(this, player);

                if (result != EPlayerRequestResult.NO_ERROR && result != EPlayerRequestResult.PACKET_NOT_HANDLED)
                {
                    W2Log.Write("eita", ELogType.CRITICAL_ERROR);
                    break;
                }
            }

            return(result);
        }