missing events, fixes #11
This commit is contained in:
parent
5449c1820f
commit
0d9c02dff6
|
@ -11,6 +11,7 @@
|
||||||
"The Enchanted Planets": true,
|
"The Enchanted Planets": true,
|
||||||
"The Infinite Plane": true,
|
"The Infinite Plane": true,
|
||||||
"The Legendary Plane": true,
|
"The Legendary Plane": true,
|
||||||
|
"The Realm of Dawns": true,
|
||||||
"The Realm of Visions": true,
|
"The Realm of Visions": true,
|
||||||
"The Realms of Legend": true,
|
"The Realms of Legend": true,
|
||||||
"The Universes of Myth": true,
|
"The Universes of Myth": true,
|
||||||
|
@ -4062,9 +4063,11 @@
|
||||||
"Base": false,
|
"Base": false,
|
||||||
"Plus": true,
|
"Plus": true,
|
||||||
"Values": {
|
"Values": {
|
||||||
|
"conflict": true,
|
||||||
"defeated": true,
|
"defeated": true,
|
||||||
"favoritepossession": true,
|
"favoritepossession": true,
|
||||||
"preservebody": true
|
"preservebody": true,
|
||||||
|
"trauma": true
|
||||||
},
|
},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
@ -4120,7 +4123,10 @@
|
||||||
"Base": false,
|
"Base": false,
|
||||||
"Plus": true,
|
"Plus": true,
|
||||||
"Values": {
|
"Values": {
|
||||||
"sanctify_hf": true
|
"sanctify_hf": true,
|
||||||
|
"unknown 3550": true,
|
||||||
|
"unknown 631": true,
|
||||||
|
"unknown 633": true
|
||||||
},
|
},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
@ -5302,7 +5308,10 @@
|
||||||
"Values": {
|
"Values": {
|
||||||
"refugee": true,
|
"refugee": true,
|
||||||
"settled": true,
|
"settled": true,
|
||||||
|
"settler": true,
|
||||||
"visiting": true,
|
"visiting": true,
|
||||||
|
"visitor": true,
|
||||||
|
"wanderer": true,
|
||||||
"wandering": true
|
"wandering": true
|
||||||
},
|
},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
|
@ -7018,6 +7027,33 @@
|
||||||
"Values": {},
|
"Values": {},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
"df_world|historical_events|historical_event+FirstContactFailed|contactor_enid": {
|
||||||
|
"IsString": false,
|
||||||
|
"NoBool": true,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": true,
|
||||||
|
"Plus": false,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
|
"df_world|historical_events|historical_event+FirstContactFailed|rejector_enid": {
|
||||||
|
"IsString": false,
|
||||||
|
"NoBool": true,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": true,
|
||||||
|
"Plus": false,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
|
"df_world|historical_events|historical_event+FirstContactFailed|site_id": {
|
||||||
|
"IsString": false,
|
||||||
|
"NoBool": true,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": true,
|
||||||
|
"Plus": false,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
"df_world|historical_events|historical_event+FirstContact|contacted_enid": {
|
"df_world|historical_events|historical_event+FirstContact|contacted_enid": {
|
||||||
"IsString": false,
|
"IsString": false,
|
||||||
"NoBool": true,
|
"NoBool": true,
|
||||||
|
@ -8367,6 +8403,15 @@
|
||||||
"Values": {},
|
"Values": {},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
"df_world|historical_events|historical_event+HfLearnsSecret|unk_1": {
|
||||||
|
"IsString": false,
|
||||||
|
"NoBool": true,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": false,
|
||||||
|
"Plus": true,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
"df_world|historical_events|historical_event+HfNewPet|coords": {
|
"df_world|historical_events|historical_event+HfNewPet|coords": {
|
||||||
"IsString": true,
|
"IsString": true,
|
||||||
"NoBool": true,
|
"NoBool": true,
|
||||||
|
@ -11041,6 +11086,15 @@
|
||||||
"Values": {},
|
"Values": {},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
"df_world|historical_events|historical_event+Merchant|all_dead": {
|
||||||
|
"IsString": true,
|
||||||
|
"NoBool": false,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": true,
|
||||||
|
"Plus": false,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
"df_world|historical_events|historical_event+Merchant|depot_entity_id": {
|
"df_world|historical_events|historical_event+Merchant|depot_entity_id": {
|
||||||
"IsString": false,
|
"IsString": false,
|
||||||
"NoBool": true,
|
"NoBool": true,
|
||||||
|
@ -11068,6 +11122,15 @@
|
||||||
"Values": {},
|
"Values": {},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
},
|
},
|
||||||
|
"df_world|historical_events|historical_event+Merchant|is_tribute": {
|
||||||
|
"IsString": true,
|
||||||
|
"NoBool": false,
|
||||||
|
"Multiple": false,
|
||||||
|
"Base": true,
|
||||||
|
"Plus": false,
|
||||||
|
"Values": {},
|
||||||
|
"Enum": true
|
||||||
|
},
|
||||||
"df_world|historical_events|historical_event+Merchant|lost_value": {
|
"df_world|historical_events|historical_event+Merchant|lost_value": {
|
||||||
"IsString": true,
|
"IsString": true,
|
||||||
"NoBool": false,
|
"NoBool": false,
|
||||||
|
@ -14770,6 +14833,7 @@
|
||||||
"Omon En": true,
|
"Omon En": true,
|
||||||
"Orid Xem": true,
|
"Orid Xem": true,
|
||||||
"Ospazosmlo": true,
|
"Ospazosmlo": true,
|
||||||
|
"Ushul Kodor": true,
|
||||||
"rsil": true
|
"rsil": true
|
||||||
},
|
},
|
||||||
"Enum": true
|
"Enum": true
|
||||||
|
@ -16098,6 +16162,11 @@
|
||||||
"base": "first contact",
|
"base": "first contact",
|
||||||
"plus": ""
|
"plus": ""
|
||||||
},
|
},
|
||||||
|
"FirstContactFailed": {
|
||||||
|
"name": "FirstContactFailed",
|
||||||
|
"base": "first contact failed",
|
||||||
|
"plus": ""
|
||||||
|
},
|
||||||
"Gamble": {
|
"Gamble": {
|
||||||
"name": "Gamble",
|
"name": "Gamble",
|
||||||
"base": "gamble",
|
"base": "gamble",
|
||||||
|
@ -16741,7 +16810,7 @@
|
||||||
"Hospital": {
|
"Hospital": {
|
||||||
"name": "Hospital",
|
"name": "Hospital",
|
||||||
"base": "hospital",
|
"base": "hospital",
|
||||||
"plus": ""
|
"plus": "hospital"
|
||||||
},
|
},
|
||||||
"InnTavern": {
|
"InnTavern": {
|
||||||
"name": "InnTavern",
|
"name": "InnTavern",
|
||||||
|
|
|
@ -222,6 +222,10 @@ func (x *HistoricalEventArtifactCreated) Html(c *Context) string {
|
||||||
e = " as the item was a favorite possession"
|
e = " as the item was a favorite possession"
|
||||||
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
|
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
|
||||||
e = " by preserving part of the body"
|
e = " by preserving part of the body"
|
||||||
|
case HistoricalEventArtifactCreatedCircumstanceType_Conflict:
|
||||||
|
e = " after conflict" /// TODO
|
||||||
|
case HistoricalEventArtifactCreatedCircumstanceType_Trauma:
|
||||||
|
e = " after trauma" /// TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch x.Reason {
|
switch x.Reason {
|
||||||
|
@ -827,6 +831,10 @@ func (x *HistoricalEventFirstContact) Html(c *Context) string {
|
||||||
return c.entity(x.ContactorEnid) + " made contact with " + c.entity(x.ContactedEnid) + c.site(x.SiteId, " at")
|
return c.entity(x.ContactorEnid) + " made contact with " + c.entity(x.ContactedEnid) + c.site(x.SiteId, " at")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *HistoricalEventFirstContactFailed) Html(c *Context) string {
|
||||||
|
return c.entity(x.ContactorEnid) + " failed to contact " + c.site(x.SiteId, " at") /// TODO
|
||||||
|
}
|
||||||
|
|
||||||
func (x *HistoricalEventGamble) Html(c *Context) string {
|
func (x *HistoricalEventGamble) Html(c *Context) string {
|
||||||
outcome := ""
|
outcome := ""
|
||||||
switch d := x.NewAccount - x.OldAccount; {
|
switch d := x.NewAccount - x.OldAccount; {
|
||||||
|
|
|
@ -42,7 +42,7 @@ func (w *DfWorld) EventsOfType(t string) any {
|
||||||
func (w *DfWorld) EventsMatching(f func(HistoricalEventDetails) bool) []*HistoricalEvent {
|
func (w *DfWorld) EventsMatching(f func(HistoricalEventDetails) bool) []*HistoricalEvent {
|
||||||
var list []*HistoricalEvent
|
var list []*HistoricalEvent
|
||||||
for _, e := range w.HistoricalEvents {
|
for _, e := range w.HistoricalEvents {
|
||||||
if f(e.Details) {
|
if e.Details != nil && f(e.Details) {
|
||||||
list = append(list, e)
|
list = append(list, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,6 +408,7 @@ func InitSameFields() {
|
||||||
"HistoricalEventFailedIntrigueCorruption": {},
|
"HistoricalEventFailedIntrigueCorruption": {},
|
||||||
"HistoricalEventFieldBattle": {},
|
"HistoricalEventFieldBattle": {},
|
||||||
"HistoricalEventFirstContact": {},
|
"HistoricalEventFirstContact": {},
|
||||||
|
"HistoricalEventFirstContactFailed": {},
|
||||||
"HistoricalEventGamble": {},
|
"HistoricalEventGamble": {},
|
||||||
"HistoricalEventHfAbducted": {},
|
"HistoricalEventHfAbducted": {},
|
||||||
"HistoricalEventHfAskedAboutArtifact": {},
|
"HistoricalEventHfAskedAboutArtifact": {},
|
||||||
|
@ -559,6 +560,11 @@ func InitSameFields() {
|
||||||
"StudentHfid": true,
|
"StudentHfid": true,
|
||||||
"TeacherHfid": true,
|
"TeacherHfid": true,
|
||||||
},
|
},
|
||||||
|
"Unk1": {
|
||||||
|
"ArtifactId": true,
|
||||||
|
"StudentHfid": true,
|
||||||
|
"TeacherHfid": true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"HistoricalEventHfNewPet": {
|
"HistoricalEventHfNewPet": {
|
||||||
"Group": {
|
"Group": {
|
||||||
|
@ -4130,12 +4136,21 @@ type HistoricalEventArtifactCreatedReason int
|
||||||
const (
|
const (
|
||||||
HistoricalEventArtifactCreatedReason_Unknown HistoricalEventArtifactCreatedReason = iota
|
HistoricalEventArtifactCreatedReason_Unknown HistoricalEventArtifactCreatedReason = iota
|
||||||
HistoricalEventArtifactCreatedReason_SanctifyHf
|
HistoricalEventArtifactCreatedReason_SanctifyHf
|
||||||
|
HistoricalEventArtifactCreatedReason_Unknown3550
|
||||||
|
HistoricalEventArtifactCreatedReason_Unknown631
|
||||||
|
HistoricalEventArtifactCreatedReason_Unknown633
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseHistoricalEventArtifactCreatedReason(s string) HistoricalEventArtifactCreatedReason {
|
func parseHistoricalEventArtifactCreatedReason(s string) HistoricalEventArtifactCreatedReason {
|
||||||
switch s {
|
switch s {
|
||||||
case "sanctify_hf":
|
case "sanctify_hf":
|
||||||
return HistoricalEventArtifactCreatedReason_SanctifyHf
|
return HistoricalEventArtifactCreatedReason_SanctifyHf
|
||||||
|
case "unknown 3550":
|
||||||
|
return HistoricalEventArtifactCreatedReason_Unknown3550
|
||||||
|
case "unknown 631":
|
||||||
|
return HistoricalEventArtifactCreatedReason_Unknown631
|
||||||
|
case "unknown 633":
|
||||||
|
return HistoricalEventArtifactCreatedReason_Unknown633
|
||||||
}
|
}
|
||||||
return HistoricalEventArtifactCreatedReason_Unknown
|
return HistoricalEventArtifactCreatedReason_Unknown
|
||||||
}
|
}
|
||||||
|
@ -4144,6 +4159,12 @@ func (s HistoricalEventArtifactCreatedReason) String() string {
|
||||||
switch s {
|
switch s {
|
||||||
case HistoricalEventArtifactCreatedReason_SanctifyHf:
|
case HistoricalEventArtifactCreatedReason_SanctifyHf:
|
||||||
return "sanctify hf"
|
return "sanctify hf"
|
||||||
|
case HistoricalEventArtifactCreatedReason_Unknown3550:
|
||||||
|
return "unknown 3550"
|
||||||
|
case HistoricalEventArtifactCreatedReason_Unknown631:
|
||||||
|
return "unknown 631"
|
||||||
|
case HistoricalEventArtifactCreatedReason_Unknown633:
|
||||||
|
return "unknown 633"
|
||||||
}
|
}
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
@ -4238,31 +4259,41 @@ type HistoricalEventArtifactCreatedCircumstanceType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
HistoricalEventArtifactCreatedCircumstanceType_Unknown HistoricalEventArtifactCreatedCircumstanceType = iota
|
HistoricalEventArtifactCreatedCircumstanceType_Unknown HistoricalEventArtifactCreatedCircumstanceType = iota
|
||||||
|
HistoricalEventArtifactCreatedCircumstanceType_Conflict
|
||||||
HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
||||||
HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
||||||
HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
||||||
|
HistoricalEventArtifactCreatedCircumstanceType_Trauma
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseHistoricalEventArtifactCreatedCircumstanceType(s string) HistoricalEventArtifactCreatedCircumstanceType {
|
func parseHistoricalEventArtifactCreatedCircumstanceType(s string) HistoricalEventArtifactCreatedCircumstanceType {
|
||||||
switch s {
|
switch s {
|
||||||
|
case "conflict":
|
||||||
|
return HistoricalEventArtifactCreatedCircumstanceType_Conflict
|
||||||
case "defeated":
|
case "defeated":
|
||||||
return HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
return HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
||||||
case "favoritepossession":
|
case "favoritepossession":
|
||||||
return HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
return HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
||||||
case "preservebody":
|
case "preservebody":
|
||||||
return HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
return HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
||||||
|
case "trauma":
|
||||||
|
return HistoricalEventArtifactCreatedCircumstanceType_Trauma
|
||||||
}
|
}
|
||||||
return HistoricalEventArtifactCreatedCircumstanceType_Unknown
|
return HistoricalEventArtifactCreatedCircumstanceType_Unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s HistoricalEventArtifactCreatedCircumstanceType) String() string {
|
func (s HistoricalEventArtifactCreatedCircumstanceType) String() string {
|
||||||
switch s {
|
switch s {
|
||||||
|
case HistoricalEventArtifactCreatedCircumstanceType_Conflict:
|
||||||
|
return "conflict"
|
||||||
case HistoricalEventArtifactCreatedCircumstanceType_Defeated:
|
case HistoricalEventArtifactCreatedCircumstanceType_Defeated:
|
||||||
return "defeated"
|
return "defeated"
|
||||||
case HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession:
|
case HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession:
|
||||||
return "favoritepossession"
|
return "favoritepossession"
|
||||||
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
|
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
|
||||||
return "preservebody"
|
return "preservebody"
|
||||||
|
case HistoricalEventArtifactCreatedCircumstanceType_Trauma:
|
||||||
|
return "trauma"
|
||||||
}
|
}
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
@ -5736,7 +5767,10 @@ const (
|
||||||
HistoricalEventChangeHfStateState_Unknown HistoricalEventChangeHfStateState = iota
|
HistoricalEventChangeHfStateState_Unknown HistoricalEventChangeHfStateState = iota
|
||||||
HistoricalEventChangeHfStateState_Refugee
|
HistoricalEventChangeHfStateState_Refugee
|
||||||
HistoricalEventChangeHfStateState_Settled
|
HistoricalEventChangeHfStateState_Settled
|
||||||
|
HistoricalEventChangeHfStateState_Settler
|
||||||
HistoricalEventChangeHfStateState_Visiting
|
HistoricalEventChangeHfStateState_Visiting
|
||||||
|
HistoricalEventChangeHfStateState_Visitor
|
||||||
|
HistoricalEventChangeHfStateState_Wanderer
|
||||||
HistoricalEventChangeHfStateState_Wandering
|
HistoricalEventChangeHfStateState_Wandering
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5746,8 +5780,14 @@ func parseHistoricalEventChangeHfStateState(s string) HistoricalEventChangeHfSta
|
||||||
return HistoricalEventChangeHfStateState_Refugee
|
return HistoricalEventChangeHfStateState_Refugee
|
||||||
case "settled":
|
case "settled":
|
||||||
return HistoricalEventChangeHfStateState_Settled
|
return HistoricalEventChangeHfStateState_Settled
|
||||||
|
case "settler":
|
||||||
|
return HistoricalEventChangeHfStateState_Settler
|
||||||
case "visiting":
|
case "visiting":
|
||||||
return HistoricalEventChangeHfStateState_Visiting
|
return HistoricalEventChangeHfStateState_Visiting
|
||||||
|
case "visitor":
|
||||||
|
return HistoricalEventChangeHfStateState_Visitor
|
||||||
|
case "wanderer":
|
||||||
|
return HistoricalEventChangeHfStateState_Wanderer
|
||||||
case "wandering":
|
case "wandering":
|
||||||
return HistoricalEventChangeHfStateState_Wandering
|
return HistoricalEventChangeHfStateState_Wandering
|
||||||
}
|
}
|
||||||
|
@ -5760,8 +5800,14 @@ func (s HistoricalEventChangeHfStateState) String() string {
|
||||||
return "refugee"
|
return "refugee"
|
||||||
case HistoricalEventChangeHfStateState_Settled:
|
case HistoricalEventChangeHfStateState_Settled:
|
||||||
return "settled"
|
return "settled"
|
||||||
|
case HistoricalEventChangeHfStateState_Settler:
|
||||||
|
return "settler"
|
||||||
case HistoricalEventChangeHfStateState_Visiting:
|
case HistoricalEventChangeHfStateState_Visiting:
|
||||||
return "visiting"
|
return "visiting"
|
||||||
|
case HistoricalEventChangeHfStateState_Visitor:
|
||||||
|
return "visitor"
|
||||||
|
case HistoricalEventChangeHfStateState_Wanderer:
|
||||||
|
return "wanderer"
|
||||||
case HistoricalEventChangeHfStateState_Wandering:
|
case HistoricalEventChangeHfStateState_Wandering:
|
||||||
return "wandering"
|
return "wandering"
|
||||||
}
|
}
|
||||||
|
@ -9405,6 +9451,53 @@ func (x *HistoricalEventFirstContact) MarshalJSON() ([]byte, error) {
|
||||||
return json.Marshal(d)
|
return json.Marshal(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type HistoricalEventFirstContactFailed struct {
|
||||||
|
ContactorEnid int `json:"contactorEnid" legend:"base" related:""` // contactor_enid
|
||||||
|
RejectorEnid int `json:"rejectorEnid" legend:"base" related:""` // rejector_enid
|
||||||
|
SiteId int `json:"siteId" legend:"base" related:""` // site_id
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewHistoricalEventFirstContactFailed() *HistoricalEventFirstContactFailed {
|
||||||
|
return &HistoricalEventFirstContactFailed{
|
||||||
|
ContactorEnid: -1,
|
||||||
|
RejectorEnid: -1,
|
||||||
|
SiteId: -1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventFirstContactFailed) Type() string { return "first contact failed" }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToEntity(id int) bool {
|
||||||
|
return x.ContactorEnid == id || x.RejectorEnid == id
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToHf(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToArtifact(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToSite(id int) bool { return x.SiteId == id }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToStructure(siteId, id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToRegion(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToWorldConstruction(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToWrittenContent(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToDanceForm(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToMusicalForm(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToPoeticForm(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToMountain(id int) bool { return false }
|
||||||
|
func (x *HistoricalEventFirstContactFailed) RelatedToIdentity(id int) bool { return false }
|
||||||
|
|
||||||
|
func (x *HistoricalEventFirstContactFailed) CheckFields() {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *HistoricalEventFirstContactFailed) MarshalJSON() ([]byte, error) {
|
||||||
|
d := make(map[string]any)
|
||||||
|
if x.ContactorEnid != -1 {
|
||||||
|
d["contactorEnid"] = x.ContactorEnid
|
||||||
|
}
|
||||||
|
if x.RejectorEnid != -1 {
|
||||||
|
d["rejectorEnid"] = x.RejectorEnid
|
||||||
|
}
|
||||||
|
if x.SiteId != -1 {
|
||||||
|
d["siteId"] = x.SiteId
|
||||||
|
}
|
||||||
|
return json.Marshal(d)
|
||||||
|
}
|
||||||
|
|
||||||
type HistoricalEventGamble struct {
|
type HistoricalEventGamble struct {
|
||||||
GamblerHfid int `json:"gamblerHfid" legend:"base" related:""` // gambler_hfid
|
GamblerHfid int `json:"gamblerHfid" legend:"base" related:""` // gambler_hfid
|
||||||
NewAccount int `json:"newAccount" legend:"base" related:""` // new_account
|
NewAccount int `json:"newAccount" legend:"base" related:""` // new_account
|
||||||
|
@ -11312,6 +11405,7 @@ type HistoricalEventHfLearnsSecret struct {
|
||||||
SecretText HistoricalEventHfLearnsSecretSecretText `json:"secretText" legend:"plus" related:""` // secret_text
|
SecretText HistoricalEventHfLearnsSecretSecretText `json:"secretText" legend:"plus" related:""` // secret_text
|
||||||
StudentHfid int `json:"studentHfid" legend:"base" related:""` // student_hfid
|
StudentHfid int `json:"studentHfid" legend:"base" related:""` // student_hfid
|
||||||
TeacherHfid int `json:"teacherHfid" legend:"base" related:""` // teacher_hfid
|
TeacherHfid int `json:"teacherHfid" legend:"base" related:""` // teacher_hfid
|
||||||
|
Unk1 int `json:"unk1" legend:"plus" related:""` // unk_1
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewHistoricalEventHfLearnsSecret() *HistoricalEventHfLearnsSecret {
|
func NewHistoricalEventHfLearnsSecret() *HistoricalEventHfLearnsSecret {
|
||||||
|
@ -11319,6 +11413,7 @@ func NewHistoricalEventHfLearnsSecret() *HistoricalEventHfLearnsSecret {
|
||||||
ArtifactId: -1,
|
ArtifactId: -1,
|
||||||
StudentHfid: -1,
|
StudentHfid: -1,
|
||||||
TeacherHfid: -1,
|
TeacherHfid: -1,
|
||||||
|
Unk1: -1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (x *HistoricalEventHfLearnsSecret) Type() string { return "hf learns secret" }
|
func (x *HistoricalEventHfLearnsSecret) Type() string { return "hf learns secret" }
|
||||||
|
@ -11339,6 +11434,15 @@ func (x *HistoricalEventHfLearnsSecret) RelatedToMountain(id int) bool
|
||||||
func (x *HistoricalEventHfLearnsSecret) RelatedToIdentity(id int) bool { return false }
|
func (x *HistoricalEventHfLearnsSecret) RelatedToIdentity(id int) bool { return false }
|
||||||
|
|
||||||
func (x *HistoricalEventHfLearnsSecret) CheckFields() {
|
func (x *HistoricalEventHfLearnsSecret) CheckFields() {
|
||||||
|
if x.Unk1 != x.ArtifactId {
|
||||||
|
sameFields["HistoricalEventHfLearnsSecret"]["Unk1"]["ArtifactId"] = false
|
||||||
|
}
|
||||||
|
if x.Unk1 != x.StudentHfid {
|
||||||
|
sameFields["HistoricalEventHfLearnsSecret"]["Unk1"]["StudentHfid"] = false
|
||||||
|
}
|
||||||
|
if x.Unk1 != x.TeacherHfid {
|
||||||
|
sameFields["HistoricalEventHfLearnsSecret"]["Unk1"]["TeacherHfid"] = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HistoricalEventHfLearnsSecret) MarshalJSON() ([]byte, error) {
|
func (x *HistoricalEventHfLearnsSecret) MarshalJSON() ([]byte, error) {
|
||||||
|
@ -11356,6 +11460,9 @@ func (x *HistoricalEventHfLearnsSecret) MarshalJSON() ([]byte, error) {
|
||||||
if x.TeacherHfid != -1 {
|
if x.TeacherHfid != -1 {
|
||||||
d["teacherHfid"] = x.TeacherHfid
|
d["teacherHfid"] = x.TeacherHfid
|
||||||
}
|
}
|
||||||
|
if x.Unk1 != -1 {
|
||||||
|
d["unk1"] = x.Unk1
|
||||||
|
}
|
||||||
return json.Marshal(d)
|
return json.Marshal(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16674,8 +16781,10 @@ func (x *HistoricalEventMasterpieceLost) MarshalJSON() ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type HistoricalEventMerchant struct {
|
type HistoricalEventMerchant struct {
|
||||||
|
AllDead bool `json:"allDead" legend:"base" related:""` // all_dead
|
||||||
DepotEntityId int `json:"depotEntityId" legend:"base" related:""` // depot_entity_id
|
DepotEntityId int `json:"depotEntityId" legend:"base" related:""` // depot_entity_id
|
||||||
Hardship bool `json:"hardship" legend:"base" related:""` // hardship
|
Hardship bool `json:"hardship" legend:"base" related:""` // hardship
|
||||||
|
IsTribute bool `json:"isTribute" legend:"base" related:""` // is_tribute
|
||||||
LostValue bool `json:"lostValue" legend:"base" related:""` // lost_value
|
LostValue bool `json:"lostValue" legend:"base" related:""` // lost_value
|
||||||
SiteId int `json:"siteId" legend:"base" related:""` // site_id
|
SiteId int `json:"siteId" legend:"base" related:""` // site_id
|
||||||
TraderEntityId int `json:"traderEntityId" legend:"base" related:""` // trader_entity_id
|
TraderEntityId int `json:"traderEntityId" legend:"base" related:""` // trader_entity_id
|
||||||
|
@ -16710,10 +16819,12 @@ func (x *HistoricalEventMerchant) CheckFields() {
|
||||||
|
|
||||||
func (x *HistoricalEventMerchant) MarshalJSON() ([]byte, error) {
|
func (x *HistoricalEventMerchant) MarshalJSON() ([]byte, error) {
|
||||||
d := make(map[string]any)
|
d := make(map[string]any)
|
||||||
|
d["allDead"] = x.AllDead
|
||||||
if x.DepotEntityId != -1 {
|
if x.DepotEntityId != -1 {
|
||||||
d["depotEntityId"] = x.DepotEntityId
|
d["depotEntityId"] = x.DepotEntityId
|
||||||
}
|
}
|
||||||
d["hardship"] = x.Hardship
|
d["hardship"] = x.Hardship
|
||||||
|
d["isTribute"] = x.IsTribute
|
||||||
d["lostValue"] = x.LostValue
|
d["lostValue"] = x.LostValue
|
||||||
if x.SiteId != -1 {
|
if x.SiteId != -1 {
|
||||||
d["siteId"] = x.SiteId
|
d["siteId"] = x.SiteId
|
||||||
|
@ -24923,6 +25034,8 @@ func parseHistoricalEvent(p *util.XMLParser) (*HistoricalEvent, error) {
|
||||||
obj.Details, err = parseHistoricalEventFieldBattle(p)
|
obj.Details, err = parseHistoricalEventFieldBattle(p)
|
||||||
case "first contact":
|
case "first contact":
|
||||||
obj.Details, err = parseHistoricalEventFirstContact(p)
|
obj.Details, err = parseHistoricalEventFirstContact(p)
|
||||||
|
case "first contact failed":
|
||||||
|
obj.Details, err = parseHistoricalEventFirstContactFailed(p)
|
||||||
case "gamble":
|
case "gamble":
|
||||||
obj.Details, err = parseHistoricalEventGamble(p)
|
obj.Details, err = parseHistoricalEventGamble(p)
|
||||||
case "hf abducted":
|
case "hf abducted":
|
||||||
|
@ -31812,6 +31925,70 @@ func parseHistoricalEventFirstContactPlus(p *util.XMLParser, obj *HistoricalEven
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func parseHistoricalEventFirstContactFailed(p *util.XMLParser) (*HistoricalEventFirstContactFailed, error) {
|
||||||
|
var obj = NewHistoricalEventFirstContactFailed()
|
||||||
|
|
||||||
|
for {
|
||||||
|
t, n, err := p.Token()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch t {
|
||||||
|
case util.StartElement:
|
||||||
|
switch n {
|
||||||
|
case "contactor_enid":
|
||||||
|
data, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.ContactorEnid = num(data)
|
||||||
|
case "rejector_enid":
|
||||||
|
data, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.RejectorEnid = num(data)
|
||||||
|
case "site_id":
|
||||||
|
data, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.SiteId = num(data)
|
||||||
|
default:
|
||||||
|
// fmt.Println("unknown field", n)
|
||||||
|
p.Skip()
|
||||||
|
}
|
||||||
|
|
||||||
|
case util.EndElement:
|
||||||
|
obj.CheckFields()
|
||||||
|
return obj, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func parseHistoricalEventFirstContactFailedPlus(p *util.XMLParser, obj *HistoricalEventFirstContactFailed) (*HistoricalEventFirstContactFailed, error) {
|
||||||
|
if obj == nil {
|
||||||
|
obj = NewHistoricalEventFirstContactFailed()
|
||||||
|
}
|
||||||
|
|
||||||
|
for {
|
||||||
|
t, n, err := p.Token()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch t {
|
||||||
|
case util.StartElement:
|
||||||
|
switch n {
|
||||||
|
default:
|
||||||
|
// fmt.Println("unknown field", n)
|
||||||
|
p.Skip()
|
||||||
|
}
|
||||||
|
|
||||||
|
case util.EndElement:
|
||||||
|
obj.CheckFields()
|
||||||
|
return obj, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
func parseHistoricalEventGamble(p *util.XMLParser) (*HistoricalEventGamble, error) {
|
func parseHistoricalEventGamble(p *util.XMLParser) (*HistoricalEventGamble, error) {
|
||||||
var obj = NewHistoricalEventGamble()
|
var obj = NewHistoricalEventGamble()
|
||||||
|
|
||||||
|
@ -33393,6 +33570,12 @@ func parseHistoricalEventHfLearnsSecretPlus(p *util.XMLParser, obj *HistoricalEv
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
obj.TeacherHfid = num(data)
|
obj.TeacherHfid = num(data)
|
||||||
|
case "unk_1":
|
||||||
|
data, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.Unk1 = num(data)
|
||||||
default:
|
default:
|
||||||
// fmt.Println("unknown field", n)
|
// fmt.Println("unknown field", n)
|
||||||
p.Skip()
|
p.Skip()
|
||||||
|
@ -36225,6 +36408,12 @@ func parseHistoricalEventMerchant(p *util.XMLParser) (*HistoricalEventMerchant,
|
||||||
switch t {
|
switch t {
|
||||||
case util.StartElement:
|
case util.StartElement:
|
||||||
switch n {
|
switch n {
|
||||||
|
case "all_dead":
|
||||||
|
_, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.AllDead = true
|
||||||
case "depot_entity_id":
|
case "depot_entity_id":
|
||||||
data, err := p.Value()
|
data, err := p.Value()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -36237,6 +36426,12 @@ func parseHistoricalEventMerchant(p *util.XMLParser) (*HistoricalEventMerchant,
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
obj.Hardship = true
|
obj.Hardship = true
|
||||||
|
case "is_tribute":
|
||||||
|
_, err := p.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
obj.IsTribute = true
|
||||||
case "lost_value":
|
case "lost_value":
|
||||||
_, err := p.Value()
|
_, err := p.Value()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue