Exemplo n.º 1
0
        private void ProcessCharacterPositionEvent(bEvents.DynelPositionEventArgs e)
        {
            if (this.curCharacterPos != null)
            {
                if (this.curCharacterPos.Equals(e) &&
                    this.lastCharPos != null &&
                    this.lastCharPos.ElapsedMilliseconds < 250)
                {
                    return;
                }
            }

            if (this.lastCharPos == null)
            {
                this.lastCharPos = new Stopwatch();
            }
            this.lastCharPos.Restart();

            //Debug.WriteLine("N3: X: {0} Y: {1} Z: {2}", e.X, e.Y, e.Z);
            this.curCharacterPos = e;
            this.outgoingEvents.Enqueue(new hEvents.CharacterPositionEventArgs(
                                            e.ProcessId,
                                            e.ServerID,
                                            e.DynelType,
                                            e.DynelID,
                                            e.ZoneID,
                                            e.ZoneName,
                                            e.InShadowlands,
                                            e.X,
                                            e.Y,
                                            e.Z,
                                            e.Time));
        }
Exemplo n.º 2
0
        private void ProcessCharacterPositionEvent(bEvents.DynelPositionEventArgs e)
        {
            if (this.curCharacterPos != null)
            {
                if (this.curCharacterPos.Equals(e)
                    && this.lastCharPos!=null
                    && this.lastCharPos.ElapsedMilliseconds < 250)
                {
                    return;
                }
            }

            if (this.lastCharPos == null) { this.lastCharPos = new Stopwatch(); }
            this.lastCharPos.Restart();

            //Debug.WriteLine("N3: X: {0} Y: {1} Z: {2}", e.X, e.Y, e.Z);
            this.curCharacterPos = e;
            this.outgoingEvents.Enqueue(new hEvents.CharacterPositionEventArgs(
                e.ProcessId,
                e.ServerID,
                e.DynelType,
                e.DynelID,
                e.ZoneID,
                e.ZoneName,
                e.InShadowlands,
                e.X,
                e.Y,
                e.Z,
                e.Time));
        }