Exemple #1
0
                public override void Refresh()
                {
                    base.Refresh();
                    if (Items != null && Items.Count > 0)
                    {
                        Item = Items.Peek();
                        ((IGMDataItem.Box)ITEM[0, 1]).Data      = Item.DATA?.Name;
                        ((IGMDataItem.Box)ITEM[0, 2]).Data      = $"{Item.QTY}";
                        ((IGMDataItem.Box)ITEM[0, 3]).Data      = Item.DATA?.Description;
                        ((IGMData.Dialog.Small)ITEM[0, 5]).Data = str_Over100.Clone().Replace(DialogSelectedItem, Item.DATA?.Name);
                        ((IGMData.Dialog.Small)ITEM[0, 5]).Data = str_Over100.Clone().Replace(DialogSelectedItem, Item.DATA?.Name);
                        ITEM[0, 1].Show();
                        ITEM[0, 2].Show();
                        ITEM[0, 3].Show();
                        ITEM[0, 4].Hide();
                        ITEM[0, 5].Hide();
                        ITEM[0, 6].Hide();
                    }
                    else
                    if (_cards != null && _cards.Count > 0)
                    {
                        card = _cards.Peek();
                        var name = Memory.Strings.Read(Strings.FileID.MNGRP, 110, (int)card.Key);

                        int pos = 0;
                        for (; pos < name.Length; pos++)
                        {
                            if (name.Value[pos] == 2)
                            {
                                break;
                            }
                        }
                        ((IGMDataItem.Box)ITEM[0, 1]).Data = new FF8String(name.Value.Take(pos - 1).ToArray());
                        //TODO grab card name from start of string
                        ((IGMDataItem.Box)ITEM[0, 2]).Data      = $"{card.Value}";
                        ((IGMDataItem.Box)ITEM[0, 3]).Data      = "";
                        ((IGMData.Dialog.Small)ITEM[0, 5]).Data = str_Over100.Clone().Replace(DialogSelectedItem, Item.DATA?.Name);
                        ((IGMData.Dialog.Small)ITEM[0, 5]).Data = str_Over100.Clone().Replace(DialogSelectedItem, Item.DATA?.Name);
                        ITEM[0, 1].Show();
                        ITEM[0, 2].Show();
                        ITEM[0, 3].Hide();
                        ITEM[0, 4].Hide();
                        ITEM[0, 5].Hide();
                        ITEM[0, 6].Hide();
                    }
                    else
                    {
                        ITEM?[0, 1]?.Hide();
                        ITEM?[0, 2]?.Hide();
                        ITEM?[0, 3]?.Hide();
                        ITEM?[0, 4]?.Show();
                        ITEM?[0, 5]?.Hide();
                        ITEM?[0, 6]?.Hide();
                    }
                }
Exemple #2
0
            /// <summary>
            /// Create a copy of this gfdata object
            /// </summary>
            public GFData Clone()
            {
                //Shadowcopy
                GFData c = (GFData)MemberwiseClone();

                //Deepcopy
                c.Name      = Name.Clone();
                c.Complete  = (BitArray)(Complete.Clone());
                c.Forgotten = (BitArray)(Forgotten.Clone());
                c.APs       = (byte[])(APs.Clone());
                return(c);
            }
Exemple #3
0
            public CharacterData Clone()
            {
                //Shadowcopy
                CharacterData c = (CharacterData)MemberwiseClone();

                //Deepcopy
                c.Name = Name.Clone();
                c.CompatibilitywithGFs = CompatibilitywithGFs.ToDictionary(e => e.Key, e => e.Value);
                c.Stat_J    = Stat_J.ToDictionary(e => e.Key, e => e.Value);
                c.Magics    = Magics.ToDictionary(e => e.Key, e => e.Value);
                c.RawStats  = RawStats.ToDictionary(e => e.Key, e => e.Value);
                c.Commands  = Commands.ConvertAll(Item => Item);
                c.Abilities = Abilities.ConvertAll(Item => Item);
                return(c);
            }