public void ItemBuy(int itemname) { itemIndex = itemname; if (itemType == 0) { //sc.UnlockCode(list_food_S[itemIndex].m_code); capital.MinusMoney(list_food_S[itemIndex].m_price); ps.changer.ChangeFood(list_food_S[itemIndex].m_code, ps.gameObject, ps.food); } else if (itemType == 1) { if (itemIndex < list_weapon_S.Count) { sc.UnlockCode(list_weapon_S[itemIndex].m_code); capital.MinusMoney(list_weapon_S[itemIndex].m_price); } else { sc.UnlockCode(list_armor_S[itemIndex].m_code); capital.MinusMoney(list_armor_S[itemIndex].m_price); } } else { sc.UnlockCode(list_skill_S[itemIndex].m_code); capital.MinusCrystal(list_skill_S[itemIndex].m_price); } }
public void QuestMonsterCheck(MonsterCode monsterCode) //퀘스트 진행 상황 체크 { int i; for (i = 0; i < questAcessList.Count; i++) { QuestType questType = questAcessList[i].quest_type; switch (questType) { case QuestType.Type_Kill: if (questAcessList[i].questItemCur < questAcessList[i].questItemMax && questAcessList[i].questmonstercode == monsterCode) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } break; case QuestType.Tutorial: if (questAcessList[i].quest_code == 23) //&& questAcessList[i].questEquipment == 지금 장착한 장비) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } else if (questAcessList[i].quest_code == 23) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } else { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } case QuestType.Repeat: if (questAcessList[i].questItemCur < questAcessList[i].questItemMax) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } break; case QuestType.Gold_Collect: { questAcessList[i].questItemCur = capital.money; playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur = capital.money; } break; case QuestType.GetItem_Type_Kill: { if (sc.GetIsUnlocked(questAcessList[i].quest_reward_item) == false) { sc.UnlockCode(questAcessList[i].quest_reward_item); } if (questAcessList[i].questItemCur < questAcessList[i].questItemMax && ps.GetComponent <Base_Weapon>().m_code == questAcessList[i].quest_reward_item && questAcessList[i].questmonstercode == monsterCode) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } } break; } } //gameObject.transform.GetComponent<QuestUI>().QuestBoardSetting(); // 라우터 ( Quest item ) if (questAcessList.Count != 0) { networkRouter.PostRouter(PostType.PLAYER_QUEST_ITEM_UPDATE, playerQuestList[questAcessList[i - 1].quest_code]); } }
public void UnlockTest() { sc.UnlockCode(SpawnCode.W003); closetSlide1Script.ItemUnLock(); }
public void UnlockCode(SpawnCode code) { spawn.UnlockCode(code); }