Exemplo n.º 1
0
        public SecretBaseManager(GBAGameSave gameSave, byte[] data)
        {
            this.gameSave    = gameSave;
            this.raw         = data;
            this.secretBases = new List <SharedSecretBase>();

            for (int i = 0; i < 19; i++)
            {
                byte locationID = raw[i * 160];
                if (SecretBaseDatabase.GetLocationFromID(locationID) != null)
                {
                    this.secretBases.Add(new SharedSecretBase(ByteHelper.SubByteArray(i * 160, data, 160), this));
                }
            }
            Sort();
        }
Exemplo n.º 2
0
        public void SetNewLocation(byte newLocationID)
        {
            if (newLocationID != LocationID)
            {
                LocationData newLocationData = SecretBaseDatabase.GetLocationFromID(newLocationID);
                RoomData     newRoomData     = newLocationData.RoomData;

                if (newRoomData.Type != RoomData.Type || newRoomData.Layout != RoomData.Layout)
                {
                    while (SlotsUsed > 0)
                    {
                        PutAwayDecorationAt(0);
                    }
                }
                LocationID = newLocationID;
            }
        }