Ejemplo n.º 1
0
    public void ApplyEquipConfig(int[] equipconfigs)
    {
        if (equipconfigs == null)
        {
            return;
        }
        Dictionary <string, string> parts = new Dictionary <string, string>();

        for (int i = 0; i < (int)EquipSlot.EquipSlot_MAX; ++i)
        {
            if (mEquipmentList[i] == equipconfigs[i])
            {
                continue;
            }

            mEquipmentList[i] = equipconfigs[i];
            int id = (int)mEquipmentList[i];
            if (id < 0)
            {
                continue;
            }
            if (!DataManager.PartModelTable.ContainsKey(id))
            {
                continue;
            }
            PartModelTableItem item = DataManager.PartModelTable[id] as PartModelTableItem;
            mVisual.ChangeElment(item.solt, AssetConfig.ModelPath + "Role/" + item.file + AssetConfig.AssetSuffix, null);
        }
    }
Ejemplo n.º 2
0
    public void ApplyEquipConfig(int[] equipconfigs)
    {
        if (equipconfigs == null)
        {
            return;
        }
        Dictionary <string, string> parts = new Dictionary <string, string>();

        for (int i = 0; i < (int)EquipSlot.EquipSlot_MAX; ++i)
        {
            if (mEquipmentList[i] == equipconfigs[i])
            {
                continue;
            }

            mEquipmentList[i] = equipconfigs[i];
            int id = (int)mEquipmentList[i];
            if (id < 0)
            {
                continue;
            }
            DefenceTableItem table = DataManager.DefenceTable[id] as DefenceTableItem;
            if (table == null)
            {
                continue;
            }

            PartModelTableItem item = DataManager.PartModelTable[table.modelShowId] as PartModelTableItem;
            if (item == null)
            {
                continue;
            }

            if (!string.IsNullOrEmpty(item.solt) && !string.IsNullOrEmpty(item.file))
            {
                mVisual.ChangeElment(item.solt, AssetConfig.ModelPath + "Role/" + item.file + AssetConfig.AssetSuffix, null);
            }
        }
    }