protected virtual void GetDeliveryList() { deliveryInfo = MonoBehaviourSingleton <DeliveryManager> .I.GetDeliveryList(true); List <Delivery> list = new List <Delivery>(); int i = 0; for (int num = deliveryInfo.Length; i < num; i++) { Delivery delivery = deliveryInfo[i]; DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)delivery.dId); if (deliveryTableData == null) { Log.Warning("DeliveryTable Not Found : dId " + delivery.dId); } else if (IsVisibleDelivery(delivery, deliveryTableData)) { NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData((int)deliveryTableData.npcID); if (nPCData == null) { Log.Error("DeliveryTable NPC ID Found : dId " + delivery.dId + " : npcID " + deliveryTableData.npcID); } else { list.Add(deliveryInfo[i]); } } } deliveryInfo = list.ToArray(); List <Delivery> list2 = new List <Delivery>(); List <Delivery> list3 = new List <Delivery>(); List <Delivery> list4 = new List <Delivery>(); Delivery[] array = deliveryInfo; foreach (Delivery delivery2 in array) { switch (delivery2.type) { case 0: list3.Add(delivery2); break; case 10: list4.Add(delivery2); break; default: list2.Add(delivery2); break; } } normalDeliveryInfo = list2.ToArray(); dailyDeliveryInfo = list3.ToArray(); weeklyDeliveryInfo = list4.ToArray(); }
private IEnumerator DoInitialize() { LoadingQueue loadingQueue = new LoadingQueue(this); LoadObject lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "SmithEquipDirection", false); int wait2 = 0; wait2++; NPCTable.NPCData npcData4 = Singleton <NPCTable> .I.GetNPCData(4); GameObject npcRoot4 = new GameObject("NPC"); npcData4.LoadModel(npcRoot4, false, true, delegate { ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_0093: stateMachine*/)._003Cwait_003E__2--; }, false); GameObject npcRoot3 = null; if (this is SmithAbilityChangePerformance || this is SmithAbilityItemPerformance) { wait2++; NPCTable.NPCData npcData3 = Singleton <NPCTable> .I.GetNPCData(3); npcRoot3 = new GameObject("NPC003"); npcData3.LoadModel(npcRoot3, false, true, delegate { ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_011c: stateMachine*/)._003Cwait_003E__2--; }, false); } int[] seIds2 = (int[])Enum.GetValues(typeof(SmithEquipDirector.AUDIO)); int[] array = seIds2; foreach (int seId in array) { loadingQueue.CacheSE(seId, null); } seIds2 = (int[])Enum.GetValues(typeof(EquipResultBase.AUDIO)); int[] array2 = seIds2; foreach (int seId2 in array2) { loadingQueue.CacheSE(seId2, null); } yield return((object)loadingQueue.Wait()); while (wait2 > 0) { yield return((object)null); } Object directionObject = lo_direction.loadedObject; Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1); director = directionTransform.GetComponent <SmithEquipDirector>(); director.SetNPC004(npcRoot4); director.SetNPC003(npcRoot3); base.Initialize(); }
protected virtual void UpdateNPC(string map_name, string enemy_name) { NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData((int)info.npcID); SetNPCIcon(baseRoot, UI.TEX_NPC, nPCData.npcModelID, isComplete); SetLabelText(baseRoot, UI.LBL_PERSON_NAME, nPCData.displayName); string text = (!isComplete) ? info.npcComment : info.npcClearComment; text = text.Replace("{MAP_NAME}", map_name); text = text.Replace("{USER_NAME}", MonoBehaviourSingleton <UserInfoManager> .I.userInfo.name); text = text.Replace("{ENEMY_NAME}", enemy_name); SetLabelText(baseRoot, UI.LBL_CHARA_MESSAGE, text); }
private void LoadModel() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown DeleteModel(); targetTex = UI.TEX_NPC; InitRenderTexture(targetTex, 45f, false); model = Utility.CreateGameObject("NPC", GetRenderTextureModelTransform(targetTex), GetRenderTextureLayer(targetTex)); npcData = Singleton <NPCTable> .I.GetNPCData(message.npc); isLoading = true; npcData.LoadModel(model.get_gameObject(), false, false, OnModelLoadComplete, false); }
private void CompleteStoryNPCLoading(NPCTable.NPCData npc_data) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) PLCA default_anim = PlayerAnimCtrl.StringToEnum(npc_data.anim); model.set_localPosition(new Vector3(0f, -1.5f, 1.5f)); model.set_localEulerAngles(new Vector3(0f, 180f, 0f)); PlayerAnimCtrl.Get(loader.animator, default_anim, null, null, null); EnableRenderTexture(UI.TEX_ENEMY); SetActive((Enum)UI.OBJ_LOADING, false); GetCtrl(UI.SPR_LOAD_ROTATE_CIRCLE).set_localRotation(Quaternion.get_identity()); loadComplete = true; }
public static StoryCharacter Initialize(int id, UITexture ui_tex, string _name, string _dir, string idle_anim) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData(_name); if (nPCData == null) { return(null); } UIRenderTexture uIRenderTexture = UIRenderTexture.Get(ui_tex, -1f, true, -1); uIRenderTexture.Disable(); uIRenderTexture.nearClipPlane = 1f; uIRenderTexture.farClipPlane = 100f; Transform val = Utility.CreateGameObject("StoryModel", uIRenderTexture.modelTransform, uIRenderTexture.renderLayer); StoryCharacter storyCharacter = val.get_gameObject().AddComponent <StoryCharacter>(); storyCharacter.model = val; storyCharacter.id = id; storyCharacter.renderTex = uIRenderTexture; storyCharacter.uiTex = ui_tex; storyCharacter.charaName = _name; storyCharacter.aliasName = string.Empty; storyCharacter.SetStandPosition(_dir, false); if (string.IsNullOrEmpty(idle_anim)) { storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(nPCData.anim); } else { storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(idle_anim); } storyCharacter.isLoading = true; ModelLoaderBase modelLoaderBase = nPCData.LoadModel(val.get_gameObject(), false, false, storyCharacter.OnModelLoadComplete, false); storyCharacter.npcLoader = (modelLoaderBase as NPCLoader); storyCharacter.CollectTween(ui_tex.get_transform()); return(storyCharacter); }
public void Clear() { if (uiRenderTexture != null) { uiRenderTexture.Release(); Object.Destroy(uiRenderTexture); uiRenderTexture = null; } DeleteModel(); playerLoadInfo = null; npcData = null; equipItemID = -1; skillItemID = -1; skillSymbolItemID = -1; itemID = -1; enemyID = -1; foundationName = null; uiTexture = null; referenceSexID = -1; referenceFaceID = -1; }
protected override void GetDeliveryList() { deliveryInfo = MonoBehaviourSingleton <DeliveryManager> .I.GetDeliveryList(true); int groupId = regionData.groupId; uint regionId = regionData.regionId; List <Delivery> list = new List <Delivery>(); int i = 0; for (int num = deliveryInfo.Length; i < num; i++) { Delivery delivery = deliveryInfo[i]; DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)delivery.dId); if (deliveryTableData == null) { Log.Warning("DeliveryTable Not Found : dId " + delivery.dId); } else if (!deliveryTableData.IsEvent()) { NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData((int)deliveryTableData.npcID); if (nPCData == null) { Log.Error("DeliveryTable NPC ID Found : dId " + delivery.dId + " : npcID " + deliveryTableData.npcID); } else if (deliveryTableData.regionId == regionId) { list.Add(delivery); } else if (groupId > 0 && deliveryTableData.regionId == groupId) { list.Add(delivery); } } } deliveryInfo = list.ToArray(); }
public void InitNPC(UITexture ui_tex, int npc_id, Vector3 pos, Vector3 rot, float fov, Action <NPCLoader> onload_callback) { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (!(npcLoader != null) || !npcLoader.isLoading) { NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData(npc_id); if (nPCData != null && nPCData != npcData) { Init(ui_tex, (fov == -1f) ? 10f : fov, LOADER_TYPE.NPC); if (uiRenderTexture != null && uiRenderTexture.nearClipPlane == -1f && ((fov >= 40f && pos.z > 13f) || (fov < 40f && pos.z > 5f))) { uiRenderTexture.nearClipPlane = pos.z - 5f; } npcData = nPCData; modelPos = pos; modelRot = rot; cameraFOV = fov; onNPCLoadFinishedCallBack = onload_callback; int num = (nPCData.specialModelID <= 0) ? nPCData.npcModelID : nPCData.specialModelID; HomeThemeTable.HomeThemeData homeThemeData = Singleton <HomeThemeTable> .I.GetHomeThemeData(Singleton <HomeThemeTable> .I.CurrentHomeTheme); int num2 = -1; if (homeThemeData != null) { num2 = Singleton <HomeThemeTable> .I.GetNpcModelID(homeThemeData, nPCData.id); } num = ((num2 <= 0) ? num : num2); npcLoader.Load(num, modelLayer, false, false, SHADER_TYPE.UI, OnNPCLoadFinished); LoadStart(); } } }
private IEnumerator DoInitialize() { SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo; magiLoader = new GameObject("magimodel").AddComponent <ItemLoader>(); int wait3 = 1; magiLoader.LoadSkillItem(skillItemInfo.tableID, magiLoader.get_transform(), magiLoader.get_gameObject().get_layer(), delegate { //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003C_003Ef__this.magiLoader.nodeMain.get_gameObject().SetActive(false); ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003Cwait_003E__1--; }); wait3++; magiSymbolLoader = new GameObject("magisymbol").AddComponent <ItemLoader>(); magiSymbolLoader.LoadSkillItemSymbol(skillItemInfo.tableID, magiSymbolLoader.get_transform(), magiSymbolLoader.get_gameObject().get_layer(), delegate { //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003C_003Ef__this.magiSymbolLoader.nodeMain.get_gameObject().SetActive(false); ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003Cwait_003E__1--; }); LoadingQueue loadingQueue = new LoadingQueue(this); LoadObject lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "GrowSkillDirection", false); LoadObject[] materialLoadObjects = new LoadObject[materials.Length]; for (int j = 0; j < materials.Length; j++) { SkillItemTable.SkillItemData data = Singleton <SkillItemTable> .I.GetSkillItemData(materials[j].tableID); materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(data.modelID), false); } wait3++; NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3); GameObject npcRoot = new GameObject("NPC"); npcData.LoadModel(npcRoot, false, true, delegate { ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0224: stateMachine*/)._003Cwait_003E__1--; }, false); CacheAudio(loadingQueue); yield return((object)loadingQueue.Wait()); while (wait3 > 0) { yield return((object)null); } Object directionObject = lo_direction.loadedObject; Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1); GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length]; for (int i = 0; i < materials.Length; i++) { SkillItemTable.SkillItemData data2 = Singleton <SkillItemTable> .I.GetSkillItemData(materials[i].tableID); Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1); PlayerLoader.SetEquipColor(item, data2.modelColor.ToColor()); materialObjects[i] = item.get_gameObject(); } magiLoader.nodeMain.get_gameObject().SetActive(true); magiSymbolLoader.nodeMain.get_gameObject().SetActive(true); SkillGrowDirector d = directionTransform.GetComponent <SkillGrowDirector>(); d.Init(); d.SetNPC(npcRoot); d.SetMagiModel(magiLoader.get_gameObject(), magiSymbolLoader.get_gameObject(), materialObjects); d.SetMaterials(materials); director = d; base.Initialize(); }
public Player CreateNonPlayer(int id, CreatePlayerInfo.ExtentionInfo extention_info, Vector3 pos, float dir, PlayerTransferInfo transfer_info = null, PlayerLoader.OnCompleteLoad callback = null) { //IL_0237: Unknown result type (might be due to invalid IL or missing references) CreatePlayerInfo createPlayerInfo = new CreatePlayerInfo(); createPlayerInfo.charaInfo = new CharaInfo(); bool flag = QuestManager.IsValidInGame() && MonoBehaviourSingleton <QuestManager> .I.GetVorgonQuestType() != QuestManager.VorgonQuetType.NONE; bool flag2 = false; if (extention_info != null) { createPlayerInfo.extentionInfo = extention_info; } else { createPlayerInfo.extentionInfo = new CreatePlayerInfo.ExtentionInfo(); flag2 = true; } NPCTable.NPCData nPCData = null; if (flag2) { List <int> list = new List <int>(); int i = 0; for (int count = nonplayerList.Count; i < count; i++) { NonPlayer nonPlayer = nonplayerList[i] as NonPlayer; if (nonPlayer != null) { list.Add(nonPlayer.npcId); } } nPCData = Singleton <NPCTable> .I.GetNPCDataRandom(NPCTable.NPC_TYPE.FIGURE, list); if (nPCData != null) { createPlayerInfo.extentionInfo.npcDataID = nPCData.id; } } else { nPCData = Singleton <NPCTable> .I.GetNPCData(createPlayerInfo.extentionInfo.npcDataID); } if (flag) { int npc_id = VorgonPreEventController.NPC_ID_LIST[id % 3]; nPCData = Singleton <NPCTable> .I.GetNPCData(npc_id); } if (nPCData == null) { return(null); } nPCData.CopyCharaInfo(createPlayerInfo.charaInfo); NpcLevelTable.NpcLevelData npcLevelData = null; if (flag2) { int lv = 1; if (QuestManager.IsValidInGame() && MonoBehaviourSingleton <QuestManager> .I.GetCurrentQuestEnemyID() > 0) { lv = MonoBehaviourSingleton <QuestManager> .I.GetCurrentQuestEnemyLv(); } if (flag) { lv = 80; } npcLevelData = Singleton <NpcLevelTable> .I.GetNpcLevelRandom((uint)lv); if (npcLevelData != null) { createPlayerInfo.extentionInfo.npcLv = (int)npcLevelData.lv; createPlayerInfo.extentionInfo.npcLvIndex = npcLevelData.lvIndex; } } else { npcLevelData = Singleton <NpcLevelTable> .I.GetNpcLevel((uint)createPlayerInfo.extentionInfo.npcLv, createPlayerInfo.extentionInfo.npcLvIndex); } if (npcLevelData == null) { return(null); } npcLevelData.CopyHomeCharaInfo(createPlayerInfo.charaInfo, (!flag2) ? null : createPlayerInfo.extentionInfo); if (flag) { for (int j = 0; j < createPlayerInfo.charaInfo.equipSet.Count; j++) { createPlayerInfo.charaInfo.equipSet[j].eId = VorgonPreEventController.NPC_WEAPON_ID_LIST[id % 3]; } } return(CreatePlayer(id, createPlayerInfo, false, pos, dir, transfer_info, callback)); }
public void SetNPCData(NPCTable.NPCData data) { npcData = data; }
protected virtual void SetIcon(Transform t, DeliveryTable.DeliveryData info) { NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData((int)info.npcID); SetNPCIcon(t, UI.TEX_NPC, nPCData.npcModelID, false); }
private void ReloadModel() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (model == null) { if (playerLoadInfo != null) { PlayerLoadInfo info = playerLoadInfo; playerLoadInfo = null; InitPlayer(uiTexture, info, playerAnimID, modelPos, modelRot, isPriorityVisualEquip, onPlayerLoadFinishedCallBack); } else if (npcData != null) { NPCTable.NPCData nPCData = npcData; npcData = null; InitNPC(uiTexture, nPCData.id, modelPos, modelRot, cameraFOV, onNPCLoadFinishedCallBack); } else if (equipItemID != -1) { InitEquip(uiTexture, (uint)equipItemID, referenceSexID, referenceFaceID, uiModelScale); } else if (itemID != -1) { InitItem(uiTexture, (uint)itemID, true); } else if (skillItemID != -1) { InitSkillItem(uiTexture, (uint)skillItemID, true, false, 35f); } else if (skillSymbolItemID != -1) { InitSkillItemSymbol(uiTexture, (uint)skillSymbolItemID, true, 13f); } else if (enemyID != -1) { InitEnemy(uiTexture, (uint)enemyID, foundationName, targetScene, null, ENEMY_MOVE_TYPE.DEFULT, true); } } else if (equipItemID != -1) { if (itemLoader != null && !itemLoader.IsLoading()) { OnLoadFinished(); } } else if (itemID != -1) { if (itemLoader != null && !itemLoader.IsLoading()) { OnLoadFinished(); } } else if (skillItemID != -1) { if (itemLoader != null && !itemLoader.IsLoading()) { OnLoadFinished(); } } else if (skillSymbolItemID != -1) { if (itemLoader != null && !itemLoader.IsLoading()) { OnLoadFinished(); } } else if (enemyID == -1) { return; } }
private IEnumerator TEst() { this.get_gameObject().AddComponent <ResourceManager>(); SkillItemInfo s = new SkillItemInfo(); s.tableData = new SkillItemTable.SkillItemData(); s.tableData.type = SKILL_SLOT_TYPE.ATTACK; s.tableData.modelID = 1; SetMaterials(new List <SkillItemInfo> { s, s, s, s, s }.ToArray()); LoadingQueue loadingQueue = new LoadingQueue(this); LoadObject lo = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(tmpid), false); LoadObject lo_symbol = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetItemModel(80000001), false); LoadObject[] materialLoadObjects = new LoadObject[materials.Length]; for (int j = 0; j < materials.Length; j++) { materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(Random.Range(1, 5)), false); } LoadObject npcTableLoadObject = loadingQueue.Load(RESOURCE_CATEGORY.TABLE, "NPCTable", false); yield return((object)loadingQueue.Wait()); TextAsset tableCSV = npcTableLoadObject.loadedObject as TextAsset; if (!Singleton <NPCTable> .IsValid()) { Singleton <NPCTable> .Create(); Singleton <NPCTable> .I.CreateTable(tableCSV.get_text()); } bool wait = true; NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3); npcData.LoadModel(npcParent.get_gameObject(), false, true, delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown ((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003C_003Ef__this.SetNPC(((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003C_003Ef__this.npcParent.get_gameObject()); ((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003Cwait_003E__9 = false; }, false); GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length]; for (int i = 0; i < materials.Length; i++) { Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1); materialObjects[i] = item.get_gameObject(); } Transform magi = ResourceUtility.Realizes(lo.loadedObject, -1); Transform magiSymbol = ResourceUtility.Realizes(lo_symbol.loadedObject, -1); SetMagiModel(magi.get_gameObject(), magiSymbol.get_gameObject(), materialObjects); while (wait) { yield return((object)null); } yield return((object)new WaitForSeconds(0.2f)); StartDirection(delegate { }); }