@@ -60,29 +60,23 @@ type Achievements struct {
6060 Secret bool `json:"secret"`
6161}
6262
63- // Child of DeathEntries
63+ // Child of Deaths
6464type Killers struct {
6565 Name string `json:"name"`
6666 Player bool `json:"player"`
6767 Traded bool `json:"traded"`
6868 Summon string `json:"summon"`
6969}
7070
71- // Child of Deaths
72- type DeathEntries struct {
71+ // Child of Characters
72+ type Deaths struct {
7373 Time string `json:"time"`
7474 Level int `json:"level"`
7575 Killers []Killers `json:"killers"`
7676 Assists []Killers `json:"assists"`
7777 Reason string `json:"reason"`
7878}
7979
80- // Child of Characters
81- type Deaths struct {
82- DeathEntries []DeathEntries `json:"death_entries,omitempty"`
83- TruncatedDeaths bool `json:"truncated,omitempty"` // deathlist can be truncated.. but we don't have logic for that atm
84- }
85-
8680// Child of Characters
8781type AccountInformation struct {
8882 Position string `json:"position,omitempty"`
@@ -105,7 +99,7 @@ type Characters struct {
10599 Character Character `json:"character"`
106100 AccountBadges []AccountBadges `json:"account_badges,omitempty"`
107101 Achievements []Achievements `json:"achievements,omitempty"`
108- Deaths Deaths `json:"deaths,omitempty"`
102+ Deaths [] Deaths `json:"deaths,omitempty"`
109103 AccountInformation AccountInformation `json:"account_information,omitempty"`
110104 OtherCharacters []OtherCharacters `json:"other_characters,omitempty"`
111105}
@@ -144,7 +138,7 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
144138 CharacterInformationData Character
145139 AccountBadgesData []AccountBadges
146140 AchievementsData []Achievements
147- DeathsData Deaths
141+ DeathsData [] Deaths
148142 AccountInformationData AccountInformation
149143 OtherCharactersData []OtherCharacters
150144 )
@@ -320,7 +314,6 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
320314
321315 // Removing line breaks
322316 CharacterListHTML = TibiadataHTMLRemoveLinebreaksV3 (CharacterListHTML )
323- //log.Println(CharacterListHTML)
324317 CharacterListHTML = strings .ReplaceAll (CharacterListHTML , ".<br/>Assisted by" , ". Assisted by" )
325318
326319 // Regex to get data for deaths
@@ -388,7 +381,7 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
388381 }
389382
390383 // append deadentry to death list
391- DeathsData . DeathEntries = append (DeathsData . DeathEntries , DeathEntries {
384+ DeathsData = append (DeathsData , Deaths {
392385 Time : TibiadataDatetimeV3 (subma1 [0 ][1 ]),
393386 Level : TibiadataStringToIntegerV3 (subma1 [0 ][3 ]),
394387 Killers : DeathKillers ,
0 commit comments