private XDict <int, WildSceneMonsterInfo> GetMonsterDataBySceneId() { this.wildMonsterInfo.Clear(); int curSceneID = MySceneManager.Instance.CurSceneID; List <YeWaiGuaiWu> dataList = DataReader <YeWaiGuaiWu> .DataList; int num = 0; for (int i = 0; i < dataList.get_Count(); i++) { if (curSceneID == dataList.get_Item(i).sceneId) { MonsterRefresh monsterRefresh = DataReader <MonsterRefresh> .Get(dataList.get_Item(i).monsterRefreshId); if (monsterRefresh != null) { Monster monster = DataReader <Monster> .Get(monsterRefresh.monster); this.wildMonsterInfo.Add(num, new WildSceneMonsterInfo { sceneId = curSceneID, monsterRefreshId = dataList.get_Item(i).monsterRefreshId, bornPoint = monsterRefresh.bornPoint, num = monsterRefresh.num, aiId = monsterRefresh.aiId, id = monsterRefresh.monster, name = monster.name, model = monster.model }); num++; } } } return(this.wildMonsterInfo); }
public void BubbleDialogueTriggerNPCBorn(MonsterRefresh dataMR, long uuid) { if (!SystemConfig.IsBillboardOn) { return; } if (uuid > 0L && BillboardManager.Instance.IsBillboardInfoOff(uuid, BillboardManager.BillboardInfoOffOption.BubbleDialogue)) { return; } this.BubbleDialogueByuuid(uuid, dataMR, 1); }
public void BubbleDialogueByuuid(long uuid, MonsterRefresh dataMR, int bubbleType2Key) { if (dataMR == null) { return; } if (uuid <= 0L) { return; } if (uuid > 0L && BillboardManager.Instance.IsBillboardInfoOff(uuid, BillboardManager.BillboardInfoOffOption.BubbleDialogue)) { return; } EntityMonster entity = EntityWorld.Instance.GetEntity <EntityMonster>(uuid); if (entity != null) { AvatarModel avatarModel = DataReader <AvatarModel> .Get(entity.FixModelID); if (avatarModel != null) { List <int> list = new List <int>(); List <int> list2 = new List <int>(); for (int i = 0; i < dataMR.dialogueNpc.get_Count(); i++) { if (dataMR.dialogueNpc.get_Item(i).key == bubbleType2Key) { string[] array = dataMR.dialogueNpc.get_Item(i).value.Split(",".ToCharArray()); if (array != null) { for (int j = 0; j < array.Length; j++) { list.Add(Convert.ToInt32(array[j])); } } break; } } for (int k = 0; k < dataMR.dialogueLastTime.get_Count(); k++) { if (dataMR.dialogueLastTime.get_Item(k).key == bubbleType2Key) { string[] array2 = dataMR.dialogueLastTime.get_Item(k).value.Split(",".ToCharArray()); if (array2 != null) { for (int l = 0; l < array2.Length; l++) { list2.Add(Convert.ToInt32(array2[l])); } } break; } } if (list.get_Count() > 0 && list2.get_Count() > 0) { this.AddBubbleDialogue(entity.Actor.FixTransform, (float)avatarModel.height_HP, uuid); this.SetContentsBySequence(uuid, list, list2, 0); } } } }