Exemple #1
0
        void SelectedIndexChangedFE8UMagicExtends(object sender, EventArgs e)
        {
            if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE8UMAGIC)
            {
                return;
            }

            if (this.AddressList.SelectedIndex < 0)
            {
                return;
            }

            uint         uid          = (uint)this.AddressList.SelectedIndex;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            uid++;
            this.MagicExtUnitBase.Value = (sbyte)MagicSplitUtil.GetUnitBaseMagicExtends(uid, addr);
            this.MagicExtUnitGrow.Value = MagicSplitUtil.GetUnitGrowMagicExtends(uid, addr);
        }
Exemple #2
0
        public static void SetSimUnit(ref GrowSimulator sim, uint uid)
        {
            if (uid == 0 || uid == U.NOT_FOUND)
            {
                return;
            }
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid - 1);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            sim.SetUnitBase((int)Program.ROM.u8(addr + 11)                                  //LV
                            , (int)(sbyte)Program.ROM.u8(addr + 12)                         //hp
                            , (int)(sbyte)Program.ROM.u8(addr + 13)                         //str
                            , (int)(sbyte)Program.ROM.u8(addr + 14)                         //skill
                            , (int)(sbyte)Program.ROM.u8(addr + 15)                         //spd
                            , (int)(sbyte)Program.ROM.u8(addr + 16)                         //def
                            , (int)(sbyte)Program.ROM.u8(addr + 17)                         //res
                            , (int)(sbyte)Program.ROM.u8(addr + 18)                         //luck
                            , (int)(sbyte)MagicSplitUtil.GetUnitBaseMagicExtends(uid, addr) //magic ext
                            );
            sim.SetUnitGrow(
                (int)Program.ROM.u8(addr + 28)                           //hp
                , (int)Program.ROM.u8(addr + 29)                         //str
                , (int)Program.ROM.u8(addr + 30)                         //skill
                , (int)Program.ROM.u8(addr + 31)                         //spd
                , (int)Program.ROM.u8(addr + 32)                         //def
                , (int)Program.ROM.u8(addr + 33)                         //res
                , (int)Program.ROM.u8(addr + 34)                         //luck
                , (int)MagicSplitUtil.GetUnitGrowMagicExtends(uid, addr) //magic ext
                );
        }