Пример #1
0
    public void RemoveOtherPlayer(uint iid)
    {
        if (!m_mapOtherPlayer.ContainsKey(iid))
        {
            return;
        }

        ProfessionRole pr = m_mapOtherPlayer[iid];

        if (m_mapOtherPlayerUnsee.ContainsKey(iid))
        {
            m_mapOtherPlayerUnsee.Remove(iid);
        }
        if (m_mapOtherPlayerSee.ContainsKey(iid))
        {
            m_mapOtherPlayerSee.Remove(iid);
        }
        FriendProxy.getInstance().removeNearyByLeave(pr.m_unCID);

        m_mapOtherPlayer.Remove(iid);
        if (a3_liteMiniBaseMap.instance != null)
        {
            a3_liteMiniBaseMap.instance.removeRoleInMiniMap(pr.strIID);
        }
        pr.dispose();

        if (SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == iid)
        {
            SelfRole._inst.m_LockRole = null;
        }

        //dispatchEvent(GameEvent.Create(MonsterMgr.EVENT_MONSTER_REMOVED, this, d));
    }
Пример #2
0
    public void RemoveOtherPlayer(uint iid)
    {
        bool flag = !this.m_mapOtherPlayer.ContainsKey(iid);

        if (!flag)
        {
            ProfessionRole professionRole = this.m_mapOtherPlayer[iid];
            bool           flag2          = this.m_mapOtherPlayerUnsee.ContainsKey(iid);
            if (flag2)
            {
                this.m_mapOtherPlayerUnsee.Remove(iid);
            }
            bool flag3 = this.m_mapOtherPlayerSee.ContainsKey(iid);
            if (flag3)
            {
                this.m_mapOtherPlayerSee.Remove(iid);
            }
            BaseProxy <FriendProxy> .getInstance().removeNearyByLeave(professionRole.m_unCID);

            this.m_mapOtherPlayer.Remove(iid);
            bool flag4 = a3_liteMinimap.instance != null;
            if (flag4)
            {
                a3_liteMinimap.instance.removeRoleInMiniMap(professionRole.strIID);
            }
            professionRole.dispose();
            bool flag5 = SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == iid;
            if (flag5)
            {
                SelfRole._inst.m_LockRole = null;
            }
        }
    }