Skip to content

Commit

Permalink
remove return of loyalty title on no title
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasehlert committed Mar 10, 2022
1 parent f7a97ee commit 6d9b805
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/TibiaCharactersCharacterV3.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {

CharacterInformationData.Comment = stringBuilder.String()
case "Loyalty Title:":
AccountInformationData.LoyaltyTitle = RowData
if RowData != "(no title)" {
AccountInformationData.LoyaltyTitle = RowData
}
case "Created:":
AccountInformationData.Created = TibiaDataDatetimeV3(RowData)
case "Position:":
Expand Down
1 change: 1 addition & 0 deletions src/TibiaCharactersCharacterV3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func TestNumber3(t *testing.T) {
assert.Equal("2022-03-08T00:09:13Z", characterJson.Characters.Character.DeletionDate)
assert.Equal("", characterJson.Characters.Character.LastLogin)
assert.Equal("Free Account", characterJson.Characters.Character.AccountStatus)
assert.Empty(characterJson.Characters.AccountInformation.LoyaltyTitle)
}

func TestNumber4(t *testing.T) {
Expand Down

0 comments on commit 6d9b805

Please sign in to comment.