Пример #1
0
    public void SetSelectedCharChg(MonsterData monsterData)
    {
        GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = monsterData.GetChipEquip().GetSlotStatus();
        int num = 0;

        if (slotStatus == null)
        {
            this.myMaxChipSlot = 0;
            this.SetNumber(0, this.myMaxChipSlot);
            if (this.chipCells != null)
            {
                for (int i = 0; i < this.chipCells.Length; i++)
                {
                    NGUITools.SetActiveSelf(this.chipCells[i].gameObject, false);
                }
            }
            this.SetNoChipMessage(true);
        }
        else
        {
            this.myMaxChipSlot = slotStatus.maxSlotNum + slotStatus.maxExtraSlotNum;
            if (this.myMaxChipSlot != 5 && this.myMaxChipSlot != 10)
            {
                global::Debug.LogErrorFormat("スロット数がありえない. myMaxChipSlot:{0} [{1}, {2}]", new object[]
                {
                    this.myMaxChipSlot,
                    slotStatus.maxSlotNum,
                    slotStatus.maxExtraSlotNum
                });
                this.myMaxChipSlot = 10;
            }
            if (monsterData.GetSlotEquip() != null)
            {
                num = monsterData.GetSlotEquip().Length;
            }
            this.SetNoChipMessage(num == 0);
            this.SetupChipCells(monsterData.GetSlotEquip());
            this.SetupChipSlotsAndCells();
            this.SetNumber(num, this.myMaxChipSlot);
            this.SetupChipIcons(num, monsterData.GetChipEquip().GetSlotStatus());
        }
    }