@@ -60,29 +60,23 @@ type Achievements struct {
60
60
Secret bool `json:"secret"`
61
61
}
62
62
63
- // Child of DeathEntries
63
+ // Child of Deaths
64
64
type Killers struct {
65
65
Name string `json:"name"`
66
66
Player bool `json:"player"`
67
67
Traded bool `json:"traded"`
68
68
Summon string `json:"summon"`
69
69
}
70
70
71
- // Child of Deaths
72
- type DeathEntries struct {
71
+ // Child of Characters
72
+ type Deaths struct {
73
73
Time string `json:"time"`
74
74
Level int `json:"level"`
75
75
Killers []Killers `json:"killers"`
76
76
Assists []Killers `json:"assists"`
77
77
Reason string `json:"reason"`
78
78
}
79
79
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
-
86
80
// Child of Characters
87
81
type AccountInformation struct {
88
82
Position string `json:"position,omitempty"`
@@ -105,7 +99,7 @@ type Characters struct {
105
99
Character Character `json:"character"`
106
100
AccountBadges []AccountBadges `json:"account_badges,omitempty"`
107
101
Achievements []Achievements `json:"achievements,omitempty"`
108
- Deaths Deaths `json:"deaths,omitempty"`
102
+ Deaths [] Deaths `json:"deaths,omitempty"`
109
103
AccountInformation AccountInformation `json:"account_information,omitempty"`
110
104
OtherCharacters []OtherCharacters `json:"other_characters,omitempty"`
111
105
}
@@ -144,7 +138,7 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
144
138
CharacterInformationData Character
145
139
AccountBadgesData []AccountBadges
146
140
AchievementsData []Achievements
147
- DeathsData Deaths
141
+ DeathsData [] Deaths
148
142
AccountInformationData AccountInformation
149
143
OtherCharactersData []OtherCharacters
150
144
)
@@ -320,7 +314,6 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
320
314
321
315
// Removing line breaks
322
316
CharacterListHTML = TibiadataHTMLRemoveLinebreaksV3 (CharacterListHTML )
323
- //log.Println(CharacterListHTML)
324
317
CharacterListHTML = strings .ReplaceAll (CharacterListHTML , ".<br/>Assisted by" , ". Assisted by" )
325
318
326
319
// Regex to get data for deaths
@@ -388,7 +381,7 @@ func TibiaCharactersCharacterV3Impl(BoxContentHTML string) CharacterResponse {
388
381
}
389
382
390
383
// append deadentry to death list
391
- DeathsData . DeathEntries = append (DeathsData . DeathEntries , DeathEntries {
384
+ DeathsData = append (DeathsData , Deaths {
392
385
Time : TibiadataDatetimeV3 (subma1 [0 ][1 ]),
393
386
Level : TibiadataStringToIntegerV3 (subma1 [0 ][3 ]),
394
387
Killers : DeathKillers ,
0 commit comments