Ejemplo n.º 1
0
        public DataContext()
        {
            foreach (var item in Info.Instance().Chars)
            {
                if (item.Value == 0)
                {
                    continue;
                }
                Charactors.Add(new Charactor(0x72FDA + 86 * (uint)(item.Value - 1), item.Name));
            }

            for (uint i = 0; i < 0x1000; i++)
            {
                Items.Add(new Item(0xF21A + i * 97));
            }

            for (uint i = 0; i < 7; i++)
            {
                PartyMembers.Add(new Member(0x73234 + i * 4));
            }
            for (uint i = 0; i < 3; i++)
            {
                BattleMembers.Add(new Member(0x73250 + i * 4));
            }
        }
Ejemplo n.º 2
0
        public DataContext()
        {
            foreach (var chara in Info.Instance().Member)
            {
                if (chara.Value == 0)
                {
                    continue;
                }
                Charactors.Add(new Charactor((chara.Value - 1) * 0x4010 + 0xA8750)
                {
                    Name = chara.Name
                });
            }

            foreach (var info in Info.Instance().Tools)
            {
                Tools.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Mains)
            {
                Mains.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Subs)
            {
                Subs.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Heads)
            {
                Heads.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Bodys)
            {
                Bodys.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Accessorys)
            {
                Accessorys.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Materials)
            {
                Materials.Add(new Item(info, 0xA3D68));
            }
            foreach (var info in Info.Instance().Synthesises)
            {
                Synthesises.Add(new Item(info, 0xA3D68));
            }

            for (uint i = 0; i < 9; i++)
            {
                Party.Add(new SaveDataValue <uint>(0xA3D38 + 4 * i, 4, 0, 9));
            }
        }
Ejemplo n.º 3
0
 public DataContext()
 {
     foreach (var member in Info.Instance().Members)
     {
         if (member.Value >= 9)
         {
             continue;
         }
         Charactors.Add(new Charactor(member.Name, 93 + member.Value * 132));
     }
     for (uint i = 0; i < 320; i++)
     {
         Items.Add(new Item(1285 + i * 2));
     }
     for (uint i = 0; i < 200; i++)
     {
         Materias.Add(new Materia(1925 + i * 4));
     }
 }
Ejemplo n.º 4
0
        public DataContext()
        {
            for (uint i = 0; i < 256; i++)
            {
                BattleItems.Add(new Item(0x37590 + i * 8));
            }

            for (uint i = 0; i < 1024; i++)
            {
                OtherItems.Add(new Item(0x37D90 + i * 8));
            }

            for (uint i = 0; i < 200; i++)
            {
                Charactors.Add(new Charactor(0x700 + i * 1062));
            }

            for (uint i = 0; i < 120; i++)
            {
                Jewels.Add(new Jewel(0x46380 + i * 8));
            }

            for (uint i = 0; i < 12; i++)
            {
                Party.Add(new Member(0x6D0 + i * 4));
            }

            foreach (var info in Info.Instance().Places)
            {
                Places.Add(new Place(info));
            }

            foreach (var info in Info.Instance().Minds)
            {
                Minds.Add(new MindQuest(info));
            }

            foreach (var info in Info.Instance().Medals)
            {
                Medals.Add(new Medal(info));
            }
        }
Ejemplo n.º 5
0
        public DataContext()
        {
            SaveData save = SaveData.Instance();

            foreach (var address in save.FindAddress("CharacterID_", 0))
            {
                var chara = new Charactor(address);
                if (chara.ID < 0 || chara.ID > 8)
                {
                    continue;
                }
                Charactors.Add(chara);
            }

            foreach (var address in save.FindAddress("ItemID_", 0))
            {
                Items.Add(new Item(address));
            }

            mMoneyAddress = save.FindAddress("Money", 0)[0] + 0x42;
        }
Ejemplo n.º 6
0
        public DataContext()
        {
            SaveData save = SaveData.Instance();

            foreach (var address in save.FindAddress("CharacterID_", 0))
            {
                var chara = new Charactor(address);
                if (chara.ID < 0 || chara.ID > 8)
                {
                    continue;
                }
                Charactors.Add(chara);
            }

            foreach (var address in save.FindAddress("ItemID_", 0))
            {
                Items.Add(new Item(address));
            }

            var gvas = new GVAS(null);

            gvas.AppendValue(save.FindAddress("MainMemberID_", 0)[0]);
            for (uint i = 0; i < 4; i++)
            {
                MainParty.Add(new Member(gvas.Key("MainMemberID_" + i.ToString()).Address));
            }

            gvas = new GVAS(null);
            gvas.AppendValue(save.FindAddress("SubMissionOrder", 0)[0]);
            for (uint i = 0; i < 200; i++)
            {
                MissionIDs.Add(new MissionID(gvas.Key("SubMissionOrder_" + i.ToString())));
            }

            var missionStates = save.FindAddress("MissionState_", 0);
            var clearIndex    = save.FindAddress("ClearIndex_", 0);

            if (missionStates.Count == clearIndex.Count)
            {
                for (int i = 0; i < missionStates.Count; i++)
                {
                    var stateGvas = new GVAS(null);
                    stateGvas.AppendValue(missionStates[i]);
                    var clearGvas = new GVAS(null);
                    clearGvas.AppendValue(clearIndex[i]);

                    var mission = new CountryMission()
                    {
                        Country = Info.Instance().Countris[i].Name
                    };
                    for (int j = 0; j < 100; j++)
                    {
                        mission.Missions.Add(new Mission(stateGvas.Key("MissionState_" + j.ToString()), clearGvas.Key("ClearIndex_" + j.ToString())));
                    }
                    Countris.Add(mission);
                }
            }

            gvas = new GVAS(null);
            gvas.AppendValue(save.FindAddress("VisitedMap", 0)[0]);
            uint id = 0;

            for (uint i = 0; i < 10; i++)
            {
                GVASData data = gvas.Key("VisitedMap_" + i.ToString());
                for (uint size = 0; size < data.Size; size++)
                {
                    for (uint bit = 0; bit < 8; bit++)
                    {
                        var           place = new Place(data.Address + size, bit);
                        NameValueInfo info  = Info.Instance().Search(Info.Instance().Places, id);
                        if (info != null)
                        {
                            place.Name = info.Name;
                        }
                        Places.Add(place);
                        id++;
                    }
                }
            }

            gvas = new GVAS(null);
            uint tame = save.FindAddress("TameMonsterData", 0)[0];

            for (uint i = 0; i < 10; i++)
            {
                uint enemyAddress = save.FindAddress("EnemyID_", tame)[0];
                TameMonsters.Add(new TameMonster(enemyAddress));
                tame = enemyAddress + 1;
            }

            uint weaks = save.FindAddress("EnemyInfoData", 0)[0];

            System.Console.WriteLine(save.FindAddress("IsAnalyse_", 0).Count);
            foreach (uint i in save.FindAddress("IsAnalyse_", 0))
            {
                EnemyWeaknesses.Add(new EnemyWeakness(i));
            }

            gvas = new GVAS(null);
            gvas.AppendValue(save.FindAddress("Money_", 0)[0]);
            mMoneyAddress = gvas.Key("Money").Address;
            gvas          = new GVAS(null);
            gvas.AppendValue(save.FindAddress("FirstSelectCharacterID", 0)[0]);
            mHeroAddress = gvas.Key("FirstSelectCharacterID").Address;
        }
Ejemplo n.º 7
0
        public DataContext()
        {
            for (uint i = 0; i < 6; i++)
            {
                Charactors.Add(new Charactor(0x0C80 + i * 0x01EC));
            }

            BagItem item = null;

            for (uint i = Util.BagItemCount - 1; (int)i >= 0; i--)
            {
                item = new BagItem(0x0544 + i * 2, 0x09D4 + i, item);
                item.PropertyChanged += Item_PropertyChanged;
                Bag.Insert(0, item);
            }

            foreach (var place in Info.Instance().Places)
            {
                Places.Add(new Place(place.Value)
                {
                    Name = place.Name
                });
            }

            foreach (var monster in Info.Instance().Monsters)
            {
                if (monster.ID != 0)
                {
                    Monsters.Add(new MonsterBook(0x1854 + (monster.ID - 1) * 8)
                    {
                        Name = monster.Name
                    });
                }
                if (monster.Passing)
                {
                    PassingSlateMonsters.Add(monster);
                }
                if (monster.Stamp)
                {
                    StampMonsters.Add(monster);
                }
            }

            for (uint i = 0; i < Util.MonsterStampCount; i++)
            {
                MonsterStamps.Add(new MonsterStamp(0x2E06 + i * 2));
            }

            foreach (var place in Info.Instance().ParkPlaces)
            {
                MonsterParkPlaces.Add(new MonsterParkPlace(0x00AC, place.Value)
                {
                    Name = place.Name
                });
            }

            for (uint i = 0; i < Util.MonsterParkDormitoryCount; i++)
            {
                MonsterParkDormitorys.Add(new MonsterParkDormitory(0x04BC + i * 4, 0x3180 + i));
            }

            for (uint i = 0; i < Util.PartyMemberCount; i++)
            {
                Party.Add(new PartyMember(0x0510 + i * 4));
            }

            for (uint i = 0; i < Util.PassingSlateCount; i++)
            {
                uint address = 0x32D0 + i * 44;
                if (SaveData.Instance().ReadNumber(address, 1) == 0)
                {
                    break;
                }
                PassingSlates.Add(new PassingSlate(address));
            }

            foreach (var monster in Info.Instance().TownMonsters)
            {
                TownMonsters.Add(new TownMonster(0x01E9, monster.Value)
                {
                    Name = monster.Name
                });
            }
        }