Example #1
0
        public VBuff GetBuff(string rid)
        {
            if (string.IsNullOrEmpty(rid))
            {
                return(null);
            }
            VBuff buff = this._buffManager.Get(rid);

            if (buff == null)
            {
                Logger.Error($"Buff:{rid} not exist");
            }
            return(buff);
        }
Example #2
0
        private void ProcessDataReceived(Packet packet)
        {
            Logger.Net($"<color=\"#00FFFF\">Received [packet:{packet}], time:{TimeUtils.GetLocalTime( TimeUtils.utcTime )}</color>");

            if (packet == null)
            {
                return;
            }

            bool isQCMD = packet.module == Module.GENERIC && packet.command == Command.ACMD_REPLY;

            if (isQCMD)
            {
                _DTO_reply dto = (( _PACKET_GENERIC_ACMD_REPLY )packet).dto;
                this._qcmdListener.Invoke(NetworkHelper.EncodePacketID(dto.src_module, dto.src_cmd), packet);
            }
            else
            {
                this._acmdListener.Invoke(NetworkHelper.EncodePacketID(packet.module, packet.command), packet);
            }
        }
Example #3
0
        public void Send(Packet packet)
        {
            Logger.Net($"<color=\"#CCFF33\">Send [packet:{packet}], time:{TimeUtils.utcTime}</color>");

            NetworkManager.Send(NETWORK_NAME, packet);
        }