Exemple #1
0
        public void OnPointerClick(PointerEventData eventData)
        {
            //将该书籍的真传和手抄属性进行切换
            int gongFaID = int.Parse(DateFile.instance.GetItemDate(_itemid, 32, false));
            int isPirate = int.Parse(DateFile.instance.GetItemDate(_itemid, 35, false));
            //int itemTrueID = int.Parse(DateFile.instance.GetItemDate(_itemid, 999, false));
            int newItemTrueID = GongFaDict.Get_GongFa_ID(gongFaID, 1 - isPirate);

            if (newItemTrueID == -1)
            {
                Main.Logger.Error("We fail to get the GongFa ID:" + _text.text);
            }
            else
            {
                // DateFile.instance.itemsDate[_itemid][999] = newItemTrueID.ToString();
                GameData.Items.SetItemProperty(_itemid, 999, newItemTrueID.ToString());
            }
            // DateFile.instance.ChangItemDate(_itemid, 999, newItemTrueID, true);

            DateFile.instance.GetItem(_actorid, _itemid, 1, false, 0, 0);
            // GameData.Items.GetItem(_itemid);

            Main.Logger.Log("We may complete the book switch.");

            // ActorMenu.instance.UpdateItemInformation(_itemid);
            //if (isPirate > 0)
            //    DateFile.instance.itemsDate[_itemid][999] = (itemTrueID - 200000).ToString();
            //else
            //    DateFile.instance.itemsDate[_itemid][999] = (itemTrueID + 200000).ToString();
        }
Exemple #2
0
        public void OnPointerClick(PointerEventData eventData)
        {
            //将该书籍的真传和手抄属性进行切换
            int gongFaID = int.Parse(DateFile.instance.GetItemDate(_itemid, 32, false));
            int isPirate = int.Parse(DateFile.instance.GetItemDate(_itemid, 35, false));
            //int itemTrueID = int.Parse(DateFile.instance.GetItemDate(_itemid, 999, false));
            int newItemTrueID = GongFaDict.Get_GongFa_ID(gongFaID, 1 - isPirate);

            if (newItemTrueID == -1)
            {
                Main.Logger.Error("We fail to get the GongFa ID:" + _text.text);
            }
            else
            {
                DateFile.instance.itemsDate[_itemid][999] = newItemTrueID.ToString();
            }

            //if (isPirate > 0)
            //    DateFile.instance.itemsDate[_itemid][999] = (itemTrueID - 200000).ToString();
            //else
            //    DateFile.instance.itemsDate[_itemid][999] = (itemTrueID + 200000).ToString();
        }