public void refresName(INameObj role)
        {
            if (role != null && !dItem.ContainsKey(role))
            {
                return;
            }

            if (role is ProfessionRole)
            {
                PlayerNameItem item = dItem[role];

                item.utext.text = (role as ProfessionRole).roleName;

                uint monId = (role as BaseRole).m_isMain ?  PlayerModel.getInstance().cid : (role as BaseRole).m_unCID;

                if (MonsterMgr._inst.roleSummonMapping.ContainsKey(monId))
                {
                    var monster = MonsterMgr._inst.m_mapMonster[MonsterMgr._inst.roleSummonMapping[monId]];

                    if (dItem.ContainsKey(monster))
                    {
                        item = dItem[monster];

                        item.setName(monster.tempXMl.getString("name"), (role as ProfessionRole).roleName + ContMgr.getCont("MonsterMgr"));
                    }  // 召唤兽的名字
                }
            }
        }
        public void refresNameColor_spost(INameObj role, SPOSTNAME_TYPE rednmstate)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.refresNameColor_spost(rednmstate);
        }
        public void refreshTitlelv(INameObj role, int title_id)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.refreshTitle(title_id);
        }
        public void seticon_forMonsterHunter(INameObj role, bool hide = false)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.show_mhMark(role, hide);
        }
예제 #5
0
        public void seticon_forMonsterHunter(INameObj role, bool hide = false)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.show_mhMark(role, hide);
            }
        }
예제 #6
0
        public void seticon_forDaobao(INameObj role, int num)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.seticon_forDaobao(num);
            }
        }
예제 #7
0
        public void setDartName(INameObj role, string legionName)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.setDartName(legionName);
            }
        }
예제 #8
0
        public void setName(INameObj role, string sumname, string mastername)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.setName(sumname, mastername);
            }
        }
예제 #9
0
        public void refreshVipLv(INameObj role, uint viplv)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.refreshVipLv(viplv);
            }
        }
예제 #10
0
        public void refreshNameColor(INameObj role, int rednmstate)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.refresNameColor(rednmstate);
            }
        }
        public void seticon_forDaobao(INameObj role, int num)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.seticon_forDaobao(num);
        }
        public void refreshNameColor(INameObj role, int rednmstate)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.refresNameColor(rednmstate);
        }
예제 #13
0
        public void refreshTitlelv(INameObj role, int title_id)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.refreshTitle(title_id);
            }
        }
        public void setDartName(INameObj role, string legionName)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }

            PlayerNameItem item = dItem[role];

            item.setDartName(legionName);
        }
        public void refreshVipLv(INameObj role, uint viplv)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }

            PlayerNameItem item = dItem[role];

            item.refreshVipLv(viplv);
        }
        public void monsterTitleInvisible(INameObj role, bool invisible)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.bg.gameObject.SetActive(!invisible);
            item.hp.gameObject.SetActive(!invisible);
            item.sumtext.gameObject.SetActive(!invisible);
        }
예제 #17
0
        public void hide(INameObj role)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                playerNameItem.clear();
                playerNameItem.visiable = false;
                this.dItem.Remove(role);
                this.lItem.Remove(playerNameItem);
                this.lPool.Add(playerNameItem);
            }
        }
예제 #18
0
        public void refreserialCount(INameObj role, int count)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                bool flag2 = !(role is ProfessionRole);
                if (!flag2)
                {
                    PlayerNameItem playerNameItem = this.dItem[role];
                    playerNameItem.refreshserial(count);
                }
            }
        }
예제 #19
0
        public void refreshmapCount(INameObj role, int count, bool ismine)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                bool flag2 = !(role is ProfessionRole);
                if (!flag2)
                {
                    PlayerNameItem playerNameItem = this.dItem[role];
                    playerNameItem.refreshMapcount(count, ismine);
                }
            }
        }
        public void refreserialCount(INameObj role, int count)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            if (!(role is ProfessionRole))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.refreshserial(count);
        }
        public void refreshmapCount(INameObj role, int count, bool ismine)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            if (!(role is ProfessionRole))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.refreshMapcount(count, ismine);
        }
        public void hide(INameObj role)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            item.clear();
            item.visiable = false;
            dItem.Remove(role);
            lItem.Remove(item);
            lPool.Add(item);
        }
예제 #23
0
        public void refresHitback(INameObj role, int time, bool ismyself = false)
        {
            bool flag = !this.dItem.ContainsKey(role);

            if (!flag)
            {
                PlayerNameItem playerNameItem = this.dItem[role];
                if (ismyself)
                {
                    playerNameItem.refresHitback(time, true);
                }
                else
                {
                    playerNameItem.refresHitback(time, false);
                }
            }
        }
        public void refresHitback(INameObj role, int time, bool ismyself = false)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }
            PlayerNameItem item = dItem[role];

            if (ismyself)
            {
                item.refresHitback(time, true);
            }
            else
            {
                item.refresHitback(time, false);
            }
        }
        public void setName(INameObj role, string sumname, string mastername)
        {
            if (!dItem.ContainsKey(role))
            {
                return;
            }

            PlayerNameItem item = dItem[role];

            item.setName(sumname, mastername);

            if (role is MS0000 && (role as MS0000).masterid == PlayerModel.getInstance().cid)
            {
                item.hp.gameObject.GetComponent <Image>().color = new Color(128f / 255f, 223f / 255f, 120f / 255f, 255f / 255f);
            }
            else if (TeamProxy.getInstance().MyTeamData != null && TeamProxy.getInstance().MyTeamData.IsInMyTeam((role as MS0000).masterid))
            {
                item.hp.gameObject.GetComponent <Image>().color = new Color(128f / 255f, 223f / 255f, 120f / 255f, 255f / 255f); // 队友召唤兽
            }
            else
            {
                item.hp.gameObject.GetComponent <Image>().color = new Color(229f / 255f, 49f / 255f, 49f / 255f, 255f / 255f);
            }
        }
        public void show(INameObj avatar)
        {
            if (dItem.ContainsKey(avatar))
            {
                return;
            }

            PlayerNameItem item;

            if (lPool.Count == 0)
            {
                GameObject temp = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_name_user");
                GameObject go   = GameObject.Instantiate(temp) as GameObject;
                go.transform.SetParent(playerNameLayer, false);
                item = new PlayerNameItem(go.transform);
            }
            else
            {
                item          = lPool[0];
                item.visiable = true;
                lPool.RemoveAt(0);
            }


            if (avatar is ProfessionRole)
            {
                if (!(avatar as ProfessionRole).m_isMain)
                {
                    allOtherTitle[(avatar as ProfessionRole).m_unCID] = item.heroTitleIcon.gameObject;
                }
                else
                {
                    selfTitleGo = item.heroTitleIcon.gameObject;
                }
            }

            item.refresh(avatar);
            lItem.Add(item);
            dItem[avatar] = item;

            if (avatar is MonsterRole)
            {
                if (A3_ActiveModel.getInstance() != null)
                {
                    if (A3_ActiveModel.getInstance().mwlr_target_monId == 0 || (avatar as MonsterRole).monsterid != A3_ActiveModel.getInstance().mwlr_target_monId)
                    {
                        item.mhPlayerName.transform.parent.gameObject.SetActive(false);
                    }
                    else
                    {
                        item.mhPlayerName.transform.parent.gameObject.SetActive(true);
                    }
                }
                else
                {
                    item.mhPlayerName.transform.parent.gameObject.SetActive(false);
                }
            }
            else
            {
                item.mhPlayerName.transform.parent.gameObject.SetActive(false);
            }
            if (avatar is MDC000)
            {
                carObj = avatar;
                item.setHP((( float )(avatar.curhp / avatar.maxHp) * 100).ToString());
                carItem = item;
                item.refreshHp(avatar.curhp, avatar.maxHp, avatar);
            }
            else
            {
                item.cartxt.gameObject.SetActive(false);
                item.refreshHp(avatar.curhp, avatar.maxHp);
            }

            //if (avatar is self)
            //item.refreshVipLv(avatar.lgAvatar.viewInfo["vip"]);
            //else
            item.refreicon();
            item.refreshVipLv(0);
            if (avatar is ProfessionRole)
            {
                if ((avatar as ProfessionRole).m_isMain)
                {
                    if (PlayerModel.getInstance().istitleActive)
                    {
                        item.refreshTitle(a3_RankModel.now_id);
                    }
                    item.refresNameColor(( int )PlayerModel.getInstance().now_nameState);

                    if (PlayerModel.getInstance().inSpost&& PlayerModel.getInstance().lvlsideid != 0)
                    {
                        if (PlayerModel.getInstance().lvlsideid == 1)
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.RED);
                        }
                        else if (PlayerModel.getInstance().lvlsideid == 2)
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.BULE);
                        }
                    }
                    else if (PlayerModel.getInstance().inCityWar&& PlayerModel.getInstance().lvlsideid != 0)
                    {
                        item.refresNameColor_spost(SPOSTNAME_TYPE.BULE);
                    }

                    item.refresHitback(( int )PlayerModel.getInstance().hitBack);
                    item.refreshVipLv(( uint )A3_VipModel.getInstance().Level);
                }
                else
                {
                    item.refreshTitle(avatar.title_id);
                    item.refresNameColor(avatar.rednm);

                    if (PlayerModel.getInstance().inSpost&& avatar.spost_lvlsideid != 0)
                    {
                        if (1 == avatar.spost_lvlsideid)
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.RED);
                        }
                        else if (2 == avatar.spost_lvlsideid)
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.BULE);
                        }
                    }

                    else if (PlayerModel.getInstance().inCityWar&& avatar.spost_lvlsideid != 0)
                    {
                        if (avatar.spost_lvlsideid == PlayerModel.getInstance().lvlsideid)
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.BULE);
                        }
                        else
                        {
                            item.refresNameColor_spost(SPOSTNAME_TYPE.RED);
                        }
                    }
                    item.refresHitback(( int )avatar.hidbacktime);
                }
            }
            else
            {
                item.refreshTitle(avatar.title_id);
            }
        }
예제 #27
0
        public void show(INameObj avatar)
        {
            bool flag = this.dItem.ContainsKey(avatar);

            if (!flag)
            {
                bool           flag2 = this.lPool.Count == 0;
                PlayerNameItem playerNameItem;
                if (flag2)
                {
                    GameObject original   = Resources.Load("prefab/name_user") as GameObject;
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
                    gameObject.transform.SetParent(this.playerNameLayer, false);
                    playerNameItem = new PlayerNameItem(gameObject.transform);
                }
                else
                {
                    playerNameItem          = this.lPool[0];
                    playerNameItem.visiable = true;
                    this.lPool.RemoveAt(0);
                }
                playerNameItem.refresh(avatar);
                this.lItem.Add(playerNameItem);
                this.dItem[avatar] = playerNameItem;
                bool flag3 = avatar is MonsterRole;
                if (flag3)
                {
                    bool flag4 = ModelBase <A3_ActiveModel> .getInstance() != null;

                    if (flag4)
                    {
                        bool flag5 = ModelBase <A3_ActiveModel> .getInstance().mwlr_target_monId == 0 || (avatar as MonsterRole).monsterid != ModelBase <A3_ActiveModel> .getInstance().mwlr_target_monId;

                        if (flag5)
                        {
                            playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false);
                        }
                        else
                        {
                            playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(true);
                        }
                    }
                    else
                    {
                        playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false);
                    }
                }
                else
                {
                    playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false);
                }
                bool flag6 = avatar is MDC000;
                if (flag6)
                {
                    this.carObj = avatar;
                    playerNameItem.setHP(((float)(avatar.curhp / avatar.maxHp) * 100f).ToString(), false);
                    this.carItem = playerNameItem;
                    playerNameItem.refreshHp(avatar.curhp, avatar.maxHp, avatar);
                }
                else
                {
                    playerNameItem.cartxt.gameObject.SetActive(false);
                    playerNameItem.refreshHp(avatar.curhp, avatar.maxHp, null);
                }
                playerNameItem.refreicon();
                playerNameItem.refreshVipLv(0u);
                bool flag7 = avatar is ProfessionRole;
                if (flag7)
                {
                    bool isMain = (avatar as ProfessionRole).m_isMain;
                    if (isMain)
                    {
                        bool istitleActive = ModelBase <PlayerModel> .getInstance().istitleActive;

                        if (istitleActive)
                        {
                            playerNameItem.refreshTitle(a3_RankModel.now_id);
                        }
                        playerNameItem.refresNameColor(ModelBase <PlayerModel> .getInstance().now_nameState);
                        playerNameItem.refresHitback((int)ModelBase <PlayerModel> .getInstance().hitBack, false);
                        playerNameItem.refreshVipLv((uint)ModelBase <A3_VipModel> .getInstance().Level);
                    }
                    else
                    {
                        playerNameItem.refreshTitle(avatar.title_id);
                        playerNameItem.refresNameColor(avatar.rednm);
                        playerNameItem.refresHitback((int)avatar.hidbacktime, false);
                    }
                }
                else
                {
                    playerNameItem.refreshTitle(avatar.title_id);
                }
            }
        }