Ejemplo n.º 1
0
        public void SetTarget(Avatar pAvatar)
        {
            if (pAvatar != null)
            {
                m_CurTarget = pAvatar;

                ChangeTargetEvent e = new ChangeTargetEvent();
                e.TargetID = m_CurTarget.Id;
                GameEntry.Event.Fire(Owner, e);
            }
        }
Ejemplo n.º 2
0
        protected void OnChangeTarget(object sender, GameEventArgs e)
        {
            ChangeTargetEvent ne = (ChangeTargetEvent)e;

            if (ne == null)
            {
                return;
            }

            m_Target = GameEntry.Entity.GetGameEntity(ne.TargetID) as Avatar;
            if (m_Target == null)
            {
                return;
            }
            SetTargetValue();
        }