Example #1
0
 public void Execute(GameCmd.stEnmityDataUserCmd_S cmd)
 {
     DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eRefreshEnemyList, cmd);
 }
Example #2
0
    public override bool OnMsg(UIMsgID msgid, object param)
    {
        if (msgid == UIMsgID.eSetRoleProperty)//添加主角的时候刷新界面
        {
            // Client.IEntity entity = (Client.IEntity)param;
            Client.IEntity entity = param as Client.IEntity;
            if (entity != null)
            {
                //SetRoleHp(entity);
                //SetRoleMp(entity);
                //SetRoleExp(entity);
                //SetRolePkModel(entity);
                //if (m_label_lablePower != null)
                //{
                //    m_label_lablePower.text = entity.GetProp((int)FightCreatureProp.Power).ToString();
                //}

                SetRoleHpMpExpPkPower(entity);
            }
        }
        else if (msgid == UIMsgID.stShowBuff)
        {
            stShowBuffInfo info = (stShowBuffInfo)param;

            if (info.IsMainRole)
            {
                ArrayList list = DataManager.Manager <BuffDataManager>().MainRoleBuffList;
                RefreshBuffIcon(m_trans_MainRoleBUffContainer, list);
                ShowBuffInfo(m_trans_MainRoleBUffContainer, true);
            }
            else
            {
                ArrayList list = DataManager.Manager <BuffDataManager>().TargetBuffList;
                RefreshBuffIcon(m_trans_TargetBUffContainer, list);
                ShowBuffInfo(m_trans_TargetBUffContainer, false);
            }
        }
        else if (msgid == UIMsgID.eRefreshEnemyList)
        {
            GameCmd.stEnmityDataUserCmd_S cmd = (GameCmd.stEnmityDataUserCmd_S)param;
            OnEnemyList(cmd);
        }
        else if (msgid == UIMsgID.eShowCopyInfo)
        {
            stCopyInfo info = (stCopyInfo)param;
            ShowFBWidgetUI(info.bShow, info.bShowBattleInfoBtn);
        }
        else if (msgid == UIMsgID.eSkillBtnRefresh)
        {//走新手引导 OnUIEvent
            SetSkillIcon();
        }
        else if (msgid == UIMsgID.eSkillChangeState)
        {
            LearnSkillDataManager data = DataManager.Manager <LearnSkillDataManager>();
            if (m_widget_SkillBtns != null)
            {
                Quaternion rotation = m_widget_SkillBtns.transform.localRotation;
                if (data.CurState == SkillSettingState.StateTwo)
                {
                    m_widget_SkillBtns.transform.DORotate(new Vector3(0, 0, 125), rotTime);
                }
                else
                {
                    m_widget_SkillBtns.transform.DORotate(new Vector3(0, 0, 0), rotTime);
                }
                SetPlayerSkillIcon();
                uint stateSkill = data.GetCurStateSkillIDByJob();
                ExecutePublicCD(stateSkill);
            }
            data.SetCurStateSkillList();
        }
        else if (msgid == UIMsgID.eSkillShowPetSkill)
        {
            if (m_lstSkillBtns.Count > 9)
            {
                m_lstSkillBtns[9].Refresh();
            }
        }
        else if (msgid == UIMsgID.eShortcutList)
        {
            InitShortcutGrid();//快捷使用道具
        }
        else if (msgid == UIMsgID.eShortcutRect)
        {
            Vector3 pos = (Vector3)param;
            PointInRectEvent(pos);
        }
        else if (msgid == UIMsgID.eShortcutRect)
        {
            Vector3 pos = (Vector3)param;
            PointInRectEvent(pos);
        }
        else if (msgid == UIMsgID.eRefreshNpcBelong)
        {
            stRefreshNPCBelongParam data = (stRefreshNPCBelongParam)param;
            UpdateTargetStatus(data.npcid, data.teamid, data.ownerid, data.clanid, data.ownerName);
        }
        else if (msgid == UIMsgID.eAnswerState)
        {
            InitAnswerUI();
        }

        return(true);
    }