Exemplo n.º 1
0
        private void LoadRidable()
        {
            Ridable ridable = _listView.SelectedItem as Ridable;

            if (ridable != null)
            {
                if (Ridable_Selected != null)
                {
                    Ridable_Selected.Invoke(this, ridable);
                }
            }
        }
Exemplo n.º 2
0
        void _ridableSelect_Ridable_Selected(object sender, Ridable ridable)
        {
            if (ridable == null)
            {
                return;
            }

            Player      player = Client.Instance.GetPlayer();
            M2SceneNode node   = ModelSceneService.Instance.MainM2SceneNode;

            if (player == null || node == null || node.Type != M2Type.MT_CHARACTER || node.IsNpc)
            {
                return;
            }

            if (ridable.NpcId == 0)
            {
                player.RideOnModel(0, E_M2_STATES.EMS_STAND);
            }
            else
            {
                player.RideOnModel(ridable.NpcId, GetStateByMountFlag(ridable.MountFlag));
            }
        }
Exemplo n.º 3
0
        private bool IsMatch(object ride)
        {
            Ridable i = ride as Ridable;

            return(-1 != i.Name.IndexOf(filter.Text, StringComparison.CurrentCultureIgnoreCase));
        }