Пример #1
0
        private void SetupNameText(MonsterActor monsterActor)
        {
            base.transform.Find("NameText").gameObject.SetActive(true);
            string str = string.Empty;

            if (monsterActor.uniqueMonsterID > 0)
            {
                UniqueMonsterMetaData uniqueMonsterMetaData = MonsterData.GetUniqueMonsterMetaData(monsterActor.uniqueMonsterID);
                str = (uniqueMonsterMetaData != null) ? LocalizationGeneralLogic.GetText(uniqueMonsterMetaData.name, new object[0]) : monsterActor.uniqueMonsterID.ToString();
            }
            else
            {
                MonsterUIMetaData monsterUIMetaDataByName = MonsterUIMetaDataReaderExtend.GetMonsterUIMetaDataByName(monsterActor.metaConfig.subTypeName);
                str = (monsterUIMetaDataByName != null) ? LocalizationGeneralLogic.GetText(monsterUIMetaDataByName.displayTitle, new object[0]) : monsterActor.metaConfig.subTypeName;
            }
            base.transform.Find("NameText").GetComponent <Text>().text = str;
        }
Пример #2
0
        private bool ListenKill(EvtKilled evt)
        {
            if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 4)
            {
                BaseMonoAvatar avatar = Singleton <AvatarManager> .Instance.TryGetAvatarByRuntimeID(evt.killerID);

                if (avatar == null)
                {
                    return(true);
                }
                Singleton <MissionModule> .Instance.TryToUpdateKillAnyEnemy();

                MonsterActor actor = (MonsterActor)Singleton <EventManager> .Instance.GetActor(evt.targetID);

                if (actor != null)
                {
                    if (actor.uniqueMonsterID != 0)
                    {
                        Singleton <MissionModule> .Instance.TryToUpdateKillUniqueMonsterMission(actor.uniqueMonsterID);
                    }
                    else
                    {
                        int monsterID = MonsterUIMetaDataReaderExtend.GetMonsterUIMetaDataByName(actor.metaConfig.subTypeName).monsterID;
                        Singleton <MissionModule> .Instance.TryToUpdateKillMonsterMission(monsterID);
                    }
                    Singleton <MissionModule> .Instance.TryToUpdateKillMonsterWithCategoryName(actor.metaConfig.categoryName);
                }
                ConfigAvatarAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(avatar.config, evt.killerAnimEventID);
                if (((event2 != null) && (event2.AttackProperty != null)) && (event2.AttackProperty.CategoryTag != null))
                {
                    AttackResult.AttackCategoryTag[] categoryTag = event2.AttackProperty.CategoryTag;
                    if (categoryTag.Length > 0)
                    {
                        Singleton <MissionModule> .Instance.TryToUpdateKillByAttackCategoryTag(categoryTag);
                    }
                }
            }
            return(true);
        }