public static bool CanFinish(string item)
        {
            var    inv   = Player.m_localPlayer.GetInventory();
            int    count = OdinData.Data.SearchTaskList[item];
            string iname = Tweakers.GetItemData(item).m_shared.m_name;

            Debug.LogWarning(count);
            if (inv.CountItems(iname) >= count)
            {
                inv.RemoveItem(iname, count);
                var quest = QuestManager.instance.MyQuests[item];
                quest.Finish();
                OdinMunin.Reward(quest.Key, quest.Level);
                return(true);
            }
            return(false);
        }
Пример #2
0
        public override bool UseItem(Humanoid user, ItemDrop.ItemData item)
        {
            if (!IsQuestReady())
            {
                return(false);
            }
            var    inv   = Player.m_localPlayer.GetInventory();
            string iname = Tweakers.GetItemData(m_item).m_shared.m_name;
            int    count = Tweakers.GetItemData(m_item).m_shared.m_maxStackSize;

            if (inv.CountItems(iname) >= count)
            {
                inv.RemoveItem(iname, count);
                OdinData.AddCredits(30, true);
                Say("$op_human_thx");
                ResetQuestCD();
                return(true);
            }
            else
            {
                Say("$op_human_noteought");
                return(true);
            }
        }