Esempio n. 1
0
    public void SettingEquipSetInfo()
    {
        if (localEquipSet == null)
        {
            localEquipSet = MonoBehaviourSingleton <StatusManager> .I.GetLocalEquipSet();

            equipSetNo = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.eSetNo;
            MonoBehaviourSingleton <StatusManager> .I.SetLocalEquipSetNo(equipSetNo);
        }
        if (visualEquip == null)
        {
            visualEquip = MonoBehaviourSingleton <StatusManager> .I.GetLocalVisualEquip();
        }
    }
    private void OnCloseDialog()
    {
        //IL_0203: Unknown result type (might be due to invalid IL or missing references)
        object eventData = GameSection.GetEventData();
        bool   flag      = false;

        if (eventData is StatusEquip.ChangeEquipData)
        {
            StatusEquip.ChangeEquipData changeEquipData = eventData as StatusEquip.ChangeEquipData;
            flag = (changeEquipData.item != localEquipSets[changeEquipData.setNo].item[changeEquipData.index]);
            if (showEquipMode)
            {
                localEquipSets[changeEquipData.setNo].item[changeEquipData.index] = changeEquipData.item;
                MonoBehaviourSingleton <StatusManager> .I.ReplaceEquipItem(localEquipSets[changeEquipData.setNo], changeEquipData.setNo, changeEquipData.index);
            }
            else
            {
                StatusManager.LocalVisual localVisualEquip = MonoBehaviourSingleton <StatusManager> .I.GetLocalVisualEquip();

                int   index = changeEquipData.index;
                ulong num   = (localVisualEquip.visualItem[index] == null) ? 0 : localVisualEquip.visualItem[index].uniqueID;
                localVisualEquip.visualItem[index] = changeEquipData.item;
                ulong num2 = (localVisualEquip.visualItem[index] == null) ? 0 : localVisualEquip.visualItem[index].uniqueID;
            }
            if (flag)
            {
                localEquipSet = localEquipSets[changeEquipData.setNo];
            }
        }
        else if (eventData is StatusEquip.ChangeEquipData[])
        {
            StatusEquip.ChangeEquipData[] array = eventData as StatusEquip.ChangeEquipData[];
            for (int i = 0; i < array.Length; i++)
            {
                if ((array[i].index != 0 || array[i].item != null) && (array[i].index != 3 || array[i].item != null))
                {
                    localEquipSets[array[i].setNo].item[array[i].index] = array[i].item;
                    MonoBehaviourSingleton <StatusManager> .I.ReplaceEquipItem(localEquipSets[array[i].setNo], array[i].setNo, array[i].index);

                    flag = true;
                }
            }
        }
        if (flag)
        {
            localEquipSetUpdate();
            RefreshUI();
            this.StartCoroutine(ReloadModelByLocalEquipSetCoroutine());
        }
    }
Esempio n. 3
0
    private PlayerLoadInfo CreatePlayerLoadInfo(int set_no)
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();
        UserStatus     userStatus     = MonoBehaviourSingleton <UserInfoManager> .I.userStatus;

        localEquipSet = MonoBehaviourSingleton <StatusManager> .I.GetEquipSet(set_no);

        StatusManager.LocalVisual localVisual = new StatusManager.LocalVisual();
        localVisual.visualItem[0] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.armorUniqId)));
        localVisual.visualItem[1] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.helmUniqId)));
        localVisual.visualItem[2] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.armUniqId)));
        localVisual.visualItem[3] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.legUniqId)));
        localVisual.isVisibleHelm = (MonoBehaviourSingleton <StatusManager> .I.GetEquippingShowHelm(set_no) > 0);
        playerLoadInfo.SetupLoadInfo(localEquipSet, 0uL, localVisual.VisialID(0), localVisual.VisialID(1), localVisual.VisialID(2), localVisual.VisialID(3), localVisual.isVisibleHelm);
        return(playerLoadInfo);
    }
Esempio n. 4
0
    protected InGameRecorder.PlayerRecord InitializePlayerRecord()
    {
        UserInfo   userInfo   = MonoBehaviourSingleton <UserInfoManager> .I.userInfo;
        UserStatus userStatus = MonoBehaviourSingleton <UserInfoManager> .I.userStatus;

        InGameRecorder.PlayerRecord playerRecord = new InGameRecorder.PlayerRecord();
        playerRecord.id     = 0;
        playerRecord.isNPC  = false;
        playerRecord.isSelf = true;
        MonoBehaviourSingleton <StatusManager> .I.CreateLocalEquipSetData();

        playerRecord.playerLoadInfo     = CreatePlayerLoadInfo(userStatus.eSetNo);
        playerRecord.animID             = 90;
        playerRecord.charaInfo          = new CharaInfo();
        playerRecord.charaInfo.userId   = userInfo.id;
        playerRecord.charaInfo.name     = userInfo.name;
        playerRecord.charaInfo.comment  = userInfo.comment;
        playerRecord.charaInfo.code     = userInfo.code;
        playerRecord.charaInfo.level    = userStatus.level;
        playerRecord.charaInfo.atk      = userStatus.atk;
        playerRecord.charaInfo.def      = userStatus.def;
        playerRecord.charaInfo.hp       = userStatus.hp;
        playerRecord.charaInfo.faceId   = userStatus.faceId;
        playerRecord.charaInfo.sex      = userStatus.sex;
        playerRecord.charaInfo.equipSet = null;
        MonoBehaviourSingleton <StatusManager> .I.CreateLocalVisualEquipData();

        StatusManager.LocalVisual localVisualEquip = MonoBehaviourSingleton <StatusManager> .I.GetLocalVisualEquip();

        playerRecord.charaInfo.aId      = (int)((localVisualEquip.visualItem[0] != null) ? localVisualEquip.visualItem[0].tableID : 0);
        playerRecord.charaInfo.hId      = (int)((localVisualEquip.visualItem[1] != null) ? localVisualEquip.visualItem[1].tableID : 0);
        playerRecord.charaInfo.rId      = (int)((localVisualEquip.visualItem[2] != null) ? localVisualEquip.visualItem[2].tableID : 0);
        playerRecord.charaInfo.lId      = (int)((localVisualEquip.visualItem[3] != null) ? localVisualEquip.visualItem[3].tableID : 0);
        playerRecord.charaInfo.showHelm = (localVisualEquip.isVisibleHelm ? 1 : 0);
        equipSetMax = MonoBehaviourSingleton <StatusManager> .I.EquipSetNum();

        return(playerRecord);
    }