Ejemplo n.º 1
0
        private bool MigrateNewUIs()
        {
            bool hasChanges = false;

            if (uiEquipItems != null)
            {
                List <UIEquipItems> list = uiCharacterEquipItems == null ? new List <UIEquipItems>() : new List <UIEquipItems>(uiCharacterEquipItems);
                list.Add(uiEquipItems);
                uiCharacterEquipItems = list.ToArray();
                uiEquipItems          = null;
                hasChanges            = true;
            }

            if (uiNonEquipItems != null)
            {
                List <UINonEquipItems> list = uiCharacterNonEquipItems == null ? new List <UINonEquipItems>() : new List <UINonEquipItems>(uiCharacterNonEquipItems);
                list.Add(uiNonEquipItems);
                uiCharacterNonEquipItems = list.ToArray();
                uiNonEquipItems          = null;
                hasChanges = true;
            }

            if (uiSkills != null)
            {
                List <UICharacterSkills> list = uiCharacterSkills == null ? new List <UICharacterSkills>() : new List <UICharacterSkills>(uiCharacterSkills);
                list.Add(uiSkills);
                uiCharacterSkills = list.ToArray();
                uiSkills          = null;
                hasChanges        = true;
            }

            if (uiSummons != null)
            {
                List <UICharacterSummons> list = uiCharacterSummons == null ? new List <UICharacterSummons>() : new List <UICharacterSummons>(uiCharacterSummons);
                list.Add(uiSummons);
                uiCharacterSummons = list.ToArray();
                uiSummons          = null;
                hasChanges         = true;
            }

            if (uiHotkeys != null)
            {
                List <UICharacterHotkeys> list = uiCharacterHotkeys == null ? new List <UICharacterHotkeys>() : new List <UICharacterHotkeys>(uiCharacterHotkeys);
                list.Add(uiHotkeys);
                uiCharacterHotkeys = list.ToArray();
                uiHotkeys          = null;
                hasChanges         = true;
            }

            if (uiQuests != null)
            {
                List <UICharacterQuests> list = uiCharacterQuests == null ? new List <UICharacterQuests>() : new List <UICharacterQuests>(uiCharacterQuests);
                list.Add(uiQuests);
                uiCharacterQuests = list.ToArray();
                uiQuests          = null;
                hasChanges        = true;
            }

            return(hasChanges);
        }
Ejemplo n.º 2
0
 public void Setup(UICharacterHotkeys uiCharacterHotkeys, CharacterHotkey data, int indexOfData)
 {
     this.uiCharacterHotkeys = uiCharacterHotkeys;
     this.indexOfData        = indexOfData;
     Data = data;
 }