Esempio n. 1
0
        private void LoadBattleAgency()
        {
            p[0] = SAV.GetPKM(SAV.DecryptPKM(SAV.GetData(0x6C200, 0xE8)));
            p[1] = SAV.GetPKM(SAV.DecryptPKM(SAV.GetData(0x6C2E8, 0x104)));
            p[2] = SAV.GetPKM(SAV.DecryptPKM(SAV.GetData(0x6C420, 0x104)));
            LoadPictureBox();
            B_ImportParty.Visible      = SAV.HasParty;
            CHK_Choosed.Checked        = SAV.GetFlag(0x6C55E, 1);
            CHK_TrainerInvited.Checked = IsTrainerInvited();
            ushort valus = BitConverter.ToUInt16(SAV.GetData(0x6C55C, 2), 0);
            int    grade = valus >> 6 & 0x3F;

            NUD_Grade.Value = grade;
            int max      = Math.Min(49, grade) / 10 * 3 + 2;
            int defeated = valus >> 12;

            NUD_Defeated.Value   = defeated > max ? max : defeated;
            NUD_Defeated.Maximum = max;
            NUD_DefeatMon.Value  = BitConverter.ToUInt16(SAV.GetData(0x6C558, 2), 0);
            for (int i = 0; i < NUD_Trainers.Length; i++)
            {
                int j = GetSavData16(0x6C56C + 0x14 * i);
                var m = (int)NUD_Trainers[i].Maximum;
                NUD_Trainers[i].Value = j <0 || j> m ? m : j;
            }
            TB_PlazaName.Text = SAV.FestivalPlazaName;
        }
Esempio n. 2
0
        private void LoadBattleAgency()
        {
            p[0] = SAV.GetStoredSlot(0x6C200);
            p[1] = SAV.GetPartySlot(0x6C2E8);
            p[2] = SAV.GetPartySlot(0x6C420);
            LoadPictureBox();
            B_ImportParty.Visible      = SAV.HasParty;
            CHK_Choosed.Checked        = SAV.GetFlag(0x6C55E, 1);
            CHK_TrainerInvited.Checked = IsTrainerInvited();
            ushort valus = BitConverter.ToUInt16(SAV.GetData(0x6C55C, 2), 0);
            int    grade = valus >> 6 & 0x3F;

            NUD_Grade.Value = grade;
            int max      = (Math.Min(49, grade) / 10 * 3) + 2;
            int defeated = valus >> 12;

            NUD_Defeated.Value   = defeated > max ? max : defeated;
            NUD_Defeated.Maximum = max;
            NUD_DefeatMon.Value  = BitConverter.ToUInt16(SAV.GetData(0x6C558, 2), 0);
            for (int i = 0; i < NUD_Trainers.Length; i++)
            {
                int j = GetSavData16(0x6C56C + (0x14 * i));
                var m = (int)NUD_Trainers[i].Maximum;
                NUD_Trainers[i].Value = (uint)j > m ? m : j;
            }
            B_AgentGlass.Enabled = (SAV.GetData(SAV.Fashion + 0xD0, 1)[0] & 1) == 0;
        }