diff --git a/src/TibiaCharactersCharacter.go b/src/TibiaCharactersCharacter.go
index 12f33a57..44c38059 100644
--- a/src/TibiaCharactersCharacter.go
+++ b/src/TibiaCharactersCharacter.go
@@ -190,7 +190,7 @@ func TibiaCharactersCharacterImpl(BoxContentHTML string) (*CharacterResponse, er
case "Sex:":
CharacterInfoData.Sex = RowData
case "Title:":
- leftParenIdx := strings.Index(RowData, "(")
+ leftParenIdx := strings.LastIndex(RowData, "(")
if leftParenIdx == -1 {
return
}
diff --git a/src/TibiaCharactersCharacter_test.go b/src/TibiaCharactersCharacter_test.go
index 39ab47e4..37955bd6 100644
--- a/src/TibiaCharactersCharacter_test.go
+++ b/src/TibiaCharactersCharacter_test.go
@@ -3005,6 +3005,35 @@ func TestNumber9(t *testing.T) {
assert.Equal(character.OtherCharacters[9].World, "Ferobra")
}
+func TestNumber10(t *testing.T) {
+ file, err := static.TestFiles.Open("testdata/characters/Nocna Furia.html")
+ if err != nil {
+ t.Fatalf("file opening error: %s", err)
+ }
+ defer file.Close()
+
+ data, err := io.ReadAll(file)
+ if err != nil {
+ t.Fatalf("File reading error: %s", err)
+ }
+
+ characterJson, err := TibiaCharactersCharacterImpl(string(data))
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ assert := assert.New(t)
+ character := characterJson.Character.CharacterInfo
+
+ assert.Equal("Nocna Furia", character.Name)
+ assert.Nil(character.FormerNames)
+ assert.False(character.Traded)
+ assert.Empty(character.DeletionDate)
+ assert.Equal("male", character.Sex)
+ assert.Equal("Tibia's Topmodel (Grade 1)", character.Title)
+ assert.Equal(6, character.UnlockedTitles)
+}
+
func BenchmarkNumber1(b *testing.B) {
file, err := static.TestFiles.Open("testdata/characters/Darkside Rafa.html")
if err != nil {
diff --git a/src/static/testdata/characters/Nocna Furia.html b/src/static/testdata/characters/Nocna Furia.html
new file mode 100644
index 00000000..8513f42d
--- /dev/null
+++ b/src/static/testdata/characters/Nocna Furia.html
@@ -0,0 +1,781 @@
+
+
+
+
+Tibia - Free Multiplayer Online Role Playing Game - Community
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NO - internet explorer
+
NEW - internet explorer
+
OLD - internet explorer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Name: | Nocna Furia | Title: | Tibia's Topmodel (Grade 1) (6 titles unlocked) | Sex: | male | Vocation: | None | Level: | 176 | Achievement Points: | 31 | World: | Celesta | Residence: | Rookgaard | Guild Membership: | Leader of the Undead Rookers | Last Login: | Oct 08 2023, 14:47:11 CEST | Comment: | dulce et decorum est pro patria mori | Account Status: | Premium Account | | |
There are no achievements set to be displayed for this character. | | |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+