Ejemplo n.º 1
0
        protected override bool DarkTorvusKeys(int index)
        {
            if (CPlayerState == 0)
            {
                return(false);
            }
            if (index < 0)
            {
                throw new Exception("Index can't be negative");
            }
            switch (index)
            {
            case 0:
                return(GCMem.ReadUInt32(CPlayerState + OFF_DARK_TORVUS_KEY_1_OBTAINED) > 0);

            case 1:
                return(GCMem.ReadUInt32(CPlayerState + OFF_DARK_TORVUS_KEY_2_OBTAINED) > 0);

            case 2:
                return(GCMem.ReadUInt32(CPlayerState + OFF_DARK_TORVUS_KEY_3_OBTAINED) > 0);

            default:
                throw new Exception("There are no 4th Dark Torvus key");
            }
        }
Ejemplo n.º 2
0
        protected override bool IngHiveKeys(int index)
        {
            int offset = -4;

            if (CPlayerState == 0)
            {
                return(false);
            }
            if (index < 0)
            {
                throw new Exception("Index can't be negative");
            }
            switch (index)
            {
            case 0:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_ING_HIVE_KEY_1_OBTAINED) > 0);

            case 1:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_ING_HIVE_KEY_2_OBTAINED) > 0);

            case 2:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_ING_HIVE_KEY_3_OBTAINED) > 0);

            default:
                throw new Exception("There are no 4th Ing Hive key");
            }
        }
Ejemplo n.º 3
0
        protected override bool Artifacts(int index)
        {
            var offset = default(long);

            if (CPlayerState == 0)
            {
                return(false);
            }
            if (index < 0)
            {
                throw new Exception("Index can't be negative");
            }
            offset = CPlayerState + 4;
            switch (index)
            {
            case 0:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_TRUTH_OBTAINED) > 0);

            case 1:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_STRENGTH_OBTAINED) > 0);

            case 2:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_ELDER_OBTAINED) > 0);

            case 3:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_WILD_OBTAINED) > 0);

            case 4:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_LIFEGIVER_OBTAINED) > 0);

            case 5:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_WARRIOR_OBTAINED) > 0);

            case 6:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_CHOZO_OBTAINED) > 0);

            case 7:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_NATURE_OBTAINED) > 0);

            case 8:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_SUN_OBTAINED) > 0);

            case 9:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_WORLD_OBTAINED) > 0);

            case 10:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_SPIRIT_OBTAINED) > 0);

            case 11:
                return(GCMem.ReadInt32(offset + OFF_ARTIFACT_OF_NEWBORN_OBTAINED) > 0);

            default:
                throw new Exception("There are no artifacts past the 12th artifact");
            }
        }
Ejemplo n.º 4
0
        protected override bool SkyTempleKeys(int index)
        {
            int offset = -4;

            if (CPlayerState == 0)
            {
                return(false);
            }
            if (index < 0)
            {
                throw new Exception("Index can't be negative");
            }
            switch (index)
            {
            case 0:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_1_OBTAINED) > 0);

            case 1:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_2_OBTAINED) > 0);

            case 2:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_3_OBTAINED) > 0);

            case 3:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_4_OBTAINED) > 0);

            case 4:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_5_OBTAINED) > 0);

            case 5:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_6_OBTAINED) > 0);

            case 6:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_7_OBTAINED) > 0);

            case 7:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_8_OBTAINED) > 0);

            case 8:
                return(GCMem.ReadUInt32(CPlayerState + offset + OFF_SKY_TEMPLE_KEY_9_OBTAINED) > 0);

            default:
                throw new Exception("There are no 10th Sky Temple key");
            }
        }
Ejemplo n.º 5
0
        protected override bool EnergyCells(int index)
        {
            if (CPlayerState == 0)
            {
                return(false);
            }
            if (index < 0)
            {
                throw new Exception("Index can't be negative");
            }
            switch (index)
            {
            case 0:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_1_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_1_USED) > 0);

            case 1:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_2_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_2_USED) > 0);

            case 2:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_3_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_3_USED) > 0);

            case 3:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_4_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_4_USED) > 0);

            case 4:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_5_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_5_USED) > 0);

            case 5:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_6_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_6_USED) > 0);

            case 6:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_7_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_7_USED) > 0);

            case 7:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_8_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_8_USED) > 0);

            case 8:
                return(GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_9_OBTAINED) > 0 || GCMem.ReadUInt32(CPlayerState + OFF_ENERGY_CELL_9_USED) > 0);

            default:
                throw new Exception("There are no 10th Energy Cell");
            }
        }