Esempio n. 1
0
 public void AddKillInfo(KillDetailInfo info)
 {
     if (!MonoSingleton <Reconnection> .instance.isProcessingRelayRecover)
     {
         this.AddKillInfo(KillNotifyUT.Convert_DetailInfo_KillInfo(info));
     }
 }
Esempio n. 2
0
        public void AddKillInfo(KillDetailInfo info)
        {
            if (MonoSingleton <Reconnection> .get_instance().isProcessingRelayRecover)
            {
                return;
            }
            KillInfo killInfo = KillNotifyUT.Convert_DetailInfo_KillInfo(info);

            this.AddKillInfo(ref killInfo);
        }
        private void InitHeroPanelHeroInfo(uint uiObjId, Transform trHeroPanel, CHostHeroDamage objHostHeroDamage)
        {
            if (trHeroPanel == null || objHostHeroDamage == null)
            {
                return;
            }
            Transform transform = trHeroPanel.FindChild("PanelTop");

            if (transform)
            {
                int          num          = 0;
                string       text         = null;
                string       text2        = null;
                byte         b            = 0;
                byte         b2           = 0;
                ActorTypeDef actorTypeDef = ActorTypeDef.Invalid;
                if (objHostHeroDamage.GetDamageActorInfo(uiObjId, ref text, ref text2, ref actorTypeDef, ref num, ref b, ref b2))
                {
                    Transform transform2 = transform.FindChild("Imghead");
                    if (transform2)
                    {
                        Transform transform3 = transform2.FindChild("head");
                        if (transform3)
                        {
                            Image component = transform3.GetComponent <Image>();
                            if (component)
                            {
                                string prefabPath;
                                if (actorTypeDef == ActorTypeDef.Actor_Type_Hero)
                                {
                                    string heroSkinPic = CSkinInfo.GetHeroSkinPic((uint)num, 0u);
                                    prefabPath = CUIUtility.s_Sprite_Dynamic_Icon_Dir + heroSkinPic;
                                }
                                else if (actorTypeDef == ActorTypeDef.Actor_Type_Organ)
                                {
                                    prefabPath = KillNotifyUT.Convert_DetailInfo_KillInfo(new KillDetailInfo
                                    {
                                        Killer = Singleton <GameObjMgr> .instance.GetActor(uiObjId)
                                    }).KillerImgSrc;
                                }
                                else if (actorTypeDef == ActorTypeDef.Actor_Type_Monster)
                                {
                                    ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(num);
                                    if (dataCfgInfoByCurLevelDiff != null && !string.IsNullOrEmpty(dataCfgInfoByCurLevelDiff.szBossIcon))
                                    {
                                        prefabPath = dataCfgInfoByCurLevelDiff.szBossIcon;
                                    }
                                    else if (b2 == 1)
                                    {
                                        prefabPath = KillNotify.monster_icon;
                                    }
                                    else if (b == 7)
                                    {
                                        prefabPath = CHostHeroDeadInfo.m_dragon_icon_3v3;
                                    }
                                    else if (b == 9)
                                    {
                                        prefabPath = KillNotify.dragon_icon;
                                    }
                                    else if (b == 8)
                                    {
                                        prefabPath = CHostHeroDeadInfo.m_strDragonBig;
                                    }
                                    else
                                    {
                                        prefabPath = KillNotify.yeguai_icon;
                                    }
                                }
                                else
                                {
                                    prefabPath = KillNotify.monster_icon;
                                }
                                component.SetSprite(prefabPath, this.m_heroDeadInfoForm, true, false, false, false);
                            }
                        }
                    }
                    Transform transform4 = transform.FindChild("heroName");
                    if (transform4)
                    {
                        Text component2 = transform4.GetComponent <Text>();
                        if (component2)
                        {
                            string text3 = text;
                            if (!string.IsNullOrEmpty(text3))
                            {
                                int    num2  = text3.IndexOf('(');
                                string text4 = text3.Substring(num2 + 1, text3.get_Length() - num2 - 2);
                                component2.set_text(text4);
                            }
                        }
                    }
                    Transform transform5 = transform.FindChild("playerName");
                    if (transform5)
                    {
                        Text component3 = transform5.GetComponent <Text>();
                        if (component3)
                        {
                            if (!string.IsNullOrEmpty(text2))
                            {
                                component3.set_text(text2);
                                transform5.gameObject.CustomSetActive(true);
                            }
                            else
                            {
                                transform5.gameObject.CustomSetActive(false);
                            }
                        }
                    }
                }
            }
        }