Пример #1
0
        public virtual void OnDataIntercept(DataInterceptedEventArgs data)
        {
            if (IsConnected && DisableEventHandlers == false)
            {
                try { OnDataInterceptEvent.Invoke(this, data); } catch { };//Invoke event handler
            }
            if (MessagesInfo_Failed == false && ModuleAtt.UseDefaultCallbacks && ClientType != "UNITY")
            {
                HandleGameObjects(data.Packet, data.IsOutgoing);
            }

            Dictionary <ushort, List <DataCaptureAttribute> > callbacks = data.IsOutgoing ? _outDataAttributes : _inDataAttributes;

            if (callbacks.TryGetValue(data.Packet.Id, out List <DataCaptureAttribute> attributes))
            {
                foreach (DataCaptureAttribute attribute in attributes)
                {
                    data.Packet.Position = 0;
                    attribute.Invoke(data);
                }
            }

            string stringified = data.ToString(true);

            _installer.SendPacketAsync(MANIPULATED_PACKET, stringified.Length, Encoding.GetEncoding("latin1").GetBytes(stringified));
        }
Пример #2
0
        public virtual void OnDataIntercept(DataInterceptedEventArgs data)
        {
            if (IsConnected && DisableEventHandlers == false)
            {
                try { OnDataInterceptEvent.Invoke(this, data); } catch { };//Invoke event handler
            }
            if (MessagesInfo_Failed == false)
            {
                HandleGameObjects(data.Packet, data.IsOutgoing);
            }

            string stringified = data.ToString(true);

            _installer.SendPacketAsync(MANIPULATED_PACKET, stringified.Length, Encoding.GetEncoding("latin1").GetBytes(stringified));
        }