Exemplo n.º 1
0
        private void UpdateRKNLocation()
        {
            if (DateTime.Now.Ticks > (LastRKNUpdate + RKNUpdateDelay))
            {
                PlayerInfo[] Characters = API.State.PlayerInfo.Values.ToArray();

                List <RKNMapService.Character> RKNCharList = new List <RKNMapService.Character>();

                foreach (PlayerInfo PlayerInfo in Characters)
                {
                    RKNMapService.Character Character = new RKNMapService.Character();

                    if (PlayerInfo.IsHooked)
                    {
                        Character.NickName = PlayerInfo.Name;
                        Character.X        = PlayerInfo.Position.X;
                        Character.Y        = PlayerInfo.Position.Z;
                        Character.Zone     = Convert.ToInt32(PlayerInfo.Zone.ID);

                        RKNCharList.Add(Character);
                    }
                }

                if (RKNCharList.Count > 0)
                {
                    try
                    {
                        Service.UpdateCharacterLocation(RKNCharList.ToArray());
                    }
                    catch (Exception e)
                    {
                        eventLog.WriteEntry("Error: " + e.Message, EventLogEntryType.Error);
                    }
                }

                LastRKNUpdate = DateTime.Now.Ticks;
            }
        }
Exemplo n.º 2
0
 /// <remarks/>
 public void UpdateCharacterLocationAsync(Character[] Characters) {
     this.UpdateCharacterLocationAsync(Characters, null);
 }
Exemplo n.º 3
0
 public bool UpdateCharacterLocation(Character[] Characters) {
     object[] results = this.Invoke("UpdateCharacterLocation", new object[] {
                 Characters});
     return ((bool)(results[0]));
 }
Exemplo n.º 4
0
 /// <remarks/>
 public void UpdateCharacterLocationAsync(Character[] Characters, object userState) {
     if ((this.UpdateCharacterLocationOperationCompleted == null)) {
         this.UpdateCharacterLocationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateCharacterLocationOperationCompleted);
     }
     this.InvokeAsync("UpdateCharacterLocation", new object[] {
                 Characters}, this.UpdateCharacterLocationOperationCompleted, userState);
 }
Exemplo n.º 5
0
        private void UpdateRKNLocation()
        {
            if (DateTime.Now.Ticks > (LastRKNUpdate + RKNUpdateDelay))
            {
                PlayerInfo[] Characters = API.State.PlayerInfo.Values.ToArray();

                List<RKNMapService.Character> RKNCharList = new List<RKNMapService.Character>();

                foreach (PlayerInfo PlayerInfo in Characters)
                {
                    RKNMapService.Character Character = new RKNMapService.Character();

                    if (PlayerInfo.IsHooked)
                    {
                        Character.NickName = PlayerInfo.Name;
                        Character.X = PlayerInfo.Position.X;
                        Character.Y = PlayerInfo.Position.Z;
                        Character.Zone = Convert.ToInt32(PlayerInfo.Zone.ID);

                        RKNCharList.Add(Character);
                    }
                }

                if (RKNCharList.Count > 0)
                {
                    try
                    {
                        Service.UpdateCharacterLocation(RKNCharList.ToArray());
                    }
                    catch (Exception e)
                    {
                        eventLog.WriteEntry("Error: " + e.Message, EventLogEntryType.Error);
                    }
                }

                LastRKNUpdate = DateTime.Now.Ticks;
            }
        }