// Token: 0x0600045B RID: 1115 RVA: 0x0001F6E7 File Offset: 0x0001DAE7
 public NodePrefDataFormat(NodePrefDataFormat original)
 {
     this.id           = original.id;
     this.collectionId = original.collectionId;
     this.specialtyId  = original.specialtyId;
 }
Example #2
0
    // Token: 0x06000334 RID: 820 RVA: 0x00011578 File Offset: 0x0000F978
    public void getPrefTest()
    {
        if (this.pathNodeSelect)
        {
            return;
        }
        if (this.goalNodeId == -1)
        {
            this.setResultText("ノードが選択されていません");
            return;
        }
        NodeDataFormat     nodeDataFormat     = SuperGameMaster.sDataBase.get_NodeDB_forId(this.goalNodeId);
        NodeItemDataFormat nodeItemDataFormat = SuperGameMaster.sDataBase.get_NodeItemDB_forId(this.goalNodeId);

        object[] array = new object[6];
        array[0] = "ノード [";
        array[1] = nodeDataFormat.id;
        array[2] = "] Type:";
        int      num  = 3;
        NodeType type = nodeDataFormat.type;

        array[num] = type.ToString();
        array[4]   = " / Path:";
        array[5]   = nodeDataFormat.pathId;
        string text = string.Concat(array);

        text += " / ";
        text += "specialty:";
        string text2 = string.Empty;
        string text3 = "[";
        string text4 = "(";

        for (int i = 0; i < nodeItemDataFormat.specialtyId.Length; i++)
        {
            ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(nodeItemDataFormat.specialtyId[i]);
            text2 = text2 + itemDataFormat.id + ",";
            text3 = text3 + nodeItemDataFormat.specialtyPer[i] + "%,";
            text4 = text4 + itemDataFormat.name + ",";
        }
        if (nodeItemDataFormat.specialtyId.Length != 0)
        {
            text2 = text2.Remove(text2.Length - 1, 1);
            text3 = text3.Remove(text3.Length - 1, 1);
            text4 = text4.Remove(text4.Length - 1, 1);
        }
        text2 += " ";
        text3 += "] ";
        text4 += ") ";
        string text5 = text;

        text = string.Concat(new string[]
        {
            text5,
            text2,
            text3,
            text4,
            "\n"
        });
        NodePrefDataFormat nodePrefDataFormat = SuperGameMaster.sDataBase.get_NodePrefDB_forId(this.goalNodeId);

        if (nodePrefDataFormat != null)
        {
            text += "<color=orange>【県データ】";
            text += "ノード [";
            List <int> list_NodeDB_prefIds = SuperGameMaster.sDataBase.getList_NodeDB_prefIds(nodePrefDataFormat.id);
            foreach (int num2 in list_NodeDB_prefIds)
            {
                text = text + num2 + ",";
            }
            text  = text.Remove(text.Length - 1, 1);
            text += "]";
            text += " / ";
            if (nodePrefDataFormat.collectionId != -1)
            {
                CollectionDataFormat collectionDataFormat = SuperGameMaster.sDataBase.get_CollectDB_forId(nodePrefDataFormat.collectionId);
                text5 = text;
                text  = string.Concat(new object[]
                {
                    text5,
                    "collect:",
                    collectionDataFormat.id,
                    " (",
                    collectionDataFormat.name,
                    ") / "
                });
            }
            else
            {
                text += "collect:(なし) / ";
            }
            text += "specialty:";
            text2 = string.Empty;
            text4 = "(";
            for (int j = 0; j < nodePrefDataFormat.specialtyId.Length; j++)
            {
                ItemDataFormat itemDataFormat2 = SuperGameMaster.sDataBase.get_ItemDB_forId(nodePrefDataFormat.specialtyId[j]);
                text2 = text2 + itemDataFormat2.id + ",";
                text4 = text4 + itemDataFormat2.name + ",";
            }
            if (nodeItemDataFormat.specialtyId.Length != 0)
            {
                text2 = text2.Remove(text2.Length - 1, 1);
                text4 = text4.Remove(text4.Length - 1, 1);
            }
            text2 += " ";
            text4 += ") ";
            text   = text + text2 + text4 + "\n";
            text  += "</color>";
        }
        this.setResultText(text);
    }
Example #3
0
    // Token: 0x060003B1 RID: 945 RVA: 0x00016228 File Offset: 0x00014628
    public void CreateResult(bool success, int _evtId, List <int> itemList, int goalNodeId)
    {
        this.evtId = _evtId;
        this.numBase_Clover.createNumObj(itemList[0], this.numBase_Clover.GetComponent <NumObjCreater>().prefub.transform.localPosition, (int)this.numBase_Clover.GetComponent <NumObjCreater>().prefub.transform.GetComponent <RectTransform>().sizeDelta.x);
        this.numBase_Ticket.createNumObj(itemList[1], this.numBase_Ticket.GetComponent <NumObjCreater>().prefub.transform.localPosition, (int)this.numBase_Ticket.GetComponent <NumObjCreater>().prefub.transform.GetComponent <RectTransform>().sizeDelta.x);
        itemList.RemoveAt(0);
        itemList.RemoveAt(0);
        if (!success)
        {
            this.MainUI.SetActive(false);
            this.SubUI.SetActive(true);
            return;
        }
        this.MainUI.SetActive(true);
        this.SubUI.SetActive(false);
        int num = itemList.FindIndex((int val) => val > 10000);

        if (num != -1)
        {
            CollectionDataFormat collectionDataFormat = SuperGameMaster.sDataBase.get_CollectDB_forId(itemList[num] - 10000);
            if (collectionDataFormat != null)
            {
                this.CollectionImage.GetComponent <Image>().sprite = collectionDataFormat.img;
            }
        }
        else
        {
            NodeDataFormat     nodeDataFormat     = SuperGameMaster.sDataBase.get_NodeDB_forId(goalNodeId);
            NodePrefDataFormat nodePrefDataFormat = SuperGameMaster.sDataBase.get_NodePrefDB_forId(nodeDataFormat.pathId);
            if (nodePrefDataFormat.collectionId == -1)
            {
                this.CollectionResultPanel.SetActive(false);
            }
            else if (SuperGameMaster.FindCollection(nodePrefDataFormat.collectionId))
            {
                CollectionDataFormat collectionDataFormat2 = SuperGameMaster.sDataBase.get_CollectDB_forId(nodePrefDataFormat.collectionId);
                if (collectionDataFormat2 != null)
                {
                    this.CollectionImage.GetComponent <Image>().sprite = collectionDataFormat2.img;
                    this.CompleteStampImage.SetActive(true);
                }
            }
            else
            {
                this.CollectionImage.GetComponent <Image>().sprite            = this.QuestionImg;
                this.CollectionImage.GetComponent <RectTransform>().sizeDelta = new Vector2(this.QuestionImg.rect.width, this.QuestionImg.rect.height);
            }
        }
        for (int i = 0; i < this.SpecialtyMax * 2; i += 2)
        {
            if (i >= itemList.Count)
            {
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.itemPref);
                gameObject.transform.SetParent(this.SpecialtyImagePanel.GetComponent <RectTransform>(), false);
            }
            else
            {
                int num2 = itemList[i];
                int num3 = itemList[i + 1];
                if (num2 >= 10000)
                {
                    itemList.RemoveAt(i);
                    itemList.RemoveAt(i);
                    i -= 2;
                }
                else
                {
                    GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.itemPref);
                    gameObject2.transform.SetParent(this.SpecialtyImagePanel.GetComponent <RectTransform>(), false);
                    ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(num2);
                    if (itemDataFormat != null)
                    {
                        gameObject2.GetComponent <Image>().enabled = true;
                        gameObject2.transform.GetChild(0).GetComponentInChildren <Image>().sprite = itemDataFormat.img;
                        if (num3 > 1)
                        {
                            gameObject2.transform.GetChild(1).gameObject.SetActive(true);
                            gameObject2.GetComponentInChildren <Text>().text = "x" + num3;
                            if (SuperGameMaster.FindItemStock(num2) + num3 > 99)
                            {
                                gameObject2.GetComponentInChildren <Text>().color = new Color(1f, 0f, 0f);
                            }
                        }
                    }
                }
            }
        }
    }