Ejemplo n.º 1
0
    public static CharacterId FF9Play_GetCharID2(CharacterIndex characterIndex, Boolean isSubCharacter)
    {
        Int32 index = characterIndex;

        if (index < CharacterIndex.Quina) // < 5
        {
            return(index);
        }

        if (index == CharacterIndex.Beatrix) // == 8
        {
            return(CharacterId.Beatrix);
        }

        if (index > CharacterIndex.Beatrix) // >> 8
        {
            throw new NotSupportedException(characterIndex.ToString());
        }

        // 5-7
        return(isSubCharacter
            ? index + 3 // Sub characters
            : index);   // Main characters
    }