30693 lines
846 KiB
Go
30693 lines
846 KiB
Go
// Code generated by legendsbrowser; DO NOT EDIT.
|
|
package model
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
|
)
|
|
|
|
func InitSameFields() {
|
|
sameFields = map[string]map[string]map[string]bool{
|
|
"Artifact": {
|
|
"ItemDescription": {},
|
|
"ItemSubtype": {},
|
|
"ItemType": {},
|
|
"Mat": {},
|
|
"PageCount": {
|
|
"AbsTileX": true,
|
|
"AbsTileY": true,
|
|
"AbsTileZ": true,
|
|
"HolderHfid": true,
|
|
"SiteId": true,
|
|
"StructureLocalId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Writing": {
|
|
"AbsTileX": true,
|
|
"AbsTileY": true,
|
|
"AbsTileZ": true,
|
|
"HolderHfid": true,
|
|
"SiteId": true,
|
|
"StructureLocalId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"Creature": {},
|
|
"DanceForm": {},
|
|
"DfWorld": {},
|
|
"Entity": {},
|
|
"EntityEntityLink": {},
|
|
"EntityFormerPositionLink": {},
|
|
"EntityFormerSquadLink": {},
|
|
"EntityPopulation": {},
|
|
"EntityPosition": {},
|
|
"EntityPositionAssignment": {},
|
|
"EntityPositionLink": {},
|
|
"EntityReputation": {},
|
|
"EntitySquadLink": {},
|
|
"Feature": {},
|
|
"HfLink": {},
|
|
"HfSkill": {},
|
|
"HistoricalEra": {},
|
|
"HistoricalEvent": {},
|
|
"HistoricalEventAddHfEntityHonor": {},
|
|
"HistoricalEventAddHfEntityLink": {
|
|
"Civ": {
|
|
"CivId": true,
|
|
"Hfid": true,
|
|
"PositionId": true,
|
|
},
|
|
"Histfig": {
|
|
"CivId": true,
|
|
"Hfid": true,
|
|
"PositionId": true,
|
|
},
|
|
"LinkType": {
|
|
"Link": true,
|
|
},
|
|
"Position": {},
|
|
},
|
|
"HistoricalEventAddHfHfLink": {
|
|
"Hf": {
|
|
"Hfid": true,
|
|
"HfidTarget": true,
|
|
},
|
|
"HfTarget": {
|
|
"Hfid": true,
|
|
"HfidTarget": true,
|
|
},
|
|
"LinkType": {},
|
|
},
|
|
"HistoricalEventAddHfSiteLink": {
|
|
"Civ": {
|
|
"SiteId": true,
|
|
},
|
|
"Histfig": {
|
|
"SiteId": true,
|
|
},
|
|
"LinkType": {},
|
|
"Site": {
|
|
"SiteId": true,
|
|
},
|
|
"Structure": {
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventAgreementFormed": {},
|
|
"HistoricalEventAgreementMade": {},
|
|
"HistoricalEventAgreementRejected": {},
|
|
"HistoricalEventArtifactClaimFormed": {},
|
|
"HistoricalEventArtifactCopied": {},
|
|
"HistoricalEventArtifactCreated": {
|
|
"CreatorHfid": {
|
|
"HistFigureId": true,
|
|
"SiteId": true,
|
|
"UnitId": true,
|
|
},
|
|
"CreatorUnitId": {
|
|
"HistFigureId": true,
|
|
"SiteId": true,
|
|
"UnitId": true,
|
|
},
|
|
"Reason": {},
|
|
"SanctifyHf": {
|
|
"HistFigureId": true,
|
|
"SiteId": true,
|
|
"UnitId": true,
|
|
},
|
|
"Site": {
|
|
"HistFigureId": true,
|
|
"SiteId": true,
|
|
"UnitId": true,
|
|
},
|
|
},
|
|
"HistoricalEventArtifactCreatedCircumstance": {},
|
|
"HistoricalEventArtifactDestroyed": {},
|
|
"HistoricalEventArtifactFound": {},
|
|
"HistoricalEventArtifactGiven": {},
|
|
"HistoricalEventArtifactLost": {},
|
|
"HistoricalEventArtifactPossessed": {},
|
|
"HistoricalEventArtifactRecovered": {},
|
|
"HistoricalEventArtifactStored": {},
|
|
"HistoricalEventArtifactTransformed": {},
|
|
"HistoricalEventAssumeIdentity": {
|
|
"IdentityCaste": {},
|
|
"IdentityHistfigId": {
|
|
"IdentityId": true,
|
|
"TargetEnid": true,
|
|
"TricksterHfid": true,
|
|
},
|
|
"IdentityName": {},
|
|
"IdentityNemesisId": {
|
|
"IdentityId": true,
|
|
"TargetEnid": true,
|
|
"TricksterHfid": true,
|
|
},
|
|
"IdentityRace": {},
|
|
"Target": {
|
|
"IdentityId": true,
|
|
"TargetEnid": true,
|
|
"TricksterHfid": true,
|
|
},
|
|
"Trickster": {
|
|
"IdentityId": true,
|
|
"TargetEnid": true,
|
|
"TricksterHfid": true,
|
|
},
|
|
},
|
|
"HistoricalEventAttackedSite": {},
|
|
"HistoricalEventBodyAbused": {
|
|
"AbuseType": {},
|
|
"Civ": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Histfig": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Interaction": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"ItemMat": {
|
|
"Coords": true,
|
|
},
|
|
"ItemSubtype": {},
|
|
"ItemType": {},
|
|
"PileType": {},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Structure": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Tree": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"VictimEntity": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventBuildingProfileAcquired": {},
|
|
"HistoricalEventCeremony": {},
|
|
"HistoricalEventChangeHfBodyState": {},
|
|
"HistoricalEventChangeHfJob": {
|
|
"NewJob": {},
|
|
"OldJob": {},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventChangeHfState": {
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventChangedCreatureType": {
|
|
"Changee": {
|
|
"ChangeeHfid": true,
|
|
"ChangerHfid": true,
|
|
},
|
|
"Changer": {
|
|
"ChangeeHfid": true,
|
|
"ChangerHfid": true,
|
|
},
|
|
},
|
|
"HistoricalEventCollection": {},
|
|
"HistoricalEventCollectionAbduction": {},
|
|
"HistoricalEventCollectionBattle": {},
|
|
"HistoricalEventCollectionBeastAttack": {},
|
|
"HistoricalEventCollectionCeremony": {},
|
|
"HistoricalEventCollectionCompetition": {},
|
|
"HistoricalEventCollectionDuel": {},
|
|
"HistoricalEventCollectionEntityOverthrown": {},
|
|
"HistoricalEventCollectionInsurrection": {},
|
|
"HistoricalEventCollectionJourney": {},
|
|
"HistoricalEventCollectionOccasion": {},
|
|
"HistoricalEventCollectionPerformance": {},
|
|
"HistoricalEventCollectionPersecution": {},
|
|
"HistoricalEventCollectionProcession": {},
|
|
"HistoricalEventCollectionPurge": {},
|
|
"HistoricalEventCollectionRaid": {},
|
|
"HistoricalEventCollectionSiteConquered": {},
|
|
"HistoricalEventCollectionTheft": {},
|
|
"HistoricalEventCollectionWar": {},
|
|
"HistoricalEventCompetition": {},
|
|
"HistoricalEventCreateEntityPosition": {},
|
|
"HistoricalEventCreatedSite": {},
|
|
"HistoricalEventCreatedStructure": {
|
|
"BuilderHf": {
|
|
"BuilderHfid": true,
|
|
"CivId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Civ": {
|
|
"BuilderHfid": true,
|
|
"CivId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Rebuild": {},
|
|
"Site": {
|
|
"BuilderHfid": true,
|
|
"CivId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"SiteCiv": {
|
|
"BuilderHfid": true,
|
|
"CivId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"BuilderHfid": true,
|
|
"CivId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventCreatedWorldConstruction": {},
|
|
"HistoricalEventCreatureDevoured": {
|
|
"Caste": {},
|
|
"Eater": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Entity": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Race": {},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Victim": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventDanceFormCreated": {},
|
|
"HistoricalEventDestroyedSite": {},
|
|
"HistoricalEventDiplomatLost": {
|
|
"Entity": {
|
|
"SiteId": true,
|
|
},
|
|
"Involved": {
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventEntityAllianceFormed": {},
|
|
"HistoricalEventEntityBreachFeatureLayer": {},
|
|
"HistoricalEventEntityCreated": {},
|
|
"HistoricalEventEntityDissolved": {},
|
|
"HistoricalEventEntityEquipmentPurchase": {},
|
|
"HistoricalEventEntityExpelsHf": {},
|
|
"HistoricalEventEntityFledSite": {},
|
|
"HistoricalEventEntityIncorporated": {},
|
|
"HistoricalEventEntityLaw": {},
|
|
"HistoricalEventEntityOverthrown": {},
|
|
"HistoricalEventEntityPersecuted": {},
|
|
"HistoricalEventEntityPrimaryCriminals": {
|
|
"Action": {},
|
|
"Entity": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Site": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventEntityRampagedInSite": {},
|
|
"HistoricalEventEntityRelocate": {
|
|
"Action": {},
|
|
"Entity": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Site": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"EntityId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventEntitySearchedSite": {},
|
|
"HistoricalEventFailedFrameAttempt": {},
|
|
"HistoricalEventFailedIntrigueCorruption": {},
|
|
"HistoricalEventFieldBattle": {},
|
|
"HistoricalEventFirstContact": {},
|
|
"HistoricalEventGamble": {},
|
|
"HistoricalEventHfAbducted": {},
|
|
"HistoricalEventHfAttackedSite": {},
|
|
"HistoricalEventHfConfronted": {},
|
|
"HistoricalEventHfConvicted": {},
|
|
"HistoricalEventHfDestroyedSite": {},
|
|
"HistoricalEventHfDied": {
|
|
"ArtifactId": {
|
|
"FeatureLayerId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
"SlayerHfid": true,
|
|
"SlayerItemId": true,
|
|
"SlayerShooterItemId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"DeathCause": {},
|
|
"Item": {
|
|
"FeatureLayerId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
"SlayerHfid": true,
|
|
"SlayerItemId": true,
|
|
"SlayerShooterItemId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"ItemSubtype": {},
|
|
"ItemType": {},
|
|
"Mat": {},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
"SlayerHfid": true,
|
|
"SlayerItemId": true,
|
|
"SlayerShooterItemId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"SlayerHf": {
|
|
"FeatureLayerId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
"SlayerHfid": true,
|
|
"SlayerItemId": true,
|
|
"SlayerShooterItemId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"VictimHf": {
|
|
"FeatureLayerId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
"SlayerHfid": true,
|
|
"SlayerItemId": true,
|
|
"SlayerShooterItemId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfDisturbedStructure": {
|
|
"Action": {},
|
|
"Histfig": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Site": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfDoesInteraction": {
|
|
"Doer": {
|
|
"DoerHfid": true,
|
|
"TargetHfid": true,
|
|
},
|
|
"InteractionAction": {
|
|
"Interaction": true,
|
|
},
|
|
"Region": {
|
|
"DoerHfid": true,
|
|
"TargetHfid": true,
|
|
},
|
|
"Site": {
|
|
"DoerHfid": true,
|
|
"TargetHfid": true,
|
|
},
|
|
"Source": {
|
|
"DoerHfid": true,
|
|
"TargetHfid": true,
|
|
},
|
|
"Target": {
|
|
"DoerHfid": true,
|
|
"TargetHfid": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfEnslaved": {},
|
|
"HistoricalEventHfEquipmentPurchase": {},
|
|
"HistoricalEventHfFreed": {},
|
|
"HistoricalEventHfGainsSecretGoal": {},
|
|
"HistoricalEventHfInterrogated": {},
|
|
"HistoricalEventHfLearnsSecret": {
|
|
"Artifact": {
|
|
"ArtifactId": true,
|
|
"StudentHfid": true,
|
|
"TeacherHfid": true,
|
|
},
|
|
"SecretText": {},
|
|
"Student": {
|
|
"ArtifactId": true,
|
|
"StudentHfid": true,
|
|
"TeacherHfid": true,
|
|
},
|
|
"Teacher": {
|
|
"ArtifactId": true,
|
|
"StudentHfid": true,
|
|
"TeacherHfid": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfNewPet": {
|
|
"Group": {
|
|
"FeatureLayerId": true,
|
|
"GroupHfid": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
"Pets": {
|
|
"Coords": true,
|
|
},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"GroupHfid": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfPerformedHorribleExperiments": {},
|
|
"HistoricalEventHfPrayedInsideStructure": {
|
|
"Action": {},
|
|
"Histfig": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Site": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfPreach": {},
|
|
"HistoricalEventHfProfanedStructure": {
|
|
"Action": {},
|
|
"Histfig": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Site": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
"Structure": {
|
|
"HistFigId": true,
|
|
"SiteId": true,
|
|
"StructureId": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfRansomed": {},
|
|
"HistoricalEventHfReachSummit": {},
|
|
"HistoricalEventHfRecruitedUnitTypeForEntity": {},
|
|
"HistoricalEventHfRelationshipDenied": {},
|
|
"HistoricalEventHfReunion": {},
|
|
"HistoricalEventHfRevived": {},
|
|
"HistoricalEventHfSimpleBattleEvent": {},
|
|
"HistoricalEventHfTravel": {},
|
|
"HistoricalEventHfViewedArtifact": {},
|
|
"HistoricalEventHfWounded": {
|
|
"BodyPart": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
"InjuryType": {},
|
|
"PartLost": {},
|
|
"Site": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
"Woundee": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
"WoundeeCaste": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
"WoundeeRace": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
"Wounder": {
|
|
"FeatureLayerId": true,
|
|
"SiteId": true,
|
|
"SubregionId": true,
|
|
"WoundeeHfid": true,
|
|
"WounderHfid": true,
|
|
},
|
|
},
|
|
"HistoricalEventHfsFormedIntrigueRelationship": {},
|
|
"HistoricalEventHfsFormedReputationRelationship": {},
|
|
"HistoricalEventHolyCityDeclaration": {},
|
|
"HistoricalEventInsurrectionStarted": {},
|
|
"HistoricalEventItemStolen": {
|
|
"Entity": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"Histfig": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"Item": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"ItemSubtype": {},
|
|
"ItemType": {},
|
|
"Mat": {},
|
|
"Matindex": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"Mattype": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"Site": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"StashSite": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"Structure": {
|
|
"CircumstanceId": true,
|
|
},
|
|
"TheftMethod": {},
|
|
},
|
|
"HistoricalEventItemStolenCircumstance": {},
|
|
"HistoricalEventKnowledgeDiscovered": {},
|
|
"HistoricalEventMasterpieceArchConstructed": {
|
|
"BuildingCustom": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"BuildingSubtype": {},
|
|
"BuildingType": {},
|
|
"Maker": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"MakerEntity": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"Unk2": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventMasterpieceEngraving": {
|
|
"ArtId": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"ArtSubid": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"Maker": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"MakerEntity": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventMasterpieceFood": {},
|
|
"HistoricalEventMasterpieceItem": {
|
|
"ItemId": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"ItemSubtype": {},
|
|
"ItemType": {},
|
|
"Maker": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"MakerEntity": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
"Mat": {},
|
|
"Site": {
|
|
"EntityId": true,
|
|
"Hfid": true,
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventMasterpieceItemImprovement": {},
|
|
"HistoricalEventMasterpieceLost": {},
|
|
"HistoricalEventMerchant": {
|
|
"Destination": {
|
|
"DepotEntityId": true,
|
|
"SiteId": true,
|
|
"TraderEntityId": true,
|
|
},
|
|
"Site": {
|
|
"DepotEntityId": true,
|
|
"SiteId": true,
|
|
"TraderEntityId": true,
|
|
},
|
|
"Source": {
|
|
"DepotEntityId": true,
|
|
"SiteId": true,
|
|
"TraderEntityId": true,
|
|
},
|
|
},
|
|
"HistoricalEventModifiedBuilding": {},
|
|
"HistoricalEventMusicalFormCreated": {},
|
|
"HistoricalEventNewSiteLeader": {},
|
|
"HistoricalEventPeaceAccepted": {
|
|
"Destination": {
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"SiteId": true,
|
|
},
|
|
"Source": {
|
|
"SiteId": true,
|
|
},
|
|
"Topic": {},
|
|
},
|
|
"HistoricalEventPeaceRejected": {
|
|
"Destination": {
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"SiteId": true,
|
|
},
|
|
"Source": {
|
|
"SiteId": true,
|
|
},
|
|
"Topic": {},
|
|
},
|
|
"HistoricalEventPerformance": {},
|
|
"HistoricalEventPlunderedSite": {},
|
|
"HistoricalEventPoeticFormCreated": {},
|
|
"HistoricalEventProcession": {},
|
|
"HistoricalEventRazedStructure": {},
|
|
"HistoricalEventReclaimSite": {},
|
|
"HistoricalEventRegionpopIncorporatedIntoEntity": {},
|
|
"HistoricalEventRelationship": {},
|
|
"HistoricalEventRelationshipSupplement": {},
|
|
"HistoricalEventRemoveHfEntityLink": {
|
|
"Civ": {
|
|
"CivId": true,
|
|
"Hfid": true,
|
|
"PositionId": true,
|
|
},
|
|
"Histfig": {
|
|
"CivId": true,
|
|
"Hfid": true,
|
|
"PositionId": true,
|
|
},
|
|
"LinkType": {
|
|
"Link": true,
|
|
},
|
|
"Position": {},
|
|
},
|
|
"HistoricalEventRemoveHfHfLink": {},
|
|
"HistoricalEventRemoveHfSiteLink": {
|
|
"Civ": {
|
|
"SiteId": true,
|
|
},
|
|
"Histfig": {
|
|
"SiteId": true,
|
|
},
|
|
"LinkType": {},
|
|
"Site": {
|
|
"SiteId": true,
|
|
},
|
|
"Structure": {
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventReplacedStructure": {
|
|
"Civ": {
|
|
"CivId": true,
|
|
"NewAbId": true,
|
|
"OldAbId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
},
|
|
"NewStructure": {
|
|
"CivId": true,
|
|
"NewAbId": true,
|
|
"OldAbId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
},
|
|
"OldStructure": {
|
|
"CivId": true,
|
|
"NewAbId": true,
|
|
"OldAbId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
},
|
|
"Site": {
|
|
"CivId": true,
|
|
"NewAbId": true,
|
|
"OldAbId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
},
|
|
"SiteCiv": {
|
|
"CivId": true,
|
|
"NewAbId": true,
|
|
"OldAbId": true,
|
|
"SiteCivId": true,
|
|
"SiteId": true,
|
|
},
|
|
},
|
|
"HistoricalEventSiteDied": {},
|
|
"HistoricalEventSiteDispute": {},
|
|
"HistoricalEventSiteRetired": {},
|
|
"HistoricalEventSiteSurrendered": {},
|
|
"HistoricalEventSiteTakenOver": {},
|
|
"HistoricalEventSiteTributeForced": {},
|
|
"HistoricalEventSneakIntoSite": {},
|
|
"HistoricalEventSpottedLeavingSite": {},
|
|
"HistoricalEventSquadVsSquad": {},
|
|
"HistoricalEventTacticalSituation": {},
|
|
"HistoricalEventTrade": {},
|
|
"HistoricalEventWrittenContentComposed": {},
|
|
"HistoricalFigure": {
|
|
"Sex": {
|
|
"Appeared": true,
|
|
"BirthSeconds72": true,
|
|
"BirthYear": true,
|
|
"BreedId": true,
|
|
"CurrentIdentityId": true,
|
|
"DeathSeconds72": true,
|
|
"DeathYear": true,
|
|
"EntPopId": true,
|
|
},
|
|
},
|
|
"HistoricalFigureEntityLink": {},
|
|
"HistoricalFigureSiteProperty": {},
|
|
"Honor": {},
|
|
"HonorEntity": {},
|
|
"Identity": {},
|
|
"IntrigueActor": {},
|
|
"IntriguePlot": {},
|
|
"Item": {},
|
|
"Landmass": {},
|
|
"MountainPeak": {},
|
|
"MusicalForm": {},
|
|
"Occasion": {},
|
|
"PlotActor": {},
|
|
"PoeticForm": {},
|
|
"Reference": {},
|
|
"Region": {},
|
|
"RelationshipProfileHfHistorical": {},
|
|
"RelationshipProfileHfIdentity": {},
|
|
"RelationshipProfileHfVisual": {},
|
|
"River": {},
|
|
"Schedule": {},
|
|
"Site": {
|
|
"CivId": {},
|
|
"CurOwnerId": {},
|
|
},
|
|
"SiteLink": {},
|
|
"SiteSiteProperty": {},
|
|
"Structure": {
|
|
"Deity": {
|
|
"EntityId": true,
|
|
"LocalId": true,
|
|
"WorshipHfid": true,
|
|
},
|
|
"DeityType": {
|
|
"EntityId": true,
|
|
"LocalId": true,
|
|
"WorshipHfid": true,
|
|
},
|
|
"DungeonType": {
|
|
"EntityId": true,
|
|
"LocalId": true,
|
|
"WorshipHfid": true,
|
|
},
|
|
"Name2": {},
|
|
"Religion": {
|
|
"EntityId": true,
|
|
"LocalId": true,
|
|
"WorshipHfid": true,
|
|
},
|
|
},
|
|
"UndergroundRegion": {
|
|
"Coords": {},
|
|
},
|
|
"VagueRelationship": {},
|
|
"WorldConstruction": {},
|
|
"WrittenContent": {
|
|
"Author": {
|
|
"AuthorHfid": true,
|
|
"AuthorRoll": true,
|
|
"FormId": true,
|
|
},
|
|
"PageEnd": {
|
|
"AuthorHfid": true,
|
|
"AuthorRoll": true,
|
|
"FormId": true,
|
|
},
|
|
"PageStart": {
|
|
"AuthorHfid": true,
|
|
"AuthorRoll": true,
|
|
"FormId": true,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
type Artifact struct {
|
|
AbsTileX int `json:"absTileX" legend:"base"` // abs_tile_x
|
|
AbsTileY int `json:"absTileY" legend:"base"` // abs_tile_y
|
|
AbsTileZ int `json:"absTileZ" legend:"base"` // abs_tile_z
|
|
HolderHfid int `json:"holderHfid" legend:"base"` // holder_hfid
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Item *Item `json:"item" legend:"base"` // item
|
|
ItemDescription string `json:"itemDescription" legend:"plus"` // item_description
|
|
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType string `json:"itemType" legend:"plus"` // item_type
|
|
Mat string `json:"mat" legend:"plus"` // mat
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
PageCount int `json:"pageCount" legend:"plus"` // page_count
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureLocalId int `json:"structureLocalId" legend:"base"` // structure_local_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
Writing int `json:"writing" legend:"plus"` // writing
|
|
}
|
|
|
|
func (x *Artifact) Id() int { return x.Id_ }
|
|
func (x *Artifact) Name() string { return x.Name_ }
|
|
func (x *Artifact) RelatedToEntity(id int) bool { return false }
|
|
func (x *Artifact) RelatedToHf(id int) bool { return x.HolderHfid == id }
|
|
|
|
func (x *Artifact) CheckFields() {
|
|
if x.PageCount != x.AbsTileX && x.PageCount != 0 && x.AbsTileX != 0 {
|
|
sameFields["Artifact"]["PageCount"]["AbsTileX"] = false
|
|
}
|
|
if x.PageCount != x.AbsTileY && x.PageCount != 0 && x.AbsTileY != 0 {
|
|
sameFields["Artifact"]["PageCount"]["AbsTileY"] = false
|
|
}
|
|
if x.PageCount != x.AbsTileZ && x.PageCount != 0 && x.AbsTileZ != 0 {
|
|
sameFields["Artifact"]["PageCount"]["AbsTileZ"] = false
|
|
}
|
|
if x.PageCount != x.HolderHfid && x.PageCount != 0 && x.HolderHfid != 0 {
|
|
sameFields["Artifact"]["PageCount"]["HolderHfid"] = false
|
|
}
|
|
if x.PageCount != x.SiteId && x.PageCount != 0 && x.SiteId != 0 {
|
|
sameFields["Artifact"]["PageCount"]["SiteId"] = false
|
|
}
|
|
if x.PageCount != x.StructureLocalId && x.PageCount != 0 && x.StructureLocalId != 0 {
|
|
sameFields["Artifact"]["PageCount"]["StructureLocalId"] = false
|
|
}
|
|
if x.PageCount != x.SubregionId && x.PageCount != 0 && x.SubregionId != 0 {
|
|
sameFields["Artifact"]["PageCount"]["SubregionId"] = false
|
|
}
|
|
if x.Writing != x.AbsTileX && x.Writing != 0 && x.AbsTileX != 0 {
|
|
sameFields["Artifact"]["Writing"]["AbsTileX"] = false
|
|
}
|
|
if x.Writing != x.AbsTileY && x.Writing != 0 && x.AbsTileY != 0 {
|
|
sameFields["Artifact"]["Writing"]["AbsTileY"] = false
|
|
}
|
|
if x.Writing != x.AbsTileZ && x.Writing != 0 && x.AbsTileZ != 0 {
|
|
sameFields["Artifact"]["Writing"]["AbsTileZ"] = false
|
|
}
|
|
if x.Writing != x.HolderHfid && x.Writing != 0 && x.HolderHfid != 0 {
|
|
sameFields["Artifact"]["Writing"]["HolderHfid"] = false
|
|
}
|
|
if x.Writing != x.SiteId && x.Writing != 0 && x.SiteId != 0 {
|
|
sameFields["Artifact"]["Writing"]["SiteId"] = false
|
|
}
|
|
if x.Writing != x.StructureLocalId && x.Writing != 0 && x.StructureLocalId != 0 {
|
|
sameFields["Artifact"]["Writing"]["StructureLocalId"] = false
|
|
}
|
|
if x.Writing != x.SubregionId && x.Writing != 0 && x.SubregionId != 0 {
|
|
sameFields["Artifact"]["Writing"]["SubregionId"] = false
|
|
}
|
|
}
|
|
|
|
type Creature struct {
|
|
AllCastesAlive bool `json:"allCastesAlive" legend:"plus"` // all_castes_alive
|
|
ArtificialHiveable bool `json:"artificialHiveable" legend:"plus"` // artificial_hiveable
|
|
BiomeDesertBadland bool `json:"biomeDesertBadland" legend:"plus"` // biome_desert_badland
|
|
BiomeDesertRock bool `json:"biomeDesertRock" legend:"plus"` // biome_desert_rock
|
|
BiomeDesertSand bool `json:"biomeDesertSand" legend:"plus"` // biome_desert_sand
|
|
BiomeForestTaiga bool `json:"biomeForestTaiga" legend:"plus"` // biome_forest_taiga
|
|
BiomeForestTemperateBroadleaf bool `json:"biomeForestTemperateBroadleaf" legend:"plus"` // biome_forest_temperate_broadleaf
|
|
BiomeForestTemperateConifer bool `json:"biomeForestTemperateConifer" legend:"plus"` // biome_forest_temperate_conifer
|
|
BiomeForestTropicalConifer bool `json:"biomeForestTropicalConifer" legend:"plus"` // biome_forest_tropical_conifer
|
|
BiomeForestTropicalDryBroadleaf bool `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` // biome_forest_tropical_dry_broadleaf
|
|
BiomeForestTropicalMoistBroadleaf bool `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` // biome_forest_tropical_moist_broadleaf
|
|
BiomeGlacier bool `json:"biomeGlacier" legend:"plus"` // biome_glacier
|
|
BiomeGrasslandTemperate bool `json:"biomeGrasslandTemperate" legend:"plus"` // biome_grassland_temperate
|
|
BiomeGrasslandTropical bool `json:"biomeGrasslandTropical" legend:"plus"` // biome_grassland_tropical
|
|
BiomeLakeTemperateBrackishwater bool `json:"biomeLakeTemperateBrackishwater" legend:"plus"` // biome_lake_temperate_brackishwater
|
|
BiomeLakeTemperateFreshwater bool `json:"biomeLakeTemperateFreshwater" legend:"plus"` // biome_lake_temperate_freshwater
|
|
BiomeLakeTemperateSaltwater bool `json:"biomeLakeTemperateSaltwater" legend:"plus"` // biome_lake_temperate_saltwater
|
|
BiomeLakeTropicalBrackishwater bool `json:"biomeLakeTropicalBrackishwater" legend:"plus"` // biome_lake_tropical_brackishwater
|
|
BiomeLakeTropicalFreshwater bool `json:"biomeLakeTropicalFreshwater" legend:"plus"` // biome_lake_tropical_freshwater
|
|
BiomeLakeTropicalSaltwater bool `json:"biomeLakeTropicalSaltwater" legend:"plus"` // biome_lake_tropical_saltwater
|
|
BiomeMarshTemperateFreshwater bool `json:"biomeMarshTemperateFreshwater" legend:"plus"` // biome_marsh_temperate_freshwater
|
|
BiomeMarshTemperateSaltwater bool `json:"biomeMarshTemperateSaltwater" legend:"plus"` // biome_marsh_temperate_saltwater
|
|
BiomeMarshTropicalFreshwater bool `json:"biomeMarshTropicalFreshwater" legend:"plus"` // biome_marsh_tropical_freshwater
|
|
BiomeMarshTropicalSaltwater bool `json:"biomeMarshTropicalSaltwater" legend:"plus"` // biome_marsh_tropical_saltwater
|
|
BiomeMountain bool `json:"biomeMountain" legend:"plus"` // biome_mountain
|
|
BiomeOceanArctic bool `json:"biomeOceanArctic" legend:"plus"` // biome_ocean_arctic
|
|
BiomeOceanTemperate bool `json:"biomeOceanTemperate" legend:"plus"` // biome_ocean_temperate
|
|
BiomeOceanTropical bool `json:"biomeOceanTropical" legend:"plus"` // biome_ocean_tropical
|
|
BiomePoolTemperateBrackishwater bool `json:"biomePoolTemperateBrackishwater" legend:"plus"` // biome_pool_temperate_brackishwater
|
|
BiomePoolTemperateFreshwater bool `json:"biomePoolTemperateFreshwater" legend:"plus"` // biome_pool_temperate_freshwater
|
|
BiomePoolTemperateSaltwater bool `json:"biomePoolTemperateSaltwater" legend:"plus"` // biome_pool_temperate_saltwater
|
|
BiomePoolTropicalBrackishwater bool `json:"biomePoolTropicalBrackishwater" legend:"plus"` // biome_pool_tropical_brackishwater
|
|
BiomePoolTropicalFreshwater bool `json:"biomePoolTropicalFreshwater" legend:"plus"` // biome_pool_tropical_freshwater
|
|
BiomePoolTropicalSaltwater bool `json:"biomePoolTropicalSaltwater" legend:"plus"` // biome_pool_tropical_saltwater
|
|
BiomeRiverTemperateBrackishwater bool `json:"biomeRiverTemperateBrackishwater" legend:"plus"` // biome_river_temperate_brackishwater
|
|
BiomeRiverTemperateFreshwater bool `json:"biomeRiverTemperateFreshwater" legend:"plus"` // biome_river_temperate_freshwater
|
|
BiomeRiverTemperateSaltwater bool `json:"biomeRiverTemperateSaltwater" legend:"plus"` // biome_river_temperate_saltwater
|
|
BiomeRiverTropicalBrackishwater bool `json:"biomeRiverTropicalBrackishwater" legend:"plus"` // biome_river_tropical_brackishwater
|
|
BiomeRiverTropicalFreshwater bool `json:"biomeRiverTropicalFreshwater" legend:"plus"` // biome_river_tropical_freshwater
|
|
BiomeRiverTropicalSaltwater bool `json:"biomeRiverTropicalSaltwater" legend:"plus"` // biome_river_tropical_saltwater
|
|
BiomeSavannaTemperate bool `json:"biomeSavannaTemperate" legend:"plus"` // biome_savanna_temperate
|
|
BiomeSavannaTropical bool `json:"biomeSavannaTropical" legend:"plus"` // biome_savanna_tropical
|
|
BiomeShrublandTemperate bool `json:"biomeShrublandTemperate" legend:"plus"` // biome_shrubland_temperate
|
|
BiomeShrublandTropical bool `json:"biomeShrublandTropical" legend:"plus"` // biome_shrubland_tropical
|
|
BiomeSubterraneanChasm bool `json:"biomeSubterraneanChasm" legend:"plus"` // biome_subterranean_chasm
|
|
BiomeSubterraneanLava bool `json:"biomeSubterraneanLava" legend:"plus"` // biome_subterranean_lava
|
|
BiomeSubterraneanWater bool `json:"biomeSubterraneanWater" legend:"plus"` // biome_subterranean_water
|
|
BiomeSwampMangrove bool `json:"biomeSwampMangrove" legend:"plus"` // biome_swamp_mangrove
|
|
BiomeSwampTemperateFreshwater bool `json:"biomeSwampTemperateFreshwater" legend:"plus"` // biome_swamp_temperate_freshwater
|
|
BiomeSwampTemperateSaltwater bool `json:"biomeSwampTemperateSaltwater" legend:"plus"` // biome_swamp_temperate_saltwater
|
|
BiomeSwampTropicalFreshwater bool `json:"biomeSwampTropicalFreshwater" legend:"plus"` // biome_swamp_tropical_freshwater
|
|
BiomeSwampTropicalSaltwater bool `json:"biomeSwampTropicalSaltwater" legend:"plus"` // biome_swamp_tropical_saltwater
|
|
BiomeTundra bool `json:"biomeTundra" legend:"plus"` // biome_tundra
|
|
CreatureId string `json:"creatureId" legend:"plus"` // creature_id
|
|
DoesNotExist bool `json:"doesNotExist" legend:"plus"` // does_not_exist
|
|
Equipment bool `json:"equipment" legend:"plus"` // equipment
|
|
EquipmentWagon bool `json:"equipmentWagon" legend:"plus"` // equipment_wagon
|
|
Evil bool `json:"evil" legend:"plus"` // evil
|
|
Fanciful bool `json:"fanciful" legend:"plus"` // fanciful
|
|
Generated bool `json:"generated" legend:"plus"` // generated
|
|
Good bool `json:"good" legend:"plus"` // good
|
|
HasAnyBenign bool `json:"hasAnyBenign" legend:"plus"` // has_any_benign
|
|
HasAnyCanSwim bool `json:"hasAnyCanSwim" legend:"plus"` // has_any_can_swim
|
|
HasAnyCannotBreatheAir bool `json:"hasAnyCannotBreatheAir" legend:"plus"` // has_any_cannot_breathe_air
|
|
HasAnyCannotBreatheWater bool `json:"hasAnyCannotBreatheWater" legend:"plus"` // has_any_cannot_breathe_water
|
|
HasAnyCarnivore bool `json:"hasAnyCarnivore" legend:"plus"` // has_any_carnivore
|
|
HasAnyCommonDomestic bool `json:"hasAnyCommonDomestic" legend:"plus"` // has_any_common_domestic
|
|
HasAnyCuriousBeast bool `json:"hasAnyCuriousBeast" legend:"plus"` // has_any_curious_beast
|
|
HasAnyDemon bool `json:"hasAnyDemon" legend:"plus"` // has_any_demon
|
|
HasAnyFeatureBeast bool `json:"hasAnyFeatureBeast" legend:"plus"` // has_any_feature_beast
|
|
HasAnyFlier bool `json:"hasAnyFlier" legend:"plus"` // has_any_flier
|
|
HasAnyFlyRaceGait bool `json:"hasAnyFlyRaceGait" legend:"plus"` // has_any_fly_race_gait
|
|
HasAnyGrasp bool `json:"hasAnyGrasp" legend:"plus"` // has_any_grasp
|
|
HasAnyGrazer bool `json:"hasAnyGrazer" legend:"plus"` // has_any_grazer
|
|
HasAnyHasBlood bool `json:"hasAnyHasBlood" legend:"plus"` // has_any_has_blood
|
|
HasAnyImmobile bool `json:"hasAnyImmobile" legend:"plus"` // has_any_immobile
|
|
HasAnyIntelligentLearns bool `json:"hasAnyIntelligentLearns" legend:"plus"` // has_any_intelligent_learns
|
|
HasAnyIntelligentSpeaks bool `json:"hasAnyIntelligentSpeaks" legend:"plus"` // has_any_intelligent_speaks
|
|
HasAnyLargePredator bool `json:"hasAnyLargePredator" legend:"plus"` // has_any_large_predator
|
|
HasAnyLocalPopsControllable bool `json:"hasAnyLocalPopsControllable" legend:"plus"` // has_any_local_pops_controllable
|
|
HasAnyLocalPopsProduceHeroes bool `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` // has_any_local_pops_produce_heroes
|
|
HasAnyMegabeast bool `json:"hasAnyMegabeast" legend:"plus"` // has_any_megabeast
|
|
HasAnyMischievous bool `json:"hasAnyMischievous" legend:"plus"` // has_any_mischievous
|
|
HasAnyNaturalAnimal bool `json:"hasAnyNaturalAnimal" legend:"plus"` // has_any_natural_animal
|
|
HasAnyNightCreature bool `json:"hasAnyNightCreature" legend:"plus"` // has_any_night_creature
|
|
HasAnyNightCreatureBogeyman bool `json:"hasAnyNightCreatureBogeyman" legend:"plus"` // has_any_night_creature_bogeyman
|
|
HasAnyNightCreatureHunter bool `json:"hasAnyNightCreatureHunter" legend:"plus"` // has_any_night_creature_hunter
|
|
HasAnyNightCreatureNightmare bool `json:"hasAnyNightCreatureNightmare" legend:"plus"` // has_any_night_creature_nightmare
|
|
HasAnyNotFireimmune bool `json:"hasAnyNotFireimmune" legend:"plus"` // has_any_not_fireimmune
|
|
HasAnyNotLiving bool `json:"hasAnyNotLiving" legend:"plus"` // has_any_not_living
|
|
HasAnyOutsiderControllable bool `json:"hasAnyOutsiderControllable" legend:"plus"` // has_any_outsider_controllable
|
|
HasAnyRaceGait bool `json:"hasAnyRaceGait" legend:"plus"` // has_any_race_gait
|
|
HasAnySemimegabeast bool `json:"hasAnySemimegabeast" legend:"plus"` // has_any_semimegabeast
|
|
HasAnySlowLearner bool `json:"hasAnySlowLearner" legend:"plus"` // has_any_slow_learner
|
|
HasAnySupernatural bool `json:"hasAnySupernatural" legend:"plus"` // has_any_supernatural
|
|
HasAnyTitan bool `json:"hasAnyTitan" legend:"plus"` // has_any_titan
|
|
HasAnyUniqueDemon bool `json:"hasAnyUniqueDemon" legend:"plus"` // has_any_unique_demon
|
|
HasAnyUtterances bool `json:"hasAnyUtterances" legend:"plus"` // has_any_utterances
|
|
HasAnyVerminHateable bool `json:"hasAnyVerminHateable" legend:"plus"` // has_any_vermin_hateable
|
|
HasAnyVerminMicro bool `json:"hasAnyVerminMicro" legend:"plus"` // has_any_vermin_micro
|
|
HasFemale bool `json:"hasFemale" legend:"plus"` // has_female
|
|
HasMale bool `json:"hasMale" legend:"plus"` // has_male
|
|
LargeRoaming bool `json:"largeRoaming" legend:"plus"` // large_roaming
|
|
LooseClusters bool `json:"looseClusters" legend:"plus"` // loose_clusters
|
|
MatesToBreed bool `json:"matesToBreed" legend:"plus"` // mates_to_breed
|
|
Mundane bool `json:"mundane" legend:"plus"` // mundane
|
|
NamePlural string `json:"namePlural" legend:"plus"` // name_plural
|
|
NameSingular string `json:"nameSingular" legend:"plus"` // name_singular
|
|
OccursAsEntityRace bool `json:"occursAsEntityRace" legend:"plus"` // occurs_as_entity_race
|
|
Savage bool `json:"savage" legend:"plus"` // savage
|
|
SmallRace bool `json:"smallRace" legend:"plus"` // small_race
|
|
TwoGenders bool `json:"twoGenders" legend:"plus"` // two_genders
|
|
Ubiquitous bool `json:"ubiquitous" legend:"plus"` // ubiquitous
|
|
VerminEater bool `json:"verminEater" legend:"plus"` // vermin_eater
|
|
VerminFish bool `json:"verminFish" legend:"plus"` // vermin_fish
|
|
VerminGrounder bool `json:"verminGrounder" legend:"plus"` // vermin_grounder
|
|
VerminRotter bool `json:"verminRotter" legend:"plus"` // vermin_rotter
|
|
VerminSoil bool `json:"verminSoil" legend:"plus"` // vermin_soil
|
|
VerminSoilColony bool `json:"verminSoilColony" legend:"plus"` // vermin_soil_colony
|
|
}
|
|
|
|
func (x *Creature) RelatedToEntity(id int) bool { return false }
|
|
func (x *Creature) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Creature) CheckFields() {
|
|
}
|
|
|
|
type DanceForm struct {
|
|
Description string `json:"description" legend:"base"` // description
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
}
|
|
|
|
func (x *DanceForm) Id() int { return x.Id_ }
|
|
func (x *DanceForm) Name() string { return x.Name_ }
|
|
func (x *DanceForm) RelatedToEntity(id int) bool { return false }
|
|
func (x *DanceForm) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *DanceForm) CheckFields() {
|
|
}
|
|
|
|
type DfWorld struct {
|
|
Altname string `json:"altname" legend:"plus"` // altname
|
|
Artifacts map[int]*Artifact `json:"artifacts" legend:"both"` // artifacts
|
|
CreatureRaw []*Creature `json:"creatureRaw" legend:"plus"` // creature_raw
|
|
DanceForms map[int]*DanceForm `json:"danceForms" legend:"both"` // dance_forms
|
|
Entities map[int]*Entity `json:"entities" legend:"both"` // entities
|
|
EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"both"` // entity_populations
|
|
HistoricalEras []*HistoricalEra `json:"historicalEras" legend:"both"` // historical_eras
|
|
HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"both"` // historical_event_collections
|
|
HistoricalEventRelationshipSupplements []*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` // historical_event_relationship_supplements
|
|
HistoricalEventRelationships []*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` // historical_event_relationships
|
|
HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"both"` // historical_events
|
|
HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"both"` // historical_figures
|
|
Identities map[int]*Identity `json:"identities" legend:"plus"` // identities
|
|
Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` // landmasses
|
|
MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` // mountain_peaks
|
|
MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"both"` // musical_forms
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"both"` // poetic_forms
|
|
Regions map[int]*Region `json:"regions" legend:"both"` // regions
|
|
Rivers []*River `json:"rivers" legend:"plus"` // rivers
|
|
Sites map[int]*Site `json:"sites" legend:"both"` // sites
|
|
UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"both"` // underground_regions
|
|
WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"both"` // world_constructions
|
|
WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"both"` // written_contents
|
|
}
|
|
|
|
func (x *DfWorld) Name() string { return x.Name_ }
|
|
func (x *DfWorld) RelatedToEntity(id int) bool { return false }
|
|
func (x *DfWorld) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *DfWorld) CheckFields() {
|
|
}
|
|
|
|
type EntityProfession int
|
|
|
|
const (
|
|
EntityProfession_Unknown EntityProfession = iota
|
|
EntityProfession_Armorer
|
|
EntityProfession_Blacksmith
|
|
EntityProfession_BoneCarver
|
|
EntityProfession_Bowyer
|
|
EntityProfession_Carpenter
|
|
EntityProfession_Clothier
|
|
EntityProfession_Craftsman
|
|
EntityProfession_GemCutter
|
|
EntityProfession_Mason
|
|
EntityProfession_Metalcrafter
|
|
EntityProfession_Weaponsmith
|
|
EntityProfession_Weaver
|
|
)
|
|
|
|
func parseEntityProfession(s string) EntityProfession {
|
|
switch s {
|
|
case "armorer":
|
|
return EntityProfession_Armorer
|
|
case "blacksmith":
|
|
return EntityProfession_Blacksmith
|
|
case "bone_carver":
|
|
return EntityProfession_BoneCarver
|
|
case "bowyer":
|
|
return EntityProfession_Bowyer
|
|
case "carpenter":
|
|
return EntityProfession_Carpenter
|
|
case "clothier":
|
|
return EntityProfession_Clothier
|
|
case "craftsman":
|
|
return EntityProfession_Craftsman
|
|
case "gem_cutter":
|
|
return EntityProfession_GemCutter
|
|
case "mason":
|
|
return EntityProfession_Mason
|
|
case "metalcrafter":
|
|
return EntityProfession_Metalcrafter
|
|
case "weaponsmith":
|
|
return EntityProfession_Weaponsmith
|
|
case "weaver":
|
|
return EntityProfession_Weaver
|
|
}
|
|
return EntityProfession_Unknown
|
|
}
|
|
|
|
func (s EntityProfession) String() string {
|
|
switch s {
|
|
case EntityProfession_Armorer:
|
|
return "armorer"
|
|
case EntityProfession_Blacksmith:
|
|
return "blacksmith"
|
|
case EntityProfession_BoneCarver:
|
|
return "bone carver"
|
|
case EntityProfession_Bowyer:
|
|
return "bowyer"
|
|
case EntityProfession_Carpenter:
|
|
return "carpenter"
|
|
case EntityProfession_Clothier:
|
|
return "clothier"
|
|
case EntityProfession_Craftsman:
|
|
return "craftsman"
|
|
case EntityProfession_GemCutter:
|
|
return "gem cutter"
|
|
case EntityProfession_Mason:
|
|
return "mason"
|
|
case EntityProfession_Metalcrafter:
|
|
return "metalcrafter"
|
|
case EntityProfession_Weaponsmith:
|
|
return "weaponsmith"
|
|
case EntityProfession_Weaver:
|
|
return "weaver"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s EntityProfession) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type EntityType int
|
|
|
|
const (
|
|
EntityType_Unknown EntityType = iota
|
|
EntityType_Civilization
|
|
EntityType_Guild
|
|
EntityType_Merchantcompany
|
|
EntityType_Migratinggroup
|
|
EntityType_Militaryunit
|
|
EntityType_Nomadicgroup
|
|
EntityType_Outcast
|
|
EntityType_Performancetroupe
|
|
EntityType_Religion
|
|
EntityType_Sitegovernment
|
|
)
|
|
|
|
func parseEntityType(s string) EntityType {
|
|
switch s {
|
|
case "civilization":
|
|
return EntityType_Civilization
|
|
case "guild":
|
|
return EntityType_Guild
|
|
case "merchantcompany":
|
|
return EntityType_Merchantcompany
|
|
case "migratinggroup":
|
|
return EntityType_Migratinggroup
|
|
case "militaryunit":
|
|
return EntityType_Militaryunit
|
|
case "nomadicgroup":
|
|
return EntityType_Nomadicgroup
|
|
case "outcast":
|
|
return EntityType_Outcast
|
|
case "performancetroupe":
|
|
return EntityType_Performancetroupe
|
|
case "religion":
|
|
return EntityType_Religion
|
|
case "sitegovernment":
|
|
return EntityType_Sitegovernment
|
|
}
|
|
return EntityType_Unknown
|
|
}
|
|
|
|
func (s EntityType) String() string {
|
|
switch s {
|
|
case EntityType_Civilization:
|
|
return "civilization"
|
|
case EntityType_Guild:
|
|
return "guild"
|
|
case EntityType_Merchantcompany:
|
|
return "merchantcompany"
|
|
case EntityType_Migratinggroup:
|
|
return "migratinggroup"
|
|
case EntityType_Militaryunit:
|
|
return "militaryunit"
|
|
case EntityType_Nomadicgroup:
|
|
return "nomadicgroup"
|
|
case EntityType_Outcast:
|
|
return "outcast"
|
|
case EntityType_Performancetroupe:
|
|
return "performancetroupe"
|
|
case EntityType_Religion:
|
|
return "religion"
|
|
case EntityType_Sitegovernment:
|
|
return "sitegovernment"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s EntityType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type EntityWeapon int
|
|
|
|
const (
|
|
EntityWeapon_Unknown EntityWeapon = iota
|
|
EntityWeapon_BattleAxe
|
|
EntityWeapon_Bow
|
|
EntityWeapon_Crossbow
|
|
EntityWeapon_Dagger
|
|
EntityWeapon_Flail
|
|
EntityWeapon_GreatAxe
|
|
EntityWeapon_Halberd
|
|
EntityWeapon_LongSword
|
|
EntityWeapon_Mace
|
|
EntityWeapon_Maul
|
|
EntityWeapon_Morningstar
|
|
EntityWeapon_Pike
|
|
EntityWeapon_Scimitar
|
|
EntityWeapon_Scourge
|
|
EntityWeapon_ShortSword
|
|
EntityWeapon_Spear
|
|
EntityWeapon_TwoHandedSword
|
|
EntityWeapon_WarHammer
|
|
EntityWeapon_Whip
|
|
)
|
|
|
|
func parseEntityWeapon(s string) EntityWeapon {
|
|
switch s {
|
|
case "battle axe":
|
|
return EntityWeapon_BattleAxe
|
|
case "bow":
|
|
return EntityWeapon_Bow
|
|
case "crossbow":
|
|
return EntityWeapon_Crossbow
|
|
case "dagger":
|
|
return EntityWeapon_Dagger
|
|
case "flail":
|
|
return EntityWeapon_Flail
|
|
case "great axe":
|
|
return EntityWeapon_GreatAxe
|
|
case "halberd":
|
|
return EntityWeapon_Halberd
|
|
case "long sword":
|
|
return EntityWeapon_LongSword
|
|
case "mace":
|
|
return EntityWeapon_Mace
|
|
case "maul":
|
|
return EntityWeapon_Maul
|
|
case "morningstar":
|
|
return EntityWeapon_Morningstar
|
|
case "pike":
|
|
return EntityWeapon_Pike
|
|
case "scimitar":
|
|
return EntityWeapon_Scimitar
|
|
case "scourge":
|
|
return EntityWeapon_Scourge
|
|
case "short sword":
|
|
return EntityWeapon_ShortSword
|
|
case "spear":
|
|
return EntityWeapon_Spear
|
|
case "two-handed sword":
|
|
return EntityWeapon_TwoHandedSword
|
|
case "war hammer":
|
|
return EntityWeapon_WarHammer
|
|
case "whip":
|
|
return EntityWeapon_Whip
|
|
}
|
|
return EntityWeapon_Unknown
|
|
}
|
|
|
|
func (s EntityWeapon) String() string {
|
|
switch s {
|
|
case EntityWeapon_BattleAxe:
|
|
return "battle axe"
|
|
case EntityWeapon_Bow:
|
|
return "bow"
|
|
case EntityWeapon_Crossbow:
|
|
return "crossbow"
|
|
case EntityWeapon_Dagger:
|
|
return "dagger"
|
|
case EntityWeapon_Flail:
|
|
return "flail"
|
|
case EntityWeapon_GreatAxe:
|
|
return "great axe"
|
|
case EntityWeapon_Halberd:
|
|
return "halberd"
|
|
case EntityWeapon_LongSword:
|
|
return "long sword"
|
|
case EntityWeapon_Mace:
|
|
return "mace"
|
|
case EntityWeapon_Maul:
|
|
return "maul"
|
|
case EntityWeapon_Morningstar:
|
|
return "morningstar"
|
|
case EntityWeapon_Pike:
|
|
return "pike"
|
|
case EntityWeapon_Scimitar:
|
|
return "scimitar"
|
|
case EntityWeapon_Scourge:
|
|
return "scourge"
|
|
case EntityWeapon_ShortSword:
|
|
return "short sword"
|
|
case EntityWeapon_Spear:
|
|
return "spear"
|
|
case EntityWeapon_TwoHandedSword:
|
|
return "two handed sword"
|
|
case EntityWeapon_WarHammer:
|
|
return "war hammer"
|
|
case EntityWeapon_Whip:
|
|
return "whip"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s EntityWeapon) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Entity struct {
|
|
Child []int `json:"child" legend:"plus"` // child
|
|
Claims string `json:"claims" legend:"plus"` // claims
|
|
EntityLink []*EntityEntityLink `json:"entityLink" legend:"plus"` // entity_link
|
|
EntityPosition []*EntityPosition `json:"entityPosition" legend:"plus"` // entity_position
|
|
EntityPositionAssignment []*EntityPositionAssignment `json:"entityPositionAssignment" legend:"plus"` // entity_position_assignment
|
|
HistfigId []int `json:"histfigId" legend:"plus"` // histfig_id
|
|
Honor []*Honor `json:"honor" legend:"base"` // honor
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
Occasion []*Occasion `json:"occasion" legend:"plus"` // occasion
|
|
Profession EntityProfession `json:"profession" legend:"plus"` // profession
|
|
Race string `json:"race" legend:"plus"` // race
|
|
Type EntityType `json:"type" legend:"plus"` // type
|
|
Weapon []EntityWeapon `json:"weapon" legend:"plus"` // weapon
|
|
WorshipId []int `json:"worshipId" legend:"plus"` // worship_id
|
|
}
|
|
|
|
func (x *Entity) Id() int { return x.Id_ }
|
|
func (x *Entity) Name() string { return x.Name_ }
|
|
func (x *Entity) RelatedToEntity(id int) bool { return false }
|
|
func (x *Entity) RelatedToHf(id int) bool { return containsInt(x.HistfigId, id) }
|
|
|
|
func (x *Entity) CheckFields() {
|
|
}
|
|
|
|
type EntityEntityLinkType int
|
|
|
|
const (
|
|
EntityEntityLinkType_Unknown EntityEntityLinkType = iota
|
|
EntityEntityLinkType_CHILD
|
|
EntityEntityLinkType_PARENT
|
|
EntityEntityLinkType_RELIGIOUS
|
|
)
|
|
|
|
func parseEntityEntityLinkType(s string) EntityEntityLinkType {
|
|
switch s {
|
|
case "CHILD":
|
|
return EntityEntityLinkType_CHILD
|
|
case "PARENT":
|
|
return EntityEntityLinkType_PARENT
|
|
case "RELIGIOUS":
|
|
return EntityEntityLinkType_RELIGIOUS
|
|
}
|
|
return EntityEntityLinkType_Unknown
|
|
}
|
|
|
|
func (s EntityEntityLinkType) String() string {
|
|
switch s {
|
|
case EntityEntityLinkType_CHILD:
|
|
return "child"
|
|
case EntityEntityLinkType_PARENT:
|
|
return "parent"
|
|
case EntityEntityLinkType_RELIGIOUS:
|
|
return "religious"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s EntityEntityLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type EntityEntityLink struct {
|
|
Strength int `json:"strength" legend:"plus"` // strength
|
|
Target int `json:"target" legend:"plus"` // target
|
|
Type EntityEntityLinkType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *EntityEntityLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *EntityEntityLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityEntityLink) CheckFields() {
|
|
}
|
|
|
|
type EntityFormerPositionLink struct {
|
|
EndYear int `json:"endYear" legend:"base"` // end_year
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
}
|
|
|
|
func (x *EntityFormerPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *EntityFormerPositionLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityFormerPositionLink) CheckFields() {
|
|
}
|
|
|
|
type EntityFormerSquadLink struct {
|
|
EndYear int `json:"endYear" legend:"base"` // end_year
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
SquadId int `json:"squadId" legend:"base"` // squad_id
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
}
|
|
|
|
func (x *EntityFormerSquadLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *EntityFormerSquadLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityFormerSquadLink) CheckFields() {
|
|
}
|
|
|
|
type EntityPopulation struct {
|
|
CivId int `json:"civId" legend:"plus"` // civ_id
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Race string `json:"race" legend:"plus"` // race
|
|
}
|
|
|
|
func (x *EntityPopulation) Id() int { return x.Id_ }
|
|
func (x *EntityPopulation) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *EntityPopulation) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityPopulation) CheckFields() {
|
|
}
|
|
|
|
type EntityPosition struct {
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
NameFemale string `json:"nameFemale" legend:"plus"` // name_female
|
|
NameMale string `json:"nameMale" legend:"plus"` // name_male
|
|
Spouse string `json:"spouse" legend:"plus"` // spouse
|
|
SpouseFemale string `json:"spouseFemale" legend:"plus"` // spouse_female
|
|
SpouseMale string `json:"spouseMale" legend:"plus"` // spouse_male
|
|
}
|
|
|
|
func (x *EntityPosition) Id() int { return x.Id_ }
|
|
func (x *EntityPosition) Name() string { return x.Name_ }
|
|
func (x *EntityPosition) RelatedToEntity(id int) bool { return false }
|
|
func (x *EntityPosition) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityPosition) CheckFields() {
|
|
}
|
|
|
|
type EntityPositionAssignment struct {
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
PositionId int `json:"positionId" legend:"plus"` // position_id
|
|
SquadId int `json:"squadId" legend:"plus"` // squad_id
|
|
}
|
|
|
|
func (x *EntityPositionAssignment) Id() int { return x.Id_ }
|
|
func (x *EntityPositionAssignment) RelatedToEntity(id int) bool { return false }
|
|
func (x *EntityPositionAssignment) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *EntityPositionAssignment) CheckFields() {
|
|
}
|
|
|
|
type EntityPositionLink struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
}
|
|
|
|
func (x *EntityPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *EntityPositionLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityPositionLink) CheckFields() {
|
|
}
|
|
|
|
type EntityReputation struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` // first_ageless_season_count
|
|
FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` // first_ageless_year
|
|
RepBard int `json:"repBard" legend:"base"` // rep_bard
|
|
RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter
|
|
RepHero int `json:"repHero" legend:"base"` // rep_hero
|
|
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
|
|
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
|
|
RepKnowledgePreserver int `json:"repKnowledgePreserver" legend:"base"` // rep_knowledge_preserver
|
|
RepPoet int `json:"repPoet" legend:"base"` // rep_poet
|
|
RepProtectorOfWeak int `json:"repProtectorOfWeak" legend:"base"` // rep_protector_of_weak
|
|
RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller
|
|
RepThief int `json:"repThief" legend:"base"` // rep_thief
|
|
RepTreasureHunter int `json:"repTreasureHunter" legend:"base"` // rep_treasure_hunter
|
|
UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` // unsolved_murders
|
|
}
|
|
|
|
func (x *EntityReputation) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *EntityReputation) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntityReputation) CheckFields() {
|
|
}
|
|
|
|
type EntitySquadLink struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
SquadId int `json:"squadId" legend:"base"` // squad_id
|
|
SquadPosition int `json:"squadPosition" legend:"base"` // squad_position
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
}
|
|
|
|
func (x *EntitySquadLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *EntitySquadLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *EntitySquadLink) CheckFields() {
|
|
}
|
|
|
|
type FeatureType int
|
|
|
|
const (
|
|
FeatureType_Unknown FeatureType = iota
|
|
FeatureType_Acrobats
|
|
FeatureType_Banners
|
|
FeatureType_Candles
|
|
FeatureType_Costumes
|
|
FeatureType_CriersInFront
|
|
FeatureType_DancePerformance
|
|
FeatureType_Images
|
|
FeatureType_IncenseBurning
|
|
FeatureType_MusicalPerformance
|
|
FeatureType_OrderOfPrecedence
|
|
FeatureType_PoetryRecital
|
|
FeatureType_Storytelling
|
|
FeatureType_TheGivingOfItems
|
|
FeatureType_TheSacrificeOfItems
|
|
)
|
|
|
|
func parseFeatureType(s string) FeatureType {
|
|
switch s {
|
|
case "acrobats":
|
|
return FeatureType_Acrobats
|
|
case "banners":
|
|
return FeatureType_Banners
|
|
case "candles":
|
|
return FeatureType_Candles
|
|
case "costumes":
|
|
return FeatureType_Costumes
|
|
case "criers_in_front":
|
|
return FeatureType_CriersInFront
|
|
case "dance_performance":
|
|
return FeatureType_DancePerformance
|
|
case "images":
|
|
return FeatureType_Images
|
|
case "incense_burning":
|
|
return FeatureType_IncenseBurning
|
|
case "musical_performance":
|
|
return FeatureType_MusicalPerformance
|
|
case "order_of_precedence":
|
|
return FeatureType_OrderOfPrecedence
|
|
case "poetry_recital":
|
|
return FeatureType_PoetryRecital
|
|
case "storytelling":
|
|
return FeatureType_Storytelling
|
|
case "the_giving_of_items":
|
|
return FeatureType_TheGivingOfItems
|
|
case "the_sacrifice_of_items":
|
|
return FeatureType_TheSacrificeOfItems
|
|
}
|
|
return FeatureType_Unknown
|
|
}
|
|
|
|
func (s FeatureType) String() string {
|
|
switch s {
|
|
case FeatureType_Acrobats:
|
|
return "acrobats"
|
|
case FeatureType_Banners:
|
|
return "banners"
|
|
case FeatureType_Candles:
|
|
return "candles"
|
|
case FeatureType_Costumes:
|
|
return "costumes"
|
|
case FeatureType_CriersInFront:
|
|
return "criers in front"
|
|
case FeatureType_DancePerformance:
|
|
return "dance performance"
|
|
case FeatureType_Images:
|
|
return "images"
|
|
case FeatureType_IncenseBurning:
|
|
return "incense burning"
|
|
case FeatureType_MusicalPerformance:
|
|
return "musical performance"
|
|
case FeatureType_OrderOfPrecedence:
|
|
return "order of precedence"
|
|
case FeatureType_PoetryRecital:
|
|
return "poetry recital"
|
|
case FeatureType_Storytelling:
|
|
return "storytelling"
|
|
case FeatureType_TheGivingOfItems:
|
|
return "the giving of items"
|
|
case FeatureType_TheSacrificeOfItems:
|
|
return "the sacrifice of items"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s FeatureType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Feature struct {
|
|
Reference int `json:"reference" legend:"plus"` // reference
|
|
Type FeatureType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *Feature) RelatedToEntity(id int) bool { return false }
|
|
func (x *Feature) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Feature) CheckFields() {
|
|
}
|
|
|
|
type HfLinkLinkType int
|
|
|
|
const (
|
|
HfLinkLinkType_Unknown HfLinkLinkType = iota
|
|
HfLinkLinkType_Apprentice
|
|
HfLinkLinkType_Child
|
|
HfLinkLinkType_Companion
|
|
HfLinkLinkType_DeceasedSpouse
|
|
HfLinkLinkType_Deity
|
|
HfLinkLinkType_Father
|
|
HfLinkLinkType_FormerApprentice
|
|
HfLinkLinkType_FormerMaster
|
|
HfLinkLinkType_FormerSpouse
|
|
HfLinkLinkType_Lover
|
|
HfLinkLinkType_Master
|
|
HfLinkLinkType_Mother
|
|
HfLinkLinkType_PetOwner
|
|
HfLinkLinkType_Spouse
|
|
)
|
|
|
|
func parseHfLinkLinkType(s string) HfLinkLinkType {
|
|
switch s {
|
|
case "apprentice":
|
|
return HfLinkLinkType_Apprentice
|
|
case "child":
|
|
return HfLinkLinkType_Child
|
|
case "companion":
|
|
return HfLinkLinkType_Companion
|
|
case "deceased spouse":
|
|
return HfLinkLinkType_DeceasedSpouse
|
|
case "deity":
|
|
return HfLinkLinkType_Deity
|
|
case "father":
|
|
return HfLinkLinkType_Father
|
|
case "former apprentice":
|
|
return HfLinkLinkType_FormerApprentice
|
|
case "former master":
|
|
return HfLinkLinkType_FormerMaster
|
|
case "former spouse":
|
|
return HfLinkLinkType_FormerSpouse
|
|
case "lover":
|
|
return HfLinkLinkType_Lover
|
|
case "master":
|
|
return HfLinkLinkType_Master
|
|
case "mother":
|
|
return HfLinkLinkType_Mother
|
|
case "pet owner":
|
|
return HfLinkLinkType_PetOwner
|
|
case "spouse":
|
|
return HfLinkLinkType_Spouse
|
|
}
|
|
return HfLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HfLinkLinkType) String() string {
|
|
switch s {
|
|
case HfLinkLinkType_Apprentice:
|
|
return "apprentice"
|
|
case HfLinkLinkType_Child:
|
|
return "child"
|
|
case HfLinkLinkType_Companion:
|
|
return "companion"
|
|
case HfLinkLinkType_DeceasedSpouse:
|
|
return "deceased spouse"
|
|
case HfLinkLinkType_Deity:
|
|
return "deity"
|
|
case HfLinkLinkType_Father:
|
|
return "father"
|
|
case HfLinkLinkType_FormerApprentice:
|
|
return "former apprentice"
|
|
case HfLinkLinkType_FormerMaster:
|
|
return "former master"
|
|
case HfLinkLinkType_FormerSpouse:
|
|
return "former spouse"
|
|
case HfLinkLinkType_Lover:
|
|
return "lover"
|
|
case HfLinkLinkType_Master:
|
|
return "master"
|
|
case HfLinkLinkType_Mother:
|
|
return "mother"
|
|
case HfLinkLinkType_PetOwner:
|
|
return "pet owner"
|
|
case HfLinkLinkType_Spouse:
|
|
return "spouse"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HfLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HfLink struct {
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
LinkStrength int `json:"linkStrength" legend:"base"` // link_strength
|
|
LinkType HfLinkLinkType `json:"linkType" legend:"base"` // link_type
|
|
}
|
|
|
|
func (x *HfLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *HfLink) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HfLink) CheckFields() {
|
|
}
|
|
|
|
type HfSkill struct {
|
|
Skill string `json:"skill" legend:"base"` // skill
|
|
TotalIp int `json:"totalIp" legend:"base"` // total_ip
|
|
}
|
|
|
|
func (x *HfSkill) RelatedToEntity(id int) bool { return false }
|
|
func (x *HfSkill) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HfSkill) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEra struct {
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
}
|
|
|
|
func (x *HistoricalEra) Name() string { return x.Name_ }
|
|
func (x *HistoricalEra) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEra) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEra) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEvent struct {
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Seconds72 int `json:"seconds72" legend:"base"` // seconds72
|
|
Year int `json:"year" legend:"base"` // year
|
|
Details HistoricalEventDetails
|
|
}
|
|
|
|
func (x *HistoricalEvent) Id() int { return x.Id_ }
|
|
func (x *HistoricalEvent) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEvent) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEvent) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAddHfEntityHonor struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
HonorId int `json:"honorId" legend:"base"` // honor_id
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfEntityHonor) Type() string { return "add hf entity honor" }
|
|
func (x *HistoricalEventAddHfEntityHonor) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventAddHfEntityHonor) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventAddHfEntityHonor) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAddHfEntityLinkLink int
|
|
|
|
const (
|
|
HistoricalEventAddHfEntityLinkLink_Unknown HistoricalEventAddHfEntityLinkLink = iota
|
|
HistoricalEventAddHfEntityLinkLink_Enemy
|
|
HistoricalEventAddHfEntityLinkLink_Member
|
|
HistoricalEventAddHfEntityLinkLink_Position
|
|
HistoricalEventAddHfEntityLinkLink_Prisoner
|
|
HistoricalEventAddHfEntityLinkLink_Slave
|
|
HistoricalEventAddHfEntityLinkLink_Squad
|
|
)
|
|
|
|
func parseHistoricalEventAddHfEntityLinkLink(s string) HistoricalEventAddHfEntityLinkLink {
|
|
switch s {
|
|
case "enemy":
|
|
return HistoricalEventAddHfEntityLinkLink_Enemy
|
|
case "member":
|
|
return HistoricalEventAddHfEntityLinkLink_Member
|
|
case "position":
|
|
return HistoricalEventAddHfEntityLinkLink_Position
|
|
case "prisoner":
|
|
return HistoricalEventAddHfEntityLinkLink_Prisoner
|
|
case "slave":
|
|
return HistoricalEventAddHfEntityLinkLink_Slave
|
|
case "squad":
|
|
return HistoricalEventAddHfEntityLinkLink_Squad
|
|
}
|
|
return HistoricalEventAddHfEntityLinkLink_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAddHfEntityLinkLink) String() string {
|
|
switch s {
|
|
case HistoricalEventAddHfEntityLinkLink_Enemy:
|
|
return "enemy"
|
|
case HistoricalEventAddHfEntityLinkLink_Member:
|
|
return "member"
|
|
case HistoricalEventAddHfEntityLinkLink_Position:
|
|
return "position"
|
|
case HistoricalEventAddHfEntityLinkLink_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalEventAddHfEntityLinkLink_Slave:
|
|
return "slave"
|
|
case HistoricalEventAddHfEntityLinkLink_Squad:
|
|
return "squad"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAddHfEntityLinkLink) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAddHfEntityLinkLinkType int
|
|
|
|
const (
|
|
HistoricalEventAddHfEntityLinkLinkType_Unknown HistoricalEventAddHfEntityLinkLinkType = iota
|
|
HistoricalEventAddHfEntityLinkLinkType_Enemy
|
|
HistoricalEventAddHfEntityLinkLinkType_Member
|
|
HistoricalEventAddHfEntityLinkLinkType_Position
|
|
HistoricalEventAddHfEntityLinkLinkType_Prisoner
|
|
HistoricalEventAddHfEntityLinkLinkType_Slave
|
|
)
|
|
|
|
func parseHistoricalEventAddHfEntityLinkLinkType(s string) HistoricalEventAddHfEntityLinkLinkType {
|
|
switch s {
|
|
case "enemy":
|
|
return HistoricalEventAddHfEntityLinkLinkType_Enemy
|
|
case "member":
|
|
return HistoricalEventAddHfEntityLinkLinkType_Member
|
|
case "position":
|
|
return HistoricalEventAddHfEntityLinkLinkType_Position
|
|
case "prisoner":
|
|
return HistoricalEventAddHfEntityLinkLinkType_Prisoner
|
|
case "slave":
|
|
return HistoricalEventAddHfEntityLinkLinkType_Slave
|
|
}
|
|
return HistoricalEventAddHfEntityLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAddHfEntityLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalEventAddHfEntityLinkLinkType_Enemy:
|
|
return "enemy"
|
|
case HistoricalEventAddHfEntityLinkLinkType_Member:
|
|
return "member"
|
|
case HistoricalEventAddHfEntityLinkLinkType_Position:
|
|
return "position"
|
|
case HistoricalEventAddHfEntityLinkLinkType_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalEventAddHfEntityLinkLinkType_Slave:
|
|
return "slave"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAddHfEntityLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAddHfEntityLink struct {
|
|
AppointerHfid int `json:"appointerHfid" legend:"both"` // appointer_hfid
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Link HistoricalEventAddHfEntityLinkLink `json:"link" legend:"base"` // link
|
|
Position string `json:"position" legend:"plus"` // position
|
|
PositionId int `json:"positionId" legend:"base"` // position_id
|
|
PromiseToHfid int `json:"promiseToHfid" legend:"both"` // promise_to_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfEntityLink) Type() string { return "add hf entity link" }
|
|
func (x *HistoricalEventAddHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventAddHfEntityLink) RelatedToHf(id int) bool {
|
|
return x.AppointerHfid == id || x.Hfid == id || x.PromiseToHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfEntityLink) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAddHfHfLinkLinkType int
|
|
|
|
const (
|
|
HistoricalEventAddHfHfLinkLinkType_Unknown HistoricalEventAddHfHfLinkLinkType = iota
|
|
HistoricalEventAddHfHfLinkLinkType_Apprentice
|
|
HistoricalEventAddHfHfLinkLinkType_Deity
|
|
HistoricalEventAddHfHfLinkLinkType_FormerMaster
|
|
HistoricalEventAddHfHfLinkLinkType_Lover
|
|
HistoricalEventAddHfHfLinkLinkType_Master
|
|
HistoricalEventAddHfHfLinkLinkType_PetOwner
|
|
HistoricalEventAddHfHfLinkLinkType_Prisoner
|
|
HistoricalEventAddHfHfLinkLinkType_Spouse
|
|
)
|
|
|
|
func parseHistoricalEventAddHfHfLinkLinkType(s string) HistoricalEventAddHfHfLinkLinkType {
|
|
switch s {
|
|
case "apprentice":
|
|
return HistoricalEventAddHfHfLinkLinkType_Apprentice
|
|
case "deity":
|
|
return HistoricalEventAddHfHfLinkLinkType_Deity
|
|
case "former_master":
|
|
return HistoricalEventAddHfHfLinkLinkType_FormerMaster
|
|
case "lover":
|
|
return HistoricalEventAddHfHfLinkLinkType_Lover
|
|
case "master":
|
|
return HistoricalEventAddHfHfLinkLinkType_Master
|
|
case "pet_owner":
|
|
return HistoricalEventAddHfHfLinkLinkType_PetOwner
|
|
case "prisoner":
|
|
return HistoricalEventAddHfHfLinkLinkType_Prisoner
|
|
case "spouse":
|
|
return HistoricalEventAddHfHfLinkLinkType_Spouse
|
|
}
|
|
return HistoricalEventAddHfHfLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAddHfHfLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalEventAddHfHfLinkLinkType_Apprentice:
|
|
return "apprentice"
|
|
case HistoricalEventAddHfHfLinkLinkType_Deity:
|
|
return "deity"
|
|
case HistoricalEventAddHfHfLinkLinkType_FormerMaster:
|
|
return "former master"
|
|
case HistoricalEventAddHfHfLinkLinkType_Lover:
|
|
return "lover"
|
|
case HistoricalEventAddHfHfLinkLinkType_Master:
|
|
return "master"
|
|
case HistoricalEventAddHfHfLinkLinkType_PetOwner:
|
|
return "pet owner"
|
|
case HistoricalEventAddHfHfLinkLinkType_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalEventAddHfHfLinkLinkType_Spouse:
|
|
return "spouse"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAddHfHfLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAddHfHfLink struct {
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target
|
|
LinkType HistoricalEventAddHfHfLinkLinkType `json:"linkType" legend:"plus"` // link_type
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfHfLink) Type() string { return "add hf hf link" }
|
|
func (x *HistoricalEventAddHfHfLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventAddHfHfLink) RelatedToHf(id int) bool {
|
|
return x.Hfid == id || x.HfidTarget == id
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfHfLink) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAddHfSiteLinkLinkType int
|
|
|
|
const (
|
|
HistoricalEventAddHfSiteLinkLinkType_Unknown HistoricalEventAddHfSiteLinkLinkType = iota
|
|
HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding
|
|
HistoricalEventAddHfSiteLinkLinkType_Occupation
|
|
HistoricalEventAddHfSiteLinkLinkType_SeatOfPower
|
|
)
|
|
|
|
func parseHistoricalEventAddHfSiteLinkLinkType(s string) HistoricalEventAddHfSiteLinkLinkType {
|
|
switch s {
|
|
case "home_site_abstract_building":
|
|
return HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding
|
|
case "occupation":
|
|
return HistoricalEventAddHfSiteLinkLinkType_Occupation
|
|
case "seat_of_power":
|
|
return HistoricalEventAddHfSiteLinkLinkType_SeatOfPower
|
|
}
|
|
return HistoricalEventAddHfSiteLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAddHfSiteLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding:
|
|
return "home site abstract building"
|
|
case HistoricalEventAddHfSiteLinkLinkType_Occupation:
|
|
return "occupation"
|
|
case HistoricalEventAddHfSiteLinkLinkType_SeatOfPower:
|
|
return "seat of power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAddHfSiteLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAddHfSiteLink struct {
|
|
Civ int `json:"civ" legend:"plus"` // civ
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
LinkType HistoricalEventAddHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Structure int `json:"structure" legend:"plus"` // structure
|
|
}
|
|
|
|
func (x *HistoricalEventAddHfSiteLink) Type() string { return "add hf site link" }
|
|
func (x *HistoricalEventAddHfSiteLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventAddHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *HistoricalEventAddHfSiteLink) CheckFields() {
|
|
if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventAddHfSiteLink"]["Civ"]["SiteId"] = false
|
|
}
|
|
if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventAddHfSiteLink"]["Histfig"]["SiteId"] = false
|
|
}
|
|
if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventAddHfSiteLink"]["Structure"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedAction int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedAction_Unknown HistoricalEventAgreementFormedAction = iota
|
|
HistoricalEventAgreementFormedAction_BribeOfficial
|
|
HistoricalEventAgreementFormedAction_InduceToEmbezzle
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedAction(s string) HistoricalEventAgreementFormedAction {
|
|
switch s {
|
|
case "bribe official":
|
|
return HistoricalEventAgreementFormedAction_BribeOfficial
|
|
case "induce to embezzle":
|
|
return HistoricalEventAgreementFormedAction_InduceToEmbezzle
|
|
}
|
|
return HistoricalEventAgreementFormedAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedAction) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedAction_BribeOfficial:
|
|
return "bribe official"
|
|
case HistoricalEventAgreementFormedAction_InduceToEmbezzle:
|
|
return "induce to embezzle"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedMethod int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedMethod_Unknown HistoricalEventAgreementFormedMethod = iota
|
|
HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement
|
|
HistoricalEventAgreementFormedMethod_Bribe
|
|
HistoricalEventAgreementFormedMethod_Flatter
|
|
HistoricalEventAgreementFormedMethod_Intimidate
|
|
HistoricalEventAgreementFormedMethod_OfferImmortality
|
|
HistoricalEventAgreementFormedMethod_Precedence
|
|
HistoricalEventAgreementFormedMethod_ReligiousSympathy
|
|
HistoricalEventAgreementFormedMethod_RevengeOnGrudge
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedMethod(s string) HistoricalEventAgreementFormedMethod {
|
|
switch s {
|
|
case "blackmail over embezzlement":
|
|
return HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement
|
|
case "bribe":
|
|
return HistoricalEventAgreementFormedMethod_Bribe
|
|
case "flatter":
|
|
return HistoricalEventAgreementFormedMethod_Flatter
|
|
case "intimidate":
|
|
return HistoricalEventAgreementFormedMethod_Intimidate
|
|
case "offer immortality":
|
|
return HistoricalEventAgreementFormedMethod_OfferImmortality
|
|
case "precedence":
|
|
return HistoricalEventAgreementFormedMethod_Precedence
|
|
case "religious sympathy":
|
|
return HistoricalEventAgreementFormedMethod_ReligiousSympathy
|
|
case "revenge on grudge":
|
|
return HistoricalEventAgreementFormedMethod_RevengeOnGrudge
|
|
}
|
|
return HistoricalEventAgreementFormedMethod_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedMethod) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement:
|
|
return "blackmail over embezzlement"
|
|
case HistoricalEventAgreementFormedMethod_Bribe:
|
|
return "bribe"
|
|
case HistoricalEventAgreementFormedMethod_Flatter:
|
|
return "flatter"
|
|
case HistoricalEventAgreementFormedMethod_Intimidate:
|
|
return "intimidate"
|
|
case HistoricalEventAgreementFormedMethod_OfferImmortality:
|
|
return "offer immortality"
|
|
case HistoricalEventAgreementFormedMethod_Precedence:
|
|
return "precedence"
|
|
case HistoricalEventAgreementFormedMethod_ReligiousSympathy:
|
|
return "religious sympathy"
|
|
case HistoricalEventAgreementFormedMethod_RevengeOnGrudge:
|
|
return "revenge on grudge"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedMethod) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedReason int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedReason_Unknown HistoricalEventAgreementFormedReason = iota
|
|
HistoricalEventAgreementFormedReason_ReunitedWithLovedOne
|
|
HistoricalEventAgreementFormedReason_ViolentDisagreement
|
|
HistoricalEventAgreementFormedReason_Whim
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedReason(s string) HistoricalEventAgreementFormedReason {
|
|
switch s {
|
|
case "reunited with loved one":
|
|
return HistoricalEventAgreementFormedReason_ReunitedWithLovedOne
|
|
case "violent disagreement":
|
|
return HistoricalEventAgreementFormedReason_ViolentDisagreement
|
|
case "whim":
|
|
return HistoricalEventAgreementFormedReason_Whim
|
|
}
|
|
return HistoricalEventAgreementFormedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedReason_ReunitedWithLovedOne:
|
|
return "reunited with loved one"
|
|
case HistoricalEventAgreementFormedReason_ViolentDisagreement:
|
|
return "violent disagreement"
|
|
case HistoricalEventAgreementFormedReason_Whim:
|
|
return "whim"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedTopFacet int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedTopFacet_Unknown HistoricalEventAgreementFormedTopFacet = iota
|
|
HistoricalEventAgreementFormedTopFacet_Ambition
|
|
HistoricalEventAgreementFormedTopFacet_AnxietyPropensity
|
|
HistoricalEventAgreementFormedTopFacet_Confidence
|
|
HistoricalEventAgreementFormedTopFacet_EnvyPropensity
|
|
HistoricalEventAgreementFormedTopFacet_Fearlessness
|
|
HistoricalEventAgreementFormedTopFacet_Greed
|
|
HistoricalEventAgreementFormedTopFacet_Hope
|
|
HistoricalEventAgreementFormedTopFacet_Pride
|
|
HistoricalEventAgreementFormedTopFacet_StressVulnerability
|
|
HistoricalEventAgreementFormedTopFacet_Swayable
|
|
HistoricalEventAgreementFormedTopFacet_Vanity
|
|
HistoricalEventAgreementFormedTopFacet_Vengeful
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedTopFacet(s string) HistoricalEventAgreementFormedTopFacet {
|
|
switch s {
|
|
case "ambition":
|
|
return HistoricalEventAgreementFormedTopFacet_Ambition
|
|
case "anxiety propensity":
|
|
return HistoricalEventAgreementFormedTopFacet_AnxietyPropensity
|
|
case "confidence":
|
|
return HistoricalEventAgreementFormedTopFacet_Confidence
|
|
case "envy propensity":
|
|
return HistoricalEventAgreementFormedTopFacet_EnvyPropensity
|
|
case "fearlessness":
|
|
return HistoricalEventAgreementFormedTopFacet_Fearlessness
|
|
case "greed":
|
|
return HistoricalEventAgreementFormedTopFacet_Greed
|
|
case "hope":
|
|
return HistoricalEventAgreementFormedTopFacet_Hope
|
|
case "pride":
|
|
return HistoricalEventAgreementFormedTopFacet_Pride
|
|
case "stress vulnerability":
|
|
return HistoricalEventAgreementFormedTopFacet_StressVulnerability
|
|
case "swayable":
|
|
return HistoricalEventAgreementFormedTopFacet_Swayable
|
|
case "vanity":
|
|
return HistoricalEventAgreementFormedTopFacet_Vanity
|
|
case "vengeful":
|
|
return HistoricalEventAgreementFormedTopFacet_Vengeful
|
|
}
|
|
return HistoricalEventAgreementFormedTopFacet_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopFacet) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedTopFacet_Ambition:
|
|
return "ambition"
|
|
case HistoricalEventAgreementFormedTopFacet_AnxietyPropensity:
|
|
return "anxiety propensity"
|
|
case HistoricalEventAgreementFormedTopFacet_Confidence:
|
|
return "confidence"
|
|
case HistoricalEventAgreementFormedTopFacet_EnvyPropensity:
|
|
return "envy propensity"
|
|
case HistoricalEventAgreementFormedTopFacet_Fearlessness:
|
|
return "fearlessness"
|
|
case HistoricalEventAgreementFormedTopFacet_Greed:
|
|
return "greed"
|
|
case HistoricalEventAgreementFormedTopFacet_Hope:
|
|
return "hope"
|
|
case HistoricalEventAgreementFormedTopFacet_Pride:
|
|
return "pride"
|
|
case HistoricalEventAgreementFormedTopFacet_StressVulnerability:
|
|
return "stress vulnerability"
|
|
case HistoricalEventAgreementFormedTopFacet_Swayable:
|
|
return "swayable"
|
|
case HistoricalEventAgreementFormedTopFacet_Vanity:
|
|
return "vanity"
|
|
case HistoricalEventAgreementFormedTopFacet_Vengeful:
|
|
return "vengeful"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopFacet) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedTopRelationshipFactor int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedTopRelationshipFactor_Unknown HistoricalEventAgreementFormedTopRelationshipFactor = iota
|
|
HistoricalEventAgreementFormedTopRelationshipFactor_Fear
|
|
HistoricalEventAgreementFormedTopRelationshipFactor_Love
|
|
HistoricalEventAgreementFormedTopRelationshipFactor_Respect
|
|
HistoricalEventAgreementFormedTopRelationshipFactor_Trust
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedTopRelationshipFactor(s string) HistoricalEventAgreementFormedTopRelationshipFactor {
|
|
switch s {
|
|
case "fear":
|
|
return HistoricalEventAgreementFormedTopRelationshipFactor_Fear
|
|
case "love":
|
|
return HistoricalEventAgreementFormedTopRelationshipFactor_Love
|
|
case "respect":
|
|
return HistoricalEventAgreementFormedTopRelationshipFactor_Respect
|
|
case "trust":
|
|
return HistoricalEventAgreementFormedTopRelationshipFactor_Trust
|
|
}
|
|
return HistoricalEventAgreementFormedTopRelationshipFactor_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopRelationshipFactor) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedTopRelationshipFactor_Fear:
|
|
return "fear"
|
|
case HistoricalEventAgreementFormedTopRelationshipFactor_Love:
|
|
return "love"
|
|
case HistoricalEventAgreementFormedTopRelationshipFactor_Respect:
|
|
return "respect"
|
|
case HistoricalEventAgreementFormedTopRelationshipFactor_Trust:
|
|
return "trust"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopRelationshipFactor) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormedTopValue int
|
|
|
|
const (
|
|
HistoricalEventAgreementFormedTopValue_Unknown HistoricalEventAgreementFormedTopValue = iota
|
|
HistoricalEventAgreementFormedTopValue_Law
|
|
HistoricalEventAgreementFormedTopValue_Power
|
|
)
|
|
|
|
func parseHistoricalEventAgreementFormedTopValue(s string) HistoricalEventAgreementFormedTopValue {
|
|
switch s {
|
|
case "law":
|
|
return HistoricalEventAgreementFormedTopValue_Law
|
|
case "power":
|
|
return HistoricalEventAgreementFormedTopValue_Power
|
|
}
|
|
return HistoricalEventAgreementFormedTopValue_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopValue) String() string {
|
|
switch s {
|
|
case HistoricalEventAgreementFormedTopValue_Law:
|
|
return "law"
|
|
case HistoricalEventAgreementFormedTopValue_Power:
|
|
return "power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventAgreementFormedTopValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventAgreementFormed struct {
|
|
Action HistoricalEventAgreementFormedAction `json:"action" legend:"base"` // action
|
|
AgreementId int `json:"agreementId" legend:"base"` // agreement_id
|
|
AgreementSubjectId int `json:"agreementSubjectId" legend:"base"` // agreement_subject_id
|
|
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
|
|
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
|
|
ConcluderHfid int `json:"concluderHfid" legend:"base"` // concluder_hfid
|
|
Delegated bool `json:"delegated" legend:"base"` // delegated
|
|
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
|
|
Method HistoricalEventAgreementFormedMethod `json:"method" legend:"base"` // method
|
|
Reason HistoricalEventAgreementFormedReason `json:"reason" legend:"base"` // reason
|
|
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
|
|
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
|
|
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
|
|
Successful bool `json:"successful" legend:"base"` // successful
|
|
TopFacet HistoricalEventAgreementFormedTopFacet `json:"topFacet" legend:"base"` // top_facet
|
|
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
|
|
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
|
|
TopRelationshipFactor HistoricalEventAgreementFormedTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
|
|
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
|
|
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
|
|
TopValue HistoricalEventAgreementFormedTopValue `json:"topValue" legend:"base"` // top_value
|
|
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
|
|
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
|
|
}
|
|
|
|
func (x *HistoricalEventAgreementFormed) Type() string { return "agreement formed" }
|
|
func (x *HistoricalEventAgreementFormed) RelatedToEntity(id int) bool {
|
|
return x.RelevantEntityId == id
|
|
}
|
|
func (x *HistoricalEventAgreementFormed) RelatedToHf(id int) bool { return x.ConcluderHfid == id }
|
|
|
|
func (x *HistoricalEventAgreementFormed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAgreementMade struct {
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventAgreementMade) Type() string { return "agreement made" }
|
|
func (x *HistoricalEventAgreementMade) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventAgreementMade) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventAgreementMade) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAgreementRejected struct {
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventAgreementRejected) Type() string { return "agreement rejected" }
|
|
func (x *HistoricalEventAgreementRejected) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventAgreementRejected) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventAgreementRejected) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactClaimFormedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventArtifactClaimFormedCircumstance_Unknown HistoricalEventArtifactClaimFormedCircumstance = iota
|
|
HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission
|
|
HistoricalEventArtifactClaimFormedCircumstance_FromAfar
|
|
)
|
|
|
|
func parseHistoricalEventArtifactClaimFormedCircumstance(s string) HistoricalEventArtifactClaimFormedCircumstance {
|
|
switch s {
|
|
case "during an infiltration mission":
|
|
return HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission
|
|
case "from afar":
|
|
return HistoricalEventArtifactClaimFormedCircumstance_FromAfar
|
|
}
|
|
return HistoricalEventArtifactClaimFormedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactClaimFormedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission:
|
|
return "during an infiltration mission"
|
|
case HistoricalEventArtifactClaimFormedCircumstance_FromAfar:
|
|
return "from afar"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactClaimFormedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactClaimFormedClaim int
|
|
|
|
const (
|
|
HistoricalEventArtifactClaimFormedClaim_Unknown HistoricalEventArtifactClaimFormedClaim = iota
|
|
HistoricalEventArtifactClaimFormedClaim_Heirloom
|
|
HistoricalEventArtifactClaimFormedClaim_Symbol
|
|
HistoricalEventArtifactClaimFormedClaim_Treasure
|
|
)
|
|
|
|
func parseHistoricalEventArtifactClaimFormedClaim(s string) HistoricalEventArtifactClaimFormedClaim {
|
|
switch s {
|
|
case "heirloom":
|
|
return HistoricalEventArtifactClaimFormedClaim_Heirloom
|
|
case "symbol":
|
|
return HistoricalEventArtifactClaimFormedClaim_Symbol
|
|
case "treasure":
|
|
return HistoricalEventArtifactClaimFormedClaim_Treasure
|
|
}
|
|
return HistoricalEventArtifactClaimFormedClaim_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactClaimFormedClaim) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactClaimFormedClaim_Heirloom:
|
|
return "heirloom"
|
|
case HistoricalEventArtifactClaimFormedClaim_Symbol:
|
|
return "symbol"
|
|
case HistoricalEventArtifactClaimFormedClaim_Treasure:
|
|
return "treasure"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactClaimFormedClaim) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactClaimFormed struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
Circumstance HistoricalEventArtifactClaimFormedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
Claim HistoricalEventArtifactClaimFormedClaim `json:"claim" legend:"base"` // claim
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactClaimFormed) Type() string { return "artifact claim formed" }
|
|
func (x *HistoricalEventArtifactClaimFormed) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventArtifactClaimFormed) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactClaimFormed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactCopied struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
DestEntityId int `json:"destEntityId" legend:"base"` // dest_entity_id
|
|
DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id
|
|
DestStructureId int `json:"destStructureId" legend:"base"` // dest_structure_id
|
|
FromOriginal bool `json:"fromOriginal" legend:"base"` // from_original
|
|
SourceEntityId int `json:"sourceEntityId" legend:"base"` // source_entity_id
|
|
SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id
|
|
SourceStructureId int `json:"sourceStructureId" legend:"base"` // source_structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactCopied) Type() string { return "artifact copied" }
|
|
func (x *HistoricalEventArtifactCopied) RelatedToEntity(id int) bool {
|
|
return x.DestEntityId == id || x.SourceEntityId == id
|
|
}
|
|
func (x *HistoricalEventArtifactCopied) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventArtifactCopied) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactCreatedReason int
|
|
|
|
const (
|
|
HistoricalEventArtifactCreatedReason_Unknown HistoricalEventArtifactCreatedReason = iota
|
|
HistoricalEventArtifactCreatedReason_SanctifyHf
|
|
)
|
|
|
|
func parseHistoricalEventArtifactCreatedReason(s string) HistoricalEventArtifactCreatedReason {
|
|
switch s {
|
|
case "sanctify_hf":
|
|
return HistoricalEventArtifactCreatedReason_SanctifyHf
|
|
}
|
|
return HistoricalEventArtifactCreatedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactCreatedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactCreatedReason_SanctifyHf:
|
|
return "sanctify hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactCreatedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactCreated struct {
|
|
ArtifactId int `json:"artifactId" legend:"both"` // artifact_id
|
|
Circumstance *HistoricalEventArtifactCreatedCircumstance `json:"circumstance" legend:"plus"` // circumstance
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
NameOnly bool `json:"nameOnly" legend:"base"` // name_only
|
|
Reason HistoricalEventArtifactCreatedReason `json:"reason" legend:"plus"` // reason
|
|
SanctifyHf int `json:"sanctifyHf" legend:"plus"` // sanctify_hf
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactCreated) Type() string { return "artifact created" }
|
|
func (x *HistoricalEventArtifactCreated) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactCreated) RelatedToHf(id int) bool {
|
|
return x.HistFigureId == id || x.SanctifyHf == id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactCreated) CheckFields() {
|
|
if x.SanctifyHf != x.HistFigureId && x.SanctifyHf != 0 && x.HistFigureId != 0 {
|
|
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["HistFigureId"] = false
|
|
}
|
|
if x.SanctifyHf != x.SiteId && x.SanctifyHf != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["SiteId"] = false
|
|
}
|
|
if x.SanctifyHf != x.UnitId && x.SanctifyHf != 0 && x.UnitId != 0 {
|
|
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["UnitId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventArtifactCreatedCircumstanceType int
|
|
|
|
const (
|
|
HistoricalEventArtifactCreatedCircumstanceType_Unknown HistoricalEventArtifactCreatedCircumstanceType = iota
|
|
HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
|
HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
|
HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
|
)
|
|
|
|
func parseHistoricalEventArtifactCreatedCircumstanceType(s string) HistoricalEventArtifactCreatedCircumstanceType {
|
|
switch s {
|
|
case "defeated":
|
|
return HistoricalEventArtifactCreatedCircumstanceType_Defeated
|
|
case "favoritepossession":
|
|
return HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
|
|
case "preservebody":
|
|
return HistoricalEventArtifactCreatedCircumstanceType_Preservebody
|
|
}
|
|
return HistoricalEventArtifactCreatedCircumstanceType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactCreatedCircumstanceType) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactCreatedCircumstanceType_Defeated:
|
|
return "defeated"
|
|
case HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession:
|
|
return "favoritepossession"
|
|
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
|
|
return "preservebody"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactCreatedCircumstanceType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactCreatedCircumstance struct {
|
|
Defeated int `json:"defeated" legend:"plus"` // defeated
|
|
Type HistoricalEventArtifactCreatedCircumstanceType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventArtifactCreatedCircumstance) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactDestroyed struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
DestroyerEnid int `json:"destroyerEnid" legend:"base"` // destroyer_enid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactDestroyed) Type() string { return "artifact destroyed" }
|
|
func (x *HistoricalEventArtifactDestroyed) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactDestroyed) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventArtifactDestroyed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactFound struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactFound) Type() string { return "artifact found" }
|
|
func (x *HistoricalEventArtifactFound) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactFound) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactFound) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactGivenReason int
|
|
|
|
const (
|
|
HistoricalEventArtifactGivenReason_Unknown HistoricalEventArtifactGivenReason = iota
|
|
HistoricalEventArtifactGivenReason_PartOfTradeNegotiation
|
|
)
|
|
|
|
func parseHistoricalEventArtifactGivenReason(s string) HistoricalEventArtifactGivenReason {
|
|
switch s {
|
|
case "part of trade negotiation":
|
|
return HistoricalEventArtifactGivenReason_PartOfTradeNegotiation
|
|
}
|
|
return HistoricalEventArtifactGivenReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactGivenReason) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactGivenReason_PartOfTradeNegotiation:
|
|
return "part of trade negotiation"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactGivenReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactGiven struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
GiverEntityId int `json:"giverEntityId" legend:"base"` // giver_entity_id
|
|
GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` // giver_hist_figure_id
|
|
Reason HistoricalEventArtifactGivenReason `json:"reason" legend:"base"` // reason
|
|
ReceiverEntityId int `json:"receiverEntityId" legend:"base"` // receiver_entity_id
|
|
ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` // receiver_hist_figure_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactGiven) Type() string { return "artifact given" }
|
|
func (x *HistoricalEventArtifactGiven) RelatedToEntity(id int) bool {
|
|
return x.GiverEntityId == id || x.ReceiverEntityId == id
|
|
}
|
|
func (x *HistoricalEventArtifactGiven) RelatedToHf(id int) bool {
|
|
return x.GiverHistFigureId == id || x.ReceiverHistFigureId == id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactGiven) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactLost struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SitePropertyId int `json:"sitePropertyId" legend:"base"` // site_property_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactLost) Type() string { return "artifact lost" }
|
|
func (x *HistoricalEventArtifactLost) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactLost) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventArtifactLost) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactPossessedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventArtifactPossessedCircumstance_Unknown HistoricalEventArtifactPossessedCircumstance = iota
|
|
HistoricalEventArtifactPossessedCircumstance_HfIsDead
|
|
)
|
|
|
|
func parseHistoricalEventArtifactPossessedCircumstance(s string) HistoricalEventArtifactPossessedCircumstance {
|
|
switch s {
|
|
case "hf is dead":
|
|
return HistoricalEventArtifactPossessedCircumstance_HfIsDead
|
|
}
|
|
return HistoricalEventArtifactPossessedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactPossessedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactPossessedCircumstance_HfIsDead:
|
|
return "hf is dead"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactPossessedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactPossessedReason int
|
|
|
|
const (
|
|
HistoricalEventArtifactPossessedReason_Unknown HistoricalEventArtifactPossessedReason = iota
|
|
HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid
|
|
HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition
|
|
)
|
|
|
|
func parseHistoricalEventArtifactPossessedReason(s string) HistoricalEventArtifactPossessedReason {
|
|
switch s {
|
|
case "artifact is heirloom of family hfid":
|
|
return HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid
|
|
case "artifact is symbol of entity position":
|
|
return HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition
|
|
}
|
|
return HistoricalEventArtifactPossessedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventArtifactPossessedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid:
|
|
return "artifact is heirloom of family hfid"
|
|
case HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition:
|
|
return "artifact is symbol of entity position"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventArtifactPossessedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventArtifactPossessed struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
Circumstance HistoricalEventArtifactPossessedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
Reason HistoricalEventArtifactPossessedReason `json:"reason" legend:"base"` // reason
|
|
ReasonId int `json:"reasonId" legend:"base"` // reason_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactPossessed) Type() string { return "artifact possessed" }
|
|
func (x *HistoricalEventArtifactPossessed) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactPossessed) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactPossessed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactRecovered struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactRecovered) Type() string { return "artifact recovered" }
|
|
func (x *HistoricalEventArtifactRecovered) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactRecovered) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactRecovered) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactStored struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactStored) Type() string { return "artifact stored" }
|
|
func (x *HistoricalEventArtifactStored) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactStored) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactStored) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventArtifactTransformed struct {
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
NewArtifactId int `json:"newArtifactId" legend:"base"` // new_artifact_id
|
|
OldArtifactId int `json:"oldArtifactId" legend:"base"` // old_artifact_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
UnitId int `json:"unitId" legend:"base"` // unit_id
|
|
}
|
|
|
|
func (x *HistoricalEventArtifactTransformed) Type() string { return "artifact transformed" }
|
|
func (x *HistoricalEventArtifactTransformed) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventArtifactTransformed) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventArtifactTransformed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAssumeIdentity struct {
|
|
IdentityCaste string `json:"identityCaste" legend:"plus"` // identity_caste
|
|
IdentityId int `json:"identityId" legend:"base"` // identity_id
|
|
IdentityName string `json:"identityName" legend:"plus"` // identity_name
|
|
IdentityRace string `json:"identityRace" legend:"plus"` // identity_race
|
|
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
|
|
TricksterHfid int `json:"tricksterHfid" legend:"base"` // trickster_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventAssumeIdentity) Type() string { return "assume identity" }
|
|
func (x *HistoricalEventAssumeIdentity) RelatedToEntity(id int) bool { return x.IdentityId == id }
|
|
func (x *HistoricalEventAssumeIdentity) RelatedToHf(id int) bool { return x.TricksterHfid == id }
|
|
|
|
func (x *HistoricalEventAssumeIdentity) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventAttackedSite struct {
|
|
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid
|
|
AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid
|
|
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid
|
|
DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventAttackedSite) Type() string { return "attacked site" }
|
|
func (x *HistoricalEventAttackedSite) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventAttackedSite) RelatedToHf(id int) bool {
|
|
return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventAttackedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventBodyAbusedAbuseType int
|
|
|
|
const (
|
|
HistoricalEventBodyAbusedAbuseType_Unknown HistoricalEventBodyAbusedAbuseType = iota
|
|
HistoricalEventBodyAbusedAbuseType_Animated
|
|
HistoricalEventBodyAbusedAbuseType_Flayed
|
|
HistoricalEventBodyAbusedAbuseType_Hung
|
|
HistoricalEventBodyAbusedAbuseType_Impaled
|
|
HistoricalEventBodyAbusedAbuseType_Mutilated
|
|
HistoricalEventBodyAbusedAbuseType_Piled
|
|
)
|
|
|
|
func parseHistoricalEventBodyAbusedAbuseType(s string) HistoricalEventBodyAbusedAbuseType {
|
|
switch s {
|
|
case "animated":
|
|
return HistoricalEventBodyAbusedAbuseType_Animated
|
|
case "flayed":
|
|
return HistoricalEventBodyAbusedAbuseType_Flayed
|
|
case "hung":
|
|
return HistoricalEventBodyAbusedAbuseType_Hung
|
|
case "impaled":
|
|
return HistoricalEventBodyAbusedAbuseType_Impaled
|
|
case "mutilated":
|
|
return HistoricalEventBodyAbusedAbuseType_Mutilated
|
|
case "piled":
|
|
return HistoricalEventBodyAbusedAbuseType_Piled
|
|
}
|
|
return HistoricalEventBodyAbusedAbuseType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedAbuseType) String() string {
|
|
switch s {
|
|
case HistoricalEventBodyAbusedAbuseType_Animated:
|
|
return "animated"
|
|
case HistoricalEventBodyAbusedAbuseType_Flayed:
|
|
return "flayed"
|
|
case HistoricalEventBodyAbusedAbuseType_Hung:
|
|
return "hung"
|
|
case HistoricalEventBodyAbusedAbuseType_Impaled:
|
|
return "impaled"
|
|
case HistoricalEventBodyAbusedAbuseType_Mutilated:
|
|
return "mutilated"
|
|
case HistoricalEventBodyAbusedAbuseType_Piled:
|
|
return "piled"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedAbuseType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventBodyAbusedItemSubtype int
|
|
|
|
const (
|
|
HistoricalEventBodyAbusedItemSubtype_Unknown HistoricalEventBodyAbusedItemSubtype = iota
|
|
HistoricalEventBodyAbusedItemSubtype_Pike
|
|
HistoricalEventBodyAbusedItemSubtype_Spear
|
|
)
|
|
|
|
func parseHistoricalEventBodyAbusedItemSubtype(s string) HistoricalEventBodyAbusedItemSubtype {
|
|
switch s {
|
|
case "pike":
|
|
return HistoricalEventBodyAbusedItemSubtype_Pike
|
|
case "spear":
|
|
return HistoricalEventBodyAbusedItemSubtype_Spear
|
|
}
|
|
return HistoricalEventBodyAbusedItemSubtype_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedItemSubtype) String() string {
|
|
switch s {
|
|
case HistoricalEventBodyAbusedItemSubtype_Pike:
|
|
return "pike"
|
|
case HistoricalEventBodyAbusedItemSubtype_Spear:
|
|
return "spear"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedItemSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventBodyAbusedItemType int
|
|
|
|
const (
|
|
HistoricalEventBodyAbusedItemType_Unknown HistoricalEventBodyAbusedItemType = iota
|
|
HistoricalEventBodyAbusedItemType_Weapon
|
|
)
|
|
|
|
func parseHistoricalEventBodyAbusedItemType(s string) HistoricalEventBodyAbusedItemType {
|
|
switch s {
|
|
case "weapon":
|
|
return HistoricalEventBodyAbusedItemType_Weapon
|
|
}
|
|
return HistoricalEventBodyAbusedItemType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedItemType) String() string {
|
|
switch s {
|
|
case HistoricalEventBodyAbusedItemType_Weapon:
|
|
return "weapon"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedItemType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventBodyAbusedPileType int
|
|
|
|
const (
|
|
HistoricalEventBodyAbusedPileType_Unknown HistoricalEventBodyAbusedPileType = iota
|
|
HistoricalEventBodyAbusedPileType_Grislymound
|
|
HistoricalEventBodyAbusedPileType_Grotesquepillar
|
|
HistoricalEventBodyAbusedPileType_Gruesomesculpture
|
|
)
|
|
|
|
func parseHistoricalEventBodyAbusedPileType(s string) HistoricalEventBodyAbusedPileType {
|
|
switch s {
|
|
case "grislymound":
|
|
return HistoricalEventBodyAbusedPileType_Grislymound
|
|
case "grotesquepillar":
|
|
return HistoricalEventBodyAbusedPileType_Grotesquepillar
|
|
case "gruesomesculpture":
|
|
return HistoricalEventBodyAbusedPileType_Gruesomesculpture
|
|
}
|
|
return HistoricalEventBodyAbusedPileType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedPileType) String() string {
|
|
switch s {
|
|
case HistoricalEventBodyAbusedPileType_Grislymound:
|
|
return "grislymound"
|
|
case HistoricalEventBodyAbusedPileType_Grotesquepillar:
|
|
return "grotesquepillar"
|
|
case HistoricalEventBodyAbusedPileType_Gruesomesculpture:
|
|
return "gruesomesculpture"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventBodyAbusedPileType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventBodyAbused struct {
|
|
AbuseType HistoricalEventBodyAbusedAbuseType `json:"abuseType" legend:"plus"` // abuse_type
|
|
Bodies []int `json:"bodies" legend:"plus"` // bodies
|
|
Civ int `json:"civ" legend:"plus"` // civ
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
Interaction int `json:"interaction" legend:"plus"` // interaction
|
|
ItemMat string `json:"itemMat" legend:"plus"` // item_mat
|
|
ItemSubtype HistoricalEventBodyAbusedItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType HistoricalEventBodyAbusedItemType `json:"itemType" legend:"plus"` // item_type
|
|
PileType HistoricalEventBodyAbusedPileType `json:"pileType" legend:"plus"` // pile_type
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Structure int `json:"structure" legend:"plus"` // structure
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
Tree int `json:"tree" legend:"plus"` // tree
|
|
VictimEntity int `json:"victimEntity" legend:"plus"` // victim_entity
|
|
}
|
|
|
|
func (x *HistoricalEventBodyAbused) Type() string { return "body abused" }
|
|
func (x *HistoricalEventBodyAbused) RelatedToEntity(id int) bool { return x.VictimEntity == id }
|
|
func (x *HistoricalEventBodyAbused) RelatedToHf(id int) bool {
|
|
return containsInt(x.Bodies, id) || x.Histfig == id
|
|
}
|
|
|
|
func (x *HistoricalEventBodyAbused) CheckFields() {
|
|
if x.Civ != x.FeatureLayerId && x.Civ != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Civ"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Civ"]["SiteId"] = false
|
|
}
|
|
if x.Civ != x.SubregionId && x.Civ != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Civ"]["SubregionId"] = false
|
|
}
|
|
if x.Histfig != x.FeatureLayerId && x.Histfig != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Histfig"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Histfig"]["SiteId"] = false
|
|
}
|
|
if x.Histfig != x.SubregionId && x.Histfig != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Histfig"]["SubregionId"] = false
|
|
}
|
|
if x.Interaction != x.FeatureLayerId && x.Interaction != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Interaction"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Interaction != x.SiteId && x.Interaction != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Interaction"]["SiteId"] = false
|
|
}
|
|
if x.Interaction != x.SubregionId && x.Interaction != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Interaction"]["SubregionId"] = false
|
|
}
|
|
if x.ItemMat != x.Coords && x.ItemMat != "" && x.Coords != "" {
|
|
sameFields["HistoricalEventBodyAbused"]["ItemMat"]["Coords"] = false
|
|
}
|
|
if x.Structure != x.FeatureLayerId && x.Structure != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Structure"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Structure"]["SiteId"] = false
|
|
}
|
|
if x.Structure != x.SubregionId && x.Structure != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Structure"]["SubregionId"] = false
|
|
}
|
|
if x.Tree != x.FeatureLayerId && x.Tree != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Tree"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Tree != x.SiteId && x.Tree != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Tree"]["SiteId"] = false
|
|
}
|
|
if x.Tree != x.SubregionId && x.Tree != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["Tree"]["SubregionId"] = false
|
|
}
|
|
if x.VictimEntity != x.FeatureLayerId && x.VictimEntity != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["FeatureLayerId"] = false
|
|
}
|
|
if x.VictimEntity != x.SiteId && x.VictimEntity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SiteId"] = false
|
|
}
|
|
if x.VictimEntity != x.SubregionId && x.VictimEntity != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SubregionId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventBuildingProfileAcquired struct {
|
|
AcquirerEnid int `json:"acquirerEnid" legend:"base"` // acquirer_enid
|
|
AcquirerHfid int `json:"acquirerHfid" legend:"base"` // acquirer_hfid
|
|
BuildingProfileId int `json:"buildingProfileId" legend:"base"` // building_profile_id
|
|
Inherited bool `json:"inherited" legend:"base"` // inherited
|
|
LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` // last_owner_hfid
|
|
PurchasedUnowned bool `json:"purchasedUnowned" legend:"base"` // purchased_unowned
|
|
RebuiltRuined bool `json:"rebuiltRuined" legend:"base"` // rebuilt_ruined
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventBuildingProfileAcquired) Type() string { return "building profile acquired" }
|
|
func (x *HistoricalEventBuildingProfileAcquired) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventBuildingProfileAcquired) RelatedToHf(id int) bool {
|
|
return x.AcquirerHfid == id || x.LastOwnerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventBuildingProfileAcquired) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCeremony struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
|
|
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCeremony) Type() string { return "ceremony" }
|
|
func (x *HistoricalEventCeremony) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventCeremony) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCeremony) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventChangeHfBodyStateBodyState int
|
|
|
|
const (
|
|
HistoricalEventChangeHfBodyStateBodyState_Unknown HistoricalEventChangeHfBodyStateBodyState = iota
|
|
HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite
|
|
)
|
|
|
|
func parseHistoricalEventChangeHfBodyStateBodyState(s string) HistoricalEventChangeHfBodyStateBodyState {
|
|
switch s {
|
|
case "entombed at site":
|
|
return HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite
|
|
}
|
|
return HistoricalEventChangeHfBodyStateBodyState_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfBodyStateBodyState) String() string {
|
|
switch s {
|
|
case HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite:
|
|
return "entombed at site"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfBodyStateBodyState) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventChangeHfBodyState struct {
|
|
BodyState HistoricalEventChangeHfBodyStateBodyState `json:"bodyState" legend:"base"` // body_state
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventChangeHfBodyState) Type() string { return "change hf body state" }
|
|
func (x *HistoricalEventChangeHfBodyState) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventChangeHfBodyState) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventChangeHfBodyState) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventChangeHfJob struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"both"` // hfid
|
|
NewJob string `json:"newJob" legend:"plus"` // new_job
|
|
OldJob string `json:"oldJob" legend:"plus"` // old_job
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventChangeHfJob) Type() string { return "change hf job" }
|
|
func (x *HistoricalEventChangeHfJob) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventChangeHfJob) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventChangeHfJob) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventChangeHfStateMood int
|
|
|
|
const (
|
|
HistoricalEventChangeHfStateMood_Unknown HistoricalEventChangeHfStateMood = iota
|
|
HistoricalEventChangeHfStateMood_Berserk
|
|
HistoricalEventChangeHfStateMood_Fell
|
|
HistoricalEventChangeHfStateMood_Fey
|
|
HistoricalEventChangeHfStateMood_Insane
|
|
HistoricalEventChangeHfStateMood_Macabre
|
|
HistoricalEventChangeHfStateMood_Melancholy
|
|
HistoricalEventChangeHfStateMood_Possessed
|
|
HistoricalEventChangeHfStateMood_Secretive
|
|
)
|
|
|
|
func parseHistoricalEventChangeHfStateMood(s string) HistoricalEventChangeHfStateMood {
|
|
switch s {
|
|
case "berserk":
|
|
return HistoricalEventChangeHfStateMood_Berserk
|
|
case "fell":
|
|
return HistoricalEventChangeHfStateMood_Fell
|
|
case "fey":
|
|
return HistoricalEventChangeHfStateMood_Fey
|
|
case "insane":
|
|
return HistoricalEventChangeHfStateMood_Insane
|
|
case "macabre":
|
|
return HistoricalEventChangeHfStateMood_Macabre
|
|
case "melancholy":
|
|
return HistoricalEventChangeHfStateMood_Melancholy
|
|
case "possessed":
|
|
return HistoricalEventChangeHfStateMood_Possessed
|
|
case "secretive":
|
|
return HistoricalEventChangeHfStateMood_Secretive
|
|
}
|
|
return HistoricalEventChangeHfStateMood_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateMood) String() string {
|
|
switch s {
|
|
case HistoricalEventChangeHfStateMood_Berserk:
|
|
return "berserk"
|
|
case HistoricalEventChangeHfStateMood_Fell:
|
|
return "fell"
|
|
case HistoricalEventChangeHfStateMood_Fey:
|
|
return "fey"
|
|
case HistoricalEventChangeHfStateMood_Insane:
|
|
return "insane"
|
|
case HistoricalEventChangeHfStateMood_Macabre:
|
|
return "macabre"
|
|
case HistoricalEventChangeHfStateMood_Melancholy:
|
|
return "melancholy"
|
|
case HistoricalEventChangeHfStateMood_Possessed:
|
|
return "possessed"
|
|
case HistoricalEventChangeHfStateMood_Secretive:
|
|
return "secretive"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateMood) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventChangeHfStateReason int
|
|
|
|
const (
|
|
HistoricalEventChangeHfStateReason_Unknown HistoricalEventChangeHfStateReason = iota
|
|
HistoricalEventChangeHfStateReason_BeWithMaster
|
|
HistoricalEventChangeHfStateReason_ConvictionExile
|
|
HistoricalEventChangeHfStateReason_ExiledAfterConviction
|
|
HistoricalEventChangeHfStateReason_FailedMood
|
|
HistoricalEventChangeHfStateReason_Flight
|
|
HistoricalEventChangeHfStateReason_GatherInformation
|
|
HistoricalEventChangeHfStateReason_GreatDealOfStress
|
|
HistoricalEventChangeHfStateReason_LackOfSleep
|
|
HistoricalEventChangeHfStateReason_None
|
|
HistoricalEventChangeHfStateReason_OnAPilgrimage
|
|
HistoricalEventChangeHfStateReason_Scholarship
|
|
HistoricalEventChangeHfStateReason_UnableToLeaveLocation
|
|
)
|
|
|
|
func parseHistoricalEventChangeHfStateReason(s string) HistoricalEventChangeHfStateReason {
|
|
switch s {
|
|
case "be with master":
|
|
return HistoricalEventChangeHfStateReason_BeWithMaster
|
|
case "be_with_master":
|
|
return HistoricalEventChangeHfStateReason_BeWithMaster
|
|
case "conviction_exile":
|
|
return HistoricalEventChangeHfStateReason_ConvictionExile
|
|
case "exiled after conviction":
|
|
return HistoricalEventChangeHfStateReason_ExiledAfterConviction
|
|
case "failed mood":
|
|
return HistoricalEventChangeHfStateReason_FailedMood
|
|
case "flight":
|
|
return HistoricalEventChangeHfStateReason_Flight
|
|
case "gather information":
|
|
return HistoricalEventChangeHfStateReason_GatherInformation
|
|
case "gather_information":
|
|
return HistoricalEventChangeHfStateReason_GatherInformation
|
|
case "great deal of stress":
|
|
return HistoricalEventChangeHfStateReason_GreatDealOfStress
|
|
case "lack of sleep":
|
|
return HistoricalEventChangeHfStateReason_LackOfSleep
|
|
case "none":
|
|
return HistoricalEventChangeHfStateReason_None
|
|
case "on a pilgrimage":
|
|
return HistoricalEventChangeHfStateReason_OnAPilgrimage
|
|
case "on_a_pilgrimage":
|
|
return HistoricalEventChangeHfStateReason_OnAPilgrimage
|
|
case "scholarship":
|
|
return HistoricalEventChangeHfStateReason_Scholarship
|
|
case "unable to leave location":
|
|
return HistoricalEventChangeHfStateReason_UnableToLeaveLocation
|
|
}
|
|
return HistoricalEventChangeHfStateReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateReason) String() string {
|
|
switch s {
|
|
case HistoricalEventChangeHfStateReason_BeWithMaster:
|
|
return "be with master"
|
|
case HistoricalEventChangeHfStateReason_ConvictionExile:
|
|
return "conviction exile"
|
|
case HistoricalEventChangeHfStateReason_ExiledAfterConviction:
|
|
return "exiled after conviction"
|
|
case HistoricalEventChangeHfStateReason_FailedMood:
|
|
return "failed mood"
|
|
case HistoricalEventChangeHfStateReason_Flight:
|
|
return "flight"
|
|
case HistoricalEventChangeHfStateReason_GatherInformation:
|
|
return "gather information"
|
|
case HistoricalEventChangeHfStateReason_GreatDealOfStress:
|
|
return "great deal of stress"
|
|
case HistoricalEventChangeHfStateReason_LackOfSleep:
|
|
return "lack of sleep"
|
|
case HistoricalEventChangeHfStateReason_None:
|
|
return "none"
|
|
case HistoricalEventChangeHfStateReason_OnAPilgrimage:
|
|
return "on a pilgrimage"
|
|
case HistoricalEventChangeHfStateReason_Scholarship:
|
|
return "scholarship"
|
|
case HistoricalEventChangeHfStateReason_UnableToLeaveLocation:
|
|
return "unable to leave location"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventChangeHfStateState int
|
|
|
|
const (
|
|
HistoricalEventChangeHfStateState_Unknown HistoricalEventChangeHfStateState = iota
|
|
HistoricalEventChangeHfStateState_Refugee
|
|
HistoricalEventChangeHfStateState_Settled
|
|
HistoricalEventChangeHfStateState_Visiting
|
|
HistoricalEventChangeHfStateState_Wandering
|
|
)
|
|
|
|
func parseHistoricalEventChangeHfStateState(s string) HistoricalEventChangeHfStateState {
|
|
switch s {
|
|
case "refugee":
|
|
return HistoricalEventChangeHfStateState_Refugee
|
|
case "settled":
|
|
return HistoricalEventChangeHfStateState_Settled
|
|
case "visiting":
|
|
return HistoricalEventChangeHfStateState_Visiting
|
|
case "wandering":
|
|
return HistoricalEventChangeHfStateState_Wandering
|
|
}
|
|
return HistoricalEventChangeHfStateState_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateState) String() string {
|
|
switch s {
|
|
case HistoricalEventChangeHfStateState_Refugee:
|
|
return "refugee"
|
|
case HistoricalEventChangeHfStateState_Settled:
|
|
return "settled"
|
|
case HistoricalEventChangeHfStateState_Visiting:
|
|
return "visiting"
|
|
case HistoricalEventChangeHfStateState_Wandering:
|
|
return "wandering"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventChangeHfStateState) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventChangeHfState struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"both"` // hfid
|
|
Mood HistoricalEventChangeHfStateMood `json:"mood" legend:"base"` // mood
|
|
Reason HistoricalEventChangeHfStateReason `json:"reason" legend:"both"` // reason
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
State HistoricalEventChangeHfStateState `json:"state" legend:"both"` // state
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventChangeHfState) Type() string { return "change hf state" }
|
|
func (x *HistoricalEventChangeHfState) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventChangeHfState) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventChangeHfState) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventChangedCreatureType struct {
|
|
ChangeeHfid int `json:"changeeHfid" legend:"base"` // changee_hfid
|
|
ChangerHfid int `json:"changerHfid" legend:"base"` // changer_hfid
|
|
NewCaste string `json:"newCaste" legend:"both"` // new_caste
|
|
NewRace string `json:"newRace" legend:"both"` // new_race
|
|
OldCaste string `json:"oldCaste" legend:"both"` // old_caste
|
|
OldRace string `json:"oldRace" legend:"both"` // old_race
|
|
}
|
|
|
|
func (x *HistoricalEventChangedCreatureType) Type() string { return "changed creature type" }
|
|
func (x *HistoricalEventChangedCreatureType) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventChangedCreatureType) RelatedToHf(id int) bool {
|
|
return x.ChangeeHfid == id || x.ChangerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventChangedCreatureType) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionType int
|
|
|
|
const (
|
|
HistoricalEventCollectionType_Unknown HistoricalEventCollectionType = iota
|
|
HistoricalEventCollectionType_Abduction
|
|
HistoricalEventCollectionType_Battle
|
|
HistoricalEventCollectionType_BeastAttack
|
|
HistoricalEventCollectionType_Ceremony
|
|
HistoricalEventCollectionType_Competition
|
|
HistoricalEventCollectionType_Duel
|
|
HistoricalEventCollectionType_EntityOverthrown
|
|
HistoricalEventCollectionType_Insurrection
|
|
HistoricalEventCollectionType_Journey
|
|
HistoricalEventCollectionType_Occasion
|
|
HistoricalEventCollectionType_Performance
|
|
HistoricalEventCollectionType_Persecution
|
|
HistoricalEventCollectionType_Procession
|
|
HistoricalEventCollectionType_Purge
|
|
HistoricalEventCollectionType_Raid
|
|
HistoricalEventCollectionType_SiteConquered
|
|
HistoricalEventCollectionType_Theft
|
|
HistoricalEventCollectionType_War
|
|
)
|
|
|
|
func parseHistoricalEventCollectionType(s string) HistoricalEventCollectionType {
|
|
switch s {
|
|
case "abduction":
|
|
return HistoricalEventCollectionType_Abduction
|
|
case "battle":
|
|
return HistoricalEventCollectionType_Battle
|
|
case "beast attack":
|
|
return HistoricalEventCollectionType_BeastAttack
|
|
case "ceremony":
|
|
return HistoricalEventCollectionType_Ceremony
|
|
case "competition":
|
|
return HistoricalEventCollectionType_Competition
|
|
case "duel":
|
|
return HistoricalEventCollectionType_Duel
|
|
case "entity overthrown":
|
|
return HistoricalEventCollectionType_EntityOverthrown
|
|
case "insurrection":
|
|
return HistoricalEventCollectionType_Insurrection
|
|
case "journey":
|
|
return HistoricalEventCollectionType_Journey
|
|
case "occasion":
|
|
return HistoricalEventCollectionType_Occasion
|
|
case "performance":
|
|
return HistoricalEventCollectionType_Performance
|
|
case "persecution":
|
|
return HistoricalEventCollectionType_Persecution
|
|
case "procession":
|
|
return HistoricalEventCollectionType_Procession
|
|
case "purge":
|
|
return HistoricalEventCollectionType_Purge
|
|
case "raid":
|
|
return HistoricalEventCollectionType_Raid
|
|
case "site conquered":
|
|
return HistoricalEventCollectionType_SiteConquered
|
|
case "theft":
|
|
return HistoricalEventCollectionType_Theft
|
|
case "war":
|
|
return HistoricalEventCollectionType_War
|
|
}
|
|
return HistoricalEventCollectionType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventCollectionType) String() string {
|
|
switch s {
|
|
case HistoricalEventCollectionType_Abduction:
|
|
return "abduction"
|
|
case HistoricalEventCollectionType_Battle:
|
|
return "battle"
|
|
case HistoricalEventCollectionType_BeastAttack:
|
|
return "beast attack"
|
|
case HistoricalEventCollectionType_Ceremony:
|
|
return "ceremony"
|
|
case HistoricalEventCollectionType_Competition:
|
|
return "competition"
|
|
case HistoricalEventCollectionType_Duel:
|
|
return "duel"
|
|
case HistoricalEventCollectionType_EntityOverthrown:
|
|
return "entity overthrown"
|
|
case HistoricalEventCollectionType_Insurrection:
|
|
return "insurrection"
|
|
case HistoricalEventCollectionType_Journey:
|
|
return "journey"
|
|
case HistoricalEventCollectionType_Occasion:
|
|
return "occasion"
|
|
case HistoricalEventCollectionType_Performance:
|
|
return "performance"
|
|
case HistoricalEventCollectionType_Persecution:
|
|
return "persecution"
|
|
case HistoricalEventCollectionType_Procession:
|
|
return "procession"
|
|
case HistoricalEventCollectionType_Purge:
|
|
return "purge"
|
|
case HistoricalEventCollectionType_Raid:
|
|
return "raid"
|
|
case HistoricalEventCollectionType_SiteConquered:
|
|
return "site conquered"
|
|
case HistoricalEventCollectionType_Theft:
|
|
return "theft"
|
|
case HistoricalEventCollectionType_War:
|
|
return "war"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventCollectionType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventCollection struct {
|
|
EndSeconds72 int `json:"endSeconds72" legend:"base"` // end_seconds72
|
|
EndYear int `json:"endYear" legend:"base"` // end_year
|
|
Event []int `json:"event" legend:"base"` // event
|
|
Eventcol []int `json:"eventcol" legend:"base"` // eventcol
|
|
Id_ int `json:"id" legend:"base"` // id
|
|
StartSeconds72 int `json:"startSeconds72" legend:"base"` // start_seconds72
|
|
StartYear int `json:"startYear" legend:"base"` // start_year
|
|
Details HistoricalEventCollectionDetails
|
|
}
|
|
|
|
func (x *HistoricalEventCollection) Id() int { return x.Id_ }
|
|
func (x *HistoricalEventCollection) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollection) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollection) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionAbduction struct {
|
|
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionAbduction) Type() string { return "abduction" }
|
|
func (x *HistoricalEventCollectionAbduction) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionAbduction) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionAbduction) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionBattleOutcome int
|
|
|
|
const (
|
|
HistoricalEventCollectionBattleOutcome_Unknown HistoricalEventCollectionBattleOutcome = iota
|
|
HistoricalEventCollectionBattleOutcome_AttackerWon
|
|
HistoricalEventCollectionBattleOutcome_DefenderWon
|
|
)
|
|
|
|
func parseHistoricalEventCollectionBattleOutcome(s string) HistoricalEventCollectionBattleOutcome {
|
|
switch s {
|
|
case "attacker won":
|
|
return HistoricalEventCollectionBattleOutcome_AttackerWon
|
|
case "defender won":
|
|
return HistoricalEventCollectionBattleOutcome_DefenderWon
|
|
}
|
|
return HistoricalEventCollectionBattleOutcome_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventCollectionBattleOutcome) String() string {
|
|
switch s {
|
|
case HistoricalEventCollectionBattleOutcome_AttackerWon:
|
|
return "attacker won"
|
|
case HistoricalEventCollectionBattleOutcome_DefenderWon:
|
|
return "defender won"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventCollectionBattleOutcome) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventCollectionBattle struct {
|
|
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
|
|
ASupportMercHfid []int `json:"aSupportMercHfid" legend:"base"` // a_support_merc_hfid
|
|
AttackingHfid []int `json:"attackingHfid" legend:"base"` // attacking_hfid
|
|
AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` // attacking_merc_enid
|
|
AttackingSquadAnimated []bool `json:"attackingSquadAnimated" legend:"base"` // attacking_squad_animated
|
|
AttackingSquadDeaths []int `json:"attackingSquadDeaths" legend:"base"` // attacking_squad_deaths
|
|
AttackingSquadEntityPop []int `json:"attackingSquadEntityPop" legend:"base"` // attacking_squad_entity_pop
|
|
AttackingSquadNumber []int `json:"attackingSquadNumber" legend:"base"` // attacking_squad_number
|
|
AttackingSquadRace []string `json:"attackingSquadRace" legend:"base"` // attacking_squad_race
|
|
AttackingSquadSite []int `json:"attackingSquadSite" legend:"base"` // attacking_squad_site
|
|
CompanyMerc []bool `json:"companyMerc" legend:"base"` // company_merc
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
|
|
DSupportMercHfid []int `json:"dSupportMercHfid" legend:"base"` // d_support_merc_hfid
|
|
DefendingHfid []int `json:"defendingHfid" legend:"base"` // defending_hfid
|
|
DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` // defending_merc_enid
|
|
DefendingSquadAnimated []bool `json:"defendingSquadAnimated" legend:"base"` // defending_squad_animated
|
|
DefendingSquadDeaths []int `json:"defendingSquadDeaths" legend:"base"` // defending_squad_deaths
|
|
DefendingSquadEntityPop []int `json:"defendingSquadEntityPop" legend:"base"` // defending_squad_entity_pop
|
|
DefendingSquadNumber []int `json:"defendingSquadNumber" legend:"base"` // defending_squad_number
|
|
DefendingSquadRace []string `json:"defendingSquadRace" legend:"base"` // defending_squad_race
|
|
DefendingSquadSite []int `json:"defendingSquadSite" legend:"base"` // defending_squad_site
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
IndividualMerc []bool `json:"individualMerc" legend:"base"` // individual_merc
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
NoncomHfid []int `json:"noncomHfid" legend:"base"` // noncom_hfid
|
|
Outcome HistoricalEventCollectionBattleOutcome `json:"outcome" legend:"base"` // outcome
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionBattle) Name() string { return x.Name_ }
|
|
func (x *HistoricalEventCollectionBattle) Type() string { return "battle" }
|
|
func (x *HistoricalEventCollectionBattle) RelatedToEntity(id int) bool {
|
|
return containsInt(x.AttackingSquadEntityPop, id) || containsInt(x.DefendingSquadEntityPop, id)
|
|
}
|
|
func (x *HistoricalEventCollectionBattle) RelatedToHf(id int) bool {
|
|
return containsInt(x.ASupportMercHfid, id) || containsInt(x.AttackingHfid, id) || containsInt(x.DSupportMercHfid, id) || containsInt(x.DefendingHfid, id) || containsInt(x.NoncomHfid, id)
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionBattle) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionBeastAttack struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionBeastAttack) Type() string { return "beast attack" }
|
|
func (x *HistoricalEventCollectionBeastAttack) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionBeastAttack) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionBeastAttack) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionCeremony struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionCeremony) Type() string { return "ceremony" }
|
|
func (x *HistoricalEventCollectionCeremony) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionCeremony) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionCeremony) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionCompetition struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionCompetition) Type() string { return "competition" }
|
|
func (x *HistoricalEventCollectionCompetition) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionCompetition) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionCompetition) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionDuel struct {
|
|
AttackingHfid int `json:"attackingHfid" legend:"base"` // attacking_hfid
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DefendingHfid int `json:"defendingHfid" legend:"base"` // defending_hfid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionDuel) Type() string { return "duel" }
|
|
func (x *HistoricalEventCollectionDuel) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionDuel) RelatedToHf(id int) bool {
|
|
return x.AttackingHfid == id || x.DefendingHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionDuel) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionEntityOverthrown struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionEntityOverthrown) Type() string { return "entity overthrown" }
|
|
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToEntity(id int) bool {
|
|
return x.TargetEntityId == id
|
|
}
|
|
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionEntityOverthrown) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionInsurrection struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionInsurrection) Type() string { return "insurrection" }
|
|
func (x *HistoricalEventCollectionInsurrection) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionInsurrection) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionInsurrection) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionJourney struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionJourney) Type() string { return "journey" }
|
|
func (x *HistoricalEventCollectionJourney) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionJourney) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionJourney) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionOccasion struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionOccasion) Type() string { return "occasion" }
|
|
func (x *HistoricalEventCollectionOccasion) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventCollectionOccasion) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionOccasion) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionPerformance struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionPerformance) Type() string { return "performance" }
|
|
func (x *HistoricalEventCollectionPerformance) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionPerformance) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionPerformance) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionPersecution struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionPersecution) Type() string { return "persecution" }
|
|
func (x *HistoricalEventCollectionPersecution) RelatedToEntity(id int) bool {
|
|
return x.TargetEntityId == id
|
|
}
|
|
func (x *HistoricalEventCollectionPersecution) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionPersecution) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionProcession struct {
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionProcession) Type() string { return "procession" }
|
|
func (x *HistoricalEventCollectionProcession) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionProcession) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionProcession) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionPurgeAdjective int
|
|
|
|
const (
|
|
HistoricalEventCollectionPurgeAdjective_Unknown HistoricalEventCollectionPurgeAdjective = iota
|
|
HistoricalEventCollectionPurgeAdjective_Vampire
|
|
)
|
|
|
|
func parseHistoricalEventCollectionPurgeAdjective(s string) HistoricalEventCollectionPurgeAdjective {
|
|
switch s {
|
|
case "Vampire":
|
|
return HistoricalEventCollectionPurgeAdjective_Vampire
|
|
}
|
|
return HistoricalEventCollectionPurgeAdjective_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventCollectionPurgeAdjective) String() string {
|
|
switch s {
|
|
case HistoricalEventCollectionPurgeAdjective_Vampire:
|
|
return "vampire"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventCollectionPurgeAdjective) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventCollectionPurge struct {
|
|
Adjective HistoricalEventCollectionPurgeAdjective `json:"adjective" legend:"base"` // adjective
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionPurge) Type() string { return "purge" }
|
|
func (x *HistoricalEventCollectionPurge) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionPurge) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionPurge) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionRaid struct {
|
|
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionRaid) Type() string { return "raid" }
|
|
func (x *HistoricalEventCollectionRaid) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionRaid) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionRaid) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionSiteConquered struct {
|
|
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
|
|
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionSiteConquered) Type() string { return "site conquered" }
|
|
func (x *HistoricalEventCollectionSiteConquered) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionSiteConquered) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionSiteConquered) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionTheft struct {
|
|
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ordinal int `json:"ordinal" legend:"base"` // ordinal
|
|
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionTheft) Type() string { return "theft" }
|
|
func (x *HistoricalEventCollectionTheft) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionTheft) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionTheft) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCollectionWar struct {
|
|
AggressorEntId int `json:"aggressorEntId" legend:"base"` // aggressor_ent_id
|
|
DefenderEntId int `json:"defenderEntId" legend:"base"` // defender_ent_id
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
}
|
|
|
|
func (x *HistoricalEventCollectionWar) Name() string { return x.Name_ }
|
|
func (x *HistoricalEventCollectionWar) Type() string { return "war" }
|
|
func (x *HistoricalEventCollectionWar) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCollectionWar) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCollectionWar) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCompetition struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
CompetitorHfid []int `json:"competitorHfid" legend:"base"` // competitor_hfid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
|
|
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
WinnerHfid int `json:"winnerHfid" legend:"base"` // winner_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventCompetition) Type() string { return "competition" }
|
|
func (x *HistoricalEventCompetition) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventCompetition) RelatedToHf(id int) bool {
|
|
return containsInt(x.CompetitorHfid, id) || x.WinnerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventCompetition) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCreateEntityPositionReason int
|
|
|
|
const (
|
|
HistoricalEventCreateEntityPositionReason_Unknown HistoricalEventCreateEntityPositionReason = iota
|
|
HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse
|
|
HistoricalEventCreateEntityPositionReason_Collaboration
|
|
HistoricalEventCreateEntityPositionReason_ForceOfArgument
|
|
HistoricalEventCreateEntityPositionReason_ThreatOfViolence
|
|
HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport
|
|
)
|
|
|
|
func parseHistoricalEventCreateEntityPositionReason(s string) HistoricalEventCreateEntityPositionReason {
|
|
switch s {
|
|
case "as_a_matter_of_course":
|
|
return HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse
|
|
case "collaboration":
|
|
return HistoricalEventCreateEntityPositionReason_Collaboration
|
|
case "force_of_argument":
|
|
return HistoricalEventCreateEntityPositionReason_ForceOfArgument
|
|
case "threat_of_violence":
|
|
return HistoricalEventCreateEntityPositionReason_ThreatOfViolence
|
|
case "wave_of_popular_support":
|
|
return HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport
|
|
}
|
|
return HistoricalEventCreateEntityPositionReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventCreateEntityPositionReason) String() string {
|
|
switch s {
|
|
case HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse:
|
|
return "as a matter of course"
|
|
case HistoricalEventCreateEntityPositionReason_Collaboration:
|
|
return "collaboration"
|
|
case HistoricalEventCreateEntityPositionReason_ForceOfArgument:
|
|
return "force of argument"
|
|
case HistoricalEventCreateEntityPositionReason_ThreatOfViolence:
|
|
return "threat of violence"
|
|
case HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport:
|
|
return "wave of popular support"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventCreateEntityPositionReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventCreateEntityPosition struct {
|
|
Civ int `json:"civ" legend:"plus"` // civ
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
Position string `json:"position" legend:"plus"` // position
|
|
Reason HistoricalEventCreateEntityPositionReason `json:"reason" legend:"plus"` // reason
|
|
SiteCiv int `json:"siteCiv" legend:"plus"` // site_civ
|
|
}
|
|
|
|
func (x *HistoricalEventCreateEntityPosition) Type() string { return "create entity position" }
|
|
func (x *HistoricalEventCreateEntityPosition) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventCreateEntityPosition) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *HistoricalEventCreateEntityPosition) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCreatedSite struct {
|
|
BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
ResidentCivId int `json:"residentCivId" legend:"base"` // resident_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventCreatedSite) Type() string { return "created site" }
|
|
func (x *HistoricalEventCreatedSite) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.ResidentCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventCreatedSite) RelatedToHf(id int) bool { return x.BuilderHfid == id }
|
|
|
|
func (x *HistoricalEventCreatedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCreatedStructureRebuild int
|
|
|
|
const (
|
|
HistoricalEventCreatedStructureRebuild_Unknown HistoricalEventCreatedStructureRebuild = iota
|
|
HistoricalEventCreatedStructureRebuild_False
|
|
HistoricalEventCreatedStructureRebuild_True
|
|
)
|
|
|
|
func parseHistoricalEventCreatedStructureRebuild(s string) HistoricalEventCreatedStructureRebuild {
|
|
switch s {
|
|
case "false":
|
|
return HistoricalEventCreatedStructureRebuild_False
|
|
case "true":
|
|
return HistoricalEventCreatedStructureRebuild_True
|
|
}
|
|
return HistoricalEventCreatedStructureRebuild_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventCreatedStructureRebuild) String() string {
|
|
switch s {
|
|
case HistoricalEventCreatedStructureRebuild_False:
|
|
return "false"
|
|
case HistoricalEventCreatedStructureRebuild_True:
|
|
return "true"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventCreatedStructureRebuild) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventCreatedStructure struct {
|
|
BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
Rebuild HistoricalEventCreatedStructureRebuild `json:"rebuild" legend:"plus"` // rebuild
|
|
Rebuilt bool `json:"rebuilt" legend:"base"` // rebuilt
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Structure int `json:"structure" legend:"plus"` // structure
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventCreatedStructure) Type() string { return "created structure" }
|
|
func (x *HistoricalEventCreatedStructure) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventCreatedStructure) RelatedToHf(id int) bool { return x.BuilderHfid == id }
|
|
|
|
func (x *HistoricalEventCreatedStructure) CheckFields() {
|
|
if x.Structure != x.BuilderHfid && x.Structure != 0 && x.BuilderHfid != 0 {
|
|
sameFields["HistoricalEventCreatedStructure"]["Structure"]["BuilderHfid"] = false
|
|
}
|
|
if x.Structure != x.CivId && x.Structure != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventCreatedStructure"]["Structure"]["CivId"] = false
|
|
}
|
|
if x.Structure != x.SiteCivId && x.Structure != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventCreatedStructure"]["Structure"]["SiteCivId"] = false
|
|
}
|
|
if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventCreatedStructure"]["Structure"]["SiteId"] = false
|
|
}
|
|
if x.Structure != x.StructureId && x.Structure != 0 && x.StructureId != 0 {
|
|
sameFields["HistoricalEventCreatedStructure"]["Structure"]["StructureId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventCreatedWorldConstruction struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
MasterWcid int `json:"masterWcid" legend:"base"` // master_wcid
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId1 int `json:"siteId1" legend:"base"` // site_id1
|
|
SiteId2 int `json:"siteId2" legend:"base"` // site_id2
|
|
Wcid int `json:"wcid" legend:"base"` // wcid
|
|
}
|
|
|
|
func (x *HistoricalEventCreatedWorldConstruction) Type() string { return "created world construction" }
|
|
func (x *HistoricalEventCreatedWorldConstruction) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventCreatedWorldConstruction) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCreatedWorldConstruction) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventCreatureDevoured struct {
|
|
Caste string `json:"caste" legend:"plus"` // caste
|
|
Eater int `json:"eater" legend:"plus"` // eater
|
|
Entity int `json:"entity" legend:"plus"` // entity
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Race string `json:"race" legend:"plus"` // race
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
Victim int `json:"victim" legend:"plus"` // victim
|
|
}
|
|
|
|
func (x *HistoricalEventCreatureDevoured) Type() string { return "creature devoured" }
|
|
func (x *HistoricalEventCreatureDevoured) RelatedToEntity(id int) bool { return x.Entity == id }
|
|
func (x *HistoricalEventCreatureDevoured) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventCreatureDevoured) CheckFields() {
|
|
if x.Eater != x.FeatureLayerId && x.Eater != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Eater != x.SiteId && x.Eater != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SiteId"] = false
|
|
}
|
|
if x.Eater != x.SubregionId && x.Eater != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SubregionId"] = false
|
|
}
|
|
if x.Entity != x.FeatureLayerId && x.Entity != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Entity != x.SiteId && x.Entity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SiteId"] = false
|
|
}
|
|
if x.Entity != x.SubregionId && x.Entity != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SubregionId"] = false
|
|
}
|
|
if x.Victim != x.FeatureLayerId && x.Victim != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["FeatureLayerId"] = false
|
|
}
|
|
if x.Victim != x.SiteId && x.Victim != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SiteId"] = false
|
|
}
|
|
if x.Victim != x.SubregionId && x.Victim != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SubregionId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventDanceFormCreatedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventDanceFormCreatedCircumstance_Unknown HistoricalEventDanceFormCreatedCircumstance = iota
|
|
HistoricalEventDanceFormCreatedCircumstance_Dream
|
|
HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf
|
|
HistoricalEventDanceFormCreatedCircumstance_Nightmare
|
|
HistoricalEventDanceFormCreatedCircumstance_PrayToHf
|
|
)
|
|
|
|
func parseHistoricalEventDanceFormCreatedCircumstance(s string) HistoricalEventDanceFormCreatedCircumstance {
|
|
switch s {
|
|
case "dream":
|
|
return HistoricalEventDanceFormCreatedCircumstance_Dream
|
|
case "dream about hf":
|
|
return HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf
|
|
case "nightmare":
|
|
return HistoricalEventDanceFormCreatedCircumstance_Nightmare
|
|
case "pray to hf":
|
|
return HistoricalEventDanceFormCreatedCircumstance_PrayToHf
|
|
}
|
|
return HistoricalEventDanceFormCreatedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventDanceFormCreatedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventDanceFormCreatedCircumstance_Dream:
|
|
return "dream"
|
|
case HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf:
|
|
return "dream about hf"
|
|
case HistoricalEventDanceFormCreatedCircumstance_Nightmare:
|
|
return "nightmare"
|
|
case HistoricalEventDanceFormCreatedCircumstance_PrayToHf:
|
|
return "pray to hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventDanceFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventDanceFormCreatedReason int
|
|
|
|
const (
|
|
HistoricalEventDanceFormCreatedReason_Unknown HistoricalEventDanceFormCreatedReason = iota
|
|
HistoricalEventDanceFormCreatedReason_GlorifyHf
|
|
)
|
|
|
|
func parseHistoricalEventDanceFormCreatedReason(s string) HistoricalEventDanceFormCreatedReason {
|
|
switch s {
|
|
case "glorify hf":
|
|
return HistoricalEventDanceFormCreatedReason_GlorifyHf
|
|
}
|
|
return HistoricalEventDanceFormCreatedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventDanceFormCreatedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventDanceFormCreatedReason_GlorifyHf:
|
|
return "glorify hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventDanceFormCreatedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventDanceFormCreated struct {
|
|
Circumstance HistoricalEventDanceFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
FormId int `json:"formId" legend:"base"` // form_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
Reason HistoricalEventDanceFormCreatedReason `json:"reason" legend:"base"` // reason
|
|
ReasonId int `json:"reasonId" legend:"base"` // reason_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventDanceFormCreated) Type() string { return "dance form created" }
|
|
func (x *HistoricalEventDanceFormCreated) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventDanceFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventDanceFormCreated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventDestroyedSite struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventDestroyedSite) Type() string { return "destroyed site" }
|
|
func (x *HistoricalEventDestroyedSite) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventDestroyedSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventDestroyedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventDiplomatLost struct {
|
|
Entity int `json:"entity" legend:"plus"` // entity
|
|
Involved int `json:"involved" legend:"plus"` // involved
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventDiplomatLost) Type() string { return "diplomat lost" }
|
|
func (x *HistoricalEventDiplomatLost) RelatedToEntity(id int) bool { return x.Entity == id }
|
|
func (x *HistoricalEventDiplomatLost) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventDiplomatLost) CheckFields() {
|
|
if x.Entity != x.SiteId && x.Entity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventDiplomatLost"]["Entity"]["SiteId"] = false
|
|
}
|
|
if x.Involved != x.SiteId && x.Involved != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventDiplomatLost"]["Involved"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventDiplomatLost"]["Site"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventEntityAllianceFormed struct {
|
|
InitiatingEnid int `json:"initiatingEnid" legend:"base"` // initiating_enid
|
|
JoiningEnid []int `json:"joiningEnid" legend:"base"` // joining_enid
|
|
}
|
|
|
|
func (x *HistoricalEventEntityAllianceFormed) Type() string { return "entity alliance formed" }
|
|
func (x *HistoricalEventEntityAllianceFormed) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventEntityAllianceFormed) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityAllianceFormed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityBreachFeatureLayer struct {
|
|
CivEntityId int `json:"civEntityId" legend:"base"` // civ_entity_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SiteEntityId int `json:"siteEntityId" legend:"base"` // site_entity_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityBreachFeatureLayer) Type() string { return "entity breach feature layer" }
|
|
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToEntity(id int) bool {
|
|
return x.CivEntityId == id || x.SiteEntityId == id
|
|
}
|
|
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityBreachFeatureLayer) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityCreated struct {
|
|
CreatorHfid int `json:"creatorHfid" legend:"base"` // creator_hfid
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityCreated) Type() string { return "entity created" }
|
|
func (x *HistoricalEventEntityCreated) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityCreated) RelatedToHf(id int) bool { return x.CreatorHfid == id }
|
|
|
|
func (x *HistoricalEventEntityCreated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityDissolvedReason int
|
|
|
|
const (
|
|
HistoricalEventEntityDissolvedReason_Unknown HistoricalEventEntityDissolvedReason = iota
|
|
HistoricalEventEntityDissolvedReason_HeavyLossesInBattle
|
|
HistoricalEventEntityDissolvedReason_LackOfFunds
|
|
)
|
|
|
|
func parseHistoricalEventEntityDissolvedReason(s string) HistoricalEventEntityDissolvedReason {
|
|
switch s {
|
|
case "heavy losses in battle":
|
|
return HistoricalEventEntityDissolvedReason_HeavyLossesInBattle
|
|
case "lack of funds":
|
|
return HistoricalEventEntityDissolvedReason_LackOfFunds
|
|
}
|
|
return HistoricalEventEntityDissolvedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntityDissolvedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventEntityDissolvedReason_HeavyLossesInBattle:
|
|
return "heavy losses in battle"
|
|
case HistoricalEventEntityDissolvedReason_LackOfFunds:
|
|
return "lack of funds"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntityDissolvedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntityDissolved struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Reason HistoricalEventEntityDissolvedReason `json:"reason" legend:"base"` // reason
|
|
}
|
|
|
|
func (x *HistoricalEventEntityDissolved) Type() string { return "entity dissolved" }
|
|
func (x *HistoricalEventEntityDissolved) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityDissolved) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityDissolved) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityEquipmentPurchase struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid []int `json:"hfid" legend:"base"` // hfid
|
|
NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` // new_equipment_level
|
|
}
|
|
|
|
func (x *HistoricalEventEntityEquipmentPurchase) Type() string { return "entity equipment purchase" }
|
|
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id
|
|
}
|
|
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToHf(id int) bool {
|
|
return containsInt(x.Hfid, id)
|
|
}
|
|
|
|
func (x *HistoricalEventEntityEquipmentPurchase) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityExpelsHf struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityExpelsHf) Type() string { return "entity expels hf" }
|
|
func (x *HistoricalEventEntityExpelsHf) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityExpelsHf) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventEntityExpelsHf) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityFledSite struct {
|
|
FledCivId int `json:"fledCivId" legend:"base"` // fled_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityFledSite) Type() string { return "entity fled site" }
|
|
func (x *HistoricalEventEntityFledSite) RelatedToEntity(id int) bool { return x.FledCivId == id }
|
|
func (x *HistoricalEventEntityFledSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityFledSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityIncorporated struct {
|
|
JoinedEntityId int `json:"joinedEntityId" legend:"base"` // joined_entity_id
|
|
JoinerEntityId int `json:"joinerEntityId" legend:"base"` // joiner_entity_id
|
|
LeaderHfid int `json:"leaderHfid" legend:"base"` // leader_hfid
|
|
PartialIncorporation bool `json:"partialIncorporation" legend:"base"` // partial_incorporation
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityIncorporated) Type() string { return "entity incorporated" }
|
|
func (x *HistoricalEventEntityIncorporated) RelatedToEntity(id int) bool {
|
|
return x.JoinedEntityId == id || x.JoinerEntityId == id
|
|
}
|
|
func (x *HistoricalEventEntityIncorporated) RelatedToHf(id int) bool { return x.LeaderHfid == id }
|
|
|
|
func (x *HistoricalEventEntityIncorporated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityLawLawAdd int
|
|
|
|
const (
|
|
HistoricalEventEntityLawLawAdd_Unknown HistoricalEventEntityLawLawAdd = iota
|
|
HistoricalEventEntityLawLawAdd_Harsh
|
|
)
|
|
|
|
func parseHistoricalEventEntityLawLawAdd(s string) HistoricalEventEntityLawLawAdd {
|
|
switch s {
|
|
case "harsh":
|
|
return HistoricalEventEntityLawLawAdd_Harsh
|
|
}
|
|
return HistoricalEventEntityLawLawAdd_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntityLawLawAdd) String() string {
|
|
switch s {
|
|
case HistoricalEventEntityLawLawAdd_Harsh:
|
|
return "harsh"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntityLawLawAdd) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntityLawLawRemove int
|
|
|
|
const (
|
|
HistoricalEventEntityLawLawRemove_Unknown HistoricalEventEntityLawLawRemove = iota
|
|
HistoricalEventEntityLawLawRemove_Harsh
|
|
)
|
|
|
|
func parseHistoricalEventEntityLawLawRemove(s string) HistoricalEventEntityLawLawRemove {
|
|
switch s {
|
|
case "harsh":
|
|
return HistoricalEventEntityLawLawRemove_Harsh
|
|
}
|
|
return HistoricalEventEntityLawLawRemove_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntityLawLawRemove) String() string {
|
|
switch s {
|
|
case HistoricalEventEntityLawLawRemove_Harsh:
|
|
return "harsh"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntityLawLawRemove) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntityLaw struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
LawAdd HistoricalEventEntityLawLawAdd `json:"lawAdd" legend:"base"` // law_add
|
|
LawRemove HistoricalEventEntityLawLawRemove `json:"lawRemove" legend:"base"` // law_remove
|
|
}
|
|
|
|
func (x *HistoricalEventEntityLaw) Type() string { return "entity law" }
|
|
func (x *HistoricalEventEntityLaw) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityLaw) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventEntityLaw) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityOverthrown struct {
|
|
ConspiratorHfid []int `json:"conspiratorHfid" legend:"base"` // conspirator_hfid
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
InstigatorHfid int `json:"instigatorHfid" legend:"base"` // instigator_hfid
|
|
OverthrownHfid int `json:"overthrownHfid" legend:"base"` // overthrown_hfid
|
|
PosTakerHfid int `json:"posTakerHfid" legend:"base"` // pos_taker_hfid
|
|
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityOverthrown) Type() string { return "entity overthrown" }
|
|
func (x *HistoricalEventEntityOverthrown) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityOverthrown) RelatedToHf(id int) bool {
|
|
return containsInt(x.ConspiratorHfid, id) || x.InstigatorHfid == id || x.OverthrownHfid == id || x.PosTakerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityOverthrown) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityPersecuted struct {
|
|
DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` // destroyed_structure_id
|
|
ExpelledCreature []int `json:"expelledCreature" legend:"base"` // expelled_creature
|
|
ExpelledHfid []int `json:"expelledHfid" legend:"base"` // expelled_hfid
|
|
ExpelledNumber []int `json:"expelledNumber" legend:"base"` // expelled_number
|
|
ExpelledPopId []int `json:"expelledPopId" legend:"base"` // expelled_pop_id
|
|
PersecutorEnid int `json:"persecutorEnid" legend:"base"` // persecutor_enid
|
|
PersecutorHfid int `json:"persecutorHfid" legend:"base"` // persecutor_hfid
|
|
PropertyConfiscatedFromHfid []int `json:"propertyConfiscatedFromHfid" legend:"base"` // property_confiscated_from_hfid
|
|
ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` // shrine_amount_destroyed
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
|
|
}
|
|
|
|
func (x *HistoricalEventEntityPersecuted) Type() string { return "entity persecuted" }
|
|
func (x *HistoricalEventEntityPersecuted) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventEntityPersecuted) RelatedToHf(id int) bool {
|
|
return containsInt(x.ExpelledHfid, id) || containsInt(x.PropertyConfiscatedFromHfid, id) || x.PersecutorHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityPersecuted) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityPrimaryCriminalsAction int
|
|
|
|
const (
|
|
HistoricalEventEntityPrimaryCriminalsAction_Unknown HistoricalEventEntityPrimaryCriminalsAction = iota
|
|
HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals
|
|
)
|
|
|
|
func parseHistoricalEventEntityPrimaryCriminalsAction(s string) HistoricalEventEntityPrimaryCriminalsAction {
|
|
switch s {
|
|
case "entity_primary_criminals":
|
|
return HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals
|
|
}
|
|
return HistoricalEventEntityPrimaryCriminalsAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntityPrimaryCriminalsAction) String() string {
|
|
switch s {
|
|
case HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals:
|
|
return "entity primary criminals"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntityPrimaryCriminalsAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntityPrimaryCriminals struct {
|
|
Action HistoricalEventEntityPrimaryCriminalsAction `json:"action" legend:"plus"` // action
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityPrimaryCriminals) Type() string { return "entity primary criminals" }
|
|
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityPrimaryCriminals) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityRampagedInSite struct {
|
|
RampageCivId int `json:"rampageCivId" legend:"base"` // rampage_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityRampagedInSite) Type() string { return "entity rampaged in site" }
|
|
func (x *HistoricalEventEntityRampagedInSite) RelatedToEntity(id int) bool {
|
|
return x.RampageCivId == id
|
|
}
|
|
func (x *HistoricalEventEntityRampagedInSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityRampagedInSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntityRelocateAction int
|
|
|
|
const (
|
|
HistoricalEventEntityRelocateAction_Unknown HistoricalEventEntityRelocateAction = iota
|
|
HistoricalEventEntityRelocateAction_EntityRelocate
|
|
)
|
|
|
|
func parseHistoricalEventEntityRelocateAction(s string) HistoricalEventEntityRelocateAction {
|
|
switch s {
|
|
case "entity_relocate":
|
|
return HistoricalEventEntityRelocateAction_EntityRelocate
|
|
}
|
|
return HistoricalEventEntityRelocateAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntityRelocateAction) String() string {
|
|
switch s {
|
|
case HistoricalEventEntityRelocateAction_EntityRelocate:
|
|
return "entity relocate"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntityRelocateAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntityRelocate struct {
|
|
Action HistoricalEventEntityRelocateAction `json:"action" legend:"plus"` // action
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntityRelocate) Type() string { return "entity relocate" }
|
|
func (x *HistoricalEventEntityRelocate) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventEntityRelocate) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntityRelocate) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventEntitySearchedSiteResult int
|
|
|
|
const (
|
|
HistoricalEventEntitySearchedSiteResult_Unknown HistoricalEventEntitySearchedSiteResult = iota
|
|
HistoricalEventEntitySearchedSiteResult_FoundNothing
|
|
)
|
|
|
|
func parseHistoricalEventEntitySearchedSiteResult(s string) HistoricalEventEntitySearchedSiteResult {
|
|
switch s {
|
|
case "found nothing":
|
|
return HistoricalEventEntitySearchedSiteResult_FoundNothing
|
|
}
|
|
return HistoricalEventEntitySearchedSiteResult_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventEntitySearchedSiteResult) String() string {
|
|
switch s {
|
|
case HistoricalEventEntitySearchedSiteResult_FoundNothing:
|
|
return "found nothing"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventEntitySearchedSiteResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventEntitySearchedSite struct {
|
|
Result HistoricalEventEntitySearchedSiteResult `json:"result" legend:"base"` // result
|
|
SearcherCivId int `json:"searcherCivId" legend:"base"` // searcher_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventEntitySearchedSite) Type() string { return "entity searched site" }
|
|
func (x *HistoricalEventEntitySearchedSite) RelatedToEntity(id int) bool {
|
|
return x.SearcherCivId == id
|
|
}
|
|
func (x *HistoricalEventEntitySearchedSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventEntitySearchedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventFailedFrameAttemptCrime int
|
|
|
|
const (
|
|
HistoricalEventFailedFrameAttemptCrime_Unknown HistoricalEventFailedFrameAttemptCrime = iota
|
|
HistoricalEventFailedFrameAttemptCrime_Treason
|
|
)
|
|
|
|
func parseHistoricalEventFailedFrameAttemptCrime(s string) HistoricalEventFailedFrameAttemptCrime {
|
|
switch s {
|
|
case "treason":
|
|
return HistoricalEventFailedFrameAttemptCrime_Treason
|
|
}
|
|
return HistoricalEventFailedFrameAttemptCrime_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedFrameAttemptCrime) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedFrameAttemptCrime_Treason:
|
|
return "treason"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedFrameAttemptCrime) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedFrameAttempt struct {
|
|
ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid
|
|
Crime HistoricalEventFailedFrameAttemptCrime `json:"crime" legend:"base"` // crime
|
|
FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid
|
|
FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid
|
|
PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventFailedFrameAttempt) Type() string { return "failed frame attempt" }
|
|
func (x *HistoricalEventFailedFrameAttempt) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventFailedFrameAttempt) RelatedToHf(id int) bool {
|
|
return x.FooledHfid == id || x.FramerHfid == id || x.PlotterHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventFailedFrameAttempt) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruptionAction int
|
|
|
|
const (
|
|
HistoricalEventFailedIntrigueCorruptionAction_Unknown HistoricalEventFailedIntrigueCorruptionAction = iota
|
|
HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial
|
|
HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork
|
|
HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace
|
|
HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle
|
|
)
|
|
|
|
func parseHistoricalEventFailedIntrigueCorruptionAction(s string) HistoricalEventFailedIntrigueCorruptionAction {
|
|
switch s {
|
|
case "bribe official":
|
|
return HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial
|
|
case "bring into network":
|
|
return HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork
|
|
case "corrupt in place":
|
|
return HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace
|
|
case "induce to embezzle":
|
|
return HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle
|
|
}
|
|
return HistoricalEventFailedIntrigueCorruptionAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionAction) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial:
|
|
return "bribe official"
|
|
case HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork:
|
|
return "bring into network"
|
|
case HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace:
|
|
return "corrupt in place"
|
|
case HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle:
|
|
return "induce to embezzle"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruptionMethod int
|
|
|
|
const (
|
|
HistoricalEventFailedIntrigueCorruptionMethod_Unknown HistoricalEventFailedIntrigueCorruptionMethod = iota
|
|
HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement
|
|
HistoricalEventFailedIntrigueCorruptionMethod_Bribe
|
|
HistoricalEventFailedIntrigueCorruptionMethod_Flatter
|
|
HistoricalEventFailedIntrigueCorruptionMethod_Intimidate
|
|
HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality
|
|
HistoricalEventFailedIntrigueCorruptionMethod_Precedence
|
|
HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy
|
|
HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge
|
|
)
|
|
|
|
func parseHistoricalEventFailedIntrigueCorruptionMethod(s string) HistoricalEventFailedIntrigueCorruptionMethod {
|
|
switch s {
|
|
case "blackmail over embezzlement":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement
|
|
case "bribe":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_Bribe
|
|
case "flatter":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_Flatter
|
|
case "intimidate":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_Intimidate
|
|
case "offer immortality":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality
|
|
case "precedence":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_Precedence
|
|
case "religious sympathy":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy
|
|
case "revenge on grudge":
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge
|
|
}
|
|
return HistoricalEventFailedIntrigueCorruptionMethod_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionMethod) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement:
|
|
return "blackmail over embezzlement"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_Bribe:
|
|
return "bribe"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_Flatter:
|
|
return "flatter"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_Intimidate:
|
|
return "intimidate"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality:
|
|
return "offer immortality"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_Precedence:
|
|
return "precedence"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy:
|
|
return "religious sympathy"
|
|
case HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge:
|
|
return "revenge on grudge"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionMethod) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruptionTopFacet int
|
|
|
|
const (
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown HistoricalEventFailedIntrigueCorruptionTopFacet = iota
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Greed
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Hope
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Pride
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity
|
|
HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful
|
|
)
|
|
|
|
func parseHistoricalEventFailedIntrigueCorruptionTopFacet(s string) HistoricalEventFailedIntrigueCorruptionTopFacet {
|
|
switch s {
|
|
case "ambition":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition
|
|
case "anxiety propensity":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity
|
|
case "confidence":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence
|
|
case "envy propensity":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity
|
|
case "fearlessness":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness
|
|
case "greed":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Greed
|
|
case "hope":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Hope
|
|
case "pride":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Pride
|
|
case "stress vulnerability":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability
|
|
case "swayable":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable
|
|
case "vanity":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity
|
|
case "vengeful":
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful
|
|
}
|
|
return HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopFacet) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition:
|
|
return "ambition"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity:
|
|
return "anxiety propensity"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence:
|
|
return "confidence"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity:
|
|
return "envy propensity"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness:
|
|
return "fearlessness"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Greed:
|
|
return "greed"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Hope:
|
|
return "hope"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Pride:
|
|
return "pride"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability:
|
|
return "stress vulnerability"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable:
|
|
return "swayable"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity:
|
|
return "vanity"
|
|
case HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful:
|
|
return "vengeful"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopFacet) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor int
|
|
|
|
const (
|
|
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor = iota
|
|
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear
|
|
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love
|
|
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect
|
|
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust
|
|
)
|
|
|
|
func parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(s string) HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor {
|
|
switch s {
|
|
case "fear":
|
|
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear
|
|
case "love":
|
|
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love
|
|
case "respect":
|
|
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect
|
|
case "trust":
|
|
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust
|
|
}
|
|
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear:
|
|
return "fear"
|
|
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love:
|
|
return "love"
|
|
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect:
|
|
return "respect"
|
|
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust:
|
|
return "trust"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruptionTopValue int
|
|
|
|
const (
|
|
HistoricalEventFailedIntrigueCorruptionTopValue_Unknown HistoricalEventFailedIntrigueCorruptionTopValue = iota
|
|
HistoricalEventFailedIntrigueCorruptionTopValue_Law
|
|
HistoricalEventFailedIntrigueCorruptionTopValue_Power
|
|
)
|
|
|
|
func parseHistoricalEventFailedIntrigueCorruptionTopValue(s string) HistoricalEventFailedIntrigueCorruptionTopValue {
|
|
switch s {
|
|
case "law":
|
|
return HistoricalEventFailedIntrigueCorruptionTopValue_Law
|
|
case "power":
|
|
return HistoricalEventFailedIntrigueCorruptionTopValue_Power
|
|
}
|
|
return HistoricalEventFailedIntrigueCorruptionTopValue_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopValue) String() string {
|
|
switch s {
|
|
case HistoricalEventFailedIntrigueCorruptionTopValue_Law:
|
|
return "law"
|
|
case HistoricalEventFailedIntrigueCorruptionTopValue_Power:
|
|
return "power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventFailedIntrigueCorruptionTopValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventFailedIntrigueCorruption struct {
|
|
Action HistoricalEventFailedIntrigueCorruptionAction `json:"action" legend:"base"` // action
|
|
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
|
|
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
|
|
CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid
|
|
CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity
|
|
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid
|
|
Method HistoricalEventFailedIntrigueCorruptionMethod `json:"method" legend:"base"` // method
|
|
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
|
|
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
|
|
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity
|
|
TopFacet HistoricalEventFailedIntrigueCorruptionTopFacet `json:"topFacet" legend:"base"` // top_facet
|
|
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
|
|
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
|
|
TopRelationshipFactor HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
|
|
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
|
|
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
|
|
TopValue HistoricalEventFailedIntrigueCorruptionTopValue `json:"topValue" legend:"base"` // top_value
|
|
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
|
|
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
|
|
}
|
|
|
|
func (x *HistoricalEventFailedIntrigueCorruption) Type() string { return "failed intrigue corruption" }
|
|
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToEntity(id int) bool {
|
|
return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id
|
|
}
|
|
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToHf(id int) bool {
|
|
return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventFailedIntrigueCorruption) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventFieldBattle struct {
|
|
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid
|
|
AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid
|
|
DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventFieldBattle) Type() string { return "field battle" }
|
|
func (x *HistoricalEventFieldBattle) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id
|
|
}
|
|
func (x *HistoricalEventFieldBattle) RelatedToHf(id int) bool {
|
|
return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventFieldBattle) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventFirstContact struct {
|
|
ContactedEnid int `json:"contactedEnid" legend:"base"` // contacted_enid
|
|
ContactorEnid int `json:"contactorEnid" legend:"base"` // contactor_enid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventFirstContact) Type() string { return "first contact" }
|
|
func (x *HistoricalEventFirstContact) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventFirstContact) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventFirstContact) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventGamble struct {
|
|
GamblerHfid int `json:"gamblerHfid" legend:"base"` // gambler_hfid
|
|
NewAccount int `json:"newAccount" legend:"base"` // new_account
|
|
OldAccount int `json:"oldAccount" legend:"base"` // old_account
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventGamble) Type() string { return "gamble" }
|
|
func (x *HistoricalEventGamble) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventGamble) RelatedToHf(id int) bool { return x.GamblerHfid == id }
|
|
|
|
func (x *HistoricalEventGamble) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfAbducted struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SnatcherHfid int `json:"snatcherHfid" legend:"base"` // snatcher_hfid
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfAbducted) Type() string { return "hf abducted" }
|
|
func (x *HistoricalEventHfAbducted) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfAbducted) RelatedToHf(id int) bool {
|
|
return x.SnatcherHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfAbducted) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfAttackedSite struct {
|
|
AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfAttackedSite) Type() string { return "hf attacked site" }
|
|
func (x *HistoricalEventHfAttackedSite) RelatedToEntity(id int) bool {
|
|
return x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventHfAttackedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id }
|
|
|
|
func (x *HistoricalEventHfAttackedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfConfrontedReason int
|
|
|
|
const (
|
|
HistoricalEventHfConfrontedReason_Unknown HistoricalEventHfConfrontedReason = iota
|
|
HistoricalEventHfConfrontedReason_Ageless
|
|
HistoricalEventHfConfrontedReason_Murder
|
|
)
|
|
|
|
func parseHistoricalEventHfConfrontedReason(s string) HistoricalEventHfConfrontedReason {
|
|
switch s {
|
|
case "ageless":
|
|
return HistoricalEventHfConfrontedReason_Ageless
|
|
case "murder":
|
|
return HistoricalEventHfConfrontedReason_Murder
|
|
}
|
|
return HistoricalEventHfConfrontedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfConfrontedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventHfConfrontedReason_Ageless:
|
|
return "ageless"
|
|
case HistoricalEventHfConfrontedReason_Murder:
|
|
return "murder"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfConfrontedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfConfrontedSituation int
|
|
|
|
const (
|
|
HistoricalEventHfConfrontedSituation_Unknown HistoricalEventHfConfrontedSituation = iota
|
|
HistoricalEventHfConfrontedSituation_GeneralSuspicion
|
|
)
|
|
|
|
func parseHistoricalEventHfConfrontedSituation(s string) HistoricalEventHfConfrontedSituation {
|
|
switch s {
|
|
case "general suspicion":
|
|
return HistoricalEventHfConfrontedSituation_GeneralSuspicion
|
|
}
|
|
return HistoricalEventHfConfrontedSituation_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfConfrontedSituation) String() string {
|
|
switch s {
|
|
case HistoricalEventHfConfrontedSituation_GeneralSuspicion:
|
|
return "general suspicion"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfConfrontedSituation) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfConfronted struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Reason []HistoricalEventHfConfrontedReason `json:"reason" legend:"base"` // reason
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Situation HistoricalEventHfConfrontedSituation `json:"situation" legend:"base"` // situation
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfConfronted) Type() string { return "hf confronted" }
|
|
func (x *HistoricalEventHfConfronted) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfConfronted) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventHfConfronted) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfConvictedCrime int
|
|
|
|
const (
|
|
HistoricalEventHfConvictedCrime_Unknown HistoricalEventHfConvictedCrime = iota
|
|
HistoricalEventHfConvictedCrime_AttemptedKidnapping
|
|
HistoricalEventHfConvictedCrime_AttemptedMurder
|
|
HistoricalEventHfConvictedCrime_AttemptedTheft
|
|
HistoricalEventHfConvictedCrime_Bribery
|
|
HistoricalEventHfConvictedCrime_BuildingDestruction
|
|
HistoricalEventHfConvictedCrime_DisorderlyConduct
|
|
HistoricalEventHfConvictedCrime_Embezzlement
|
|
HistoricalEventHfConvictedCrime_Espionage
|
|
HistoricalEventHfConvictedCrime_Murder
|
|
HistoricalEventHfConvictedCrime_Theft
|
|
HistoricalEventHfConvictedCrime_Treason
|
|
HistoricalEventHfConvictedCrime_Vandalism
|
|
)
|
|
|
|
func parseHistoricalEventHfConvictedCrime(s string) HistoricalEventHfConvictedCrime {
|
|
switch s {
|
|
case "attempted kidnapping":
|
|
return HistoricalEventHfConvictedCrime_AttemptedKidnapping
|
|
case "attempted murder":
|
|
return HistoricalEventHfConvictedCrime_AttemptedMurder
|
|
case "attempted theft":
|
|
return HistoricalEventHfConvictedCrime_AttemptedTheft
|
|
case "bribery":
|
|
return HistoricalEventHfConvictedCrime_Bribery
|
|
case "building destruction":
|
|
return HistoricalEventHfConvictedCrime_BuildingDestruction
|
|
case "disorderly conduct":
|
|
return HistoricalEventHfConvictedCrime_DisorderlyConduct
|
|
case "embezzlement":
|
|
return HistoricalEventHfConvictedCrime_Embezzlement
|
|
case "espionage":
|
|
return HistoricalEventHfConvictedCrime_Espionage
|
|
case "murder":
|
|
return HistoricalEventHfConvictedCrime_Murder
|
|
case "theft":
|
|
return HistoricalEventHfConvictedCrime_Theft
|
|
case "treason":
|
|
return HistoricalEventHfConvictedCrime_Treason
|
|
case "vandalism":
|
|
return HistoricalEventHfConvictedCrime_Vandalism
|
|
}
|
|
return HistoricalEventHfConvictedCrime_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfConvictedCrime) String() string {
|
|
switch s {
|
|
case HistoricalEventHfConvictedCrime_AttemptedKidnapping:
|
|
return "attempted kidnapping"
|
|
case HistoricalEventHfConvictedCrime_AttemptedMurder:
|
|
return "attempted murder"
|
|
case HistoricalEventHfConvictedCrime_AttemptedTheft:
|
|
return "attempted theft"
|
|
case HistoricalEventHfConvictedCrime_Bribery:
|
|
return "bribery"
|
|
case HistoricalEventHfConvictedCrime_BuildingDestruction:
|
|
return "building destruction"
|
|
case HistoricalEventHfConvictedCrime_DisorderlyConduct:
|
|
return "disorderly conduct"
|
|
case HistoricalEventHfConvictedCrime_Embezzlement:
|
|
return "embezzlement"
|
|
case HistoricalEventHfConvictedCrime_Espionage:
|
|
return "espionage"
|
|
case HistoricalEventHfConvictedCrime_Murder:
|
|
return "murder"
|
|
case HistoricalEventHfConvictedCrime_Theft:
|
|
return "theft"
|
|
case HistoricalEventHfConvictedCrime_Treason:
|
|
return "treason"
|
|
case HistoricalEventHfConvictedCrime_Vandalism:
|
|
return "vandalism"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfConvictedCrime) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfConvicted struct {
|
|
Beating bool `json:"beating" legend:"base"` // beating
|
|
CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` // coconspirator_hfid
|
|
ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` // confessed_after_apb_arrest_enid
|
|
ContactHfid int `json:"contactHfid" legend:"base"` // contact_hfid
|
|
ConvictIsContact bool `json:"convictIsContact" legend:"base"` // convict_is_contact
|
|
ConvictedHfid int `json:"convictedHfid" legend:"base"` // convicted_hfid
|
|
ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid
|
|
CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` // corrupt_convicter_hfid
|
|
Crime HistoricalEventHfConvictedCrime `json:"crime" legend:"base"` // crime
|
|
DeathPenalty bool `json:"deathPenalty" legend:"base"` // death_penalty
|
|
DidNotRevealAllInInterrogation bool `json:"didNotRevealAllInInterrogation" legend:"base"` // did_not_reveal_all_in_interrogation
|
|
Exiled bool `json:"exiled" legend:"base"` // exiled
|
|
FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid
|
|
FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid
|
|
Hammerstrokes int `json:"hammerstrokes" legend:"base"` // hammerstrokes
|
|
HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation
|
|
ImplicatedHfid []int `json:"implicatedHfid" legend:"base"` // implicated_hfid
|
|
InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid
|
|
NoPrisonAvailable bool `json:"noPrisonAvailable" legend:"base"` // no_prison_available
|
|
PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid
|
|
PrisonMonths int `json:"prisonMonths" legend:"base"` // prison_months
|
|
SurveiledCoconspirator bool `json:"surveiledCoconspirator" legend:"base"` // surveiled_coconspirator
|
|
SurveiledContact bool `json:"surveiledContact" legend:"base"` // surveiled_contact
|
|
SurveiledConvicted bool `json:"surveiledConvicted" legend:"base"` // surveiled_convicted
|
|
SurveiledTarget bool `json:"surveiledTarget" legend:"base"` // surveiled_target
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
WrongfulConviction bool `json:"wrongfulConviction" legend:"base"` // wrongful_conviction
|
|
}
|
|
|
|
func (x *HistoricalEventHfConvicted) Type() string { return "hf convicted" }
|
|
func (x *HistoricalEventHfConvicted) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfConvicted) RelatedToHf(id int) bool {
|
|
return containsInt(x.ImplicatedHfid, id) || x.CoconspiratorHfid == id || x.ContactHfid == id || x.ConvictedHfid == id || x.CorruptConvicterHfid == id || x.FooledHfid == id || x.FramerHfid == id || x.InterrogatorHfid == id || x.PlotterHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfConvicted) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfDestroyedSite struct {
|
|
AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfDestroyedSite) Type() string { return "hf destroyed site" }
|
|
func (x *HistoricalEventHfDestroyedSite) RelatedToEntity(id int) bool {
|
|
return x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventHfDestroyedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id }
|
|
|
|
func (x *HistoricalEventHfDestroyedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfDiedDeathCause int
|
|
|
|
const (
|
|
HistoricalEventHfDiedDeathCause_Unknown HistoricalEventHfDiedDeathCause = iota
|
|
HistoricalEventHfDiedDeathCause_Behead
|
|
HistoricalEventHfDiedDeathCause_Bleed
|
|
HistoricalEventHfDiedDeathCause_BurnAlive
|
|
HistoricalEventHfDiedDeathCause_BuryAlive
|
|
HistoricalEventHfDiedDeathCause_Cavein
|
|
HistoricalEventHfDiedDeathCause_Crucify
|
|
HistoricalEventHfDiedDeathCause_Drown
|
|
HistoricalEventHfDiedDeathCause_DrownAlt
|
|
HistoricalEventHfDiedDeathCause_DrownAltTwo
|
|
HistoricalEventHfDiedDeathCause_ExecutionGeneric
|
|
HistoricalEventHfDiedDeathCause_FeedToBeasts
|
|
HistoricalEventHfDiedDeathCause_HackToPieces
|
|
HistoricalEventHfDiedDeathCause_Heat
|
|
HistoricalEventHfDiedDeathCause_Infection
|
|
HistoricalEventHfDiedDeathCause_LeaptFromHeight
|
|
HistoricalEventHfDiedDeathCause_Memorialize
|
|
HistoricalEventHfDiedDeathCause_Murder
|
|
HistoricalEventHfDiedDeathCause_OldAge
|
|
HistoricalEventHfDiedDeathCause_Shot
|
|
HistoricalEventHfDiedDeathCause_StruckDown
|
|
HistoricalEventHfDiedDeathCause_Suffocate
|
|
HistoricalEventHfDiedDeathCause_Thirst
|
|
)
|
|
|
|
func parseHistoricalEventHfDiedDeathCause(s string) HistoricalEventHfDiedDeathCause {
|
|
switch s {
|
|
case "behead":
|
|
return HistoricalEventHfDiedDeathCause_Behead
|
|
case "bleed":
|
|
return HistoricalEventHfDiedDeathCause_Bleed
|
|
case "burn_alive":
|
|
return HistoricalEventHfDiedDeathCause_BurnAlive
|
|
case "bury_alive":
|
|
return HistoricalEventHfDiedDeathCause_BuryAlive
|
|
case "cavein":
|
|
return HistoricalEventHfDiedDeathCause_Cavein
|
|
case "crucify":
|
|
return HistoricalEventHfDiedDeathCause_Crucify
|
|
case "drown":
|
|
return HistoricalEventHfDiedDeathCause_Drown
|
|
case "drown_alt":
|
|
return HistoricalEventHfDiedDeathCause_DrownAlt
|
|
case "drown_alt2":
|
|
return HistoricalEventHfDiedDeathCause_DrownAltTwo
|
|
case "execution_generic":
|
|
return HistoricalEventHfDiedDeathCause_ExecutionGeneric
|
|
case "feed_to_beasts":
|
|
return HistoricalEventHfDiedDeathCause_FeedToBeasts
|
|
case "hack_to_pieces":
|
|
return HistoricalEventHfDiedDeathCause_HackToPieces
|
|
case "heat":
|
|
return HistoricalEventHfDiedDeathCause_Heat
|
|
case "infection":
|
|
return HistoricalEventHfDiedDeathCause_Infection
|
|
case "leapt_from_height":
|
|
return HistoricalEventHfDiedDeathCause_LeaptFromHeight
|
|
case "memorialize":
|
|
return HistoricalEventHfDiedDeathCause_Memorialize
|
|
case "murder":
|
|
return HistoricalEventHfDiedDeathCause_Murder
|
|
case "old_age":
|
|
return HistoricalEventHfDiedDeathCause_OldAge
|
|
case "shot":
|
|
return HistoricalEventHfDiedDeathCause_Shot
|
|
case "struck_down":
|
|
return HistoricalEventHfDiedDeathCause_StruckDown
|
|
case "suffocate":
|
|
return HistoricalEventHfDiedDeathCause_Suffocate
|
|
case "thirst":
|
|
return HistoricalEventHfDiedDeathCause_Thirst
|
|
}
|
|
return HistoricalEventHfDiedDeathCause_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedDeathCause) String() string {
|
|
switch s {
|
|
case HistoricalEventHfDiedDeathCause_Behead:
|
|
return "behead"
|
|
case HistoricalEventHfDiedDeathCause_Bleed:
|
|
return "bleed"
|
|
case HistoricalEventHfDiedDeathCause_BurnAlive:
|
|
return "burn alive"
|
|
case HistoricalEventHfDiedDeathCause_BuryAlive:
|
|
return "bury alive"
|
|
case HistoricalEventHfDiedDeathCause_Cavein:
|
|
return "cavein"
|
|
case HistoricalEventHfDiedDeathCause_Crucify:
|
|
return "crucify"
|
|
case HistoricalEventHfDiedDeathCause_Drown:
|
|
return "drown"
|
|
case HistoricalEventHfDiedDeathCause_DrownAlt:
|
|
return "drown alt"
|
|
case HistoricalEventHfDiedDeathCause_DrownAltTwo:
|
|
return "drown alt two"
|
|
case HistoricalEventHfDiedDeathCause_ExecutionGeneric:
|
|
return "execution generic"
|
|
case HistoricalEventHfDiedDeathCause_FeedToBeasts:
|
|
return "feed to beasts"
|
|
case HistoricalEventHfDiedDeathCause_HackToPieces:
|
|
return "hack to pieces"
|
|
case HistoricalEventHfDiedDeathCause_Heat:
|
|
return "heat"
|
|
case HistoricalEventHfDiedDeathCause_Infection:
|
|
return "infection"
|
|
case HistoricalEventHfDiedDeathCause_LeaptFromHeight:
|
|
return "leapt from height"
|
|
case HistoricalEventHfDiedDeathCause_Memorialize:
|
|
return "memorialize"
|
|
case HistoricalEventHfDiedDeathCause_Murder:
|
|
return "murder"
|
|
case HistoricalEventHfDiedDeathCause_OldAge:
|
|
return "old age"
|
|
case HistoricalEventHfDiedDeathCause_Shot:
|
|
return "shot"
|
|
case HistoricalEventHfDiedDeathCause_StruckDown:
|
|
return "struck down"
|
|
case HistoricalEventHfDiedDeathCause_Suffocate:
|
|
return "suffocate"
|
|
case HistoricalEventHfDiedDeathCause_Thirst:
|
|
return "thirst"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedDeathCause) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfDiedItemSubtype int
|
|
|
|
const (
|
|
HistoricalEventHfDiedItemSubtype_Unknown HistoricalEventHfDiedItemSubtype = iota
|
|
HistoricalEventHfDiedItemSubtype_BattleAxe
|
|
HistoricalEventHfDiedItemSubtype_Buckler
|
|
HistoricalEventHfDiedItemSubtype_Pick
|
|
HistoricalEventHfDiedItemSubtype_Shield
|
|
HistoricalEventHfDiedItemSubtype_Spear
|
|
HistoricalEventHfDiedItemSubtype_WarHammer
|
|
)
|
|
|
|
func parseHistoricalEventHfDiedItemSubtype(s string) HistoricalEventHfDiedItemSubtype {
|
|
switch s {
|
|
case "battle axe":
|
|
return HistoricalEventHfDiedItemSubtype_BattleAxe
|
|
case "buckler":
|
|
return HistoricalEventHfDiedItemSubtype_Buckler
|
|
case "pick":
|
|
return HistoricalEventHfDiedItemSubtype_Pick
|
|
case "shield":
|
|
return HistoricalEventHfDiedItemSubtype_Shield
|
|
case "spear":
|
|
return HistoricalEventHfDiedItemSubtype_Spear
|
|
case "war hammer":
|
|
return HistoricalEventHfDiedItemSubtype_WarHammer
|
|
}
|
|
return HistoricalEventHfDiedItemSubtype_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedItemSubtype) String() string {
|
|
switch s {
|
|
case HistoricalEventHfDiedItemSubtype_BattleAxe:
|
|
return "battle axe"
|
|
case HistoricalEventHfDiedItemSubtype_Buckler:
|
|
return "buckler"
|
|
case HistoricalEventHfDiedItemSubtype_Pick:
|
|
return "pick"
|
|
case HistoricalEventHfDiedItemSubtype_Shield:
|
|
return "shield"
|
|
case HistoricalEventHfDiedItemSubtype_Spear:
|
|
return "spear"
|
|
case HistoricalEventHfDiedItemSubtype_WarHammer:
|
|
return "war hammer"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedItemSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfDiedItemType int
|
|
|
|
const (
|
|
HistoricalEventHfDiedItemType_Unknown HistoricalEventHfDiedItemType = iota
|
|
HistoricalEventHfDiedItemType_None
|
|
HistoricalEventHfDiedItemType_Shield
|
|
HistoricalEventHfDiedItemType_Weapon
|
|
)
|
|
|
|
func parseHistoricalEventHfDiedItemType(s string) HistoricalEventHfDiedItemType {
|
|
switch s {
|
|
case "none":
|
|
return HistoricalEventHfDiedItemType_None
|
|
case "shield":
|
|
return HistoricalEventHfDiedItemType_Shield
|
|
case "weapon":
|
|
return HistoricalEventHfDiedItemType_Weapon
|
|
}
|
|
return HistoricalEventHfDiedItemType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedItemType) String() string {
|
|
switch s {
|
|
case HistoricalEventHfDiedItemType_None:
|
|
return "none"
|
|
case HistoricalEventHfDiedItemType_Shield:
|
|
return "shield"
|
|
case HistoricalEventHfDiedItemType_Weapon:
|
|
return "weapon"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedItemType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfDiedMat int
|
|
|
|
const (
|
|
HistoricalEventHfDiedMat_Unknown HistoricalEventHfDiedMat = iota
|
|
HistoricalEventHfDiedMat_Bronze
|
|
HistoricalEventHfDiedMat_Copper
|
|
HistoricalEventHfDiedMat_Silver
|
|
HistoricalEventHfDiedMat_SporeTree
|
|
)
|
|
|
|
func parseHistoricalEventHfDiedMat(s string) HistoricalEventHfDiedMat {
|
|
switch s {
|
|
case "bronze":
|
|
return HistoricalEventHfDiedMat_Bronze
|
|
case "copper":
|
|
return HistoricalEventHfDiedMat_Copper
|
|
case "silver":
|
|
return HistoricalEventHfDiedMat_Silver
|
|
case "spore tree":
|
|
return HistoricalEventHfDiedMat_SporeTree
|
|
}
|
|
return HistoricalEventHfDiedMat_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedMat) String() string {
|
|
switch s {
|
|
case HistoricalEventHfDiedMat_Bronze:
|
|
return "bronze"
|
|
case HistoricalEventHfDiedMat_Copper:
|
|
return "copper"
|
|
case HistoricalEventHfDiedMat_Silver:
|
|
return "silver"
|
|
case HistoricalEventHfDiedMat_SporeTree:
|
|
return "spore tree"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfDiedMat) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfDied struct {
|
|
Cause string `json:"cause" legend:"base"` // cause
|
|
DeathCause HistoricalEventHfDiedDeathCause `json:"deathCause" legend:"plus"` // death_cause
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
ItemSubtype HistoricalEventHfDiedItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType HistoricalEventHfDiedItemType `json:"itemType" legend:"plus"` // item_type
|
|
Mat HistoricalEventHfDiedMat `json:"mat" legend:"plus"` // mat
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SlayerCaste string `json:"slayerCaste" legend:"both"` // slayer_caste
|
|
SlayerHfid int `json:"slayerHfid" legend:"base"` // slayer_hfid
|
|
SlayerItemId int `json:"slayerItemId" legend:"base"` // slayer_item_id
|
|
SlayerRace string `json:"slayerRace" legend:"both"` // slayer_race
|
|
SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` // slayer_shooter_item_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfDied) Type() string { return "hf died" }
|
|
func (x *HistoricalEventHfDied) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfDied) RelatedToHf(id int) bool { return x.Hfid == id || x.SlayerHfid == id }
|
|
|
|
func (x *HistoricalEventHfDied) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfDisturbedStructureAction int
|
|
|
|
const (
|
|
HistoricalEventHfDisturbedStructureAction_Unknown HistoricalEventHfDisturbedStructureAction = iota
|
|
HistoricalEventHfDisturbedStructureAction_Disturb
|
|
)
|
|
|
|
func parseHistoricalEventHfDisturbedStructureAction(s string) HistoricalEventHfDisturbedStructureAction {
|
|
switch s {
|
|
case "disturb":
|
|
return HistoricalEventHfDisturbedStructureAction_Disturb
|
|
}
|
|
return HistoricalEventHfDisturbedStructureAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfDisturbedStructureAction) String() string {
|
|
switch s {
|
|
case HistoricalEventHfDisturbedStructureAction_Disturb:
|
|
return "disturb"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfDisturbedStructureAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfDisturbedStructure struct {
|
|
Action HistoricalEventHfDisturbedStructureAction `json:"action" legend:"plus"` // action
|
|
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfDisturbedStructure) Type() string { return "hf disturbed structure" }
|
|
func (x *HistoricalEventHfDisturbedStructure) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfDisturbedStructure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventHfDisturbedStructure) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfDoesInteraction struct {
|
|
DoerHfid int `json:"doerHfid" legend:"base"` // doer_hfid
|
|
Interaction string `json:"interaction" legend:"base"` // interaction
|
|
InteractionAction string `json:"interactionAction" legend:"plus"` // interaction_action
|
|
Region int `json:"region" legend:"plus"` // region
|
|
Site int `json:"site" legend:"plus"` // site
|
|
Source int `json:"source" legend:"plus"` // source
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfDoesInteraction) Type() string { return "hf does interaction" }
|
|
func (x *HistoricalEventHfDoesInteraction) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfDoesInteraction) RelatedToHf(id int) bool {
|
|
return x.DoerHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfDoesInteraction) CheckFields() {
|
|
if x.InteractionAction != x.Interaction && x.InteractionAction != "" && x.Interaction != "" {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["InteractionAction"]["Interaction"] = false
|
|
}
|
|
if x.Region != x.DoerHfid && x.Region != 0 && x.DoerHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Region"]["DoerHfid"] = false
|
|
}
|
|
if x.Region != x.TargetHfid && x.Region != 0 && x.TargetHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Region"]["TargetHfid"] = false
|
|
}
|
|
if x.Site != x.DoerHfid && x.Site != 0 && x.DoerHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Site"]["DoerHfid"] = false
|
|
}
|
|
if x.Site != x.TargetHfid && x.Site != 0 && x.TargetHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Site"]["TargetHfid"] = false
|
|
}
|
|
if x.Source != x.DoerHfid && x.Source != 0 && x.DoerHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Source"]["DoerHfid"] = false
|
|
}
|
|
if x.Source != x.TargetHfid && x.Source != 0 && x.TargetHfid != 0 {
|
|
sameFields["HistoricalEventHfDoesInteraction"]["Source"]["TargetHfid"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventHfEnslaved struct {
|
|
EnslavedHfid int `json:"enslavedHfid" legend:"base"` // enslaved_hfid
|
|
MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id
|
|
PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id
|
|
SellerHfid int `json:"sellerHfid" legend:"base"` // seller_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfEnslaved) Type() string { return "hf enslaved" }
|
|
func (x *HistoricalEventHfEnslaved) RelatedToEntity(id int) bool { return x.PayerEntityId == id }
|
|
func (x *HistoricalEventHfEnslaved) RelatedToHf(id int) bool {
|
|
return x.EnslavedHfid == id || x.SellerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfEnslaved) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfEquipmentPurchase struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
|
|
Quality int `json:"quality" legend:"base"` // quality
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfEquipmentPurchase) Type() string { return "hf equipment purchase" }
|
|
func (x *HistoricalEventHfEquipmentPurchase) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfEquipmentPurchase) RelatedToHf(id int) bool { return x.GroupHfid == id }
|
|
|
|
func (x *HistoricalEventHfEquipmentPurchase) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfFreed struct {
|
|
FreeingHfid int `json:"freeingHfid" legend:"base"` // freeing_hfid
|
|
HoldingCivId int `json:"holdingCivId" legend:"base"` // holding_civ_id
|
|
RescuedHfid int `json:"rescuedHfid" legend:"base"` // rescued_hfid
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfFreed) Type() string { return "hf freed" }
|
|
func (x *HistoricalEventHfFreed) RelatedToEntity(id int) bool {
|
|
return x.HoldingCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventHfFreed) RelatedToHf(id int) bool {
|
|
return x.FreeingHfid == id || x.RescuedHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfFreed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfGainsSecretGoalSecretGoal int
|
|
|
|
const (
|
|
HistoricalEventHfGainsSecretGoalSecretGoal_Unknown HistoricalEventHfGainsSecretGoalSecretGoal = iota
|
|
HistoricalEventHfGainsSecretGoalSecretGoal_Immortality
|
|
)
|
|
|
|
func parseHistoricalEventHfGainsSecretGoalSecretGoal(s string) HistoricalEventHfGainsSecretGoalSecretGoal {
|
|
switch s {
|
|
case "immortality":
|
|
return HistoricalEventHfGainsSecretGoalSecretGoal_Immortality
|
|
}
|
|
return HistoricalEventHfGainsSecretGoalSecretGoal_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfGainsSecretGoalSecretGoal) String() string {
|
|
switch s {
|
|
case HistoricalEventHfGainsSecretGoalSecretGoal_Immortality:
|
|
return "immortality"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfGainsSecretGoalSecretGoal) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfGainsSecretGoal struct {
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SecretGoal HistoricalEventHfGainsSecretGoalSecretGoal `json:"secretGoal" legend:"base"` // secret_goal
|
|
}
|
|
|
|
func (x *HistoricalEventHfGainsSecretGoal) Type() string { return "hf gains secret goal" }
|
|
func (x *HistoricalEventHfGainsSecretGoal) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfGainsSecretGoal) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventHfGainsSecretGoal) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfInterrogated struct {
|
|
ArrestingEnid int `json:"arrestingEnid" legend:"base"` // arresting_enid
|
|
HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation
|
|
ImplicatedHfid int `json:"implicatedHfid" legend:"base"` // implicated_hfid
|
|
InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
WantedAndRecognized bool `json:"wantedAndRecognized" legend:"base"` // wanted_and_recognized
|
|
}
|
|
|
|
func (x *HistoricalEventHfInterrogated) Type() string { return "hf interrogated" }
|
|
func (x *HistoricalEventHfInterrogated) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfInterrogated) RelatedToHf(id int) bool {
|
|
return x.ImplicatedHfid == id || x.InterrogatorHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfInterrogated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfLearnsSecretSecretText int
|
|
|
|
const (
|
|
HistoricalEventHfLearnsSecretSecretText_Unknown HistoricalEventHfLearnsSecretSecretText = iota
|
|
HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath
|
|
)
|
|
|
|
func parseHistoricalEventHfLearnsSecretSecretText(s string) HistoricalEventHfLearnsSecretSecretText {
|
|
switch s {
|
|
case "the secrets of life and death":
|
|
return HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath
|
|
}
|
|
return HistoricalEventHfLearnsSecretSecretText_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfLearnsSecretSecretText) String() string {
|
|
switch s {
|
|
case HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath:
|
|
return "the secrets of life and death"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfLearnsSecretSecretText) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfLearnsSecret struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
Interaction string `json:"interaction" legend:"base"` // interaction
|
|
SecretText HistoricalEventHfLearnsSecretSecretText `json:"secretText" legend:"plus"` // secret_text
|
|
StudentHfid int `json:"studentHfid" legend:"base"` // student_hfid
|
|
TeacherHfid int `json:"teacherHfid" legend:"base"` // teacher_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfLearnsSecret) Type() string { return "hf learns secret" }
|
|
func (x *HistoricalEventHfLearnsSecret) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfLearnsSecret) RelatedToHf(id int) bool {
|
|
return x.StudentHfid == id || x.TeacherHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfLearnsSecret) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfNewPet struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
|
|
Pets string `json:"pets" legend:"plus"` // pets
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfNewPet) Type() string { return "hf new pet" }
|
|
func (x *HistoricalEventHfNewPet) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfNewPet) RelatedToHf(id int) bool { return x.GroupHfid == id }
|
|
|
|
func (x *HistoricalEventHfNewPet) CheckFields() {
|
|
if x.Pets != x.Coords && x.Pets != "" && x.Coords != "" {
|
|
sameFields["HistoricalEventHfNewPet"]["Pets"]["Coords"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventHfPerformedHorribleExperiments struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfPerformedHorribleExperiments) Type() string {
|
|
return "hf performed horrible experiments"
|
|
}
|
|
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToHf(id int) bool {
|
|
return x.GroupHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfPerformedHorribleExperiments) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfPrayedInsideStructureAction int
|
|
|
|
const (
|
|
HistoricalEventHfPrayedInsideStructureAction_Unknown HistoricalEventHfPrayedInsideStructureAction = iota
|
|
HistoricalEventHfPrayedInsideStructureAction_Prayedinside
|
|
)
|
|
|
|
func parseHistoricalEventHfPrayedInsideStructureAction(s string) HistoricalEventHfPrayedInsideStructureAction {
|
|
switch s {
|
|
case "prayedinside":
|
|
return HistoricalEventHfPrayedInsideStructureAction_Prayedinside
|
|
}
|
|
return HistoricalEventHfPrayedInsideStructureAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfPrayedInsideStructureAction) String() string {
|
|
switch s {
|
|
case HistoricalEventHfPrayedInsideStructureAction_Prayedinside:
|
|
return "prayedinside"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfPrayedInsideStructureAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfPrayedInsideStructure struct {
|
|
Action HistoricalEventHfPrayedInsideStructureAction `json:"action" legend:"plus"` // action
|
|
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfPrayedInsideStructure) Type() string { return "hf prayed inside structure" }
|
|
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventHfPrayedInsideStructure) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfPreachTopic int
|
|
|
|
const (
|
|
HistoricalEventHfPreachTopic_Unknown HistoricalEventHfPreachTopic = iota
|
|
HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo
|
|
HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo
|
|
)
|
|
|
|
func parseHistoricalEventHfPreachTopic(s string) HistoricalEventHfPreachTopic {
|
|
switch s {
|
|
case "entity 1 should love entity 2":
|
|
return HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo
|
|
case "set entity 1 against entity 2":
|
|
return HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo
|
|
}
|
|
return HistoricalEventHfPreachTopic_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfPreachTopic) String() string {
|
|
switch s {
|
|
case HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo:
|
|
return "entity 1 should love entity two"
|
|
case HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo:
|
|
return "set entity 1 against entity two"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfPreachTopic) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfPreach struct {
|
|
Entity1 int `json:"entity1" legend:"base"` // entity_1
|
|
Entity2 int `json:"entity2" legend:"base"` // entity_2
|
|
SiteHfid int `json:"siteHfid" legend:"base"` // site_hfid
|
|
SpeakerHfid int `json:"speakerHfid" legend:"base"` // speaker_hfid
|
|
Topic HistoricalEventHfPreachTopic `json:"topic" legend:"base"` // topic
|
|
}
|
|
|
|
func (x *HistoricalEventHfPreach) Type() string { return "hf preach" }
|
|
func (x *HistoricalEventHfPreach) RelatedToEntity(id int) bool {
|
|
return x.Entity1 == id || x.Entity2 == id
|
|
}
|
|
func (x *HistoricalEventHfPreach) RelatedToHf(id int) bool {
|
|
return x.SiteHfid == id || x.SpeakerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfPreach) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfProfanedStructureAction int
|
|
|
|
const (
|
|
HistoricalEventHfProfanedStructureAction_Unknown HistoricalEventHfProfanedStructureAction = iota
|
|
HistoricalEventHfProfanedStructureAction_Profane
|
|
)
|
|
|
|
func parseHistoricalEventHfProfanedStructureAction(s string) HistoricalEventHfProfanedStructureAction {
|
|
switch s {
|
|
case "profane":
|
|
return HistoricalEventHfProfanedStructureAction_Profane
|
|
}
|
|
return HistoricalEventHfProfanedStructureAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfProfanedStructureAction) String() string {
|
|
switch s {
|
|
case HistoricalEventHfProfanedStructureAction_Profane:
|
|
return "profane"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfProfanedStructureAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfProfanedStructure struct {
|
|
Action HistoricalEventHfProfanedStructureAction `json:"action" legend:"plus"` // action
|
|
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfProfanedStructure) Type() string { return "hf profaned structure" }
|
|
func (x *HistoricalEventHfProfanedStructure) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfProfanedStructure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventHfProfanedStructure) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfRansomed struct {
|
|
MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id
|
|
PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id
|
|
PayerHfid int `json:"payerHfid" legend:"base"` // payer_hfid
|
|
RansomedHfid int `json:"ransomedHfid" legend:"base"` // ransomed_hfid
|
|
RansomerHfid int `json:"ransomerHfid" legend:"base"` // ransomer_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfRansomed) Type() string { return "hf ransomed" }
|
|
func (x *HistoricalEventHfRansomed) RelatedToEntity(id int) bool { return x.PayerEntityId == id }
|
|
func (x *HistoricalEventHfRansomed) RelatedToHf(id int) bool {
|
|
return x.PayerHfid == id || x.RansomedHfid == id || x.RansomerHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfRansomed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfReachSummit struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfReachSummit) Type() string { return "hf reach summit" }
|
|
func (x *HistoricalEventHfReachSummit) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfReachSummit) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) }
|
|
|
|
func (x *HistoricalEventHfReachSummit) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfRecruitedUnitTypeForEntityUnitType int
|
|
|
|
const (
|
|
HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown HistoricalEventHfRecruitedUnitTypeForEntityUnitType = iota
|
|
HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk
|
|
)
|
|
|
|
func parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(s string) HistoricalEventHfRecruitedUnitTypeForEntityUnitType {
|
|
switch s {
|
|
case "monk":
|
|
return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk
|
|
}
|
|
return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) String() string {
|
|
switch s {
|
|
case HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk:
|
|
return "monk"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfRecruitedUnitTypeForEntity struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
UnitType HistoricalEventHfRecruitedUnitTypeForEntityUnitType `json:"unitType" legend:"base"` // unit_type
|
|
}
|
|
|
|
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) Type() string {
|
|
return "hf recruited unit type for entity"
|
|
}
|
|
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id
|
|
}
|
|
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfRelationshipDeniedReason int
|
|
|
|
const (
|
|
HistoricalEventHfRelationshipDeniedReason_Unknown HistoricalEventHfRelationshipDeniedReason = iota
|
|
HistoricalEventHfRelationshipDeniedReason_Jealousy
|
|
HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone
|
|
)
|
|
|
|
func parseHistoricalEventHfRelationshipDeniedReason(s string) HistoricalEventHfRelationshipDeniedReason {
|
|
switch s {
|
|
case "jealousy":
|
|
return HistoricalEventHfRelationshipDeniedReason_Jealousy
|
|
case "prefers working alone":
|
|
return HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone
|
|
}
|
|
return HistoricalEventHfRelationshipDeniedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfRelationshipDeniedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventHfRelationshipDeniedReason_Jealousy:
|
|
return "jealousy"
|
|
case HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone:
|
|
return "prefers working alone"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfRelationshipDeniedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfRelationshipDeniedRelationship int
|
|
|
|
const (
|
|
HistoricalEventHfRelationshipDeniedRelationship_Unknown HistoricalEventHfRelationshipDeniedRelationship = iota
|
|
HistoricalEventHfRelationshipDeniedRelationship_Apprentice
|
|
)
|
|
|
|
func parseHistoricalEventHfRelationshipDeniedRelationship(s string) HistoricalEventHfRelationshipDeniedRelationship {
|
|
switch s {
|
|
case "apprentice":
|
|
return HistoricalEventHfRelationshipDeniedRelationship_Apprentice
|
|
}
|
|
return HistoricalEventHfRelationshipDeniedRelationship_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfRelationshipDeniedRelationship) String() string {
|
|
switch s {
|
|
case HistoricalEventHfRelationshipDeniedRelationship_Apprentice:
|
|
return "apprentice"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfRelationshipDeniedRelationship) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfRelationshipDenied struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Reason HistoricalEventHfRelationshipDeniedReason `json:"reason" legend:"base"` // reason
|
|
ReasonId int `json:"reasonId" legend:"base"` // reason_id
|
|
Relationship HistoricalEventHfRelationshipDeniedRelationship `json:"relationship" legend:"base"` // relationship
|
|
SeekerHfid int `json:"seekerHfid" legend:"base"` // seeker_hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfRelationshipDenied) Type() string { return "hf relationship denied" }
|
|
func (x *HistoricalEventHfRelationshipDenied) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfRelationshipDenied) RelatedToHf(id int) bool {
|
|
return x.SeekerHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfRelationshipDenied) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfReunion struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid
|
|
Group2Hfid []int `json:"group2Hfid" legend:"base"` // group_2_hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfReunion) Type() string { return "hf reunion" }
|
|
func (x *HistoricalEventHfReunion) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfReunion) RelatedToHf(id int) bool {
|
|
return containsInt(x.Group2Hfid, id) || x.Group1Hfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfReunion) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfRevivedGhost int
|
|
|
|
const (
|
|
HistoricalEventHfRevivedGhost_Unknown HistoricalEventHfRevivedGhost = iota
|
|
HistoricalEventHfRevivedGhost_AngryGhost
|
|
HistoricalEventHfRevivedGhost_EnergeticPoltergeist
|
|
HistoricalEventHfRevivedGhost_ForlornHaunt
|
|
HistoricalEventHfRevivedGhost_HowlingSpirit
|
|
HistoricalEventHfRevivedGhost_MoaningSpirit
|
|
HistoricalEventHfRevivedGhost_MurderousGhost
|
|
HistoricalEventHfRevivedGhost_RestlessHaunt
|
|
HistoricalEventHfRevivedGhost_SecretivePoltergeist
|
|
HistoricalEventHfRevivedGhost_TroublesomePoltergeist
|
|
HistoricalEventHfRevivedGhost_ViolentGhost
|
|
)
|
|
|
|
func parseHistoricalEventHfRevivedGhost(s string) HistoricalEventHfRevivedGhost {
|
|
switch s {
|
|
case "angry ghost":
|
|
return HistoricalEventHfRevivedGhost_AngryGhost
|
|
case "energetic poltergeist":
|
|
return HistoricalEventHfRevivedGhost_EnergeticPoltergeist
|
|
case "forlorn haunt":
|
|
return HistoricalEventHfRevivedGhost_ForlornHaunt
|
|
case "howling spirit":
|
|
return HistoricalEventHfRevivedGhost_HowlingSpirit
|
|
case "moaning spirit":
|
|
return HistoricalEventHfRevivedGhost_MoaningSpirit
|
|
case "murderous ghost":
|
|
return HistoricalEventHfRevivedGhost_MurderousGhost
|
|
case "restless haunt":
|
|
return HistoricalEventHfRevivedGhost_RestlessHaunt
|
|
case "secretive poltergeist":
|
|
return HistoricalEventHfRevivedGhost_SecretivePoltergeist
|
|
case "troublesome poltergeist":
|
|
return HistoricalEventHfRevivedGhost_TroublesomePoltergeist
|
|
case "violent ghost":
|
|
return HistoricalEventHfRevivedGhost_ViolentGhost
|
|
}
|
|
return HistoricalEventHfRevivedGhost_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfRevivedGhost) String() string {
|
|
switch s {
|
|
case HistoricalEventHfRevivedGhost_AngryGhost:
|
|
return "angry ghost"
|
|
case HistoricalEventHfRevivedGhost_EnergeticPoltergeist:
|
|
return "energetic poltergeist"
|
|
case HistoricalEventHfRevivedGhost_ForlornHaunt:
|
|
return "forlorn haunt"
|
|
case HistoricalEventHfRevivedGhost_HowlingSpirit:
|
|
return "howling spirit"
|
|
case HistoricalEventHfRevivedGhost_MoaningSpirit:
|
|
return "moaning spirit"
|
|
case HistoricalEventHfRevivedGhost_MurderousGhost:
|
|
return "murderous ghost"
|
|
case HistoricalEventHfRevivedGhost_RestlessHaunt:
|
|
return "restless haunt"
|
|
case HistoricalEventHfRevivedGhost_SecretivePoltergeist:
|
|
return "secretive poltergeist"
|
|
case HistoricalEventHfRevivedGhost_TroublesomePoltergeist:
|
|
return "troublesome poltergeist"
|
|
case HistoricalEventHfRevivedGhost_ViolentGhost:
|
|
return "violent ghost"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfRevivedGhost) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfRevived struct {
|
|
ActorHfid int `json:"actorHfid" legend:"base"` // actor_hfid
|
|
Disturbance bool `json:"disturbance" legend:"base"` // disturbance
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Ghost HistoricalEventHfRevivedGhost `json:"ghost" legend:"base"` // ghost
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
RaisedBefore bool `json:"raisedBefore" legend:"base"` // raised_before
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfRevived) Type() string { return "hf revived" }
|
|
func (x *HistoricalEventHfRevived) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfRevived) RelatedToHf(id int) bool { return x.ActorHfid == id || x.Hfid == id }
|
|
|
|
func (x *HistoricalEventHfRevived) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfSimpleBattleEventSubtype int
|
|
|
|
const (
|
|
HistoricalEventHfSimpleBattleEventSubtype_Unknown HistoricalEventHfSimpleBattleEventSubtype = iota
|
|
HistoricalEventHfSimpleBattleEventSubtype_Ambushed
|
|
HistoricalEventHfSimpleBattleEventSubtype_Attacked
|
|
HistoricalEventHfSimpleBattleEventSubtype_Confront
|
|
HistoricalEventHfSimpleBattleEventSubtype_Corner
|
|
HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl
|
|
HistoricalEventHfSimpleBattleEventSubtype_HappenUpon
|
|
HistoricalEventHfSimpleBattleEventSubtype_Scuffle
|
|
HistoricalEventHfSimpleBattleEventSubtype_Subdued
|
|
HistoricalEventHfSimpleBattleEventSubtype_Surprised
|
|
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds
|
|
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds
|
|
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds
|
|
)
|
|
|
|
func parseHistoricalEventHfSimpleBattleEventSubtype(s string) HistoricalEventHfSimpleBattleEventSubtype {
|
|
switch s {
|
|
case "2 lost after giving wounds":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds
|
|
case "2 lost after mutual wounds":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds
|
|
case "2 lost after receiving wounds":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds
|
|
case "ambushed":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Ambushed
|
|
case "attacked":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Attacked
|
|
case "confront":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Confront
|
|
case "corner":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Corner
|
|
case "got into a brawl":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl
|
|
case "happen upon":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_HappenUpon
|
|
case "scuffle":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Scuffle
|
|
case "subdued":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Subdued
|
|
case "surprised":
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Surprised
|
|
}
|
|
return HistoricalEventHfSimpleBattleEventSubtype_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfSimpleBattleEventSubtype) String() string {
|
|
switch s {
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Ambushed:
|
|
return "ambushed"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Attacked:
|
|
return "attacked"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Confront:
|
|
return "confront"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Corner:
|
|
return "corner"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl:
|
|
return "got into a brawl"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_HappenUpon:
|
|
return "happen upon"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Scuffle:
|
|
return "scuffle"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Subdued:
|
|
return "subdued"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_Surprised:
|
|
return "surprised"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds:
|
|
return "two lost after giving wounds"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds:
|
|
return "two lost after mutual wounds"
|
|
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds:
|
|
return "two lost after receiving wounds"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfSimpleBattleEventSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfSimpleBattleEvent struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid
|
|
Group2Hfid int `json:"group2Hfid" legend:"base"` // group_2_hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
Subtype HistoricalEventHfSimpleBattleEventSubtype `json:"subtype" legend:"base"` // subtype
|
|
}
|
|
|
|
func (x *HistoricalEventHfSimpleBattleEvent) Type() string { return "hf simple battle event" }
|
|
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToHf(id int) bool {
|
|
return x.Group1Hfid == id || x.Group2Hfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfSimpleBattleEvent) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfTravel struct {
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid
|
|
Return bool `json:"return" legend:"base"` // return
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfTravel) Type() string { return "hf travel" }
|
|
func (x *HistoricalEventHfTravel) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfTravel) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) }
|
|
|
|
func (x *HistoricalEventHfTravel) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfViewedArtifact struct {
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfViewedArtifact) Type() string { return "hf viewed artifact" }
|
|
func (x *HistoricalEventHfViewedArtifact) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfViewedArtifact) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventHfViewedArtifact) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfWoundedInjuryType int
|
|
|
|
const (
|
|
HistoricalEventHfWoundedInjuryType_Unknown HistoricalEventHfWoundedInjuryType = iota
|
|
HistoricalEventHfWoundedInjuryType_Rip
|
|
HistoricalEventHfWoundedInjuryType_Slash
|
|
HistoricalEventHfWoundedInjuryType_Smash
|
|
HistoricalEventHfWoundedInjuryType_Stab
|
|
)
|
|
|
|
func parseHistoricalEventHfWoundedInjuryType(s string) HistoricalEventHfWoundedInjuryType {
|
|
switch s {
|
|
case "rip":
|
|
return HistoricalEventHfWoundedInjuryType_Rip
|
|
case "slash":
|
|
return HistoricalEventHfWoundedInjuryType_Slash
|
|
case "smash":
|
|
return HistoricalEventHfWoundedInjuryType_Smash
|
|
case "stab":
|
|
return HistoricalEventHfWoundedInjuryType_Stab
|
|
}
|
|
return HistoricalEventHfWoundedInjuryType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfWoundedInjuryType) String() string {
|
|
switch s {
|
|
case HistoricalEventHfWoundedInjuryType_Rip:
|
|
return "rip"
|
|
case HistoricalEventHfWoundedInjuryType_Slash:
|
|
return "slash"
|
|
case HistoricalEventHfWoundedInjuryType_Smash:
|
|
return "smash"
|
|
case HistoricalEventHfWoundedInjuryType_Stab:
|
|
return "stab"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfWoundedInjuryType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfWoundedPartLost int
|
|
|
|
const (
|
|
HistoricalEventHfWoundedPartLost_Unknown HistoricalEventHfWoundedPartLost = iota
|
|
HistoricalEventHfWoundedPartLost_False
|
|
HistoricalEventHfWoundedPartLost_True
|
|
)
|
|
|
|
func parseHistoricalEventHfWoundedPartLost(s string) HistoricalEventHfWoundedPartLost {
|
|
switch s {
|
|
case "false":
|
|
return HistoricalEventHfWoundedPartLost_False
|
|
case "true":
|
|
return HistoricalEventHfWoundedPartLost_True
|
|
}
|
|
return HistoricalEventHfWoundedPartLost_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfWoundedPartLost) String() string {
|
|
switch s {
|
|
case HistoricalEventHfWoundedPartLost_False:
|
|
return "false"
|
|
case HistoricalEventHfWoundedPartLost_True:
|
|
return "true"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfWoundedPartLost) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfWounded struct {
|
|
BodyPart int `json:"bodyPart" legend:"plus"` // body_part
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
InjuryType HistoricalEventHfWoundedInjuryType `json:"injuryType" legend:"plus"` // injury_type
|
|
PartLost HistoricalEventHfWoundedPartLost `json:"partLost" legend:"plus"` // part_lost
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
WasTorture bool `json:"wasTorture" legend:"base"` // was_torture
|
|
WoundeeCaste int `json:"woundeeCaste" legend:"plus"` // woundee_caste
|
|
WoundeeHfid int `json:"woundeeHfid" legend:"base"` // woundee_hfid
|
|
WoundeeRace int `json:"woundeeRace" legend:"plus"` // woundee_race
|
|
WounderHfid int `json:"wounderHfid" legend:"base"` // wounder_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventHfWounded) Type() string { return "hf wounded" }
|
|
func (x *HistoricalEventHfWounded) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHfWounded) RelatedToHf(id int) bool {
|
|
return x.WoundeeHfid == id || x.WounderHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfWounded) CheckFields() {
|
|
if x.BodyPart != x.FeatureLayerId && x.BodyPart != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["BodyPart"]["FeatureLayerId"] = false
|
|
}
|
|
if x.BodyPart != x.SiteId && x.BodyPart != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["BodyPart"]["SiteId"] = false
|
|
}
|
|
if x.BodyPart != x.SubregionId && x.BodyPart != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["BodyPart"]["SubregionId"] = false
|
|
}
|
|
if x.BodyPart != x.WoundeeHfid && x.BodyPart != 0 && x.WoundeeHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["BodyPart"]["WoundeeHfid"] = false
|
|
}
|
|
if x.BodyPart != x.WounderHfid && x.BodyPart != 0 && x.WounderHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["BodyPart"]["WounderHfid"] = false
|
|
}
|
|
if x.WoundeeCaste != x.FeatureLayerId && x.WoundeeCaste != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["FeatureLayerId"] = false
|
|
}
|
|
if x.WoundeeCaste != x.SiteId && x.WoundeeCaste != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SiteId"] = false
|
|
}
|
|
if x.WoundeeCaste != x.SubregionId && x.WoundeeCaste != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SubregionId"] = false
|
|
}
|
|
if x.WoundeeCaste != x.WoundeeHfid && x.WoundeeCaste != 0 && x.WoundeeHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WoundeeHfid"] = false
|
|
}
|
|
if x.WoundeeCaste != x.WounderHfid && x.WoundeeCaste != 0 && x.WounderHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WounderHfid"] = false
|
|
}
|
|
if x.WoundeeRace != x.FeatureLayerId && x.WoundeeRace != 0 && x.FeatureLayerId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["FeatureLayerId"] = false
|
|
}
|
|
if x.WoundeeRace != x.SiteId && x.WoundeeRace != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SiteId"] = false
|
|
}
|
|
if x.WoundeeRace != x.SubregionId && x.WoundeeRace != 0 && x.SubregionId != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SubregionId"] = false
|
|
}
|
|
if x.WoundeeRace != x.WoundeeHfid && x.WoundeeRace != 0 && x.WoundeeHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WoundeeHfid"] = false
|
|
}
|
|
if x.WoundeeRace != x.WounderHfid && x.WoundeeRace != 0 && x.WounderHfid != 0 {
|
|
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WounderHfid"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipAction int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown HistoricalEventHfsFormedIntrigueRelationshipAction = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork
|
|
HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipAction(s string) HistoricalEventHfsFormedIntrigueRelationshipAction {
|
|
switch s {
|
|
case "bring into network":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork
|
|
case "corrupt in place":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipAction) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork:
|
|
return "bring into network"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace:
|
|
return "corrupt in place"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipAction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipCircumstance int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown HistoricalEventHfsFormedIntrigueRelationshipCircumstance = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(s string) HistoricalEventHfsFormedIntrigueRelationshipCircumstance {
|
|
switch s {
|
|
case "is entity subordinate":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate:
|
|
return "is entity subordinate"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master
|
|
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs {
|
|
switch s {
|
|
case "master":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master
|
|
case "possibly unknown director":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master:
|
|
return "master"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector:
|
|
return "possibly unknown director"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipMethod int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown HistoricalEventHfsFormedIntrigueRelationshipMethod = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy
|
|
HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipMethod(s string) HistoricalEventHfsFormedIntrigueRelationshipMethod {
|
|
switch s {
|
|
case "blackmail over embezzlement":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement
|
|
case "bribe":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe
|
|
case "flatter":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter
|
|
case "intimidate":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate
|
|
case "offer immortality":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality
|
|
case "precedence":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence
|
|
case "religious sympathy":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy
|
|
case "revenge on grudge":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement:
|
|
return "blackmail over embezzlement"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe:
|
|
return "bribe"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter:
|
|
return "flatter"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate:
|
|
return "intimidate"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality:
|
|
return "offer immortality"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence:
|
|
return "precedence"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy:
|
|
return "religious sympathy"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge:
|
|
return "revenge on grudge"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder
|
|
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs {
|
|
switch s {
|
|
case "compromised position holder":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder
|
|
case "general purpose asset":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder:
|
|
return "compromised position holder"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset:
|
|
return "general purpose asset"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipTopFacet int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopFacet = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(s string) HistoricalEventHfsFormedIntrigueRelationshipTopFacet {
|
|
switch s {
|
|
case "ambition":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition
|
|
case "confidence":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence
|
|
case "envy propensity":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity
|
|
case "fearlessness":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness
|
|
case "greed":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed
|
|
case "hope":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope
|
|
case "pride":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride
|
|
case "stress vulnerability":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability
|
|
case "swayable":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable
|
|
case "vanity":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity
|
|
case "vengeful":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition:
|
|
return "ambition"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence:
|
|
return "confidence"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity:
|
|
return "envy propensity"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness:
|
|
return "fearlessness"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed:
|
|
return "greed"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope:
|
|
return "hope"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride:
|
|
return "pride"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability:
|
|
return "stress vulnerability"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable:
|
|
return "swayable"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity:
|
|
return "vanity"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful:
|
|
return "vengeful"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(s string) HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor {
|
|
switch s {
|
|
case "fear":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear
|
|
case "love":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love
|
|
case "loyalty":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty
|
|
case "trust":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear:
|
|
return "fear"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love:
|
|
return "love"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty:
|
|
return "loyalty"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust:
|
|
return "trust"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationshipTopValue int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopValue = iota
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law
|
|
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(s string) HistoricalEventHfsFormedIntrigueRelationshipTopValue {
|
|
switch s {
|
|
case "law":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law
|
|
case "power":
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power
|
|
}
|
|
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law:
|
|
return "law"
|
|
case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power:
|
|
return "power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedIntrigueRelationship struct {
|
|
Action HistoricalEventHfsFormedIntrigueRelationshipAction `json:"action" legend:"base"` // action
|
|
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
|
|
Circumstance HistoricalEventHfsFormedIntrigueRelationshipCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
|
|
CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid
|
|
CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity
|
|
CorruptorSeenAs HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs `json:"corruptorSeenAs" legend:"base"` // corruptor_seen_as
|
|
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid
|
|
Method HistoricalEventHfsFormedIntrigueRelationshipMethod `json:"method" legend:"base"` // method
|
|
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
|
|
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
|
|
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
Successful bool `json:"successful" legend:"base"` // successful
|
|
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
|
|
TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity
|
|
TargetSeenAs HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs `json:"targetSeenAs" legend:"base"` // target_seen_as
|
|
TopFacet HistoricalEventHfsFormedIntrigueRelationshipTopFacet `json:"topFacet" legend:"base"` // top_facet
|
|
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
|
|
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
|
|
TopRelationshipFactor HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
|
|
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
|
|
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
|
|
TopValue HistoricalEventHfsFormedIntrigueRelationshipTopValue `json:"topValue" legend:"base"` // top_value
|
|
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
|
|
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
|
|
}
|
|
|
|
func (x *HistoricalEventHfsFormedIntrigueRelationship) Type() string {
|
|
return "hfs formed intrigue relationship"
|
|
}
|
|
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToEntity(id int) bool {
|
|
return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id
|
|
}
|
|
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToHf(id int) bool {
|
|
return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfsFormedIntrigueRelationship) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 = iota
|
|
HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(s string) HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 {
|
|
switch s {
|
|
case "information source":
|
|
return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource
|
|
}
|
|
return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource:
|
|
return "information source"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 int
|
|
|
|
const (
|
|
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 = iota
|
|
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly
|
|
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource
|
|
)
|
|
|
|
func parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(s string) HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 {
|
|
switch s {
|
|
case "friendly":
|
|
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly
|
|
case "information source":
|
|
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource
|
|
}
|
|
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) String() string {
|
|
switch s {
|
|
case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly:
|
|
return "friendly"
|
|
case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource:
|
|
return "information source"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventHfsFormedReputationRelationship struct {
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
HfRep1Of2 HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 `json:"hfRep1Of2" legend:"base"` // hf_rep_1_of_2
|
|
HfRep2Of1 HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 `json:"hfRep2Of1" legend:"base"` // hf_rep_2_of_1
|
|
Hfid1 int `json:"hfid1" legend:"base"` // hfid1
|
|
Hfid2 int `json:"hfid2" legend:"base"` // hfid2
|
|
IdentityId1 int `json:"identityId1" legend:"base"` // identity_id1
|
|
IdentityId2 int `json:"identityId2" legend:"base"` // identity_id2
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventHfsFormedReputationRelationship) Type() string {
|
|
return "hfs formed reputation relationship"
|
|
}
|
|
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToEntity(id int) bool {
|
|
return x.IdentityId1 == id || x.IdentityId2 == id
|
|
}
|
|
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToHf(id int) bool {
|
|
return x.Hfid1 == id || x.Hfid2 == id
|
|
}
|
|
|
|
func (x *HistoricalEventHfsFormedReputationRelationship) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventHolyCityDeclaration struct {
|
|
ReligionId int `json:"religionId" legend:"base"` // religion_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventHolyCityDeclaration) Type() string { return "holy city declaration" }
|
|
func (x *HistoricalEventHolyCityDeclaration) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventHolyCityDeclaration) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventHolyCityDeclaration) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventInsurrectionStartedOutcome int
|
|
|
|
const (
|
|
HistoricalEventInsurrectionStartedOutcome_Unknown HistoricalEventInsurrectionStartedOutcome = iota
|
|
HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown
|
|
HistoricalEventInsurrectionStartedOutcome_PopulationGone
|
|
)
|
|
|
|
func parseHistoricalEventInsurrectionStartedOutcome(s string) HistoricalEventInsurrectionStartedOutcome {
|
|
switch s {
|
|
case "leadership overthrown":
|
|
return HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown
|
|
case "population gone":
|
|
return HistoricalEventInsurrectionStartedOutcome_PopulationGone
|
|
}
|
|
return HistoricalEventInsurrectionStartedOutcome_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventInsurrectionStartedOutcome) String() string {
|
|
switch s {
|
|
case HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown:
|
|
return "leadership overthrown"
|
|
case HistoricalEventInsurrectionStartedOutcome_PopulationGone:
|
|
return "population gone"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventInsurrectionStartedOutcome) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventInsurrectionStarted struct {
|
|
Outcome HistoricalEventInsurrectionStartedOutcome `json:"outcome" legend:"base"` // outcome
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TargetCivId int `json:"targetCivId" legend:"base"` // target_civ_id
|
|
}
|
|
|
|
func (x *HistoricalEventInsurrectionStarted) Type() string { return "insurrection started" }
|
|
func (x *HistoricalEventInsurrectionStarted) RelatedToEntity(id int) bool { return x.TargetCivId == id }
|
|
func (x *HistoricalEventInsurrectionStarted) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventInsurrectionStarted) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventItemStolenTheftMethod int
|
|
|
|
const (
|
|
HistoricalEventItemStolenTheftMethod_Unknown HistoricalEventItemStolenTheftMethod = iota
|
|
HistoricalEventItemStolenTheftMethod_Confiscated
|
|
HistoricalEventItemStolenTheftMethod_Looted
|
|
HistoricalEventItemStolenTheftMethod_Recovered
|
|
HistoricalEventItemStolenTheftMethod_Theft
|
|
)
|
|
|
|
func parseHistoricalEventItemStolenTheftMethod(s string) HistoricalEventItemStolenTheftMethod {
|
|
switch s {
|
|
case "confiscated":
|
|
return HistoricalEventItemStolenTheftMethod_Confiscated
|
|
case "looted":
|
|
return HistoricalEventItemStolenTheftMethod_Looted
|
|
case "recovered":
|
|
return HistoricalEventItemStolenTheftMethod_Recovered
|
|
case "theft":
|
|
return HistoricalEventItemStolenTheftMethod_Theft
|
|
}
|
|
return HistoricalEventItemStolenTheftMethod_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventItemStolenTheftMethod) String() string {
|
|
switch s {
|
|
case HistoricalEventItemStolenTheftMethod_Confiscated:
|
|
return "confiscated"
|
|
case HistoricalEventItemStolenTheftMethod_Looted:
|
|
return "looted"
|
|
case HistoricalEventItemStolenTheftMethod_Recovered:
|
|
return "recovered"
|
|
case HistoricalEventItemStolenTheftMethod_Theft:
|
|
return "theft"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventItemStolenTheftMethod) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventItemStolen struct {
|
|
Circumstance *HistoricalEventItemStolenCircumstance `json:"circumstance" legend:"both"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
Entity int `json:"entity" legend:"plus"` // entity
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
Item int `json:"item" legend:"plus"` // item
|
|
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType string `json:"itemType" legend:"plus"` // item_type
|
|
Mat string `json:"mat" legend:"plus"` // mat
|
|
Matindex int `json:"matindex" legend:"plus"` // matindex
|
|
Mattype int `json:"mattype" legend:"plus"` // mattype
|
|
Site int `json:"site" legend:"plus"` // site
|
|
StashSite int `json:"stashSite" legend:"plus"` // stash_site
|
|
Structure int `json:"structure" legend:"plus"` // structure
|
|
TheftMethod HistoricalEventItemStolenTheftMethod `json:"theftMethod" legend:"plus"` // theft_method
|
|
}
|
|
|
|
func (x *HistoricalEventItemStolen) Type() string { return "item stolen" }
|
|
func (x *HistoricalEventItemStolen) RelatedToEntity(id int) bool { return x.Entity == id }
|
|
func (x *HistoricalEventItemStolen) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *HistoricalEventItemStolen) CheckFields() {
|
|
if x.Entity != x.CircumstanceId && x.Entity != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Entity"]["CircumstanceId"] = false
|
|
}
|
|
if x.Histfig != x.CircumstanceId && x.Histfig != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Histfig"]["CircumstanceId"] = false
|
|
}
|
|
if x.Item != x.CircumstanceId && x.Item != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Item"]["CircumstanceId"] = false
|
|
}
|
|
if x.Matindex != x.CircumstanceId && x.Matindex != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Matindex"]["CircumstanceId"] = false
|
|
}
|
|
if x.Mattype != x.CircumstanceId && x.Mattype != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Mattype"]["CircumstanceId"] = false
|
|
}
|
|
if x.Site != x.CircumstanceId && x.Site != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Site"]["CircumstanceId"] = false
|
|
}
|
|
if x.StashSite != x.CircumstanceId && x.StashSite != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["StashSite"]["CircumstanceId"] = false
|
|
}
|
|
if x.Structure != x.CircumstanceId && x.Structure != 0 && x.CircumstanceId != 0 {
|
|
sameFields["HistoricalEventItemStolen"]["Structure"]["CircumstanceId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventItemStolenCircumstanceType int
|
|
|
|
const (
|
|
HistoricalEventItemStolenCircumstanceType_Unknown HistoricalEventItemStolenCircumstanceType = iota
|
|
HistoricalEventItemStolenCircumstanceType_Defeated
|
|
HistoricalEventItemStolenCircumstanceType_Histeventcollection
|
|
HistoricalEventItemStolenCircumstanceType_Murdered
|
|
)
|
|
|
|
func parseHistoricalEventItemStolenCircumstanceType(s string) HistoricalEventItemStolenCircumstanceType {
|
|
switch s {
|
|
case "defeated":
|
|
return HistoricalEventItemStolenCircumstanceType_Defeated
|
|
case "histeventcollection":
|
|
return HistoricalEventItemStolenCircumstanceType_Histeventcollection
|
|
case "murdered":
|
|
return HistoricalEventItemStolenCircumstanceType_Murdered
|
|
}
|
|
return HistoricalEventItemStolenCircumstanceType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventItemStolenCircumstanceType) String() string {
|
|
switch s {
|
|
case HistoricalEventItemStolenCircumstanceType_Defeated:
|
|
return "defeated"
|
|
case HistoricalEventItemStolenCircumstanceType_Histeventcollection:
|
|
return "histeventcollection"
|
|
case HistoricalEventItemStolenCircumstanceType_Murdered:
|
|
return "murdered"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventItemStolenCircumstanceType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventItemStolenCircumstance struct {
|
|
Defeated int `json:"defeated" legend:"plus"` // defeated
|
|
HistEventCollection int `json:"histEventCollection" legend:"plus"` // hist_event_collection
|
|
Murdered int `json:"murdered" legend:"plus"` // murdered
|
|
Type HistoricalEventItemStolenCircumstanceType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *HistoricalEventItemStolenCircumstance) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventItemStolenCircumstance) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventItemStolenCircumstance) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventKnowledgeDiscovered struct {
|
|
First bool `json:"first" legend:"base"` // first
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Knowledge string `json:"knowledge" legend:"base"` // knowledge
|
|
}
|
|
|
|
func (x *HistoricalEventKnowledgeDiscovered) Type() string { return "knowledge discovered" }
|
|
func (x *HistoricalEventKnowledgeDiscovered) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventKnowledgeDiscovered) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventKnowledgeDiscovered) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventMasterpieceArchConstructedBuildingSubtype int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown HistoricalEventMasterpieceArchConstructedBuildingSubtype = iota
|
|
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter
|
|
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(s string) HistoricalEventMasterpieceArchConstructedBuildingSubtype {
|
|
switch s {
|
|
case "magmasmelter":
|
|
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter
|
|
case "woodfurnace":
|
|
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace
|
|
}
|
|
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter:
|
|
return "magmasmelter"
|
|
case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace:
|
|
return "woodfurnace"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceArchConstructedBuildingType int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceArchConstructedBuildingType_Unknown HistoricalEventMasterpieceArchConstructedBuildingType = iota
|
|
HistoricalEventMasterpieceArchConstructedBuildingType_Bridge
|
|
HistoricalEventMasterpieceArchConstructedBuildingType_Furnace
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceArchConstructedBuildingType(s string) HistoricalEventMasterpieceArchConstructedBuildingType {
|
|
switch s {
|
|
case "bridge":
|
|
return HistoricalEventMasterpieceArchConstructedBuildingType_Bridge
|
|
case "furnace":
|
|
return HistoricalEventMasterpieceArchConstructedBuildingType_Furnace
|
|
}
|
|
return HistoricalEventMasterpieceArchConstructedBuildingType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedBuildingType) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceArchConstructedBuildingType_Bridge:
|
|
return "bridge"
|
|
case HistoricalEventMasterpieceArchConstructedBuildingType_Furnace:
|
|
return "furnace"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedBuildingType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceArchConstructedSkillAtTime int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown HistoricalEventMasterpieceArchConstructedSkillAtTime = iota
|
|
HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished
|
|
HistoricalEventMasterpieceArchConstructedSkillAtTime_Master
|
|
HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional
|
|
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceArchConstructedSkillAtTime(s string) HistoricalEventMasterpieceArchConstructedSkillAtTime {
|
|
switch s {
|
|
case "accomplished":
|
|
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished
|
|
case "master":
|
|
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Master
|
|
case "professional":
|
|
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional
|
|
case "unknown 21":
|
|
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1
|
|
}
|
|
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished:
|
|
return "accomplished"
|
|
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Master:
|
|
return "master"
|
|
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional:
|
|
return "professional"
|
|
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1:
|
|
return "unknown two 1"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceArchConstructed struct {
|
|
BuildingCustom int `json:"buildingCustom" legend:"plus"` // building_custom
|
|
BuildingSubtype HistoricalEventMasterpieceArchConstructedBuildingSubtype `json:"buildingSubtype" legend:"plus"` // building_subtype
|
|
BuildingType HistoricalEventMasterpieceArchConstructedBuildingType `json:"buildingType" legend:"plus"` // building_type
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Maker int `json:"maker" legend:"plus"` // maker
|
|
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SkillAtTime HistoricalEventMasterpieceArchConstructedSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
|
|
Unk2 int `json:"unk2" legend:"plus"` // unk_2
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceArchConstructed) Type() string {
|
|
return "masterpiece arch constructed"
|
|
}
|
|
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id || x.MakerEntity == id
|
|
}
|
|
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventMasterpieceArchConstructed) CheckFields() {
|
|
if x.BuildingCustom != x.EntityId && x.BuildingCustom != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["EntityId"] = false
|
|
}
|
|
if x.BuildingCustom != x.Hfid && x.BuildingCustom != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["Hfid"] = false
|
|
}
|
|
if x.BuildingCustom != x.SiteId && x.BuildingCustom != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["SiteId"] = false
|
|
}
|
|
if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["EntityId"] = false
|
|
}
|
|
if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["Hfid"] = false
|
|
}
|
|
if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["SiteId"] = false
|
|
}
|
|
if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["EntityId"] = false
|
|
}
|
|
if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["Hfid"] = false
|
|
}
|
|
if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["EntityId"] = false
|
|
}
|
|
if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["Hfid"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["SiteId"] = false
|
|
}
|
|
if x.Unk2 != x.EntityId && x.Unk2 != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["EntityId"] = false
|
|
}
|
|
if x.Unk2 != x.Hfid && x.Unk2 != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["Hfid"] = false
|
|
}
|
|
if x.Unk2 != x.SiteId && x.Unk2 != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventMasterpieceEngravingSkillAtTime int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Unknown HistoricalEventMasterpieceEngravingSkillAtTime = iota
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Expert
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Great
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Legendary
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Master
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Professional
|
|
HistoricalEventMasterpieceEngravingSkillAtTime_Proficient
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceEngravingSkillAtTime(s string) HistoricalEventMasterpieceEngravingSkillAtTime {
|
|
switch s {
|
|
case "accomplished":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished
|
|
case "expert":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Expert
|
|
case "grandmaster":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster
|
|
case "great":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Great
|
|
case "highmaster":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster
|
|
case "legendary":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Legendary
|
|
case "legendary4":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4
|
|
case "master":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Master
|
|
case "professional":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Professional
|
|
case "proficient":
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Proficient
|
|
}
|
|
return HistoricalEventMasterpieceEngravingSkillAtTime_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceEngravingSkillAtTime) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished:
|
|
return "accomplished"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Expert:
|
|
return "expert"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster:
|
|
return "grandmaster"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Great:
|
|
return "great"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster:
|
|
return "highmaster"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Legendary:
|
|
return "legendary"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4:
|
|
return "legendary 4"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Master:
|
|
return "master"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Professional:
|
|
return "professional"
|
|
case HistoricalEventMasterpieceEngravingSkillAtTime_Proficient:
|
|
return "proficient"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceEngravingSkillAtTime) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceEngraving struct {
|
|
ArtId int `json:"artId" legend:"plus"` // art_id
|
|
ArtSubid int `json:"artSubid" legend:"plus"` // art_subid
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Maker int `json:"maker" legend:"plus"` // maker
|
|
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SkillAtTime HistoricalEventMasterpieceEngravingSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceEngraving) Type() string { return "masterpiece engraving" }
|
|
func (x *HistoricalEventMasterpieceEngraving) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id || x.MakerEntity == id
|
|
}
|
|
func (x *HistoricalEventMasterpieceEngraving) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventMasterpieceEngraving) CheckFields() {
|
|
if x.ArtId != x.EntityId && x.ArtId != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["EntityId"] = false
|
|
}
|
|
if x.ArtId != x.Hfid && x.ArtId != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["Hfid"] = false
|
|
}
|
|
if x.ArtId != x.SiteId && x.ArtId != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["SiteId"] = false
|
|
}
|
|
if x.ArtSubid != x.EntityId && x.ArtSubid != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["EntityId"] = false
|
|
}
|
|
if x.ArtSubid != x.Hfid && x.ArtSubid != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["Hfid"] = false
|
|
}
|
|
if x.ArtSubid != x.SiteId && x.ArtSubid != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["SiteId"] = false
|
|
}
|
|
if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["EntityId"] = false
|
|
}
|
|
if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["Hfid"] = false
|
|
}
|
|
if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["SiteId"] = false
|
|
}
|
|
if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["EntityId"] = false
|
|
}
|
|
if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["Hfid"] = false
|
|
}
|
|
if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["EntityId"] = false
|
|
}
|
|
if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["Hfid"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventMasterpieceFood struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SkillAtTime int `json:"skillAtTime" legend:"base"` // skill_at_time
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceFood) Type() string { return "masterpiece food" }
|
|
func (x *HistoricalEventMasterpieceFood) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalEventMasterpieceFood) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventMasterpieceFood) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventMasterpieceItemItemSubtype int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceItemItemSubtype_Unknown HistoricalEventMasterpieceItemItemSubtype = iota
|
|
HistoricalEventMasterpieceItemItemSubtype_Bookcase
|
|
HistoricalEventMasterpieceItemItemSubtype_Breastplate
|
|
HistoricalEventMasterpieceItemItemSubtype_Cap
|
|
HistoricalEventMasterpieceItemItemSubtype_Cloak
|
|
HistoricalEventMasterpieceItemItemSubtype_Coat
|
|
HistoricalEventMasterpieceItemItemSubtype_Corkscrew
|
|
HistoricalEventMasterpieceItemItemSubtype_Gauntlet
|
|
HistoricalEventMasterpieceItemItemSubtype_Glove
|
|
HistoricalEventMasterpieceItemItemSubtype_Greaves
|
|
HistoricalEventMasterpieceItemItemSubtype_Helm
|
|
HistoricalEventMasterpieceItemItemSubtype_HighBoot
|
|
HistoricalEventMasterpieceItemItemSubtype_Hood
|
|
HistoricalEventMasterpieceItemItemSubtype_Leggings
|
|
HistoricalEventMasterpieceItemItemSubtype_MailShirt
|
|
HistoricalEventMasterpieceItemItemSubtype_Mitten
|
|
HistoricalEventMasterpieceItemItemSubtype_Robe
|
|
HistoricalEventMasterpieceItemItemSubtype_ScrollRollers
|
|
HistoricalEventMasterpieceItemItemSubtype_Shield
|
|
HistoricalEventMasterpieceItemItemSubtype_Shirt
|
|
HistoricalEventMasterpieceItemItemSubtype_Shoe
|
|
HistoricalEventMasterpieceItemItemSubtype_Sock
|
|
HistoricalEventMasterpieceItemItemSubtype_Trousers
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceItemItemSubtype(s string) HistoricalEventMasterpieceItemItemSubtype {
|
|
switch s {
|
|
case "bookcase":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Bookcase
|
|
case "breastplate":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Breastplate
|
|
case "cap":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Cap
|
|
case "cloak":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Cloak
|
|
case "coat":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Coat
|
|
case "corkscrew":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Corkscrew
|
|
case "gauntlet":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Gauntlet
|
|
case "glove":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Glove
|
|
case "greaves":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Greaves
|
|
case "helm":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Helm
|
|
case "high boot":
|
|
return HistoricalEventMasterpieceItemItemSubtype_HighBoot
|
|
case "hood":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Hood
|
|
case "leggings":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Leggings
|
|
case "mail shirt":
|
|
return HistoricalEventMasterpieceItemItemSubtype_MailShirt
|
|
case "mitten":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Mitten
|
|
case "robe":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Robe
|
|
case "scroll rollers":
|
|
return HistoricalEventMasterpieceItemItemSubtype_ScrollRollers
|
|
case "shield":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Shield
|
|
case "shirt":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Shirt
|
|
case "shoe":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Shoe
|
|
case "sock":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Sock
|
|
case "trousers":
|
|
return HistoricalEventMasterpieceItemItemSubtype_Trousers
|
|
}
|
|
return HistoricalEventMasterpieceItemItemSubtype_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceItemItemSubtype) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceItemItemSubtype_Bookcase:
|
|
return "bookcase"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Breastplate:
|
|
return "breastplate"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Cap:
|
|
return "cap"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Cloak:
|
|
return "cloak"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Coat:
|
|
return "coat"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Corkscrew:
|
|
return "corkscrew"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Gauntlet:
|
|
return "gauntlet"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Glove:
|
|
return "glove"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Greaves:
|
|
return "greaves"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Helm:
|
|
return "helm"
|
|
case HistoricalEventMasterpieceItemItemSubtype_HighBoot:
|
|
return "high boot"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Hood:
|
|
return "hood"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Leggings:
|
|
return "leggings"
|
|
case HistoricalEventMasterpieceItemItemSubtype_MailShirt:
|
|
return "mail shirt"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Mitten:
|
|
return "mitten"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Robe:
|
|
return "robe"
|
|
case HistoricalEventMasterpieceItemItemSubtype_ScrollRollers:
|
|
return "scroll rollers"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Shield:
|
|
return "shield"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Shirt:
|
|
return "shirt"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Shoe:
|
|
return "shoe"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Sock:
|
|
return "sock"
|
|
case HistoricalEventMasterpieceItemItemSubtype_Trousers:
|
|
return "trousers"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceItemItemSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceItemItemType int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceItemItemType_Unknown HistoricalEventMasterpieceItemItemType = iota
|
|
HistoricalEventMasterpieceItemItemType_Armor
|
|
HistoricalEventMasterpieceItemItemType_Armorstand
|
|
HistoricalEventMasterpieceItemItemType_Backpack
|
|
HistoricalEventMasterpieceItemItemType_Barrel
|
|
HistoricalEventMasterpieceItemItemType_Bed
|
|
HistoricalEventMasterpieceItemItemType_Box
|
|
HistoricalEventMasterpieceItemItemType_Bucket
|
|
HistoricalEventMasterpieceItemItemType_Cabinet
|
|
HistoricalEventMasterpieceItemItemType_Chair
|
|
HistoricalEventMasterpieceItemItemType_Cloth
|
|
HistoricalEventMasterpieceItemItemType_Coffin
|
|
HistoricalEventMasterpieceItemItemType_Crown
|
|
HistoricalEventMasterpieceItemItemType_Door
|
|
HistoricalEventMasterpieceItemItemType_Figurine
|
|
HistoricalEventMasterpieceItemItemType_Flask
|
|
HistoricalEventMasterpieceItemItemType_Floodgate
|
|
HistoricalEventMasterpieceItemItemType_Gloves
|
|
HistoricalEventMasterpieceItemItemType_Helm
|
|
HistoricalEventMasterpieceItemItemType_Pants
|
|
HistoricalEventMasterpieceItemItemType_Shield
|
|
HistoricalEventMasterpieceItemItemType_Shoes
|
|
HistoricalEventMasterpieceItemItemType_Slab
|
|
HistoricalEventMasterpieceItemItemType_Table
|
|
HistoricalEventMasterpieceItemItemType_Tool
|
|
HistoricalEventMasterpieceItemItemType_Totem
|
|
HistoricalEventMasterpieceItemItemType_Trapcomp
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceItemItemType(s string) HistoricalEventMasterpieceItemItemType {
|
|
switch s {
|
|
case "armor":
|
|
return HistoricalEventMasterpieceItemItemType_Armor
|
|
case "armorstand":
|
|
return HistoricalEventMasterpieceItemItemType_Armorstand
|
|
case "backpack":
|
|
return HistoricalEventMasterpieceItemItemType_Backpack
|
|
case "barrel":
|
|
return HistoricalEventMasterpieceItemItemType_Barrel
|
|
case "bed":
|
|
return HistoricalEventMasterpieceItemItemType_Bed
|
|
case "box":
|
|
return HistoricalEventMasterpieceItemItemType_Box
|
|
case "bucket":
|
|
return HistoricalEventMasterpieceItemItemType_Bucket
|
|
case "cabinet":
|
|
return HistoricalEventMasterpieceItemItemType_Cabinet
|
|
case "chair":
|
|
return HistoricalEventMasterpieceItemItemType_Chair
|
|
case "cloth":
|
|
return HistoricalEventMasterpieceItemItemType_Cloth
|
|
case "coffin":
|
|
return HistoricalEventMasterpieceItemItemType_Coffin
|
|
case "crown":
|
|
return HistoricalEventMasterpieceItemItemType_Crown
|
|
case "door":
|
|
return HistoricalEventMasterpieceItemItemType_Door
|
|
case "figurine":
|
|
return HistoricalEventMasterpieceItemItemType_Figurine
|
|
case "flask":
|
|
return HistoricalEventMasterpieceItemItemType_Flask
|
|
case "floodgate":
|
|
return HistoricalEventMasterpieceItemItemType_Floodgate
|
|
case "gloves":
|
|
return HistoricalEventMasterpieceItemItemType_Gloves
|
|
case "helm":
|
|
return HistoricalEventMasterpieceItemItemType_Helm
|
|
case "pants":
|
|
return HistoricalEventMasterpieceItemItemType_Pants
|
|
case "shield":
|
|
return HistoricalEventMasterpieceItemItemType_Shield
|
|
case "shoes":
|
|
return HistoricalEventMasterpieceItemItemType_Shoes
|
|
case "slab":
|
|
return HistoricalEventMasterpieceItemItemType_Slab
|
|
case "table":
|
|
return HistoricalEventMasterpieceItemItemType_Table
|
|
case "tool":
|
|
return HistoricalEventMasterpieceItemItemType_Tool
|
|
case "totem":
|
|
return HistoricalEventMasterpieceItemItemType_Totem
|
|
case "trapcomp":
|
|
return HistoricalEventMasterpieceItemItemType_Trapcomp
|
|
}
|
|
return HistoricalEventMasterpieceItemItemType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceItemItemType) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceItemItemType_Armor:
|
|
return "armor"
|
|
case HistoricalEventMasterpieceItemItemType_Armorstand:
|
|
return "armorstand"
|
|
case HistoricalEventMasterpieceItemItemType_Backpack:
|
|
return "backpack"
|
|
case HistoricalEventMasterpieceItemItemType_Barrel:
|
|
return "barrel"
|
|
case HistoricalEventMasterpieceItemItemType_Bed:
|
|
return "bed"
|
|
case HistoricalEventMasterpieceItemItemType_Box:
|
|
return "box"
|
|
case HistoricalEventMasterpieceItemItemType_Bucket:
|
|
return "bucket"
|
|
case HistoricalEventMasterpieceItemItemType_Cabinet:
|
|
return "cabinet"
|
|
case HistoricalEventMasterpieceItemItemType_Chair:
|
|
return "chair"
|
|
case HistoricalEventMasterpieceItemItemType_Cloth:
|
|
return "cloth"
|
|
case HistoricalEventMasterpieceItemItemType_Coffin:
|
|
return "coffin"
|
|
case HistoricalEventMasterpieceItemItemType_Crown:
|
|
return "crown"
|
|
case HistoricalEventMasterpieceItemItemType_Door:
|
|
return "door"
|
|
case HistoricalEventMasterpieceItemItemType_Figurine:
|
|
return "figurine"
|
|
case HistoricalEventMasterpieceItemItemType_Flask:
|
|
return "flask"
|
|
case HistoricalEventMasterpieceItemItemType_Floodgate:
|
|
return "floodgate"
|
|
case HistoricalEventMasterpieceItemItemType_Gloves:
|
|
return "gloves"
|
|
case HistoricalEventMasterpieceItemItemType_Helm:
|
|
return "helm"
|
|
case HistoricalEventMasterpieceItemItemType_Pants:
|
|
return "pants"
|
|
case HistoricalEventMasterpieceItemItemType_Shield:
|
|
return "shield"
|
|
case HistoricalEventMasterpieceItemItemType_Shoes:
|
|
return "shoes"
|
|
case HistoricalEventMasterpieceItemItemType_Slab:
|
|
return "slab"
|
|
case HistoricalEventMasterpieceItemItemType_Table:
|
|
return "table"
|
|
case HistoricalEventMasterpieceItemItemType_Tool:
|
|
return "tool"
|
|
case HistoricalEventMasterpieceItemItemType_Totem:
|
|
return "totem"
|
|
case HistoricalEventMasterpieceItemItemType_Trapcomp:
|
|
return "trapcomp"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceItemItemType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceItem struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
ItemId int `json:"itemId" legend:"plus"` // item_id
|
|
ItemSubtype HistoricalEventMasterpieceItemItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType HistoricalEventMasterpieceItemItemType `json:"itemType" legend:"plus"` // item_type
|
|
Maker int `json:"maker" legend:"plus"` // maker
|
|
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
|
|
Mat string `json:"mat" legend:"plus"` // mat
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SkillAtTime string `json:"skillAtTime" legend:"both"` // skill_at_time
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceItem) Type() string { return "masterpiece item" }
|
|
func (x *HistoricalEventMasterpieceItem) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id || x.MakerEntity == id
|
|
}
|
|
func (x *HistoricalEventMasterpieceItem) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventMasterpieceItem) CheckFields() {
|
|
if x.ItemId != x.EntityId && x.ItemId != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["EntityId"] = false
|
|
}
|
|
if x.ItemId != x.Hfid && x.ItemId != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["Hfid"] = false
|
|
}
|
|
if x.ItemId != x.SiteId && x.ItemId != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["SiteId"] = false
|
|
}
|
|
if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Maker"]["EntityId"] = false
|
|
}
|
|
if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Maker"]["Hfid"] = false
|
|
}
|
|
if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Maker"]["SiteId"] = false
|
|
}
|
|
if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["EntityId"] = false
|
|
}
|
|
if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["Hfid"] = false
|
|
}
|
|
if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Site"]["EntityId"] = false
|
|
}
|
|
if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Site"]["Hfid"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMasterpieceItem"]["Site"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventMasterpieceItemImprovement struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SkillAtTime int `json:"skillAtTime" legend:"base"` // skill_at_time
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceItemImprovement) Type() string {
|
|
return "masterpiece item improvement"
|
|
}
|
|
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToEntity(id int) bool {
|
|
return x.EntityId == id
|
|
}
|
|
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventMasterpieceItemImprovement) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventMasterpieceLostMethod int
|
|
|
|
const (
|
|
HistoricalEventMasterpieceLostMethod_Unknown HistoricalEventMasterpieceLostMethod = iota
|
|
HistoricalEventMasterpieceLostMethod_Melt
|
|
)
|
|
|
|
func parseHistoricalEventMasterpieceLostMethod(s string) HistoricalEventMasterpieceLostMethod {
|
|
switch s {
|
|
case "melt":
|
|
return HistoricalEventMasterpieceLostMethod_Melt
|
|
}
|
|
return HistoricalEventMasterpieceLostMethod_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceLostMethod) String() string {
|
|
switch s {
|
|
case HistoricalEventMasterpieceLostMethod_Melt:
|
|
return "melt"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMasterpieceLostMethod) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMasterpieceLost struct {
|
|
CreationEvent int `json:"creationEvent" legend:"plus"` // creation_event
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
Method HistoricalEventMasterpieceLostMethod `json:"method" legend:"plus"` // method
|
|
Site int `json:"site" legend:"plus"` // site
|
|
}
|
|
|
|
func (x *HistoricalEventMasterpieceLost) Type() string { return "masterpiece lost" }
|
|
func (x *HistoricalEventMasterpieceLost) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventMasterpieceLost) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *HistoricalEventMasterpieceLost) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventMerchant struct {
|
|
DepotEntityId int `json:"depotEntityId" legend:"base"` // depot_entity_id
|
|
Destination int `json:"destination" legend:"plus"` // destination
|
|
Hardship bool `json:"hardship" legend:"base"` // hardship
|
|
LostValue bool `json:"lostValue" legend:"base"` // lost_value
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Source int `json:"source" legend:"plus"` // source
|
|
TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id
|
|
}
|
|
|
|
func (x *HistoricalEventMerchant) Type() string { return "merchant" }
|
|
func (x *HistoricalEventMerchant) RelatedToEntity(id int) bool {
|
|
return x.DepotEntityId == id || x.TraderEntityId == id
|
|
}
|
|
func (x *HistoricalEventMerchant) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventMerchant) CheckFields() {
|
|
if x.Destination != x.DepotEntityId && x.Destination != 0 && x.DepotEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Destination"]["DepotEntityId"] = false
|
|
}
|
|
if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Destination"]["SiteId"] = false
|
|
}
|
|
if x.Destination != x.TraderEntityId && x.Destination != 0 && x.TraderEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Destination"]["TraderEntityId"] = false
|
|
}
|
|
if x.Site != x.DepotEntityId && x.Site != 0 && x.DepotEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Site"]["DepotEntityId"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Site"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.TraderEntityId && x.Site != 0 && x.TraderEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Site"]["TraderEntityId"] = false
|
|
}
|
|
if x.Source != x.DepotEntityId && x.Source != 0 && x.DepotEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Source"]["DepotEntityId"] = false
|
|
}
|
|
if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Source"]["SiteId"] = false
|
|
}
|
|
if x.Source != x.TraderEntityId && x.Source != 0 && x.TraderEntityId != 0 {
|
|
sameFields["HistoricalEventMerchant"]["Source"]["TraderEntityId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventModifiedBuildingModification int
|
|
|
|
const (
|
|
HistoricalEventModifiedBuildingModification_Unknown HistoricalEventModifiedBuildingModification = iota
|
|
HistoricalEventModifiedBuildingModification_Dungeon
|
|
HistoricalEventModifiedBuildingModification_FeastHall
|
|
HistoricalEventModifiedBuildingModification_GatedCourtyard
|
|
HistoricalEventModifiedBuildingModification_ImprovedFortifications
|
|
)
|
|
|
|
func parseHistoricalEventModifiedBuildingModification(s string) HistoricalEventModifiedBuildingModification {
|
|
switch s {
|
|
case "dungeon":
|
|
return HistoricalEventModifiedBuildingModification_Dungeon
|
|
case "feast hall":
|
|
return HistoricalEventModifiedBuildingModification_FeastHall
|
|
case "gated courtyard":
|
|
return HistoricalEventModifiedBuildingModification_GatedCourtyard
|
|
case "improved fortifications":
|
|
return HistoricalEventModifiedBuildingModification_ImprovedFortifications
|
|
}
|
|
return HistoricalEventModifiedBuildingModification_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventModifiedBuildingModification) String() string {
|
|
switch s {
|
|
case HistoricalEventModifiedBuildingModification_Dungeon:
|
|
return "dungeon"
|
|
case HistoricalEventModifiedBuildingModification_FeastHall:
|
|
return "feast hall"
|
|
case HistoricalEventModifiedBuildingModification_GatedCourtyard:
|
|
return "gated courtyard"
|
|
case HistoricalEventModifiedBuildingModification_ImprovedFortifications:
|
|
return "improved fortifications"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventModifiedBuildingModification) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventModifiedBuilding struct {
|
|
Modification HistoricalEventModifiedBuildingModification `json:"modification" legend:"base"` // modification
|
|
ModifierHfid int `json:"modifierHfid" legend:"base"` // modifier_hfid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventModifiedBuilding) Type() string { return "modified building" }
|
|
func (x *HistoricalEventModifiedBuilding) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventModifiedBuilding) RelatedToHf(id int) bool { return x.ModifierHfid == id }
|
|
|
|
func (x *HistoricalEventModifiedBuilding) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventMusicalFormCreatedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventMusicalFormCreatedCircumstance_Unknown HistoricalEventMusicalFormCreatedCircumstance = iota
|
|
HistoricalEventMusicalFormCreatedCircumstance_Dream
|
|
HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf
|
|
HistoricalEventMusicalFormCreatedCircumstance_Nightmare
|
|
HistoricalEventMusicalFormCreatedCircumstance_PrayToHf
|
|
)
|
|
|
|
func parseHistoricalEventMusicalFormCreatedCircumstance(s string) HistoricalEventMusicalFormCreatedCircumstance {
|
|
switch s {
|
|
case "dream":
|
|
return HistoricalEventMusicalFormCreatedCircumstance_Dream
|
|
case "dream about hf":
|
|
return HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf
|
|
case "nightmare":
|
|
return HistoricalEventMusicalFormCreatedCircumstance_Nightmare
|
|
case "pray to hf":
|
|
return HistoricalEventMusicalFormCreatedCircumstance_PrayToHf
|
|
}
|
|
return HistoricalEventMusicalFormCreatedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMusicalFormCreatedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventMusicalFormCreatedCircumstance_Dream:
|
|
return "dream"
|
|
case HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf:
|
|
return "dream about hf"
|
|
case HistoricalEventMusicalFormCreatedCircumstance_Nightmare:
|
|
return "nightmare"
|
|
case HistoricalEventMusicalFormCreatedCircumstance_PrayToHf:
|
|
return "pray to hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMusicalFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMusicalFormCreatedReason int
|
|
|
|
const (
|
|
HistoricalEventMusicalFormCreatedReason_Unknown HistoricalEventMusicalFormCreatedReason = iota
|
|
HistoricalEventMusicalFormCreatedReason_GlorifyHf
|
|
)
|
|
|
|
func parseHistoricalEventMusicalFormCreatedReason(s string) HistoricalEventMusicalFormCreatedReason {
|
|
switch s {
|
|
case "glorify hf":
|
|
return HistoricalEventMusicalFormCreatedReason_GlorifyHf
|
|
}
|
|
return HistoricalEventMusicalFormCreatedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventMusicalFormCreatedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventMusicalFormCreatedReason_GlorifyHf:
|
|
return "glorify hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventMusicalFormCreatedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventMusicalFormCreated struct {
|
|
Circumstance HistoricalEventMusicalFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
FormId int `json:"formId" legend:"base"` // form_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
Reason HistoricalEventMusicalFormCreatedReason `json:"reason" legend:"base"` // reason
|
|
ReasonId int `json:"reasonId" legend:"base"` // reason_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventMusicalFormCreated) Type() string { return "musical form created" }
|
|
func (x *HistoricalEventMusicalFormCreated) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventMusicalFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventMusicalFormCreated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventNewSiteLeader struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` // new_leader_hfid
|
|
NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventNewSiteLeader) Type() string { return "new site leader" }
|
|
func (x *HistoricalEventNewSiteLeader) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventNewSiteLeader) RelatedToHf(id int) bool { return x.NewLeaderHfid == id }
|
|
|
|
func (x *HistoricalEventNewSiteLeader) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventPeaceAcceptedTopic int
|
|
|
|
const (
|
|
HistoricalEventPeaceAcceptedTopic_Unknown HistoricalEventPeaceAcceptedTopic = iota
|
|
HistoricalEventPeaceAcceptedTopic_Requestpeace
|
|
)
|
|
|
|
func parseHistoricalEventPeaceAcceptedTopic(s string) HistoricalEventPeaceAcceptedTopic {
|
|
switch s {
|
|
case "requestpeace":
|
|
return HistoricalEventPeaceAcceptedTopic_Requestpeace
|
|
}
|
|
return HistoricalEventPeaceAcceptedTopic_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventPeaceAcceptedTopic) String() string {
|
|
switch s {
|
|
case HistoricalEventPeaceAcceptedTopic_Requestpeace:
|
|
return "requestpeace"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventPeaceAcceptedTopic) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventPeaceAccepted struct {
|
|
Destination int `json:"destination" legend:"plus"` // destination
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Source int `json:"source" legend:"plus"` // source
|
|
Topic HistoricalEventPeaceAcceptedTopic `json:"topic" legend:"plus"` // topic
|
|
}
|
|
|
|
func (x *HistoricalEventPeaceAccepted) Type() string { return "peace accepted" }
|
|
func (x *HistoricalEventPeaceAccepted) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventPeaceAccepted) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventPeaceAccepted) CheckFields() {
|
|
if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventPeaceAccepted"]["Destination"]["SiteId"] = false
|
|
}
|
|
if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventPeaceAccepted"]["Source"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventPeaceRejectedTopic int
|
|
|
|
const (
|
|
HistoricalEventPeaceRejectedTopic_Unknown HistoricalEventPeaceRejectedTopic = iota
|
|
HistoricalEventPeaceRejectedTopic_Requestpeace
|
|
)
|
|
|
|
func parseHistoricalEventPeaceRejectedTopic(s string) HistoricalEventPeaceRejectedTopic {
|
|
switch s {
|
|
case "requestpeace":
|
|
return HistoricalEventPeaceRejectedTopic_Requestpeace
|
|
}
|
|
return HistoricalEventPeaceRejectedTopic_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventPeaceRejectedTopic) String() string {
|
|
switch s {
|
|
case HistoricalEventPeaceRejectedTopic_Requestpeace:
|
|
return "requestpeace"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventPeaceRejectedTopic) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventPeaceRejected struct {
|
|
Destination int `json:"destination" legend:"plus"` // destination
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Source int `json:"source" legend:"plus"` // source
|
|
Topic HistoricalEventPeaceRejectedTopic `json:"topic" legend:"plus"` // topic
|
|
}
|
|
|
|
func (x *HistoricalEventPeaceRejected) Type() string { return "peace rejected" }
|
|
func (x *HistoricalEventPeaceRejected) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventPeaceRejected) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventPeaceRejected) CheckFields() {
|
|
if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventPeaceRejected"]["Destination"]["SiteId"] = false
|
|
}
|
|
if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventPeaceRejected"]["Source"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventPerformance struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
|
|
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventPerformance) Type() string { return "performance" }
|
|
func (x *HistoricalEventPerformance) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventPerformance) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventPerformance) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventPlunderedSite struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
Detected bool `json:"detected" legend:"base"` // detected
|
|
NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
TookItems bool `json:"tookItems" legend:"base"` // took_items
|
|
TookLivestock bool `json:"tookLivestock" legend:"base"` // took_livestock
|
|
WasRaid bool `json:"wasRaid" legend:"base"` // was_raid
|
|
}
|
|
|
|
func (x *HistoricalEventPlunderedSite) Type() string { return "plundered site" }
|
|
func (x *HistoricalEventPlunderedSite) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventPlunderedSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventPlunderedSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventPoeticFormCreatedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventPoeticFormCreatedCircumstance_Unknown HistoricalEventPoeticFormCreatedCircumstance = iota
|
|
HistoricalEventPoeticFormCreatedCircumstance_Dream
|
|
HistoricalEventPoeticFormCreatedCircumstance_Nightmare
|
|
)
|
|
|
|
func parseHistoricalEventPoeticFormCreatedCircumstance(s string) HistoricalEventPoeticFormCreatedCircumstance {
|
|
switch s {
|
|
case "dream":
|
|
return HistoricalEventPoeticFormCreatedCircumstance_Dream
|
|
case "nightmare":
|
|
return HistoricalEventPoeticFormCreatedCircumstance_Nightmare
|
|
}
|
|
return HistoricalEventPoeticFormCreatedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventPoeticFormCreatedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventPoeticFormCreatedCircumstance_Dream:
|
|
return "dream"
|
|
case HistoricalEventPoeticFormCreatedCircumstance_Nightmare:
|
|
return "nightmare"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventPoeticFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventPoeticFormCreated struct {
|
|
Circumstance HistoricalEventPoeticFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
FormId int `json:"formId" legend:"base"` // form_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventPoeticFormCreated) Type() string { return "poetic form created" }
|
|
func (x *HistoricalEventPoeticFormCreated) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventPoeticFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventPoeticFormCreated) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventProcession struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
|
|
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventProcession) Type() string { return "procession" }
|
|
func (x *HistoricalEventProcession) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventProcession) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventProcession) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRazedStructure struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
}
|
|
|
|
func (x *HistoricalEventRazedStructure) Type() string { return "razed structure" }
|
|
func (x *HistoricalEventRazedStructure) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventRazedStructure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventRazedStructure) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventReclaimSite struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Unretire bool `json:"unretire" legend:"base"` // unretire
|
|
}
|
|
|
|
func (x *HistoricalEventReclaimSite) Type() string { return "reclaim site" }
|
|
func (x *HistoricalEventReclaimSite) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventReclaimSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventReclaimSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRegionpopIncorporatedIntoEntity struct {
|
|
JoinEntityId int `json:"joinEntityId" legend:"base"` // join_entity_id
|
|
PopFlid int `json:"popFlid" legend:"base"` // pop_flid
|
|
PopNumberMoved int `json:"popNumberMoved" legend:"base"` // pop_number_moved
|
|
PopRace int `json:"popRace" legend:"base"` // pop_race
|
|
PopSrid int `json:"popSrid" legend:"base"` // pop_srid
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) Type() string {
|
|
return "regionpop incorporated into entity"
|
|
}
|
|
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToEntity(id int) bool {
|
|
return x.JoinEntityId == id
|
|
}
|
|
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRelationshipRelationship int
|
|
|
|
const (
|
|
HistoricalEventRelationshipRelationship_Unknown HistoricalEventRelationshipRelationship = iota
|
|
HistoricalEventRelationshipRelationship_ArtisticBuddy
|
|
HistoricalEventRelationshipRelationship_AtheleticRival
|
|
HistoricalEventRelationshipRelationship_AthleteBuddy
|
|
HistoricalEventRelationshipRelationship_BusinessRival
|
|
HistoricalEventRelationshipRelationship_ChildhoodFriend
|
|
HistoricalEventRelationshipRelationship_FormerLover
|
|
HistoricalEventRelationshipRelationship_Grudge
|
|
HistoricalEventRelationshipRelationship_JealousObsession
|
|
HistoricalEventRelationshipRelationship_JealousRelationshipGrudge
|
|
HistoricalEventRelationshipRelationship_Lieutenant
|
|
HistoricalEventRelationshipRelationship_Lover
|
|
HistoricalEventRelationshipRelationship_PersecutionGrudge
|
|
HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge
|
|
HistoricalEventRelationshipRelationship_ScholarBuddy
|
|
HistoricalEventRelationshipRelationship_SupernaturalGrudge
|
|
HistoricalEventRelationshipRelationship_WarBuddy
|
|
)
|
|
|
|
func parseHistoricalEventRelationshipRelationship(s string) HistoricalEventRelationshipRelationship {
|
|
switch s {
|
|
case "artistic_buddy":
|
|
return HistoricalEventRelationshipRelationship_ArtisticBuddy
|
|
case "atheletic_rival":
|
|
return HistoricalEventRelationshipRelationship_AtheleticRival
|
|
case "athlete_buddy":
|
|
return HistoricalEventRelationshipRelationship_AthleteBuddy
|
|
case "business_rival":
|
|
return HistoricalEventRelationshipRelationship_BusinessRival
|
|
case "childhood_friend":
|
|
return HistoricalEventRelationshipRelationship_ChildhoodFriend
|
|
case "former_lover":
|
|
return HistoricalEventRelationshipRelationship_FormerLover
|
|
case "grudge":
|
|
return HistoricalEventRelationshipRelationship_Grudge
|
|
case "jealous_obsession":
|
|
return HistoricalEventRelationshipRelationship_JealousObsession
|
|
case "jealous_relationship_grudge":
|
|
return HistoricalEventRelationshipRelationship_JealousRelationshipGrudge
|
|
case "lieutenant":
|
|
return HistoricalEventRelationshipRelationship_Lieutenant
|
|
case "lover":
|
|
return HistoricalEventRelationshipRelationship_Lover
|
|
case "persecution_grudge":
|
|
return HistoricalEventRelationshipRelationship_PersecutionGrudge
|
|
case "religious_persecution_grudge":
|
|
return HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge
|
|
case "scholar_buddy":
|
|
return HistoricalEventRelationshipRelationship_ScholarBuddy
|
|
case "supernatural_grudge":
|
|
return HistoricalEventRelationshipRelationship_SupernaturalGrudge
|
|
case "war_buddy":
|
|
return HistoricalEventRelationshipRelationship_WarBuddy
|
|
}
|
|
return HistoricalEventRelationshipRelationship_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventRelationshipRelationship) String() string {
|
|
switch s {
|
|
case HistoricalEventRelationshipRelationship_ArtisticBuddy:
|
|
return "artistic buddy"
|
|
case HistoricalEventRelationshipRelationship_AtheleticRival:
|
|
return "atheletic rival"
|
|
case HistoricalEventRelationshipRelationship_AthleteBuddy:
|
|
return "athlete buddy"
|
|
case HistoricalEventRelationshipRelationship_BusinessRival:
|
|
return "business rival"
|
|
case HistoricalEventRelationshipRelationship_ChildhoodFriend:
|
|
return "childhood friend"
|
|
case HistoricalEventRelationshipRelationship_FormerLover:
|
|
return "former lover"
|
|
case HistoricalEventRelationshipRelationship_Grudge:
|
|
return "grudge"
|
|
case HistoricalEventRelationshipRelationship_JealousObsession:
|
|
return "jealous obsession"
|
|
case HistoricalEventRelationshipRelationship_JealousRelationshipGrudge:
|
|
return "jealous relationship grudge"
|
|
case HistoricalEventRelationshipRelationship_Lieutenant:
|
|
return "lieutenant"
|
|
case HistoricalEventRelationshipRelationship_Lover:
|
|
return "lover"
|
|
case HistoricalEventRelationshipRelationship_PersecutionGrudge:
|
|
return "persecution grudge"
|
|
case HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge:
|
|
return "religious persecution grudge"
|
|
case HistoricalEventRelationshipRelationship_ScholarBuddy:
|
|
return "scholar buddy"
|
|
case HistoricalEventRelationshipRelationship_SupernaturalGrudge:
|
|
return "supernatural grudge"
|
|
case HistoricalEventRelationshipRelationship_WarBuddy:
|
|
return "war buddy"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventRelationshipRelationship) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventRelationship struct {
|
|
Event int `json:"event" legend:"plus"` // event
|
|
Relationship HistoricalEventRelationshipRelationship `json:"relationship" legend:"plus"` // relationship
|
|
SourceHf int `json:"sourceHf" legend:"plus"` // source_hf
|
|
TargetHf int `json:"targetHf" legend:"plus"` // target_hf
|
|
Year int `json:"year" legend:"plus"` // year
|
|
}
|
|
|
|
func (x *HistoricalEventRelationship) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventRelationship) RelatedToHf(id int) bool {
|
|
return x.SourceHf == id || x.TargetHf == id
|
|
}
|
|
|
|
func (x *HistoricalEventRelationship) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRelationshipSupplement struct {
|
|
Event int `json:"event" legend:"plus"` // event
|
|
OccasionType int `json:"occasionType" legend:"plus"` // occasion_type
|
|
Site int `json:"site" legend:"plus"` // site
|
|
Unk1 int `json:"unk1" legend:"plus"` // unk_1
|
|
}
|
|
|
|
func (x *HistoricalEventRelationshipSupplement) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventRelationshipSupplement) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventRelationshipSupplement) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRemoveHfEntityLinkLink int
|
|
|
|
const (
|
|
HistoricalEventRemoveHfEntityLinkLink_Unknown HistoricalEventRemoveHfEntityLinkLink = iota
|
|
HistoricalEventRemoveHfEntityLinkLink_Member
|
|
HistoricalEventRemoveHfEntityLinkLink_Position
|
|
HistoricalEventRemoveHfEntityLinkLink_Prisoner
|
|
HistoricalEventRemoveHfEntityLinkLink_Slave
|
|
)
|
|
|
|
func parseHistoricalEventRemoveHfEntityLinkLink(s string) HistoricalEventRemoveHfEntityLinkLink {
|
|
switch s {
|
|
case "member":
|
|
return HistoricalEventRemoveHfEntityLinkLink_Member
|
|
case "position":
|
|
return HistoricalEventRemoveHfEntityLinkLink_Position
|
|
case "prisoner":
|
|
return HistoricalEventRemoveHfEntityLinkLink_Prisoner
|
|
case "slave":
|
|
return HistoricalEventRemoveHfEntityLinkLink_Slave
|
|
}
|
|
return HistoricalEventRemoveHfEntityLinkLink_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfEntityLinkLink) String() string {
|
|
switch s {
|
|
case HistoricalEventRemoveHfEntityLinkLink_Member:
|
|
return "member"
|
|
case HistoricalEventRemoveHfEntityLinkLink_Position:
|
|
return "position"
|
|
case HistoricalEventRemoveHfEntityLinkLink_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalEventRemoveHfEntityLinkLink_Slave:
|
|
return "slave"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfEntityLinkLink) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventRemoveHfEntityLinkLinkType int
|
|
|
|
const (
|
|
HistoricalEventRemoveHfEntityLinkLinkType_Unknown HistoricalEventRemoveHfEntityLinkLinkType = iota
|
|
HistoricalEventRemoveHfEntityLinkLinkType_Member
|
|
HistoricalEventRemoveHfEntityLinkLinkType_Position
|
|
HistoricalEventRemoveHfEntityLinkLinkType_Prisoner
|
|
HistoricalEventRemoveHfEntityLinkLinkType_Slave
|
|
)
|
|
|
|
func parseHistoricalEventRemoveHfEntityLinkLinkType(s string) HistoricalEventRemoveHfEntityLinkLinkType {
|
|
switch s {
|
|
case "member":
|
|
return HistoricalEventRemoveHfEntityLinkLinkType_Member
|
|
case "position":
|
|
return HistoricalEventRemoveHfEntityLinkLinkType_Position
|
|
case "prisoner":
|
|
return HistoricalEventRemoveHfEntityLinkLinkType_Prisoner
|
|
case "slave":
|
|
return HistoricalEventRemoveHfEntityLinkLinkType_Slave
|
|
}
|
|
return HistoricalEventRemoveHfEntityLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfEntityLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalEventRemoveHfEntityLinkLinkType_Member:
|
|
return "member"
|
|
case HistoricalEventRemoveHfEntityLinkLinkType_Position:
|
|
return "position"
|
|
case HistoricalEventRemoveHfEntityLinkLinkType_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalEventRemoveHfEntityLinkLinkType_Slave:
|
|
return "slave"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfEntityLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventRemoveHfEntityLink struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
Link HistoricalEventRemoveHfEntityLinkLink `json:"link" legend:"base"` // link
|
|
Position string `json:"position" legend:"plus"` // position
|
|
PositionId int `json:"positionId" legend:"base"` // position_id
|
|
}
|
|
|
|
func (x *HistoricalEventRemoveHfEntityLink) Type() string { return "remove hf entity link" }
|
|
func (x *HistoricalEventRemoveHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *HistoricalEventRemoveHfEntityLink) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *HistoricalEventRemoveHfEntityLink) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRemoveHfHfLink struct {
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target
|
|
}
|
|
|
|
func (x *HistoricalEventRemoveHfHfLink) Type() string { return "remove hf hf link" }
|
|
func (x *HistoricalEventRemoveHfHfLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventRemoveHfHfLink) RelatedToHf(id int) bool {
|
|
return x.Hfid == id || x.HfidTarget == id
|
|
}
|
|
|
|
func (x *HistoricalEventRemoveHfHfLink) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventRemoveHfSiteLinkLinkType int
|
|
|
|
const (
|
|
HistoricalEventRemoveHfSiteLinkLinkType_Unknown HistoricalEventRemoveHfSiteLinkLinkType = iota
|
|
HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding
|
|
HistoricalEventRemoveHfSiteLinkLinkType_Occupation
|
|
HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower
|
|
)
|
|
|
|
func parseHistoricalEventRemoveHfSiteLinkLinkType(s string) HistoricalEventRemoveHfSiteLinkLinkType {
|
|
switch s {
|
|
case "home_site_abstract_building":
|
|
return HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding
|
|
case "occupation":
|
|
return HistoricalEventRemoveHfSiteLinkLinkType_Occupation
|
|
case "seat_of_power":
|
|
return HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower
|
|
}
|
|
return HistoricalEventRemoveHfSiteLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfSiteLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding:
|
|
return "home site abstract building"
|
|
case HistoricalEventRemoveHfSiteLinkLinkType_Occupation:
|
|
return "occupation"
|
|
case HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower:
|
|
return "seat of power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventRemoveHfSiteLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventRemoveHfSiteLink struct {
|
|
Civ int `json:"civ" legend:"plus"` // civ
|
|
Histfig int `json:"histfig" legend:"plus"` // histfig
|
|
LinkType HistoricalEventRemoveHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Structure int `json:"structure" legend:"plus"` // structure
|
|
}
|
|
|
|
func (x *HistoricalEventRemoveHfSiteLink) Type() string { return "remove hf site link" }
|
|
func (x *HistoricalEventRemoveHfSiteLink) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventRemoveHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id }
|
|
|
|
func (x *HistoricalEventRemoveHfSiteLink) CheckFields() {
|
|
if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventRemoveHfSiteLink"]["Civ"]["SiteId"] = false
|
|
}
|
|
if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventRemoveHfSiteLink"]["Histfig"]["SiteId"] = false
|
|
}
|
|
if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventRemoveHfSiteLink"]["Structure"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventReplacedStructure struct {
|
|
Civ int `json:"civ" legend:"plus"` // civ
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
NewAbId int `json:"newAbId" legend:"base"` // new_ab_id
|
|
NewStructure int `json:"newStructure" legend:"plus"` // new_structure
|
|
OldAbId int `json:"oldAbId" legend:"base"` // old_ab_id
|
|
OldStructure int `json:"oldStructure" legend:"plus"` // old_structure
|
|
Site int `json:"site" legend:"plus"` // site
|
|
SiteCiv int `json:"siteCiv" legend:"plus"` // site_civ
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventReplacedStructure) Type() string { return "replaced structure" }
|
|
func (x *HistoricalEventReplacedStructure) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventReplacedStructure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventReplacedStructure) CheckFields() {
|
|
if x.Civ != x.CivId && x.Civ != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Civ"]["CivId"] = false
|
|
}
|
|
if x.Civ != x.NewAbId && x.Civ != 0 && x.NewAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Civ"]["NewAbId"] = false
|
|
}
|
|
if x.Civ != x.OldAbId && x.Civ != 0 && x.OldAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Civ"]["OldAbId"] = false
|
|
}
|
|
if x.Civ != x.SiteCivId && x.Civ != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Civ"]["SiteCivId"] = false
|
|
}
|
|
if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Civ"]["SiteId"] = false
|
|
}
|
|
if x.NewStructure != x.CivId && x.NewStructure != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["CivId"] = false
|
|
}
|
|
if x.NewStructure != x.NewAbId && x.NewStructure != 0 && x.NewAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["NewAbId"] = false
|
|
}
|
|
if x.NewStructure != x.OldAbId && x.NewStructure != 0 && x.OldAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["OldAbId"] = false
|
|
}
|
|
if x.NewStructure != x.SiteCivId && x.NewStructure != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["SiteCivId"] = false
|
|
}
|
|
if x.NewStructure != x.SiteId && x.NewStructure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["SiteId"] = false
|
|
}
|
|
if x.OldStructure != x.CivId && x.OldStructure != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["CivId"] = false
|
|
}
|
|
if x.OldStructure != x.NewAbId && x.OldStructure != 0 && x.NewAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["NewAbId"] = false
|
|
}
|
|
if x.OldStructure != x.OldAbId && x.OldStructure != 0 && x.OldAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["OldAbId"] = false
|
|
}
|
|
if x.OldStructure != x.SiteCivId && x.OldStructure != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["SiteCivId"] = false
|
|
}
|
|
if x.OldStructure != x.SiteId && x.OldStructure != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["SiteId"] = false
|
|
}
|
|
if x.Site != x.CivId && x.Site != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Site"]["CivId"] = false
|
|
}
|
|
if x.Site != x.NewAbId && x.Site != 0 && x.NewAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Site"]["NewAbId"] = false
|
|
}
|
|
if x.Site != x.OldAbId && x.Site != 0 && x.OldAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Site"]["OldAbId"] = false
|
|
}
|
|
if x.Site != x.SiteCivId && x.Site != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Site"]["SiteCivId"] = false
|
|
}
|
|
if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["Site"]["SiteId"] = false
|
|
}
|
|
if x.SiteCiv != x.CivId && x.SiteCiv != 0 && x.CivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["CivId"] = false
|
|
}
|
|
if x.SiteCiv != x.NewAbId && x.SiteCiv != 0 && x.NewAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["NewAbId"] = false
|
|
}
|
|
if x.SiteCiv != x.OldAbId && x.SiteCiv != 0 && x.OldAbId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["OldAbId"] = false
|
|
}
|
|
if x.SiteCiv != x.SiteCivId && x.SiteCiv != 0 && x.SiteCivId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["SiteCivId"] = false
|
|
}
|
|
if x.SiteCiv != x.SiteId && x.SiteCiv != 0 && x.SiteId != 0 {
|
|
sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["SiteId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalEventSiteDied struct {
|
|
Abandoned bool `json:"abandoned" legend:"base"` // abandoned
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSiteDied) Type() string { return "site died" }
|
|
func (x *HistoricalEventSiteDied) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSiteDied) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteDied) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSiteDisputeDispute int
|
|
|
|
const (
|
|
HistoricalEventSiteDisputeDispute_Unknown HistoricalEventSiteDisputeDispute = iota
|
|
HistoricalEventSiteDisputeDispute_FishingRights
|
|
HistoricalEventSiteDisputeDispute_GrazingRights
|
|
HistoricalEventSiteDisputeDispute_LivestockOwnership
|
|
HistoricalEventSiteDisputeDispute_RightsOfWay
|
|
HistoricalEventSiteDisputeDispute_Territory
|
|
HistoricalEventSiteDisputeDispute_WaterRights
|
|
)
|
|
|
|
func parseHistoricalEventSiteDisputeDispute(s string) HistoricalEventSiteDisputeDispute {
|
|
switch s {
|
|
case "fishing rights":
|
|
return HistoricalEventSiteDisputeDispute_FishingRights
|
|
case "grazing rights":
|
|
return HistoricalEventSiteDisputeDispute_GrazingRights
|
|
case "livestock ownership":
|
|
return HistoricalEventSiteDisputeDispute_LivestockOwnership
|
|
case "rights-of-way":
|
|
return HistoricalEventSiteDisputeDispute_RightsOfWay
|
|
case "territory":
|
|
return HistoricalEventSiteDisputeDispute_Territory
|
|
case "water rights":
|
|
return HistoricalEventSiteDisputeDispute_WaterRights
|
|
}
|
|
return HistoricalEventSiteDisputeDispute_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventSiteDisputeDispute) String() string {
|
|
switch s {
|
|
case HistoricalEventSiteDisputeDispute_FishingRights:
|
|
return "fishing rights"
|
|
case HistoricalEventSiteDisputeDispute_GrazingRights:
|
|
return "grazing rights"
|
|
case HistoricalEventSiteDisputeDispute_LivestockOwnership:
|
|
return "livestock ownership"
|
|
case HistoricalEventSiteDisputeDispute_RightsOfWay:
|
|
return "rights of way"
|
|
case HistoricalEventSiteDisputeDispute_Territory:
|
|
return "territory"
|
|
case HistoricalEventSiteDisputeDispute_WaterRights:
|
|
return "water rights"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventSiteDisputeDispute) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventSiteDispute struct {
|
|
Dispute HistoricalEventSiteDisputeDispute `json:"dispute" legend:"base"` // dispute
|
|
EntityId1 int `json:"entityId1" legend:"base"` // entity_id_1
|
|
EntityId2 int `json:"entityId2" legend:"base"` // entity_id_2
|
|
SiteId1 int `json:"siteId1" legend:"base"` // site_id_1
|
|
SiteId2 int `json:"siteId2" legend:"base"` // site_id_2
|
|
}
|
|
|
|
func (x *HistoricalEventSiteDispute) Type() string { return "site dispute" }
|
|
func (x *HistoricalEventSiteDispute) RelatedToEntity(id int) bool {
|
|
return x.EntityId1 == id || x.EntityId2 == id
|
|
}
|
|
func (x *HistoricalEventSiteDispute) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteDispute) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSiteRetired struct {
|
|
CivId int `json:"civId" legend:"base"` // civ_id
|
|
First bool `json:"first" legend:"base"` // first
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSiteRetired) Type() string { return "site retired" }
|
|
func (x *HistoricalEventSiteRetired) RelatedToEntity(id int) bool {
|
|
return x.CivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSiteRetired) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteRetired) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSiteSurrendered struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSiteSurrendered) Type() string { return "site surrendered" }
|
|
func (x *HistoricalEventSiteSurrendered) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSiteSurrendered) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteSurrendered) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSiteTakenOver struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSiteTakenOver) Type() string { return "site taken over" }
|
|
func (x *HistoricalEventSiteTakenOver) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSiteTakenOver) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteTakenOver) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSiteTributeForcedSeason int
|
|
|
|
const (
|
|
HistoricalEventSiteTributeForcedSeason_Unknown HistoricalEventSiteTributeForcedSeason = iota
|
|
HistoricalEventSiteTributeForcedSeason_Autumn
|
|
HistoricalEventSiteTributeForcedSeason_Summer
|
|
)
|
|
|
|
func parseHistoricalEventSiteTributeForcedSeason(s string) HistoricalEventSiteTributeForcedSeason {
|
|
switch s {
|
|
case "Autumn":
|
|
return HistoricalEventSiteTributeForcedSeason_Autumn
|
|
case "Summer":
|
|
return HistoricalEventSiteTributeForcedSeason_Summer
|
|
}
|
|
return HistoricalEventSiteTributeForcedSeason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventSiteTributeForcedSeason) String() string {
|
|
switch s {
|
|
case HistoricalEventSiteTributeForcedSeason_Autumn:
|
|
return "autumn"
|
|
case HistoricalEventSiteTributeForcedSeason_Summer:
|
|
return "summer"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventSiteTributeForcedSeason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventSiteTributeForced struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
Season HistoricalEventSiteTributeForcedSeason `json:"season" legend:"base"` // season
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSiteTributeForced) Type() string { return "site tribute forced" }
|
|
func (x *HistoricalEventSiteTributeForced) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSiteTributeForced) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSiteTributeForced) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSneakIntoSite struct {
|
|
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
|
|
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalEventSneakIntoSite) Type() string { return "sneak into site" }
|
|
func (x *HistoricalEventSneakIntoSite) RelatedToEntity(id int) bool {
|
|
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSneakIntoSite) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalEventSneakIntoSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSpottedLeavingSite struct {
|
|
LeaverCivId int `json:"leaverCivId" legend:"base"` // leaver_civ_id
|
|
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SpotterHfid int `json:"spotterHfid" legend:"base"` // spotter_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventSpottedLeavingSite) Type() string { return "spotted leaving site" }
|
|
func (x *HistoricalEventSpottedLeavingSite) RelatedToEntity(id int) bool {
|
|
return x.LeaverCivId == id || x.SiteCivId == id
|
|
}
|
|
func (x *HistoricalEventSpottedLeavingSite) RelatedToHf(id int) bool { return x.SpotterHfid == id }
|
|
|
|
func (x *HistoricalEventSpottedLeavingSite) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventSquadVsSquad struct {
|
|
AHfid []int `json:"aHfid" legend:"base"` // a_hfid
|
|
ALeaderHfid int `json:"aLeaderHfid" legend:"base"` // a_leader_hfid
|
|
ALeadershipRoll int `json:"aLeadershipRoll" legend:"base"` // a_leadership_roll
|
|
ASquadId int `json:"aSquadId" legend:"base"` // a_squad_id
|
|
DEffect int `json:"dEffect" legend:"base"` // d_effect
|
|
DHfid []int `json:"dHfid" legend:"base"` // d_hfid
|
|
DInteraction int `json:"dInteraction" legend:"base"` // d_interaction
|
|
DLeaderHfid int `json:"dLeaderHfid" legend:"base"` // d_leader_hfid
|
|
DLeadershipRoll int `json:"dLeadershipRoll" legend:"base"` // d_leadership_roll
|
|
DNumber int `json:"dNumber" legend:"base"` // d_number
|
|
DRace int `json:"dRace" legend:"base"` // d_race
|
|
DSlain int `json:"dSlain" legend:"base"` // d_slain
|
|
DSquadId int `json:"dSquadId" legend:"base"` // d_squad_id
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventSquadVsSquad) Type() string { return "squad vs squad" }
|
|
func (x *HistoricalEventSquadVsSquad) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventSquadVsSquad) RelatedToHf(id int) bool {
|
|
return containsInt(x.AHfid, id) || containsInt(x.DHfid, id) || x.ALeaderHfid == id || x.DLeaderHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventSquadVsSquad) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventTacticalSituationSituation int
|
|
|
|
const (
|
|
HistoricalEventTacticalSituationSituation_Unknown HistoricalEventTacticalSituationSituation = iota
|
|
HistoricalEventTacticalSituationSituation_AFavored
|
|
HistoricalEventTacticalSituationSituation_ASlightlyFavored
|
|
HistoricalEventTacticalSituationSituation_AStronglyFavored
|
|
HistoricalEventTacticalSituationSituation_DSlightlyFavored
|
|
HistoricalEventTacticalSituationSituation_DStronglyFavored
|
|
HistoricalEventTacticalSituationSituation_NeitherFavored
|
|
)
|
|
|
|
func parseHistoricalEventTacticalSituationSituation(s string) HistoricalEventTacticalSituationSituation {
|
|
switch s {
|
|
case "a favored":
|
|
return HistoricalEventTacticalSituationSituation_AFavored
|
|
case "a slightly favored":
|
|
return HistoricalEventTacticalSituationSituation_ASlightlyFavored
|
|
case "a strongly favored":
|
|
return HistoricalEventTacticalSituationSituation_AStronglyFavored
|
|
case "d slightly favored":
|
|
return HistoricalEventTacticalSituationSituation_DSlightlyFavored
|
|
case "d strongly favored":
|
|
return HistoricalEventTacticalSituationSituation_DStronglyFavored
|
|
case "neither favored":
|
|
return HistoricalEventTacticalSituationSituation_NeitherFavored
|
|
}
|
|
return HistoricalEventTacticalSituationSituation_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventTacticalSituationSituation) String() string {
|
|
switch s {
|
|
case HistoricalEventTacticalSituationSituation_AFavored:
|
|
return "a favored"
|
|
case HistoricalEventTacticalSituationSituation_ASlightlyFavored:
|
|
return "a slightly favored"
|
|
case HistoricalEventTacticalSituationSituation_AStronglyFavored:
|
|
return "a strongly favored"
|
|
case HistoricalEventTacticalSituationSituation_DSlightlyFavored:
|
|
return "d slightly favored"
|
|
case HistoricalEventTacticalSituationSituation_DStronglyFavored:
|
|
return "d strongly favored"
|
|
case HistoricalEventTacticalSituationSituation_NeitherFavored:
|
|
return "neither favored"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventTacticalSituationSituation) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventTacticalSituation struct {
|
|
ATacticianHfid int `json:"aTacticianHfid" legend:"base"` // a_tactician_hfid
|
|
ATacticsRoll int `json:"aTacticsRoll" legend:"base"` // a_tactics_roll
|
|
DTacticianHfid int `json:"dTacticianHfid" legend:"base"` // d_tactician_hfid
|
|
DTacticsRoll int `json:"dTacticsRoll" legend:"base"` // d_tactics_roll
|
|
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
Situation HistoricalEventTacticalSituationSituation `json:"situation" legend:"base"` // situation
|
|
Start bool `json:"start" legend:"base"` // start
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
}
|
|
|
|
func (x *HistoricalEventTacticalSituation) Type() string { return "tactical situation" }
|
|
func (x *HistoricalEventTacticalSituation) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventTacticalSituation) RelatedToHf(id int) bool {
|
|
return x.ATacticianHfid == id || x.DTacticianHfid == id
|
|
}
|
|
|
|
func (x *HistoricalEventTacticalSituation) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventTrade struct {
|
|
AccountShift int `json:"accountShift" legend:"base"` // account_shift
|
|
Allotment int `json:"allotment" legend:"base"` // allotment
|
|
AllotmentIndex int `json:"allotmentIndex" legend:"base"` // allotment_index
|
|
DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id
|
|
ProductionZoneId int `json:"productionZoneId" legend:"base"` // production_zone_id
|
|
SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id
|
|
TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id
|
|
TraderHfid int `json:"traderHfid" legend:"base"` // trader_hfid
|
|
}
|
|
|
|
func (x *HistoricalEventTrade) Type() string { return "trade" }
|
|
func (x *HistoricalEventTrade) RelatedToEntity(id int) bool { return x.TraderEntityId == id }
|
|
func (x *HistoricalEventTrade) RelatedToHf(id int) bool { return x.TraderHfid == id }
|
|
|
|
func (x *HistoricalEventTrade) CheckFields() {
|
|
}
|
|
|
|
type HistoricalEventWrittenContentComposedCircumstance int
|
|
|
|
const (
|
|
HistoricalEventWrittenContentComposedCircumstance_Unknown HistoricalEventWrittenContentComposedCircumstance = iota
|
|
HistoricalEventWrittenContentComposedCircumstance_Dream
|
|
HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf
|
|
HistoricalEventWrittenContentComposedCircumstance_Nightmare
|
|
HistoricalEventWrittenContentComposedCircumstance_PrayToHf
|
|
)
|
|
|
|
func parseHistoricalEventWrittenContentComposedCircumstance(s string) HistoricalEventWrittenContentComposedCircumstance {
|
|
switch s {
|
|
case "dream":
|
|
return HistoricalEventWrittenContentComposedCircumstance_Dream
|
|
case "dream about hf":
|
|
return HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf
|
|
case "nightmare":
|
|
return HistoricalEventWrittenContentComposedCircumstance_Nightmare
|
|
case "pray to hf":
|
|
return HistoricalEventWrittenContentComposedCircumstance_PrayToHf
|
|
}
|
|
return HistoricalEventWrittenContentComposedCircumstance_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventWrittenContentComposedCircumstance) String() string {
|
|
switch s {
|
|
case HistoricalEventWrittenContentComposedCircumstance_Dream:
|
|
return "dream"
|
|
case HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf:
|
|
return "dream about hf"
|
|
case HistoricalEventWrittenContentComposedCircumstance_Nightmare:
|
|
return "nightmare"
|
|
case HistoricalEventWrittenContentComposedCircumstance_PrayToHf:
|
|
return "pray to hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventWrittenContentComposedCircumstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventWrittenContentComposedReason int
|
|
|
|
const (
|
|
HistoricalEventWrittenContentComposedReason_Unknown HistoricalEventWrittenContentComposedReason = iota
|
|
HistoricalEventWrittenContentComposedReason_GlorifyHf
|
|
)
|
|
|
|
func parseHistoricalEventWrittenContentComposedReason(s string) HistoricalEventWrittenContentComposedReason {
|
|
switch s {
|
|
case "glorify hf":
|
|
return HistoricalEventWrittenContentComposedReason_GlorifyHf
|
|
}
|
|
return HistoricalEventWrittenContentComposedReason_Unknown
|
|
}
|
|
|
|
func (s HistoricalEventWrittenContentComposedReason) String() string {
|
|
switch s {
|
|
case HistoricalEventWrittenContentComposedReason_GlorifyHf:
|
|
return "glorify hf"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalEventWrittenContentComposedReason) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalEventWrittenContentComposed struct {
|
|
Circumstance HistoricalEventWrittenContentComposedCircumstance `json:"circumstance" legend:"base"` // circumstance
|
|
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
|
|
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
|
|
Reason HistoricalEventWrittenContentComposedReason `json:"reason" legend:"base"` // reason
|
|
ReasonId int `json:"reasonId" legend:"base"` // reason_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
|
|
WcId int `json:"wcId" legend:"base"` // wc_id
|
|
}
|
|
|
|
func (x *HistoricalEventWrittenContentComposed) Type() string { return "written content composed" }
|
|
func (x *HistoricalEventWrittenContentComposed) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalEventWrittenContentComposed) RelatedToHf(id int) bool { return x.HistFigureId == id }
|
|
|
|
func (x *HistoricalEventWrittenContentComposed) CheckFields() {
|
|
}
|
|
|
|
type HistoricalFigureGoal int
|
|
|
|
const (
|
|
HistoricalFigureGoal_Unknown HistoricalFigureGoal = iota
|
|
HistoricalFigureGoal_AttainRankInSociety
|
|
HistoricalFigureGoal_BatheWorldInChaos
|
|
HistoricalFigureGoal_BecomeALegendaryWarrior
|
|
HistoricalFigureGoal_BringPeaceToTheWorld
|
|
HistoricalFigureGoal_CraftAMasterwork
|
|
HistoricalFigureGoal_CreateAGreatWorkOfArt
|
|
HistoricalFigureGoal_FallInLove
|
|
HistoricalFigureGoal_Immortality
|
|
HistoricalFigureGoal_MaintainEntityStatus
|
|
HistoricalFigureGoal_MakeAGreatDiscovery
|
|
HistoricalFigureGoal_MasterASkill
|
|
HistoricalFigureGoal_RuleTheWorld
|
|
HistoricalFigureGoal_SeeTheGreatNaturalSites
|
|
HistoricalFigureGoal_StartAFamily
|
|
)
|
|
|
|
func parseHistoricalFigureGoal(s string) HistoricalFigureGoal {
|
|
switch s {
|
|
case "attain rank in society":
|
|
return HistoricalFigureGoal_AttainRankInSociety
|
|
case "bathe world in chaos":
|
|
return HistoricalFigureGoal_BatheWorldInChaos
|
|
case "become a legendary warrior":
|
|
return HistoricalFigureGoal_BecomeALegendaryWarrior
|
|
case "bring peace to the world":
|
|
return HistoricalFigureGoal_BringPeaceToTheWorld
|
|
case "craft a masterwork":
|
|
return HistoricalFigureGoal_CraftAMasterwork
|
|
case "create a great work of art":
|
|
return HistoricalFigureGoal_CreateAGreatWorkOfArt
|
|
case "fall in love":
|
|
return HistoricalFigureGoal_FallInLove
|
|
case "immortality":
|
|
return HistoricalFigureGoal_Immortality
|
|
case "maintain entity status":
|
|
return HistoricalFigureGoal_MaintainEntityStatus
|
|
case "make a great discovery":
|
|
return HistoricalFigureGoal_MakeAGreatDiscovery
|
|
case "master a skill":
|
|
return HistoricalFigureGoal_MasterASkill
|
|
case "rule the world":
|
|
return HistoricalFigureGoal_RuleTheWorld
|
|
case "see the great natural sites":
|
|
return HistoricalFigureGoal_SeeTheGreatNaturalSites
|
|
case "start a family":
|
|
return HistoricalFigureGoal_StartAFamily
|
|
}
|
|
return HistoricalFigureGoal_Unknown
|
|
}
|
|
|
|
func (s HistoricalFigureGoal) String() string {
|
|
switch s {
|
|
case HistoricalFigureGoal_AttainRankInSociety:
|
|
return "attain rank in society"
|
|
case HistoricalFigureGoal_BatheWorldInChaos:
|
|
return "bathe world in chaos"
|
|
case HistoricalFigureGoal_BecomeALegendaryWarrior:
|
|
return "become a legendary warrior"
|
|
case HistoricalFigureGoal_BringPeaceToTheWorld:
|
|
return "bring peace to the world"
|
|
case HistoricalFigureGoal_CraftAMasterwork:
|
|
return "craft a masterwork"
|
|
case HistoricalFigureGoal_CreateAGreatWorkOfArt:
|
|
return "create a great work of art"
|
|
case HistoricalFigureGoal_FallInLove:
|
|
return "fall in love"
|
|
case HistoricalFigureGoal_Immortality:
|
|
return "immortality"
|
|
case HistoricalFigureGoal_MaintainEntityStatus:
|
|
return "maintain entity status"
|
|
case HistoricalFigureGoal_MakeAGreatDiscovery:
|
|
return "make a great discovery"
|
|
case HistoricalFigureGoal_MasterASkill:
|
|
return "master a skill"
|
|
case HistoricalFigureGoal_RuleTheWorld:
|
|
return "rule the world"
|
|
case HistoricalFigureGoal_SeeTheGreatNaturalSites:
|
|
return "see the great natural sites"
|
|
case HistoricalFigureGoal_StartAFamily:
|
|
return "start a family"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalFigureGoal) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalFigure struct {
|
|
ActiveInteraction []string `json:"activeInteraction" legend:"base"` // active_interaction
|
|
Adventurer bool `json:"adventurer" legend:"base"` // adventurer
|
|
Animated bool `json:"animated" legend:"base"` // animated
|
|
AnimatedString string `json:"animatedString" legend:"base"` // animated_string
|
|
Appeared int `json:"appeared" legend:"base"` // appeared
|
|
AssociatedType string `json:"associatedType" legend:"base"` // associated_type
|
|
BirthSeconds72 int `json:"birthSeconds72" legend:"base"` // birth_seconds72
|
|
BirthYear int `json:"birthYear" legend:"base"` // birth_year
|
|
BreedId int `json:"breedId" legend:"base"` // breed_id
|
|
Caste string `json:"caste" legend:"base"` // caste
|
|
CurrentIdentityId int `json:"currentIdentityId" legend:"base"` // current_identity_id
|
|
DeathSeconds72 int `json:"deathSeconds72" legend:"base"` // death_seconds72
|
|
DeathYear int `json:"deathYear" legend:"base"` // death_year
|
|
Deity bool `json:"deity" legend:"base"` // deity
|
|
EntPopId int `json:"entPopId" legend:"base"` // ent_pop_id
|
|
EntityFormerPositionLink []*EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` // entity_former_position_link
|
|
EntityFormerSquadLink []*EntityFormerSquadLink `json:"entityFormerSquadLink" legend:"base"` // entity_former_squad_link
|
|
EntityLink []*HistoricalFigureEntityLink `json:"entityLink" legend:"base"` // entity_link
|
|
EntityPositionLink []*EntityPositionLink `json:"entityPositionLink" legend:"base"` // entity_position_link
|
|
EntityReputation []*EntityReputation `json:"entityReputation" legend:"base"` // entity_reputation
|
|
EntitySquadLink *EntitySquadLink `json:"entitySquadLink" legend:"base"` // entity_squad_link
|
|
Force bool `json:"force" legend:"base"` // force
|
|
Ghost bool `json:"ghost" legend:"base"` // ghost
|
|
Goal []HistoricalFigureGoal `json:"goal" legend:"base"` // goal
|
|
HfLink []*HfLink `json:"hfLink" legend:"base"` // hf_link
|
|
HfSkill []*HfSkill `json:"hfSkill" legend:"base"` // hf_skill
|
|
HoldsArtifact []int `json:"holdsArtifact" legend:"base"` // holds_artifact
|
|
HonorEntity []*HonorEntity `json:"honorEntity" legend:"base"` // honor_entity
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
InteractionKnowledge []string `json:"interactionKnowledge" legend:"base"` // interaction_knowledge
|
|
IntrigueActor []*IntrigueActor `json:"intrigueActor" legend:"base"` // intrigue_actor
|
|
IntriguePlot []*IntriguePlot `json:"intriguePlot" legend:"base"` // intrigue_plot
|
|
JourneyPet []string `json:"journeyPet" legend:"base"` // journey_pet
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
Race string `json:"race" legend:"both"` // race
|
|
RelationshipProfileHfHistorical []*RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` // relationship_profile_hf_historical
|
|
RelationshipProfileHfIdentity []*RelationshipProfileHfIdentity `json:"relationshipProfileHfIdentity" legend:"base"` // relationship_profile_hf_identity
|
|
RelationshipProfileHfVisual []*RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` // relationship_profile_hf_visual
|
|
Sex int `json:"sex" legend:"plus"` // sex
|
|
SiteLink []*SiteLink `json:"siteLink" legend:"base"` // site_link
|
|
SiteProperty []*HistoricalFigureSiteProperty `json:"siteProperty" legend:"base"` // site_property
|
|
Sphere []string `json:"sphere" legend:"base"` // sphere
|
|
UsedIdentityId []int `json:"usedIdentityId" legend:"base"` // used_identity_id
|
|
VagueRelationship []*VagueRelationship `json:"vagueRelationship" legend:"base"` // vague_relationship
|
|
}
|
|
|
|
func (x *HistoricalFigure) Id() int { return x.Id_ }
|
|
func (x *HistoricalFigure) Name() string { return x.Name_ }
|
|
func (x *HistoricalFigure) RelatedToEntity(id int) bool {
|
|
return containsInt(x.UsedIdentityId, id) || x.CurrentIdentityId == id
|
|
}
|
|
func (x *HistoricalFigure) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalFigure) CheckFields() {
|
|
if x.Sex != x.Appeared && x.Sex != 0 && x.Appeared != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["Appeared"] = false
|
|
}
|
|
if x.Sex != x.BirthSeconds72 && x.Sex != 0 && x.BirthSeconds72 != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["BirthSeconds72"] = false
|
|
}
|
|
if x.Sex != x.BirthYear && x.Sex != 0 && x.BirthYear != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["BirthYear"] = false
|
|
}
|
|
if x.Sex != x.BreedId && x.Sex != 0 && x.BreedId != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["BreedId"] = false
|
|
}
|
|
if x.Sex != x.CurrentIdentityId && x.Sex != 0 && x.CurrentIdentityId != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["CurrentIdentityId"] = false
|
|
}
|
|
if x.Sex != x.DeathSeconds72 && x.Sex != 0 && x.DeathSeconds72 != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["DeathSeconds72"] = false
|
|
}
|
|
if x.Sex != x.DeathYear && x.Sex != 0 && x.DeathYear != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["DeathYear"] = false
|
|
}
|
|
if x.Sex != x.EntPopId && x.Sex != 0 && x.EntPopId != 0 {
|
|
sameFields["HistoricalFigure"]["Sex"]["EntPopId"] = false
|
|
}
|
|
}
|
|
|
|
type HistoricalFigureEntityLinkLinkType int
|
|
|
|
const (
|
|
HistoricalFigureEntityLinkLinkType_Unknown HistoricalFigureEntityLinkLinkType = iota
|
|
HistoricalFigureEntityLinkLinkType_Criminal
|
|
HistoricalFigureEntityLinkLinkType_Enemy
|
|
HistoricalFigureEntityLinkLinkType_FormerMember
|
|
HistoricalFigureEntityLinkLinkType_FormerPrisoner
|
|
HistoricalFigureEntityLinkLinkType_FormerSlave
|
|
HistoricalFigureEntityLinkLinkType_Member
|
|
HistoricalFigureEntityLinkLinkType_Prisoner
|
|
HistoricalFigureEntityLinkLinkType_Slave
|
|
)
|
|
|
|
func parseHistoricalFigureEntityLinkLinkType(s string) HistoricalFigureEntityLinkLinkType {
|
|
switch s {
|
|
case "criminal":
|
|
return HistoricalFigureEntityLinkLinkType_Criminal
|
|
case "enemy":
|
|
return HistoricalFigureEntityLinkLinkType_Enemy
|
|
case "former member":
|
|
return HistoricalFigureEntityLinkLinkType_FormerMember
|
|
case "former prisoner":
|
|
return HistoricalFigureEntityLinkLinkType_FormerPrisoner
|
|
case "former slave":
|
|
return HistoricalFigureEntityLinkLinkType_FormerSlave
|
|
case "member":
|
|
return HistoricalFigureEntityLinkLinkType_Member
|
|
case "prisoner":
|
|
return HistoricalFigureEntityLinkLinkType_Prisoner
|
|
case "slave":
|
|
return HistoricalFigureEntityLinkLinkType_Slave
|
|
}
|
|
return HistoricalFigureEntityLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s HistoricalFigureEntityLinkLinkType) String() string {
|
|
switch s {
|
|
case HistoricalFigureEntityLinkLinkType_Criminal:
|
|
return "criminal"
|
|
case HistoricalFigureEntityLinkLinkType_Enemy:
|
|
return "enemy"
|
|
case HistoricalFigureEntityLinkLinkType_FormerMember:
|
|
return "former member"
|
|
case HistoricalFigureEntityLinkLinkType_FormerPrisoner:
|
|
return "former prisoner"
|
|
case HistoricalFigureEntityLinkLinkType_FormerSlave:
|
|
return "former slave"
|
|
case HistoricalFigureEntityLinkLinkType_Member:
|
|
return "member"
|
|
case HistoricalFigureEntityLinkLinkType_Prisoner:
|
|
return "prisoner"
|
|
case HistoricalFigureEntityLinkLinkType_Slave:
|
|
return "slave"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HistoricalFigureEntityLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type HistoricalFigureEntityLink struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
LinkStrength int `json:"linkStrength" legend:"base"` // link_strength
|
|
LinkType HistoricalFigureEntityLinkLinkType `json:"linkType" legend:"base"` // link_type
|
|
}
|
|
|
|
func (x *HistoricalFigureEntityLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *HistoricalFigureEntityLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalFigureEntityLink) CheckFields() {
|
|
}
|
|
|
|
type HistoricalFigureSiteProperty struct {
|
|
PropertyId int `json:"propertyId" legend:"base"` // property_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
}
|
|
|
|
func (x *HistoricalFigureSiteProperty) RelatedToEntity(id int) bool { return false }
|
|
func (x *HistoricalFigureSiteProperty) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HistoricalFigureSiteProperty) CheckFields() {
|
|
}
|
|
|
|
type HonorRequiredSkill int
|
|
|
|
const (
|
|
HonorRequiredSkill_Unknown HonorRequiredSkill = iota
|
|
HonorRequiredSkill_AXE
|
|
HonorRequiredSkill_CROSSBOW
|
|
HonorRequiredSkill_HAMMER
|
|
HonorRequiredSkill_MACE
|
|
HonorRequiredSkill_SPEAR
|
|
HonorRequiredSkill_SWORD
|
|
)
|
|
|
|
func parseHonorRequiredSkill(s string) HonorRequiredSkill {
|
|
switch s {
|
|
case "AXE":
|
|
return HonorRequiredSkill_AXE
|
|
case "CROSSBOW":
|
|
return HonorRequiredSkill_CROSSBOW
|
|
case "HAMMER":
|
|
return HonorRequiredSkill_HAMMER
|
|
case "MACE":
|
|
return HonorRequiredSkill_MACE
|
|
case "SPEAR":
|
|
return HonorRequiredSkill_SPEAR
|
|
case "SWORD":
|
|
return HonorRequiredSkill_SWORD
|
|
}
|
|
return HonorRequiredSkill_Unknown
|
|
}
|
|
|
|
func (s HonorRequiredSkill) String() string {
|
|
switch s {
|
|
case HonorRequiredSkill_AXE:
|
|
return "axe"
|
|
case HonorRequiredSkill_CROSSBOW:
|
|
return "crossbow"
|
|
case HonorRequiredSkill_HAMMER:
|
|
return "hammer"
|
|
case HonorRequiredSkill_MACE:
|
|
return "mace"
|
|
case HonorRequiredSkill_SPEAR:
|
|
return "spear"
|
|
case HonorRequiredSkill_SWORD:
|
|
return "sword"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s HonorRequiredSkill) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Honor struct {
|
|
ExemptEpid int `json:"exemptEpid" legend:"base"` // exempt_epid
|
|
ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` // exempt_former_epid
|
|
GivesPrecedence int `json:"givesPrecedence" legend:"base"` // gives_precedence
|
|
GrantedToEverybody bool `json:"grantedToEverybody" legend:"base"` // granted_to_everybody
|
|
Id_ int `json:"id" legend:"base"` // id
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
RequiredBattles int `json:"requiredBattles" legend:"base"` // required_battles
|
|
RequiredKills int `json:"requiredKills" legend:"base"` // required_kills
|
|
RequiredSkill HonorRequiredSkill `json:"requiredSkill" legend:"base"` // required_skill
|
|
RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` // required_skill_ip_total
|
|
RequiredYears int `json:"requiredYears" legend:"base"` // required_years
|
|
RequiresAnyMeleeOrRangedSkill bool `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` // requires_any_melee_or_ranged_skill
|
|
}
|
|
|
|
func (x *Honor) Id() int { return x.Id_ }
|
|
func (x *Honor) Name() string { return x.Name_ }
|
|
func (x *Honor) RelatedToEntity(id int) bool { return false }
|
|
func (x *Honor) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Honor) CheckFields() {
|
|
}
|
|
|
|
type HonorEntity struct {
|
|
Battles int `json:"battles" legend:"base"` // battles
|
|
Entity int `json:"entity" legend:"base"` // entity
|
|
HonorId []int `json:"honorId" legend:"base"` // honor_id
|
|
Kills int `json:"kills" legend:"base"` // kills
|
|
}
|
|
|
|
func (x *HonorEntity) RelatedToEntity(id int) bool { return x.Entity == id }
|
|
func (x *HonorEntity) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *HonorEntity) CheckFields() {
|
|
}
|
|
|
|
type IdentityProfession int
|
|
|
|
const (
|
|
IdentityProfession_Unknown IdentityProfession = iota
|
|
IdentityProfession_Bard
|
|
IdentityProfession_BeastHunter
|
|
IdentityProfession_Criminal
|
|
IdentityProfession_Dancer
|
|
IdentityProfession_Mercenary
|
|
IdentityProfession_Merchant
|
|
IdentityProfession_Monk
|
|
IdentityProfession_MonsterSlayer
|
|
IdentityProfession_Peddler
|
|
IdentityProfession_Pilgrim
|
|
IdentityProfession_Poet
|
|
IdentityProfession_Prophet
|
|
IdentityProfession_Scholar
|
|
IdentityProfession_Snatcher
|
|
)
|
|
|
|
func parseIdentityProfession(s string) IdentityProfession {
|
|
switch s {
|
|
case "bard":
|
|
return IdentityProfession_Bard
|
|
case "beast_hunter":
|
|
return IdentityProfession_BeastHunter
|
|
case "criminal":
|
|
return IdentityProfession_Criminal
|
|
case "dancer":
|
|
return IdentityProfession_Dancer
|
|
case "mercenary":
|
|
return IdentityProfession_Mercenary
|
|
case "merchant":
|
|
return IdentityProfession_Merchant
|
|
case "monk":
|
|
return IdentityProfession_Monk
|
|
case "monster_slayer":
|
|
return IdentityProfession_MonsterSlayer
|
|
case "peddler":
|
|
return IdentityProfession_Peddler
|
|
case "pilgrim":
|
|
return IdentityProfession_Pilgrim
|
|
case "poet":
|
|
return IdentityProfession_Poet
|
|
case "prophet":
|
|
return IdentityProfession_Prophet
|
|
case "scholar":
|
|
return IdentityProfession_Scholar
|
|
case "snatcher":
|
|
return IdentityProfession_Snatcher
|
|
}
|
|
return IdentityProfession_Unknown
|
|
}
|
|
|
|
func (s IdentityProfession) String() string {
|
|
switch s {
|
|
case IdentityProfession_Bard:
|
|
return "bard"
|
|
case IdentityProfession_BeastHunter:
|
|
return "beast hunter"
|
|
case IdentityProfession_Criminal:
|
|
return "criminal"
|
|
case IdentityProfession_Dancer:
|
|
return "dancer"
|
|
case IdentityProfession_Mercenary:
|
|
return "mercenary"
|
|
case IdentityProfession_Merchant:
|
|
return "merchant"
|
|
case IdentityProfession_Monk:
|
|
return "monk"
|
|
case IdentityProfession_MonsterSlayer:
|
|
return "monster slayer"
|
|
case IdentityProfession_Peddler:
|
|
return "peddler"
|
|
case IdentityProfession_Pilgrim:
|
|
return "pilgrim"
|
|
case IdentityProfession_Poet:
|
|
return "poet"
|
|
case IdentityProfession_Prophet:
|
|
return "prophet"
|
|
case IdentityProfession_Scholar:
|
|
return "scholar"
|
|
case IdentityProfession_Snatcher:
|
|
return "snatcher"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s IdentityProfession) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Identity struct {
|
|
BirthSecond int `json:"birthSecond" legend:"plus"` // birth_second
|
|
BirthYear int `json:"birthYear" legend:"plus"` // birth_year
|
|
Caste string `json:"caste" legend:"plus"` // caste
|
|
EntityId int `json:"entityId" legend:"plus"` // entity_id
|
|
HistfigId int `json:"histfigId" legend:"plus"` // histfig_id
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
NemesisId int `json:"nemesisId" legend:"plus"` // nemesis_id
|
|
Profession IdentityProfession `json:"profession" legend:"plus"` // profession
|
|
Race string `json:"race" legend:"plus"` // race
|
|
}
|
|
|
|
func (x *Identity) Id() int { return x.Id_ }
|
|
func (x *Identity) Name() string { return x.Name_ }
|
|
func (x *Identity) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *Identity) RelatedToHf(id int) bool { return x.HistfigId == id }
|
|
|
|
func (x *Identity) CheckFields() {
|
|
}
|
|
|
|
type IntrigueActorRole int
|
|
|
|
const (
|
|
IntrigueActorRole_Unknown IntrigueActorRole = iota
|
|
IntrigueActorRole_Asset
|
|
IntrigueActorRole_CorruptPositionHolder
|
|
IntrigueActorRole_DeliveryTarget
|
|
IntrigueActorRole_Enemy
|
|
IntrigueActorRole_Handler
|
|
IntrigueActorRole_Lieutenant
|
|
IntrigueActorRole_Master
|
|
IntrigueActorRole_PossibleThreat
|
|
IntrigueActorRole_PossiblyUnknownDirector
|
|
IntrigueActorRole_PotentialEmployer
|
|
IntrigueActorRole_Rebuffed
|
|
IntrigueActorRole_SourceOfFunds
|
|
IntrigueActorRole_SourceOfFundsForMaster
|
|
IntrigueActorRole_SuspectedCriminal
|
|
IntrigueActorRole_UnderworldContact
|
|
IntrigueActorRole_UsableAssassin
|
|
IntrigueActorRole_UsableSnatcher
|
|
IntrigueActorRole_UsableThief
|
|
)
|
|
|
|
func parseIntrigueActorRole(s string) IntrigueActorRole {
|
|
switch s {
|
|
case "asset":
|
|
return IntrigueActorRole_Asset
|
|
case "corrupt position holder":
|
|
return IntrigueActorRole_CorruptPositionHolder
|
|
case "delivery target":
|
|
return IntrigueActorRole_DeliveryTarget
|
|
case "enemy":
|
|
return IntrigueActorRole_Enemy
|
|
case "handler":
|
|
return IntrigueActorRole_Handler
|
|
case "lieutenant":
|
|
return IntrigueActorRole_Lieutenant
|
|
case "master":
|
|
return IntrigueActorRole_Master
|
|
case "possible threat":
|
|
return IntrigueActorRole_PossibleThreat
|
|
case "possibly unknown director":
|
|
return IntrigueActorRole_PossiblyUnknownDirector
|
|
case "potential employer":
|
|
return IntrigueActorRole_PotentialEmployer
|
|
case "rebuffed":
|
|
return IntrigueActorRole_Rebuffed
|
|
case "source of funds":
|
|
return IntrigueActorRole_SourceOfFunds
|
|
case "source of funds for master":
|
|
return IntrigueActorRole_SourceOfFundsForMaster
|
|
case "suspected criminal":
|
|
return IntrigueActorRole_SuspectedCriminal
|
|
case "underworld contact":
|
|
return IntrigueActorRole_UnderworldContact
|
|
case "usable assassin":
|
|
return IntrigueActorRole_UsableAssassin
|
|
case "usable snatcher":
|
|
return IntrigueActorRole_UsableSnatcher
|
|
case "usable thief":
|
|
return IntrigueActorRole_UsableThief
|
|
}
|
|
return IntrigueActorRole_Unknown
|
|
}
|
|
|
|
func (s IntrigueActorRole) String() string {
|
|
switch s {
|
|
case IntrigueActorRole_Asset:
|
|
return "asset"
|
|
case IntrigueActorRole_CorruptPositionHolder:
|
|
return "corrupt position holder"
|
|
case IntrigueActorRole_DeliveryTarget:
|
|
return "delivery target"
|
|
case IntrigueActorRole_Enemy:
|
|
return "enemy"
|
|
case IntrigueActorRole_Handler:
|
|
return "handler"
|
|
case IntrigueActorRole_Lieutenant:
|
|
return "lieutenant"
|
|
case IntrigueActorRole_Master:
|
|
return "master"
|
|
case IntrigueActorRole_PossibleThreat:
|
|
return "possible threat"
|
|
case IntrigueActorRole_PossiblyUnknownDirector:
|
|
return "possibly unknown director"
|
|
case IntrigueActorRole_PotentialEmployer:
|
|
return "potential employer"
|
|
case IntrigueActorRole_Rebuffed:
|
|
return "rebuffed"
|
|
case IntrigueActorRole_SourceOfFunds:
|
|
return "source of funds"
|
|
case IntrigueActorRole_SourceOfFundsForMaster:
|
|
return "source of funds for master"
|
|
case IntrigueActorRole_SuspectedCriminal:
|
|
return "suspected criminal"
|
|
case IntrigueActorRole_UnderworldContact:
|
|
return "underworld contact"
|
|
case IntrigueActorRole_UsableAssassin:
|
|
return "usable assassin"
|
|
case IntrigueActorRole_UsableSnatcher:
|
|
return "usable snatcher"
|
|
case IntrigueActorRole_UsableThief:
|
|
return "usable thief"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s IntrigueActorRole) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type IntrigueActorStrategy int
|
|
|
|
const (
|
|
IntrigueActorStrategy_Unknown IntrigueActorStrategy = iota
|
|
IntrigueActorStrategy_Avoid
|
|
IntrigueActorStrategy_CorruptAndPacify
|
|
IntrigueActorStrategy_Monitor
|
|
IntrigueActorStrategy_Neutralize
|
|
IntrigueActorStrategy_Obey
|
|
IntrigueActorStrategy_Tax
|
|
IntrigueActorStrategy_Torment
|
|
IntrigueActorStrategy_Use
|
|
IntrigueActorStrategy_WorkIfSuited
|
|
)
|
|
|
|
func parseIntrigueActorStrategy(s string) IntrigueActorStrategy {
|
|
switch s {
|
|
case "avoid":
|
|
return IntrigueActorStrategy_Avoid
|
|
case "corrupt and pacify":
|
|
return IntrigueActorStrategy_CorruptAndPacify
|
|
case "monitor":
|
|
return IntrigueActorStrategy_Monitor
|
|
case "neutralize":
|
|
return IntrigueActorStrategy_Neutralize
|
|
case "obey":
|
|
return IntrigueActorStrategy_Obey
|
|
case "tax":
|
|
return IntrigueActorStrategy_Tax
|
|
case "torment":
|
|
return IntrigueActorStrategy_Torment
|
|
case "use":
|
|
return IntrigueActorStrategy_Use
|
|
case "work if suited":
|
|
return IntrigueActorStrategy_WorkIfSuited
|
|
}
|
|
return IntrigueActorStrategy_Unknown
|
|
}
|
|
|
|
func (s IntrigueActorStrategy) String() string {
|
|
switch s {
|
|
case IntrigueActorStrategy_Avoid:
|
|
return "avoid"
|
|
case IntrigueActorStrategy_CorruptAndPacify:
|
|
return "corrupt and pacify"
|
|
case IntrigueActorStrategy_Monitor:
|
|
return "monitor"
|
|
case IntrigueActorStrategy_Neutralize:
|
|
return "neutralize"
|
|
case IntrigueActorStrategy_Obey:
|
|
return "obey"
|
|
case IntrigueActorStrategy_Tax:
|
|
return "tax"
|
|
case IntrigueActorStrategy_Torment:
|
|
return "torment"
|
|
case IntrigueActorStrategy_Use:
|
|
return "use"
|
|
case IntrigueActorStrategy_WorkIfSuited:
|
|
return "work if suited"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s IntrigueActorStrategy) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type IntrigueActor struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
HandleActorId int `json:"handleActorId" legend:"base"` // handle_actor_id
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
LocalId int `json:"localId" legend:"base"` // local_id
|
|
PromisedActorImmortality bool `json:"promisedActorImmortality" legend:"base"` // promised_actor_immortality
|
|
PromisedMeImmortality bool `json:"promisedMeImmortality" legend:"base"` // promised_me_immortality
|
|
Role IntrigueActorRole `json:"role" legend:"base"` // role
|
|
Strategy IntrigueActorStrategy `json:"strategy" legend:"base"` // strategy
|
|
StrategyEnid int `json:"strategyEnid" legend:"base"` // strategy_enid
|
|
StrategyEppid int `json:"strategyEppid" legend:"base"` // strategy_eppid
|
|
}
|
|
|
|
func (x *IntrigueActor) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *IntrigueActor) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *IntrigueActor) CheckFields() {
|
|
}
|
|
|
|
type IntriguePlotType int
|
|
|
|
const (
|
|
IntriguePlotType_Unknown IntriguePlotType = iota
|
|
IntriguePlotType_AcquireArtifact
|
|
IntriguePlotType_AssassinateActor
|
|
IntriguePlotType_AttainRank
|
|
IntriguePlotType_BecomeImmortal
|
|
IntriguePlotType_CorruptActorsGovernment
|
|
IntriguePlotType_Counterintelligence
|
|
IntriguePlotType_DirectWarToActor
|
|
IntriguePlotType_FrameActor
|
|
IntriguePlotType_GrowAssetNetwork
|
|
IntriguePlotType_GrowCorruptionNetwork
|
|
IntriguePlotType_GrowFundingNetwork
|
|
IntriguePlotType_InfiltrateSociety
|
|
IntriguePlotType_KidnapActor
|
|
IntriguePlotType_SabotageActor
|
|
IntriguePlotType_UndeadWorldConquest
|
|
)
|
|
|
|
func parseIntriguePlotType(s string) IntriguePlotType {
|
|
switch s {
|
|
case "acquire artifact":
|
|
return IntriguePlotType_AcquireArtifact
|
|
case "assassinate actor":
|
|
return IntriguePlotType_AssassinateActor
|
|
case "attain rank":
|
|
return IntriguePlotType_AttainRank
|
|
case "become immortal":
|
|
return IntriguePlotType_BecomeImmortal
|
|
case "corrupt actor's government":
|
|
return IntriguePlotType_CorruptActorsGovernment
|
|
case "counterintelligence":
|
|
return IntriguePlotType_Counterintelligence
|
|
case "direct war to actor":
|
|
return IntriguePlotType_DirectWarToActor
|
|
case "frame actor":
|
|
return IntriguePlotType_FrameActor
|
|
case "grow asset network":
|
|
return IntriguePlotType_GrowAssetNetwork
|
|
case "grow corruption network":
|
|
return IntriguePlotType_GrowCorruptionNetwork
|
|
case "grow funding network":
|
|
return IntriguePlotType_GrowFundingNetwork
|
|
case "infiltrate society":
|
|
return IntriguePlotType_InfiltrateSociety
|
|
case "kidnap actor":
|
|
return IntriguePlotType_KidnapActor
|
|
case "sabotage actor":
|
|
return IntriguePlotType_SabotageActor
|
|
case "undead world conquest":
|
|
return IntriguePlotType_UndeadWorldConquest
|
|
}
|
|
return IntriguePlotType_Unknown
|
|
}
|
|
|
|
func (s IntriguePlotType) String() string {
|
|
switch s {
|
|
case IntriguePlotType_AcquireArtifact:
|
|
return "acquire artifact"
|
|
case IntriguePlotType_AssassinateActor:
|
|
return "assassinate actor"
|
|
case IntriguePlotType_AttainRank:
|
|
return "attain rank"
|
|
case IntriguePlotType_BecomeImmortal:
|
|
return "become immortal"
|
|
case IntriguePlotType_CorruptActorsGovernment:
|
|
return "corrupt actors government"
|
|
case IntriguePlotType_Counterintelligence:
|
|
return "counterintelligence"
|
|
case IntriguePlotType_DirectWarToActor:
|
|
return "direct war to actor"
|
|
case IntriguePlotType_FrameActor:
|
|
return "frame actor"
|
|
case IntriguePlotType_GrowAssetNetwork:
|
|
return "grow asset network"
|
|
case IntriguePlotType_GrowCorruptionNetwork:
|
|
return "grow corruption network"
|
|
case IntriguePlotType_GrowFundingNetwork:
|
|
return "grow funding network"
|
|
case IntriguePlotType_InfiltrateSociety:
|
|
return "infiltrate society"
|
|
case IntriguePlotType_KidnapActor:
|
|
return "kidnap actor"
|
|
case IntriguePlotType_SabotageActor:
|
|
return "sabotage actor"
|
|
case IntriguePlotType_UndeadWorldConquest:
|
|
return "undead world conquest"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s IntriguePlotType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type IntriguePlot struct {
|
|
ActorId int `json:"actorId" legend:"base"` // actor_id
|
|
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
|
|
DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` // delegated_plot_hfid
|
|
DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` // delegated_plot_id
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
LocalId int `json:"localId" legend:"base"` // local_id
|
|
OnHold bool `json:"onHold" legend:"base"` // on_hold
|
|
ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` // parent_plot_hfid
|
|
ParentPlotId int `json:"parentPlotId" legend:"base"` // parent_plot_id
|
|
PlotActor []*PlotActor `json:"plotActor" legend:"base"` // plot_actor
|
|
Type IntriguePlotType `json:"type" legend:"base"` // type
|
|
}
|
|
|
|
func (x *IntriguePlot) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *IntriguePlot) RelatedToHf(id int) bool {
|
|
return x.DelegatedPlotHfid == id || x.ParentPlotHfid == id
|
|
}
|
|
|
|
func (x *IntriguePlot) CheckFields() {
|
|
}
|
|
|
|
type Item struct {
|
|
NameString string `json:"nameString" legend:"base"` // name_string
|
|
PageNumber int `json:"pageNumber" legend:"base"` // page_number
|
|
PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` // page_written_content_id
|
|
WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` // writing_written_content_id
|
|
}
|
|
|
|
func (x *Item) RelatedToEntity(id int) bool { return false }
|
|
func (x *Item) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Item) CheckFields() {
|
|
}
|
|
|
|
type Landmass struct {
|
|
Coord1 string `json:"coord1" legend:"plus"` // coord_1
|
|
Coord2 string `json:"coord2" legend:"plus"` // coord_2
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
}
|
|
|
|
func (x *Landmass) Id() int { return x.Id_ }
|
|
func (x *Landmass) Name() string { return x.Name_ }
|
|
func (x *Landmass) RelatedToEntity(id int) bool { return false }
|
|
func (x *Landmass) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Landmass) CheckFields() {
|
|
}
|
|
|
|
type MountainPeak struct {
|
|
Coords string `json:"coords" legend:"plus"` // coords
|
|
Height int `json:"height" legend:"plus"` // height
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
IsVolcano bool `json:"isVolcano" legend:"plus"` // is_volcano
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
}
|
|
|
|
func (x *MountainPeak) Id() int { return x.Id_ }
|
|
func (x *MountainPeak) Name() string { return x.Name_ }
|
|
func (x *MountainPeak) RelatedToEntity(id int) bool { return false }
|
|
func (x *MountainPeak) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *MountainPeak) CheckFields() {
|
|
}
|
|
|
|
type MusicalForm struct {
|
|
Description string `json:"description" legend:"base"` // description
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
}
|
|
|
|
func (x *MusicalForm) Id() int { return x.Id_ }
|
|
func (x *MusicalForm) Name() string { return x.Name_ }
|
|
func (x *MusicalForm) RelatedToEntity(id int) bool { return false }
|
|
func (x *MusicalForm) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *MusicalForm) CheckFields() {
|
|
}
|
|
|
|
type Occasion struct {
|
|
Event int `json:"event" legend:"plus"` // event
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
Schedule []*Schedule `json:"schedule" legend:"plus"` // schedule
|
|
}
|
|
|
|
func (x *Occasion) Id() int { return x.Id_ }
|
|
func (x *Occasion) Name() string { return x.Name_ }
|
|
func (x *Occasion) RelatedToEntity(id int) bool { return false }
|
|
func (x *Occasion) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Occasion) CheckFields() {
|
|
}
|
|
|
|
type PlotActorPlotRole int
|
|
|
|
const (
|
|
PlotActorPlotRole_Unknown PlotActorPlotRole = iota
|
|
PlotActorPlotRole_Assassin
|
|
PlotActorPlotRole_SourceOfFunds
|
|
PlotActorPlotRole_Thief
|
|
)
|
|
|
|
func parsePlotActorPlotRole(s string) PlotActorPlotRole {
|
|
switch s {
|
|
case "assassin":
|
|
return PlotActorPlotRole_Assassin
|
|
case "source of funds":
|
|
return PlotActorPlotRole_SourceOfFunds
|
|
case "thief":
|
|
return PlotActorPlotRole_Thief
|
|
}
|
|
return PlotActorPlotRole_Unknown
|
|
}
|
|
|
|
func (s PlotActorPlotRole) String() string {
|
|
switch s {
|
|
case PlotActorPlotRole_Assassin:
|
|
return "assassin"
|
|
case PlotActorPlotRole_SourceOfFunds:
|
|
return "source of funds"
|
|
case PlotActorPlotRole_Thief:
|
|
return "thief"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s PlotActorPlotRole) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type PlotActor struct {
|
|
ActorId int `json:"actorId" legend:"base"` // actor_id
|
|
AgreementHasMessenger bool `json:"agreementHasMessenger" legend:"base"` // agreement_has_messenger
|
|
AgreementId int `json:"agreementId" legend:"base"` // agreement_id
|
|
PlotRole PlotActorPlotRole `json:"plotRole" legend:"base"` // plot_role
|
|
}
|
|
|
|
func (x *PlotActor) RelatedToEntity(id int) bool { return false }
|
|
func (x *PlotActor) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *PlotActor) CheckFields() {
|
|
}
|
|
|
|
type PoeticForm struct {
|
|
Description string `json:"description" legend:"base"` // description
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
}
|
|
|
|
func (x *PoeticForm) Id() int { return x.Id_ }
|
|
func (x *PoeticForm) Name() string { return x.Name_ }
|
|
func (x *PoeticForm) RelatedToEntity(id int) bool { return false }
|
|
func (x *PoeticForm) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *PoeticForm) CheckFields() {
|
|
}
|
|
|
|
type ReferenceType int
|
|
|
|
const (
|
|
ReferenceType_Unknown ReferenceType = iota
|
|
ReferenceType_ABSTRACTBUILDING
|
|
ReferenceType_ARTIFACT
|
|
ReferenceType_DANCEFORM
|
|
ReferenceType_ENTITY
|
|
ReferenceType_HISTORICALEVENT
|
|
ReferenceType_HISTORICALFIGURE
|
|
ReferenceType_INTERACTION
|
|
ReferenceType_KNOWLEDGESCHOLARFLAG
|
|
ReferenceType_LANGUAGE
|
|
ReferenceType_MUSICALFORM
|
|
ReferenceType_POETICFORM
|
|
ReferenceType_SITE
|
|
ReferenceType_SUBREGION
|
|
ReferenceType_VALUELEVEL
|
|
ReferenceType_WRITTENCONTENT
|
|
)
|
|
|
|
func parseReferenceType(s string) ReferenceType {
|
|
switch s {
|
|
case "ABSTRACT_BUILDING":
|
|
return ReferenceType_ABSTRACTBUILDING
|
|
case "ARTIFACT":
|
|
return ReferenceType_ARTIFACT
|
|
case "DANCE_FORM":
|
|
return ReferenceType_DANCEFORM
|
|
case "ENTITY":
|
|
return ReferenceType_ENTITY
|
|
case "HISTORICAL_EVENT":
|
|
return ReferenceType_HISTORICALEVENT
|
|
case "HISTORICAL_FIGURE":
|
|
return ReferenceType_HISTORICALFIGURE
|
|
case "INTERACTION":
|
|
return ReferenceType_INTERACTION
|
|
case "KNOWLEDGE_SCHOLAR_FLAG":
|
|
return ReferenceType_KNOWLEDGESCHOLARFLAG
|
|
case "LANGUAGE":
|
|
return ReferenceType_LANGUAGE
|
|
case "MUSICAL_FORM":
|
|
return ReferenceType_MUSICALFORM
|
|
case "POETIC_FORM":
|
|
return ReferenceType_POETICFORM
|
|
case "SITE":
|
|
return ReferenceType_SITE
|
|
case "SUBREGION":
|
|
return ReferenceType_SUBREGION
|
|
case "VALUE_LEVEL":
|
|
return ReferenceType_VALUELEVEL
|
|
case "WRITTEN_CONTENT":
|
|
return ReferenceType_WRITTENCONTENT
|
|
}
|
|
return ReferenceType_Unknown
|
|
}
|
|
|
|
func (s ReferenceType) String() string {
|
|
switch s {
|
|
case ReferenceType_ABSTRACTBUILDING:
|
|
return "abstractbuilding"
|
|
case ReferenceType_ARTIFACT:
|
|
return "artifact"
|
|
case ReferenceType_DANCEFORM:
|
|
return "danceform"
|
|
case ReferenceType_ENTITY:
|
|
return "entity"
|
|
case ReferenceType_HISTORICALEVENT:
|
|
return "historicalevent"
|
|
case ReferenceType_HISTORICALFIGURE:
|
|
return "historicalfigure"
|
|
case ReferenceType_INTERACTION:
|
|
return "interaction"
|
|
case ReferenceType_KNOWLEDGESCHOLARFLAG:
|
|
return "knowledgescholarflag"
|
|
case ReferenceType_LANGUAGE:
|
|
return "language"
|
|
case ReferenceType_MUSICALFORM:
|
|
return "musicalform"
|
|
case ReferenceType_POETICFORM:
|
|
return "poeticform"
|
|
case ReferenceType_SITE:
|
|
return "site"
|
|
case ReferenceType_SUBREGION:
|
|
return "subregion"
|
|
case ReferenceType_VALUELEVEL:
|
|
return "valuelevel"
|
|
case ReferenceType_WRITTENCONTENT:
|
|
return "writtencontent"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s ReferenceType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Reference struct {
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Type ReferenceType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *Reference) Id() int { return x.Id_ }
|
|
func (x *Reference) RelatedToEntity(id int) bool { return false }
|
|
func (x *Reference) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Reference) CheckFields() {
|
|
}
|
|
|
|
type RegionEvilness int
|
|
|
|
const (
|
|
RegionEvilness_Unknown RegionEvilness = iota
|
|
RegionEvilness_Evil
|
|
RegionEvilness_Good
|
|
RegionEvilness_Neutral
|
|
)
|
|
|
|
func parseRegionEvilness(s string) RegionEvilness {
|
|
switch s {
|
|
case "evil":
|
|
return RegionEvilness_Evil
|
|
case "good":
|
|
return RegionEvilness_Good
|
|
case "neutral":
|
|
return RegionEvilness_Neutral
|
|
}
|
|
return RegionEvilness_Unknown
|
|
}
|
|
|
|
func (s RegionEvilness) String() string {
|
|
switch s {
|
|
case RegionEvilness_Evil:
|
|
return "evil"
|
|
case RegionEvilness_Good:
|
|
return "good"
|
|
case RegionEvilness_Neutral:
|
|
return "neutral"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s RegionEvilness) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type RegionType int
|
|
|
|
const (
|
|
RegionType_Unknown RegionType = iota
|
|
RegionType_Desert
|
|
RegionType_Forest
|
|
RegionType_Glacier
|
|
RegionType_Grassland
|
|
RegionType_Hills
|
|
RegionType_Lake
|
|
RegionType_Mountains
|
|
RegionType_Ocean
|
|
RegionType_Tundra
|
|
RegionType_Wetland
|
|
)
|
|
|
|
func parseRegionType(s string) RegionType {
|
|
switch s {
|
|
case "Desert":
|
|
return RegionType_Desert
|
|
case "Forest":
|
|
return RegionType_Forest
|
|
case "Glacier":
|
|
return RegionType_Glacier
|
|
case "Grassland":
|
|
return RegionType_Grassland
|
|
case "Hills":
|
|
return RegionType_Hills
|
|
case "Lake":
|
|
return RegionType_Lake
|
|
case "Mountains":
|
|
return RegionType_Mountains
|
|
case "Ocean":
|
|
return RegionType_Ocean
|
|
case "Tundra":
|
|
return RegionType_Tundra
|
|
case "Wetland":
|
|
return RegionType_Wetland
|
|
}
|
|
return RegionType_Unknown
|
|
}
|
|
|
|
func (s RegionType) String() string {
|
|
switch s {
|
|
case RegionType_Desert:
|
|
return "desert"
|
|
case RegionType_Forest:
|
|
return "forest"
|
|
case RegionType_Glacier:
|
|
return "glacier"
|
|
case RegionType_Grassland:
|
|
return "grassland"
|
|
case RegionType_Hills:
|
|
return "hills"
|
|
case RegionType_Lake:
|
|
return "lake"
|
|
case RegionType_Mountains:
|
|
return "mountains"
|
|
case RegionType_Ocean:
|
|
return "ocean"
|
|
case RegionType_Tundra:
|
|
return "tundra"
|
|
case RegionType_Wetland:
|
|
return "wetland"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s RegionType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Region struct {
|
|
Coords string `json:"coords" legend:"plus"` // coords
|
|
Evilness RegionEvilness `json:"evilness" legend:"plus"` // evilness
|
|
ForceId int `json:"forceId" legend:"plus"` // force_id
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
Type RegionType `json:"type" legend:"base"` // type
|
|
}
|
|
|
|
func (x *Region) Id() int { return x.Id_ }
|
|
func (x *Region) Name() string { return x.Name_ }
|
|
func (x *Region) RelatedToEntity(id int) bool { return false }
|
|
func (x *Region) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Region) CheckFields() {
|
|
}
|
|
|
|
type RelationshipProfileHfHistorical struct {
|
|
Fear int `json:"fear" legend:"base"` // fear
|
|
HfId int `json:"hfId" legend:"base"` // hf_id
|
|
Love int `json:"love" legend:"base"` // love
|
|
Loyalty int `json:"loyalty" legend:"base"` // loyalty
|
|
RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter
|
|
RepHero int `json:"repHero" legend:"base"` // rep_hero
|
|
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
|
|
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
|
|
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
|
|
RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller
|
|
RepViolent int `json:"repViolent" legend:"base"` // rep_violent
|
|
Respect int `json:"respect" legend:"base"` // respect
|
|
Trust int `json:"trust" legend:"base"` // trust
|
|
}
|
|
|
|
func (x *RelationshipProfileHfHistorical) RelatedToEntity(id int) bool { return false }
|
|
func (x *RelationshipProfileHfHistorical) RelatedToHf(id int) bool { return x.HfId == id }
|
|
|
|
func (x *RelationshipProfileHfHistorical) CheckFields() {
|
|
}
|
|
|
|
type RelationshipProfileHfIdentity struct {
|
|
Fear int `json:"fear" legend:"base"` // fear
|
|
Id_ int `json:"id" legend:"base"` // id
|
|
Love int `json:"love" legend:"base"` // love
|
|
Loyalty int `json:"loyalty" legend:"base"` // loyalty
|
|
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
|
|
Respect int `json:"respect" legend:"base"` // respect
|
|
Trust int `json:"trust" legend:"base"` // trust
|
|
}
|
|
|
|
func (x *RelationshipProfileHfIdentity) Id() int { return x.Id_ }
|
|
func (x *RelationshipProfileHfIdentity) RelatedToEntity(id int) bool { return false }
|
|
func (x *RelationshipProfileHfIdentity) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *RelationshipProfileHfIdentity) CheckFields() {
|
|
}
|
|
|
|
type RelationshipProfileHfVisual struct {
|
|
Fear int `json:"fear" legend:"base"` // fear
|
|
HfId int `json:"hfId" legend:"base"` // hf_id
|
|
KnownIdentityId int `json:"knownIdentityId" legend:"base"` // known_identity_id
|
|
LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` // last_meet_seconds72
|
|
LastMeetYear int `json:"lastMeetYear" legend:"base"` // last_meet_year
|
|
Love int `json:"love" legend:"base"` // love
|
|
Loyalty int `json:"loyalty" legend:"base"` // loyalty
|
|
MeetCount int `json:"meetCount" legend:"base"` // meet_count
|
|
RepBonded int `json:"repBonded" legend:"base"` // rep_bonded
|
|
RepComrade int `json:"repComrade" legend:"base"` // rep_comrade
|
|
RepFlatterer int `json:"repFlatterer" legend:"base"` // rep_flatterer
|
|
RepFriendly int `json:"repFriendly" legend:"base"` // rep_friendly
|
|
RepHero int `json:"repHero" legend:"base"` // rep_hero
|
|
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
|
|
RepInformationSource int `json:"repInformationSource" legend:"base"` // rep_information_source
|
|
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
|
|
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
|
|
RepQuarreler int `json:"repQuarreler" legend:"base"` // rep_quarreler
|
|
RepTradePartner int `json:"repTradePartner" legend:"base"` // rep_trade_partner
|
|
Respect int `json:"respect" legend:"base"` // respect
|
|
Trust int `json:"trust" legend:"base"` // trust
|
|
}
|
|
|
|
func (x *RelationshipProfileHfVisual) RelatedToEntity(id int) bool { return x.KnownIdentityId == id }
|
|
func (x *RelationshipProfileHfVisual) RelatedToHf(id int) bool { return x.HfId == id }
|
|
|
|
func (x *RelationshipProfileHfVisual) CheckFields() {
|
|
}
|
|
|
|
type River struct {
|
|
EndPos string `json:"endPos" legend:"plus"` // end_pos
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
Path string `json:"path" legend:"plus"` // path
|
|
}
|
|
|
|
func (x *River) Name() string { return x.Name_ }
|
|
func (x *River) RelatedToEntity(id int) bool { return false }
|
|
func (x *River) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *River) CheckFields() {
|
|
}
|
|
|
|
type ScheduleItemSubtype int
|
|
|
|
const (
|
|
ScheduleItemSubtype_Unknown ScheduleItemSubtype = iota
|
|
ScheduleItemSubtype_AstodStand
|
|
ScheduleItemSubtype_BattleAxe
|
|
ScheduleItemSubtype_Bow
|
|
ScheduleItemSubtype_Crossbow
|
|
ScheduleItemSubtype_Flail
|
|
ScheduleItemSubtype_GreatAxe
|
|
ScheduleItemSubtype_LongSword
|
|
ScheduleItemSubtype_Mace
|
|
ScheduleItemSubtype_Maul
|
|
ScheduleItemSubtype_RohirBody
|
|
ScheduleItemSubtype_Scimitar
|
|
ScheduleItemSubtype_ShortSword
|
|
ScheduleItemSubtype_Spear
|
|
ScheduleItemSubtype_TwoHandedSword
|
|
ScheduleItemSubtype_WarHammer
|
|
ScheduleItemSubtype_Whip
|
|
)
|
|
|
|
func parseScheduleItemSubtype(s string) ScheduleItemSubtype {
|
|
switch s {
|
|
case "astod stand":
|
|
return ScheduleItemSubtype_AstodStand
|
|
case "battle axe":
|
|
return ScheduleItemSubtype_BattleAxe
|
|
case "bow":
|
|
return ScheduleItemSubtype_Bow
|
|
case "crossbow":
|
|
return ScheduleItemSubtype_Crossbow
|
|
case "flail":
|
|
return ScheduleItemSubtype_Flail
|
|
case "great axe":
|
|
return ScheduleItemSubtype_GreatAxe
|
|
case "long sword":
|
|
return ScheduleItemSubtype_LongSword
|
|
case "mace":
|
|
return ScheduleItemSubtype_Mace
|
|
case "maul":
|
|
return ScheduleItemSubtype_Maul
|
|
case "rohir body":
|
|
return ScheduleItemSubtype_RohirBody
|
|
case "scimitar":
|
|
return ScheduleItemSubtype_Scimitar
|
|
case "short sword":
|
|
return ScheduleItemSubtype_ShortSword
|
|
case "spear":
|
|
return ScheduleItemSubtype_Spear
|
|
case "two-handed sword":
|
|
return ScheduleItemSubtype_TwoHandedSword
|
|
case "war hammer":
|
|
return ScheduleItemSubtype_WarHammer
|
|
case "whip":
|
|
return ScheduleItemSubtype_Whip
|
|
}
|
|
return ScheduleItemSubtype_Unknown
|
|
}
|
|
|
|
func (s ScheduleItemSubtype) String() string {
|
|
switch s {
|
|
case ScheduleItemSubtype_AstodStand:
|
|
return "astod stand"
|
|
case ScheduleItemSubtype_BattleAxe:
|
|
return "battle axe"
|
|
case ScheduleItemSubtype_Bow:
|
|
return "bow"
|
|
case ScheduleItemSubtype_Crossbow:
|
|
return "crossbow"
|
|
case ScheduleItemSubtype_Flail:
|
|
return "flail"
|
|
case ScheduleItemSubtype_GreatAxe:
|
|
return "great axe"
|
|
case ScheduleItemSubtype_LongSword:
|
|
return "long sword"
|
|
case ScheduleItemSubtype_Mace:
|
|
return "mace"
|
|
case ScheduleItemSubtype_Maul:
|
|
return "maul"
|
|
case ScheduleItemSubtype_RohirBody:
|
|
return "rohir body"
|
|
case ScheduleItemSubtype_Scimitar:
|
|
return "scimitar"
|
|
case ScheduleItemSubtype_ShortSword:
|
|
return "short sword"
|
|
case ScheduleItemSubtype_Spear:
|
|
return "spear"
|
|
case ScheduleItemSubtype_TwoHandedSword:
|
|
return "two handed sword"
|
|
case ScheduleItemSubtype_WarHammer:
|
|
return "war hammer"
|
|
case ScheduleItemSubtype_Whip:
|
|
return "whip"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s ScheduleItemSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type ScheduleItemType int
|
|
|
|
const (
|
|
ScheduleItemType_Unknown ScheduleItemType = iota
|
|
ScheduleItemType_Tool
|
|
ScheduleItemType_Weapon
|
|
)
|
|
|
|
func parseScheduleItemType(s string) ScheduleItemType {
|
|
switch s {
|
|
case "tool":
|
|
return ScheduleItemType_Tool
|
|
case "weapon":
|
|
return ScheduleItemType_Weapon
|
|
}
|
|
return ScheduleItemType_Unknown
|
|
}
|
|
|
|
func (s ScheduleItemType) String() string {
|
|
switch s {
|
|
case ScheduleItemType_Tool:
|
|
return "tool"
|
|
case ScheduleItemType_Weapon:
|
|
return "weapon"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s ScheduleItemType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type ScheduleType int
|
|
|
|
const (
|
|
ScheduleType_Unknown ScheduleType = iota
|
|
ScheduleType_Ceremony
|
|
ScheduleType_DanceCompetition
|
|
ScheduleType_DancePerformance
|
|
ScheduleType_FootRace
|
|
ScheduleType_GladiatoryCompetition
|
|
ScheduleType_MusicalCompetition
|
|
ScheduleType_MusicalPerformance
|
|
ScheduleType_PoetryCompetition
|
|
ScheduleType_PoetryRecital
|
|
ScheduleType_Procession
|
|
ScheduleType_Storytelling
|
|
ScheduleType_ThrowingCompetition
|
|
ScheduleType_WrestlingCompetition
|
|
)
|
|
|
|
func parseScheduleType(s string) ScheduleType {
|
|
switch s {
|
|
case "ceremony":
|
|
return ScheduleType_Ceremony
|
|
case "dance_competition":
|
|
return ScheduleType_DanceCompetition
|
|
case "dance_performance":
|
|
return ScheduleType_DancePerformance
|
|
case "foot_race":
|
|
return ScheduleType_FootRace
|
|
case "gladiatory_competition":
|
|
return ScheduleType_GladiatoryCompetition
|
|
case "musical_competition":
|
|
return ScheduleType_MusicalCompetition
|
|
case "musical_performance":
|
|
return ScheduleType_MusicalPerformance
|
|
case "poetry_competition":
|
|
return ScheduleType_PoetryCompetition
|
|
case "poetry_recital":
|
|
return ScheduleType_PoetryRecital
|
|
case "procession":
|
|
return ScheduleType_Procession
|
|
case "storytelling":
|
|
return ScheduleType_Storytelling
|
|
case "throwing_competition":
|
|
return ScheduleType_ThrowingCompetition
|
|
case "wrestling_competition":
|
|
return ScheduleType_WrestlingCompetition
|
|
}
|
|
return ScheduleType_Unknown
|
|
}
|
|
|
|
func (s ScheduleType) String() string {
|
|
switch s {
|
|
case ScheduleType_Ceremony:
|
|
return "ceremony"
|
|
case ScheduleType_DanceCompetition:
|
|
return "dance competition"
|
|
case ScheduleType_DancePerformance:
|
|
return "dance performance"
|
|
case ScheduleType_FootRace:
|
|
return "foot race"
|
|
case ScheduleType_GladiatoryCompetition:
|
|
return "gladiatory competition"
|
|
case ScheduleType_MusicalCompetition:
|
|
return "musical competition"
|
|
case ScheduleType_MusicalPerformance:
|
|
return "musical performance"
|
|
case ScheduleType_PoetryCompetition:
|
|
return "poetry competition"
|
|
case ScheduleType_PoetryRecital:
|
|
return "poetry recital"
|
|
case ScheduleType_Procession:
|
|
return "procession"
|
|
case ScheduleType_Storytelling:
|
|
return "storytelling"
|
|
case ScheduleType_ThrowingCompetition:
|
|
return "throwing competition"
|
|
case ScheduleType_WrestlingCompetition:
|
|
return "wrestling competition"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s ScheduleType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Schedule struct {
|
|
Feature []*Feature `json:"feature" legend:"plus"` // feature
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
ItemSubtype ScheduleItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
|
|
ItemType ScheduleItemType `json:"itemType" legend:"plus"` // item_type
|
|
Reference int `json:"reference" legend:"plus"` // reference
|
|
Reference2 int `json:"reference2" legend:"plus"` // reference2
|
|
Type ScheduleType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *Schedule) Id() int { return x.Id_ }
|
|
func (x *Schedule) RelatedToEntity(id int) bool { return false }
|
|
func (x *Schedule) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Schedule) CheckFields() {
|
|
}
|
|
|
|
type SiteType int
|
|
|
|
const (
|
|
SiteType_Unknown SiteType = iota
|
|
SiteType_Camp
|
|
SiteType_Castle
|
|
SiteType_Cave
|
|
SiteType_DarkFortress
|
|
SiteType_DarkPits
|
|
SiteType_ForestRetreat
|
|
SiteType_Fort
|
|
SiteType_Fortress
|
|
SiteType_Hamlet
|
|
SiteType_Hillocks
|
|
SiteType_ImportantLocation
|
|
SiteType_Labyrinth
|
|
SiteType_Lair
|
|
SiteType_Monastery
|
|
SiteType_MountainHalls
|
|
SiteType_Shrine
|
|
SiteType_Tomb
|
|
SiteType_Tower
|
|
SiteType_Town
|
|
SiteType_Vault
|
|
)
|
|
|
|
func parseSiteType(s string) SiteType {
|
|
switch s {
|
|
case "camp":
|
|
return SiteType_Camp
|
|
case "castle":
|
|
return SiteType_Castle
|
|
case "cave":
|
|
return SiteType_Cave
|
|
case "dark fortress":
|
|
return SiteType_DarkFortress
|
|
case "dark pits":
|
|
return SiteType_DarkPits
|
|
case "forest retreat":
|
|
return SiteType_ForestRetreat
|
|
case "fort":
|
|
return SiteType_Fort
|
|
case "fortress":
|
|
return SiteType_Fortress
|
|
case "hamlet":
|
|
return SiteType_Hamlet
|
|
case "hillocks":
|
|
return SiteType_Hillocks
|
|
case "important location":
|
|
return SiteType_ImportantLocation
|
|
case "labyrinth":
|
|
return SiteType_Labyrinth
|
|
case "lair":
|
|
return SiteType_Lair
|
|
case "monastery":
|
|
return SiteType_Monastery
|
|
case "mountain halls":
|
|
return SiteType_MountainHalls
|
|
case "shrine":
|
|
return SiteType_Shrine
|
|
case "tomb":
|
|
return SiteType_Tomb
|
|
case "tower":
|
|
return SiteType_Tower
|
|
case "town":
|
|
return SiteType_Town
|
|
case "vault":
|
|
return SiteType_Vault
|
|
}
|
|
return SiteType_Unknown
|
|
}
|
|
|
|
func (s SiteType) String() string {
|
|
switch s {
|
|
case SiteType_Camp:
|
|
return "camp"
|
|
case SiteType_Castle:
|
|
return "castle"
|
|
case SiteType_Cave:
|
|
return "cave"
|
|
case SiteType_DarkFortress:
|
|
return "dark fortress"
|
|
case SiteType_DarkPits:
|
|
return "dark pits"
|
|
case SiteType_ForestRetreat:
|
|
return "forest retreat"
|
|
case SiteType_Fort:
|
|
return "fort"
|
|
case SiteType_Fortress:
|
|
return "fortress"
|
|
case SiteType_Hamlet:
|
|
return "hamlet"
|
|
case SiteType_Hillocks:
|
|
return "hillocks"
|
|
case SiteType_ImportantLocation:
|
|
return "important location"
|
|
case SiteType_Labyrinth:
|
|
return "labyrinth"
|
|
case SiteType_Lair:
|
|
return "lair"
|
|
case SiteType_Monastery:
|
|
return "monastery"
|
|
case SiteType_MountainHalls:
|
|
return "mountain halls"
|
|
case SiteType_Shrine:
|
|
return "shrine"
|
|
case SiteType_Tomb:
|
|
return "tomb"
|
|
case SiteType_Tower:
|
|
return "tower"
|
|
case SiteType_Town:
|
|
return "town"
|
|
case SiteType_Vault:
|
|
return "vault"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s SiteType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Site struct {
|
|
CivId int `json:"civId" legend:"plus"` // civ_id
|
|
Coords string `json:"coords" legend:"base"` // coords
|
|
CurOwnerId int `json:"curOwnerId" legend:"plus"` // cur_owner_id
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Name_ string `json:"name" legend:"base"` // name
|
|
Rectangle string `json:"rectangle" legend:"base"` // rectangle
|
|
SiteProperties map[int]*SiteSiteProperty `json:"siteProperties" legend:"base"` // site_properties
|
|
Structures map[int]*Structure `json:"structures" legend:"both"` // structures
|
|
Type SiteType `json:"type" legend:"base"` // type
|
|
}
|
|
|
|
func (x *Site) Id() int { return x.Id_ }
|
|
func (x *Site) Name() string { return x.Name_ }
|
|
func (x *Site) RelatedToEntity(id int) bool { return x.CivId == id }
|
|
func (x *Site) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *Site) CheckFields() {
|
|
}
|
|
|
|
type SiteLinkLinkType int
|
|
|
|
const (
|
|
SiteLinkLinkType_Unknown SiteLinkLinkType = iota
|
|
SiteLinkLinkType_Hangout
|
|
SiteLinkLinkType_HomeSavedZone
|
|
SiteLinkLinkType_HomeSiteBuilding
|
|
SiteLinkLinkType_HomeSiteUnderground
|
|
SiteLinkLinkType_HomeStructure
|
|
SiteLinkLinkType_Lair
|
|
SiteLinkLinkType_Occupation
|
|
SiteLinkLinkType_SeatOfPower
|
|
)
|
|
|
|
func parseSiteLinkLinkType(s string) SiteLinkLinkType {
|
|
switch s {
|
|
case "hangout":
|
|
return SiteLinkLinkType_Hangout
|
|
case "home saved zone":
|
|
return SiteLinkLinkType_HomeSavedZone
|
|
case "home site building":
|
|
return SiteLinkLinkType_HomeSiteBuilding
|
|
case "home site underground":
|
|
return SiteLinkLinkType_HomeSiteUnderground
|
|
case "home structure":
|
|
return SiteLinkLinkType_HomeStructure
|
|
case "lair":
|
|
return SiteLinkLinkType_Lair
|
|
case "occupation":
|
|
return SiteLinkLinkType_Occupation
|
|
case "seat of power":
|
|
return SiteLinkLinkType_SeatOfPower
|
|
}
|
|
return SiteLinkLinkType_Unknown
|
|
}
|
|
|
|
func (s SiteLinkLinkType) String() string {
|
|
switch s {
|
|
case SiteLinkLinkType_Hangout:
|
|
return "hangout"
|
|
case SiteLinkLinkType_HomeSavedZone:
|
|
return "home saved zone"
|
|
case SiteLinkLinkType_HomeSiteBuilding:
|
|
return "home site building"
|
|
case SiteLinkLinkType_HomeSiteUnderground:
|
|
return "home site underground"
|
|
case SiteLinkLinkType_HomeStructure:
|
|
return "home structure"
|
|
case SiteLinkLinkType_Lair:
|
|
return "lair"
|
|
case SiteLinkLinkType_Occupation:
|
|
return "occupation"
|
|
case SiteLinkLinkType_SeatOfPower:
|
|
return "seat of power"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s SiteLinkLinkType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type SiteLink struct {
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
LinkType SiteLinkLinkType `json:"linkType" legend:"base"` // link_type
|
|
OccupationId int `json:"occupationId" legend:"base"` // occupation_id
|
|
SiteId int `json:"siteId" legend:"base"` // site_id
|
|
SubId int `json:"subId" legend:"base"` // sub_id
|
|
}
|
|
|
|
func (x *SiteLink) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *SiteLink) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *SiteLink) CheckFields() {
|
|
}
|
|
|
|
type SiteSitePropertyType int
|
|
|
|
const (
|
|
SiteSitePropertyType_Unknown SiteSitePropertyType = iota
|
|
SiteSitePropertyType_House
|
|
)
|
|
|
|
func parseSiteSitePropertyType(s string) SiteSitePropertyType {
|
|
switch s {
|
|
case "house":
|
|
return SiteSitePropertyType_House
|
|
}
|
|
return SiteSitePropertyType_Unknown
|
|
}
|
|
|
|
func (s SiteSitePropertyType) String() string {
|
|
switch s {
|
|
case SiteSitePropertyType_House:
|
|
return "house"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s SiteSitePropertyType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type SiteSiteProperty struct {
|
|
Id_ int `json:"id" legend:"base"` // id
|
|
OwnerHfid int `json:"ownerHfid" legend:"base"` // owner_hfid
|
|
StructureId int `json:"structureId" legend:"base"` // structure_id
|
|
Type SiteSitePropertyType `json:"type" legend:"base"` // type
|
|
}
|
|
|
|
func (x *SiteSiteProperty) Id() int { return x.Id_ }
|
|
func (x *SiteSiteProperty) RelatedToEntity(id int) bool { return false }
|
|
func (x *SiteSiteProperty) RelatedToHf(id int) bool { return x.OwnerHfid == id }
|
|
|
|
func (x *SiteSiteProperty) CheckFields() {
|
|
}
|
|
|
|
type StructureSubtype int
|
|
|
|
const (
|
|
StructureSubtype_Unknown StructureSubtype = iota
|
|
StructureSubtype_Catacombs
|
|
StructureSubtype_Sewers
|
|
)
|
|
|
|
func parseStructureSubtype(s string) StructureSubtype {
|
|
switch s {
|
|
case "catacombs":
|
|
return StructureSubtype_Catacombs
|
|
case "sewers":
|
|
return StructureSubtype_Sewers
|
|
}
|
|
return StructureSubtype_Unknown
|
|
}
|
|
|
|
func (s StructureSubtype) String() string {
|
|
switch s {
|
|
case StructureSubtype_Catacombs:
|
|
return "catacombs"
|
|
case StructureSubtype_Sewers:
|
|
return "sewers"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s StructureSubtype) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type StructureType int
|
|
|
|
const (
|
|
StructureType_Unknown StructureType = iota
|
|
StructureType_CountingHouse
|
|
StructureType_Dungeon
|
|
StructureType_Guildhall
|
|
StructureType_InnTavern
|
|
StructureType_Keep
|
|
StructureType_Library
|
|
StructureType_Market
|
|
StructureType_MeadHall
|
|
StructureType_Temple
|
|
StructureType_Tomb
|
|
StructureType_Tower
|
|
StructureType_UnderworldSpire
|
|
)
|
|
|
|
func parseStructureType(s string) StructureType {
|
|
switch s {
|
|
case "counting house":
|
|
return StructureType_CountingHouse
|
|
case "counting_house":
|
|
return StructureType_CountingHouse
|
|
case "dungeon":
|
|
return StructureType_Dungeon
|
|
case "guildhall":
|
|
return StructureType_Guildhall
|
|
case "inn tavern":
|
|
return StructureType_InnTavern
|
|
case "inn_tavern":
|
|
return StructureType_InnTavern
|
|
case "keep":
|
|
return StructureType_Keep
|
|
case "library":
|
|
return StructureType_Library
|
|
case "market":
|
|
return StructureType_Market
|
|
case "mead hall":
|
|
return StructureType_MeadHall
|
|
case "mead_hall":
|
|
return StructureType_MeadHall
|
|
case "temple":
|
|
return StructureType_Temple
|
|
case "tomb":
|
|
return StructureType_Tomb
|
|
case "tower":
|
|
return StructureType_Tower
|
|
case "underworld spire":
|
|
return StructureType_UnderworldSpire
|
|
case "underworld_spire":
|
|
return StructureType_UnderworldSpire
|
|
}
|
|
return StructureType_Unknown
|
|
}
|
|
|
|
func (s StructureType) String() string {
|
|
switch s {
|
|
case StructureType_CountingHouse:
|
|
return "counting house"
|
|
case StructureType_Dungeon:
|
|
return "dungeon"
|
|
case StructureType_Guildhall:
|
|
return "guildhall"
|
|
case StructureType_InnTavern:
|
|
return "inn tavern"
|
|
case StructureType_Keep:
|
|
return "keep"
|
|
case StructureType_Library:
|
|
return "library"
|
|
case StructureType_Market:
|
|
return "market"
|
|
case StructureType_MeadHall:
|
|
return "mead hall"
|
|
case StructureType_Temple:
|
|
return "temple"
|
|
case StructureType_Tomb:
|
|
return "tomb"
|
|
case StructureType_Tower:
|
|
return "tower"
|
|
case StructureType_UnderworldSpire:
|
|
return "underworld spire"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s StructureType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type Structure struct {
|
|
CopiedArtifactId []int `json:"copiedArtifactId" legend:"base"` // copied_artifact_id
|
|
Deity int `json:"deity" legend:"plus"` // deity
|
|
DeityType int `json:"deityType" legend:"plus"` // deity_type
|
|
DungeonType int `json:"dungeonType" legend:"plus"` // dungeon_type
|
|
EntityId int `json:"entityId" legend:"base"` // entity_id
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Inhabitant []int `json:"inhabitant" legend:"plus"` // inhabitant
|
|
LocalId int `json:"localId" legend:"base"` // local_id
|
|
Name_ string `json:"name" legend:"both"` // name
|
|
Name2 string `json:"name2" legend:"plus"` // name2
|
|
Religion int `json:"religion" legend:"plus"` // religion
|
|
Subtype StructureSubtype `json:"subtype" legend:"base"` // subtype
|
|
Type StructureType `json:"type" legend:"both"` // type
|
|
WorshipHfid int `json:"worshipHfid" legend:"base"` // worship_hfid
|
|
}
|
|
|
|
func (x *Structure) Id() int { return x.Id_ }
|
|
func (x *Structure) Name() string { return x.Name_ }
|
|
func (x *Structure) RelatedToEntity(id int) bool { return x.EntityId == id }
|
|
func (x *Structure) RelatedToHf(id int) bool { return x.WorshipHfid == id }
|
|
|
|
func (x *Structure) CheckFields() {
|
|
if x.Deity != x.EntityId && x.Deity != 0 && x.EntityId != 0 {
|
|
sameFields["Structure"]["Deity"]["EntityId"] = false
|
|
}
|
|
if x.Deity != x.LocalId && x.Deity != 0 && x.LocalId != 0 {
|
|
sameFields["Structure"]["Deity"]["LocalId"] = false
|
|
}
|
|
if x.Deity != x.WorshipHfid && x.Deity != 0 && x.WorshipHfid != 0 {
|
|
sameFields["Structure"]["Deity"]["WorshipHfid"] = false
|
|
}
|
|
if x.DeityType != x.EntityId && x.DeityType != 0 && x.EntityId != 0 {
|
|
sameFields["Structure"]["DeityType"]["EntityId"] = false
|
|
}
|
|
if x.DeityType != x.LocalId && x.DeityType != 0 && x.LocalId != 0 {
|
|
sameFields["Structure"]["DeityType"]["LocalId"] = false
|
|
}
|
|
if x.DeityType != x.WorshipHfid && x.DeityType != 0 && x.WorshipHfid != 0 {
|
|
sameFields["Structure"]["DeityType"]["WorshipHfid"] = false
|
|
}
|
|
if x.DungeonType != x.EntityId && x.DungeonType != 0 && x.EntityId != 0 {
|
|
sameFields["Structure"]["DungeonType"]["EntityId"] = false
|
|
}
|
|
if x.DungeonType != x.LocalId && x.DungeonType != 0 && x.LocalId != 0 {
|
|
sameFields["Structure"]["DungeonType"]["LocalId"] = false
|
|
}
|
|
if x.DungeonType != x.WorshipHfid && x.DungeonType != 0 && x.WorshipHfid != 0 {
|
|
sameFields["Structure"]["DungeonType"]["WorshipHfid"] = false
|
|
}
|
|
if x.Religion != x.EntityId && x.Religion != 0 && x.EntityId != 0 {
|
|
sameFields["Structure"]["Religion"]["EntityId"] = false
|
|
}
|
|
if x.Religion != x.LocalId && x.Religion != 0 && x.LocalId != 0 {
|
|
sameFields["Structure"]["Religion"]["LocalId"] = false
|
|
}
|
|
if x.Religion != x.WorshipHfid && x.Religion != 0 && x.WorshipHfid != 0 {
|
|
sameFields["Structure"]["Religion"]["WorshipHfid"] = false
|
|
}
|
|
}
|
|
|
|
type UndergroundRegionType int
|
|
|
|
const (
|
|
UndergroundRegionType_Unknown UndergroundRegionType = iota
|
|
UndergroundRegionType_Cavern
|
|
UndergroundRegionType_Magma
|
|
UndergroundRegionType_Underworld
|
|
)
|
|
|
|
func parseUndergroundRegionType(s string) UndergroundRegionType {
|
|
switch s {
|
|
case "cavern":
|
|
return UndergroundRegionType_Cavern
|
|
case "magma":
|
|
return UndergroundRegionType_Magma
|
|
case "underworld":
|
|
return UndergroundRegionType_Underworld
|
|
}
|
|
return UndergroundRegionType_Unknown
|
|
}
|
|
|
|
func (s UndergroundRegionType) String() string {
|
|
switch s {
|
|
case UndergroundRegionType_Cavern:
|
|
return "cavern"
|
|
case UndergroundRegionType_Magma:
|
|
return "magma"
|
|
case UndergroundRegionType_Underworld:
|
|
return "underworld"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s UndergroundRegionType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type UndergroundRegion struct {
|
|
Coords string `json:"coords" legend:"plus"` // coords
|
|
Depth int `json:"depth" legend:"base"` // depth
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
Type UndergroundRegionType `json:"type" legend:"base"` // type
|
|
}
|
|
|
|
func (x *UndergroundRegion) Id() int { return x.Id_ }
|
|
func (x *UndergroundRegion) RelatedToEntity(id int) bool { return false }
|
|
func (x *UndergroundRegion) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *UndergroundRegion) CheckFields() {
|
|
}
|
|
|
|
type VagueRelationship struct {
|
|
ArtisticBuddy bool `json:"artisticBuddy" legend:"base"` // artistic_buddy
|
|
AtheleticRival bool `json:"atheleticRival" legend:"base"` // atheletic_rival
|
|
AthleteBuddy bool `json:"athleteBuddy" legend:"base"` // athlete_buddy
|
|
BusinessRival bool `json:"businessRival" legend:"base"` // business_rival
|
|
ChildhoodFriend bool `json:"childhoodFriend" legend:"base"` // childhood_friend
|
|
Grudge bool `json:"grudge" legend:"base"` // grudge
|
|
Hfid int `json:"hfid" legend:"base"` // hfid
|
|
JealousObsession bool `json:"jealousObsession" legend:"base"` // jealous_obsession
|
|
JealousRelationshipGrudge bool `json:"jealousRelationshipGrudge" legend:"base"` // jealous_relationship_grudge
|
|
PersecutionGrudge bool `json:"persecutionGrudge" legend:"base"` // persecution_grudge
|
|
ReligiousPersecutionGrudge bool `json:"religiousPersecutionGrudge" legend:"base"` // religious_persecution_grudge
|
|
ScholarBuddy bool `json:"scholarBuddy" legend:"base"` // scholar_buddy
|
|
SupernaturalGrudge bool `json:"supernaturalGrudge" legend:"base"` // supernatural_grudge
|
|
WarBuddy bool `json:"warBuddy" legend:"base"` // war_buddy
|
|
}
|
|
|
|
func (x *VagueRelationship) RelatedToEntity(id int) bool { return false }
|
|
func (x *VagueRelationship) RelatedToHf(id int) bool { return x.Hfid == id }
|
|
|
|
func (x *VagueRelationship) CheckFields() {
|
|
}
|
|
|
|
type WorldConstructionType int
|
|
|
|
const (
|
|
WorldConstructionType_Unknown WorldConstructionType = iota
|
|
WorldConstructionType_Bridge
|
|
WorldConstructionType_Road
|
|
WorldConstructionType_Tunnel
|
|
)
|
|
|
|
func parseWorldConstructionType(s string) WorldConstructionType {
|
|
switch s {
|
|
case "bridge":
|
|
return WorldConstructionType_Bridge
|
|
case "road":
|
|
return WorldConstructionType_Road
|
|
case "tunnel":
|
|
return WorldConstructionType_Tunnel
|
|
}
|
|
return WorldConstructionType_Unknown
|
|
}
|
|
|
|
func (s WorldConstructionType) String() string {
|
|
switch s {
|
|
case WorldConstructionType_Bridge:
|
|
return "bridge"
|
|
case WorldConstructionType_Road:
|
|
return "road"
|
|
case WorldConstructionType_Tunnel:
|
|
return "tunnel"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s WorldConstructionType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type WorldConstruction struct {
|
|
Coords string `json:"coords" legend:"plus"` // coords
|
|
Id_ int `json:"id" legend:"plus"` // id
|
|
Name_ string `json:"name" legend:"plus"` // name
|
|
Type WorldConstructionType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *WorldConstruction) Id() int { return x.Id_ }
|
|
func (x *WorldConstruction) Name() string { return x.Name_ }
|
|
func (x *WorldConstruction) RelatedToEntity(id int) bool { return false }
|
|
func (x *WorldConstruction) RelatedToHf(id int) bool { return false }
|
|
|
|
func (x *WorldConstruction) CheckFields() {
|
|
}
|
|
|
|
type WrittenContentForm int
|
|
|
|
const (
|
|
WrittenContentForm_Unknown WrittenContentForm = iota
|
|
WrittenContentForm_AlternateHistory
|
|
WrittenContentForm_Atlas
|
|
WrittenContentForm_Autobiography
|
|
WrittenContentForm_Biography
|
|
WrittenContentForm_Choreography
|
|
WrittenContentForm_Chronicle
|
|
WrittenContentForm_ComparativeBiography
|
|
WrittenContentForm_CulturalComparison
|
|
WrittenContentForm_CulturalHistory
|
|
WrittenContentForm_Dialog
|
|
WrittenContentForm_Dictionary
|
|
WrittenContentForm_Encyclopedia
|
|
WrittenContentForm_Essay
|
|
WrittenContentForm_Genealogy
|
|
WrittenContentForm_Guide
|
|
WrittenContentForm_Letter
|
|
WrittenContentForm_Manual
|
|
WrittenContentForm_MusicalComposition
|
|
WrittenContentForm_Novel
|
|
WrittenContentForm_Play
|
|
WrittenContentForm_Poem
|
|
WrittenContentForm_ShortStory
|
|
WrittenContentForm_StarCatalogue
|
|
WrittenContentForm_StarChart
|
|
WrittenContentForm_TreatiseOnTechnologicalEvolution
|
|
)
|
|
|
|
func parseWrittenContentForm(s string) WrittenContentForm {
|
|
switch s {
|
|
case "alternate history":
|
|
return WrittenContentForm_AlternateHistory
|
|
case "atlas":
|
|
return WrittenContentForm_Atlas
|
|
case "autobiography":
|
|
return WrittenContentForm_Autobiography
|
|
case "biography":
|
|
return WrittenContentForm_Biography
|
|
case "choreography":
|
|
return WrittenContentForm_Choreography
|
|
case "chronicle":
|
|
return WrittenContentForm_Chronicle
|
|
case "comparative biography":
|
|
return WrittenContentForm_ComparativeBiography
|
|
case "cultural comparison":
|
|
return WrittenContentForm_CulturalComparison
|
|
case "cultural history":
|
|
return WrittenContentForm_CulturalHistory
|
|
case "dialog":
|
|
return WrittenContentForm_Dialog
|
|
case "dictionary":
|
|
return WrittenContentForm_Dictionary
|
|
case "encyclopedia":
|
|
return WrittenContentForm_Encyclopedia
|
|
case "essay":
|
|
return WrittenContentForm_Essay
|
|
case "genealogy":
|
|
return WrittenContentForm_Genealogy
|
|
case "guide":
|
|
return WrittenContentForm_Guide
|
|
case "letter":
|
|
return WrittenContentForm_Letter
|
|
case "manual":
|
|
return WrittenContentForm_Manual
|
|
case "musical composition":
|
|
return WrittenContentForm_MusicalComposition
|
|
case "novel":
|
|
return WrittenContentForm_Novel
|
|
case "play":
|
|
return WrittenContentForm_Play
|
|
case "poem":
|
|
return WrittenContentForm_Poem
|
|
case "short story":
|
|
return WrittenContentForm_ShortStory
|
|
case "star catalogue":
|
|
return WrittenContentForm_StarCatalogue
|
|
case "star chart":
|
|
return WrittenContentForm_StarChart
|
|
case "treatise on technological evolution":
|
|
return WrittenContentForm_TreatiseOnTechnologicalEvolution
|
|
}
|
|
return WrittenContentForm_Unknown
|
|
}
|
|
|
|
func (s WrittenContentForm) String() string {
|
|
switch s {
|
|
case WrittenContentForm_AlternateHistory:
|
|
return "alternate history"
|
|
case WrittenContentForm_Atlas:
|
|
return "atlas"
|
|
case WrittenContentForm_Autobiography:
|
|
return "autobiography"
|
|
case WrittenContentForm_Biography:
|
|
return "biography"
|
|
case WrittenContentForm_Choreography:
|
|
return "choreography"
|
|
case WrittenContentForm_Chronicle:
|
|
return "chronicle"
|
|
case WrittenContentForm_ComparativeBiography:
|
|
return "comparative biography"
|
|
case WrittenContentForm_CulturalComparison:
|
|
return "cultural comparison"
|
|
case WrittenContentForm_CulturalHistory:
|
|
return "cultural history"
|
|
case WrittenContentForm_Dialog:
|
|
return "dialog"
|
|
case WrittenContentForm_Dictionary:
|
|
return "dictionary"
|
|
case WrittenContentForm_Encyclopedia:
|
|
return "encyclopedia"
|
|
case WrittenContentForm_Essay:
|
|
return "essay"
|
|
case WrittenContentForm_Genealogy:
|
|
return "genealogy"
|
|
case WrittenContentForm_Guide:
|
|
return "guide"
|
|
case WrittenContentForm_Letter:
|
|
return "letter"
|
|
case WrittenContentForm_Manual:
|
|
return "manual"
|
|
case WrittenContentForm_MusicalComposition:
|
|
return "musical composition"
|
|
case WrittenContentForm_Novel:
|
|
return "novel"
|
|
case WrittenContentForm_Play:
|
|
return "play"
|
|
case WrittenContentForm_Poem:
|
|
return "poem"
|
|
case WrittenContentForm_ShortStory:
|
|
return "short story"
|
|
case WrittenContentForm_StarCatalogue:
|
|
return "star catalogue"
|
|
case WrittenContentForm_StarChart:
|
|
return "star chart"
|
|
case WrittenContentForm_TreatiseOnTechnologicalEvolution:
|
|
return "treatise on technological evolution"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s WrittenContentForm) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type WrittenContentType int
|
|
|
|
const (
|
|
WrittenContentType_Unknown WrittenContentType = iota
|
|
WrittenContentType_AlternateHistory
|
|
WrittenContentType_Atlas
|
|
WrittenContentType_Autobiography
|
|
WrittenContentType_Biography
|
|
WrittenContentType_Choreography
|
|
WrittenContentType_Chronicle
|
|
WrittenContentType_ComparativeBiography
|
|
WrittenContentType_CulturalComparison
|
|
WrittenContentType_CulturalHistory
|
|
WrittenContentType_Dialog
|
|
WrittenContentType_Dictionary
|
|
WrittenContentType_Encyclopedia
|
|
WrittenContentType_Essay
|
|
WrittenContentType_Genealogy
|
|
WrittenContentType_Guide
|
|
WrittenContentType_Letter
|
|
WrittenContentType_Manual
|
|
WrittenContentType_MusicalComposition
|
|
WrittenContentType_Novel
|
|
WrittenContentType_Play
|
|
WrittenContentType_Poem
|
|
WrittenContentType_ShortStory
|
|
WrittenContentType_StarCatalogue
|
|
WrittenContentType_StarChart
|
|
WrittenContentType_TreatiseOnTechnologicalEvolution
|
|
)
|
|
|
|
func parseWrittenContentType(s string) WrittenContentType {
|
|
switch s {
|
|
case "AlternateHistory":
|
|
return WrittenContentType_AlternateHistory
|
|
case "Atlas":
|
|
return WrittenContentType_Atlas
|
|
case "Autobiography":
|
|
return WrittenContentType_Autobiography
|
|
case "Biography":
|
|
return WrittenContentType_Biography
|
|
case "Choreography":
|
|
return WrittenContentType_Choreography
|
|
case "Chronicle":
|
|
return WrittenContentType_Chronicle
|
|
case "ComparativeBiography":
|
|
return WrittenContentType_ComparativeBiography
|
|
case "CulturalComparison":
|
|
return WrittenContentType_CulturalComparison
|
|
case "CulturalHistory":
|
|
return WrittenContentType_CulturalHistory
|
|
case "Dialog":
|
|
return WrittenContentType_Dialog
|
|
case "Dictionary":
|
|
return WrittenContentType_Dictionary
|
|
case "Encyclopedia":
|
|
return WrittenContentType_Encyclopedia
|
|
case "Essay":
|
|
return WrittenContentType_Essay
|
|
case "Genealogy":
|
|
return WrittenContentType_Genealogy
|
|
case "Guide":
|
|
return WrittenContentType_Guide
|
|
case "Letter":
|
|
return WrittenContentType_Letter
|
|
case "Manual":
|
|
return WrittenContentType_Manual
|
|
case "MusicalComposition":
|
|
return WrittenContentType_MusicalComposition
|
|
case "Novel":
|
|
return WrittenContentType_Novel
|
|
case "Play":
|
|
return WrittenContentType_Play
|
|
case "Poem":
|
|
return WrittenContentType_Poem
|
|
case "ShortStory":
|
|
return WrittenContentType_ShortStory
|
|
case "StarCatalogue":
|
|
return WrittenContentType_StarCatalogue
|
|
case "StarChart":
|
|
return WrittenContentType_StarChart
|
|
case "TreatiseOnTechnologicalEvolution":
|
|
return WrittenContentType_TreatiseOnTechnologicalEvolution
|
|
}
|
|
return WrittenContentType_Unknown
|
|
}
|
|
|
|
func (s WrittenContentType) String() string {
|
|
switch s {
|
|
case WrittenContentType_AlternateHistory:
|
|
return "alternate history"
|
|
case WrittenContentType_Atlas:
|
|
return "atlas"
|
|
case WrittenContentType_Autobiography:
|
|
return "autobiography"
|
|
case WrittenContentType_Biography:
|
|
return "biography"
|
|
case WrittenContentType_Choreography:
|
|
return "choreography"
|
|
case WrittenContentType_Chronicle:
|
|
return "chronicle"
|
|
case WrittenContentType_ComparativeBiography:
|
|
return "comparative biography"
|
|
case WrittenContentType_CulturalComparison:
|
|
return "cultural comparison"
|
|
case WrittenContentType_CulturalHistory:
|
|
return "cultural history"
|
|
case WrittenContentType_Dialog:
|
|
return "dialog"
|
|
case WrittenContentType_Dictionary:
|
|
return "dictionary"
|
|
case WrittenContentType_Encyclopedia:
|
|
return "encyclopedia"
|
|
case WrittenContentType_Essay:
|
|
return "essay"
|
|
case WrittenContentType_Genealogy:
|
|
return "genealogy"
|
|
case WrittenContentType_Guide:
|
|
return "guide"
|
|
case WrittenContentType_Letter:
|
|
return "letter"
|
|
case WrittenContentType_Manual:
|
|
return "manual"
|
|
case WrittenContentType_MusicalComposition:
|
|
return "musical composition"
|
|
case WrittenContentType_Novel:
|
|
return "novel"
|
|
case WrittenContentType_Play:
|
|
return "play"
|
|
case WrittenContentType_Poem:
|
|
return "poem"
|
|
case WrittenContentType_ShortStory:
|
|
return "short story"
|
|
case WrittenContentType_StarCatalogue:
|
|
return "star catalogue"
|
|
case WrittenContentType_StarChart:
|
|
return "star chart"
|
|
case WrittenContentType_TreatiseOnTechnologicalEvolution:
|
|
return "treatise on technological evolution"
|
|
}
|
|
return "unknown"
|
|
}
|
|
|
|
func (s WrittenContentType) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(s.String())
|
|
}
|
|
|
|
type WrittenContent struct {
|
|
AuthorHfid int `json:"authorHfid" legend:"base"` // author_hfid
|
|
AuthorRoll int `json:"authorRoll" legend:"base"` // author_roll
|
|
Form WrittenContentForm `json:"form" legend:"base"` // form
|
|
FormId int `json:"formId" legend:"base"` // form_id
|
|
Id_ int `json:"id" legend:"both"` // id
|
|
PageEnd int `json:"pageEnd" legend:"plus"` // page_end
|
|
PageStart int `json:"pageStart" legend:"plus"` // page_start
|
|
Reference []*Reference `json:"reference" legend:"plus"` // reference
|
|
Style []string `json:"style" legend:"both"` // style
|
|
Title string `json:"title" legend:"both"` // title
|
|
Type WrittenContentType `json:"type" legend:"plus"` // type
|
|
}
|
|
|
|
func (x *WrittenContent) Id() int { return x.Id_ }
|
|
func (x *WrittenContent) RelatedToEntity(id int) bool { return false }
|
|
func (x *WrittenContent) RelatedToHf(id int) bool { return x.AuthorHfid == id }
|
|
|
|
func (x *WrittenContent) CheckFields() {
|
|
if x.PageEnd != x.AuthorHfid && x.PageEnd != 0 && x.AuthorHfid != 0 {
|
|
sameFields["WrittenContent"]["PageEnd"]["AuthorHfid"] = false
|
|
}
|
|
if x.PageEnd != x.AuthorRoll && x.PageEnd != 0 && x.AuthorRoll != 0 {
|
|
sameFields["WrittenContent"]["PageEnd"]["AuthorRoll"] = false
|
|
}
|
|
if x.PageEnd != x.FormId && x.PageEnd != 0 && x.FormId != 0 {
|
|
sameFields["WrittenContent"]["PageEnd"]["FormId"] = false
|
|
}
|
|
if x.PageStart != x.AuthorHfid && x.PageStart != 0 && x.AuthorHfid != 0 {
|
|
sameFields["WrittenContent"]["PageStart"]["AuthorHfid"] = false
|
|
}
|
|
if x.PageStart != x.AuthorRoll && x.PageStart != 0 && x.AuthorRoll != 0 {
|
|
sameFields["WrittenContent"]["PageStart"]["AuthorRoll"] = false
|
|
}
|
|
if x.PageStart != x.FormId && x.PageStart != 0 && x.FormId != 0 {
|
|
sameFields["WrittenContent"]["PageStart"]["FormId"] = false
|
|
}
|
|
}
|
|
|
|
// Parser
|
|
func parseArtifact(p *util.XMLParser) (*Artifact, error) {
|
|
var (
|
|
obj = &Artifact{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "abs_tile_x":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AbsTileX = num(data)
|
|
case "abs_tile_y":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AbsTileY = num(data)
|
|
case "abs_tile_z":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AbsTileZ = num(data)
|
|
case "holder_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HolderHfid = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "item":
|
|
v, _ := parseItem(p)
|
|
obj.Item = v
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_local_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureLocalId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseArtifactPlus(p *util.XMLParser, obj *Artifact) (*Artifact, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Artifact{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "item_description":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemDescription = txt(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = txt(data)
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = txt(data)
|
|
case "mat":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mat = txt(data)
|
|
case "page_count":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PageCount = num(data)
|
|
case "writing":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Writing = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseCreature(p *util.XMLParser) (*Creature, error) {
|
|
var (
|
|
obj = &Creature{}
|
|
)
|
|
|
|
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 parseCreaturePlus(p *util.XMLParser, obj *Creature) (*Creature, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Creature{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "all_castes_alive":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AllCastesAlive = true
|
|
case "artificial_hiveable":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtificialHiveable = true
|
|
case "biome_desert_badland":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeDesertBadland = true
|
|
case "biome_desert_rock":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeDesertRock = true
|
|
case "biome_desert_sand":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeDesertSand = true
|
|
case "biome_forest_taiga":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTaiga = true
|
|
case "biome_forest_temperate_broadleaf":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTemperateBroadleaf = true
|
|
case "biome_forest_temperate_conifer":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTemperateConifer = true
|
|
case "biome_forest_tropical_conifer":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTropicalConifer = true
|
|
case "biome_forest_tropical_dry_broadleaf":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTropicalDryBroadleaf = true
|
|
case "biome_forest_tropical_moist_broadleaf":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeForestTropicalMoistBroadleaf = true
|
|
case "biome_glacier":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeGlacier = true
|
|
case "biome_grassland_temperate":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeGrasslandTemperate = true
|
|
case "biome_grassland_tropical":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeGrasslandTropical = true
|
|
case "biome_lake_temperate_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTemperateBrackishwater = true
|
|
case "biome_lake_temperate_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTemperateFreshwater = true
|
|
case "biome_lake_temperate_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTemperateSaltwater = true
|
|
case "biome_lake_tropical_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTropicalBrackishwater = true
|
|
case "biome_lake_tropical_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTropicalFreshwater = true
|
|
case "biome_lake_tropical_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeLakeTropicalSaltwater = true
|
|
case "biome_marsh_temperate_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeMarshTemperateFreshwater = true
|
|
case "biome_marsh_temperate_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeMarshTemperateSaltwater = true
|
|
case "biome_marsh_tropical_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeMarshTropicalFreshwater = true
|
|
case "biome_marsh_tropical_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeMarshTropicalSaltwater = true
|
|
case "biome_mountain":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeMountain = true
|
|
case "biome_ocean_arctic":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeOceanArctic = true
|
|
case "biome_ocean_temperate":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeOceanTemperate = true
|
|
case "biome_ocean_tropical":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeOceanTropical = true
|
|
case "biome_pool_temperate_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTemperateBrackishwater = true
|
|
case "biome_pool_temperate_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTemperateFreshwater = true
|
|
case "biome_pool_temperate_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTemperateSaltwater = true
|
|
case "biome_pool_tropical_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTropicalBrackishwater = true
|
|
case "biome_pool_tropical_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTropicalFreshwater = true
|
|
case "biome_pool_tropical_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomePoolTropicalSaltwater = true
|
|
case "biome_river_temperate_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTemperateBrackishwater = true
|
|
case "biome_river_temperate_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTemperateFreshwater = true
|
|
case "biome_river_temperate_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTemperateSaltwater = true
|
|
case "biome_river_tropical_brackishwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTropicalBrackishwater = true
|
|
case "biome_river_tropical_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTropicalFreshwater = true
|
|
case "biome_river_tropical_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeRiverTropicalSaltwater = true
|
|
case "biome_savanna_temperate":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSavannaTemperate = true
|
|
case "biome_savanna_tropical":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSavannaTropical = true
|
|
case "biome_shrubland_temperate":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeShrublandTemperate = true
|
|
case "biome_shrubland_tropical":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeShrublandTropical = true
|
|
case "biome_subterranean_chasm":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSubterraneanChasm = true
|
|
case "biome_subterranean_lava":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSubterraneanLava = true
|
|
case "biome_subterranean_water":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSubterraneanWater = true
|
|
case "biome_swamp_mangrove":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSwampMangrove = true
|
|
case "biome_swamp_temperate_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSwampTemperateFreshwater = true
|
|
case "biome_swamp_temperate_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSwampTemperateSaltwater = true
|
|
case "biome_swamp_tropical_freshwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSwampTropicalFreshwater = true
|
|
case "biome_swamp_tropical_saltwater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeSwampTropicalSaltwater = true
|
|
case "biome_tundra":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BiomeTundra = true
|
|
case "creature_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CreatureId = txt(data)
|
|
case "does_not_exist":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DoesNotExist = true
|
|
case "equipment":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Equipment = true
|
|
case "equipment_wagon":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EquipmentWagon = true
|
|
case "evil":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Evil = true
|
|
case "fanciful":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Fanciful = true
|
|
case "generated":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Generated = true
|
|
case "good":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Good = true
|
|
case "has_any_benign":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyBenign = true
|
|
case "has_any_can_swim":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCanSwim = true
|
|
case "has_any_cannot_breathe_air":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCannotBreatheAir = true
|
|
case "has_any_cannot_breathe_water":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCannotBreatheWater = true
|
|
case "has_any_carnivore":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCarnivore = true
|
|
case "has_any_common_domestic":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCommonDomestic = true
|
|
case "has_any_curious_beast":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyCuriousBeast = true
|
|
case "has_any_demon":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyDemon = true
|
|
case "has_any_feature_beast":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyFeatureBeast = true
|
|
case "has_any_flier":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyFlier = true
|
|
case "has_any_fly_race_gait":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyFlyRaceGait = true
|
|
case "has_any_grasp":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyGrasp = true
|
|
case "has_any_grazer":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyGrazer = true
|
|
case "has_any_has_blood":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyHasBlood = true
|
|
case "has_any_immobile":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyImmobile = true
|
|
case "has_any_intelligent_learns":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyIntelligentLearns = true
|
|
case "has_any_intelligent_speaks":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyIntelligentSpeaks = true
|
|
case "has_any_large_predator":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyLargePredator = true
|
|
case "has_any_local_pops_controllable":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyLocalPopsControllable = true
|
|
case "has_any_local_pops_produce_heroes":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyLocalPopsProduceHeroes = true
|
|
case "has_any_megabeast":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyMegabeast = true
|
|
case "has_any_mischievous":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyMischievous = true
|
|
case "has_any_natural_animal":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNaturalAnimal = true
|
|
case "has_any_night_creature":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNightCreature = true
|
|
case "has_any_night_creature_bogeyman":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNightCreatureBogeyman = true
|
|
case "has_any_night_creature_hunter":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNightCreatureHunter = true
|
|
case "has_any_night_creature_nightmare":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNightCreatureNightmare = true
|
|
case "has_any_not_fireimmune":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNotFireimmune = true
|
|
case "has_any_not_living":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyNotLiving = true
|
|
case "has_any_outsider_controllable":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyOutsiderControllable = true
|
|
case "has_any_race_gait":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyRaceGait = true
|
|
case "has_any_semimegabeast":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnySemimegabeast = true
|
|
case "has_any_slow_learner":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnySlowLearner = true
|
|
case "has_any_supernatural":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnySupernatural = true
|
|
case "has_any_titan":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyTitan = true
|
|
case "has_any_unique_demon":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyUniqueDemon = true
|
|
case "has_any_utterances":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyUtterances = true
|
|
case "has_any_vermin_hateable":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyVerminHateable = true
|
|
case "has_any_vermin_micro":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasAnyVerminMicro = true
|
|
case "has_female":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasFemale = true
|
|
case "has_male":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HasMale = true
|
|
case "large_roaming":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LargeRoaming = true
|
|
case "loose_clusters":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LooseClusters = true
|
|
case "mates_to_breed":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MatesToBreed = true
|
|
case "mundane":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mundane = true
|
|
case "name_plural":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NamePlural = txt(data)
|
|
case "name_singular":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NameSingular = txt(data)
|
|
case "occurs_as_entity_race":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccursAsEntityRace = true
|
|
case "savage":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Savage = true
|
|
case "small_race":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SmallRace = true
|
|
case "two_genders":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TwoGenders = true
|
|
case "ubiquitous":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ubiquitous = true
|
|
case "vermin_eater":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminEater = true
|
|
case "vermin_fish":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminFish = true
|
|
case "vermin_grounder":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminGrounder = true
|
|
case "vermin_rotter":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminRotter = true
|
|
case "vermin_soil":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminSoil = true
|
|
case "vermin_soil_colony":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VerminSoilColony = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseDanceForm(p *util.XMLParser) (*DanceForm, error) {
|
|
var (
|
|
obj = &DanceForm{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "description":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Description = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseDanceFormPlus(p *util.XMLParser, obj *DanceForm) (*DanceForm, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &DanceForm{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseDfWorld(p *util.XMLParser) (*DfWorld, error) {
|
|
var (
|
|
obj = &DfWorld{}
|
|
)
|
|
|
|
obj.Artifacts = make(map[int]*Artifact)
|
|
|
|
obj.DanceForms = make(map[int]*DanceForm)
|
|
obj.Entities = make(map[int]*Entity)
|
|
obj.EntityPopulations = make(map[int]*EntityPopulation)
|
|
|
|
obj.HistoricalEventCollections = make(map[int]*HistoricalEventCollection)
|
|
|
|
obj.HistoricalEvents = make(map[int]*HistoricalEvent)
|
|
obj.HistoricalFigures = make(map[int]*HistoricalFigure)
|
|
obj.Identities = make(map[int]*Identity)
|
|
obj.Landmasses = make(map[int]*Landmass)
|
|
obj.MountainPeaks = make(map[int]*MountainPeak)
|
|
obj.MusicalForms = make(map[int]*MusicalForm)
|
|
|
|
obj.PoeticForms = make(map[int]*PoeticForm)
|
|
obj.Regions = make(map[int]*Region)
|
|
|
|
obj.Sites = make(map[int]*Site)
|
|
obj.UndergroundRegions = make(map[int]*UndergroundRegion)
|
|
obj.WorldConstructions = make(map[int]*WorldConstruction)
|
|
obj.WrittenContents = make(map[int]*WrittenContent)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifacts":
|
|
parseMap(p, &obj.Artifacts, parseArtifact)
|
|
case "dance_forms":
|
|
parseMap(p, &obj.DanceForms, parseDanceForm)
|
|
case "entities":
|
|
parseMap(p, &obj.Entities, parseEntity)
|
|
case "entity_populations":
|
|
parseMap(p, &obj.EntityPopulations, parseEntityPopulation)
|
|
case "historical_eras":
|
|
parseArray(p, &obj.HistoricalEras, parseHistoricalEra)
|
|
case "historical_event_collections":
|
|
parseMap(p, &obj.HistoricalEventCollections, parseHistoricalEventCollection)
|
|
case "historical_events":
|
|
parseMap(p, &obj.HistoricalEvents, parseHistoricalEvent)
|
|
case "historical_figures":
|
|
parseMap(p, &obj.HistoricalFigures, parseHistoricalFigure)
|
|
case "musical_forms":
|
|
parseMap(p, &obj.MusicalForms, parseMusicalForm)
|
|
case "poetic_forms":
|
|
parseMap(p, &obj.PoeticForms, parsePoeticForm)
|
|
case "regions":
|
|
parseMap(p, &obj.Regions, parseRegion)
|
|
case "sites":
|
|
parseMap(p, &obj.Sites, parseSite)
|
|
case "underground_regions":
|
|
parseMap(p, &obj.UndergroundRegions, parseUndergroundRegion)
|
|
case "world_constructions":
|
|
parseMap(p, &obj.WorldConstructions, parseWorldConstruction)
|
|
case "written_contents":
|
|
parseMap(p, &obj.WrittenContents, parseWrittenContent)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseDfWorldPlus(p *util.XMLParser, obj *DfWorld) (*DfWorld, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &DfWorld{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "altname":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Altname = txt(data)
|
|
case "artifacts":
|
|
parseMapPlus(p, &obj.Artifacts, parseArtifactPlus)
|
|
case "creature_raw":
|
|
parseArray(p, &obj.CreatureRaw, parseCreature)
|
|
case "dance_forms":
|
|
parseMapPlus(p, &obj.DanceForms, parseDanceFormPlus)
|
|
case "entities":
|
|
parseMapPlus(p, &obj.Entities, parseEntityPlus)
|
|
case "entity_populations":
|
|
parseMapPlus(p, &obj.EntityPopulations, parseEntityPopulationPlus)
|
|
case "historical_eras":
|
|
parseArray(p, &obj.HistoricalEras, parseHistoricalEra)
|
|
case "historical_event_collections":
|
|
parseMapPlus(p, &obj.HistoricalEventCollections, parseHistoricalEventCollectionPlus)
|
|
case "historical_event_relationship_supplements":
|
|
parseArray(p, &obj.HistoricalEventRelationshipSupplements, parseHistoricalEventRelationshipSupplement)
|
|
case "historical_event_relationships":
|
|
parseArray(p, &obj.HistoricalEventRelationships, parseHistoricalEventRelationship)
|
|
case "historical_events":
|
|
parseMapPlus(p, &obj.HistoricalEvents, parseHistoricalEventPlus)
|
|
case "historical_figures":
|
|
parseMapPlus(p, &obj.HistoricalFigures, parseHistoricalFigurePlus)
|
|
case "identities":
|
|
parseMapPlus(p, &obj.Identities, parseIdentityPlus)
|
|
case "landmasses":
|
|
parseMapPlus(p, &obj.Landmasses, parseLandmassPlus)
|
|
case "mountain_peaks":
|
|
parseMapPlus(p, &obj.MountainPeaks, parseMountainPeakPlus)
|
|
case "musical_forms":
|
|
parseMapPlus(p, &obj.MusicalForms, parseMusicalFormPlus)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "poetic_forms":
|
|
parseMapPlus(p, &obj.PoeticForms, parsePoeticFormPlus)
|
|
case "regions":
|
|
parseMapPlus(p, &obj.Regions, parseRegionPlus)
|
|
case "rivers":
|
|
parseArray(p, &obj.Rivers, parseRiver)
|
|
case "sites":
|
|
parseMapPlus(p, &obj.Sites, parseSitePlus)
|
|
case "underground_regions":
|
|
parseMapPlus(p, &obj.UndergroundRegions, parseUndergroundRegionPlus)
|
|
case "world_constructions":
|
|
parseMapPlus(p, &obj.WorldConstructions, parseWorldConstructionPlus)
|
|
case "written_contents":
|
|
parseMapPlus(p, &obj.WrittenContents, parseWrittenContentPlus)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntity(p *util.XMLParser) (*Entity, error) {
|
|
var (
|
|
obj = &Entity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "honor":
|
|
v, _ := parseHonor(p)
|
|
obj.Honor = append(obj.Honor, v)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPlus(p *util.XMLParser, obj *Entity) (*Entity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Entity{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "child":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Child = append(obj.Child, num(data))
|
|
case "claims":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Claims = txt(data)
|
|
case "entity_link":
|
|
v, _ := parseEntityEntityLinkPlus(p, &EntityEntityLink{})
|
|
obj.EntityLink = append(obj.EntityLink, v)
|
|
case "entity_position":
|
|
v, _ := parseEntityPositionPlus(p, &EntityPosition{})
|
|
obj.EntityPosition = append(obj.EntityPosition, v)
|
|
case "entity_position_assignment":
|
|
v, _ := parseEntityPositionAssignmentPlus(p, &EntityPositionAssignment{})
|
|
obj.EntityPositionAssignment = append(obj.EntityPositionAssignment, v)
|
|
case "histfig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistfigId = append(obj.HistfigId, num(data))
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "occasion":
|
|
v, _ := parseOccasionPlus(p, &Occasion{})
|
|
obj.Occasion = append(obj.Occasion, v)
|
|
case "profession":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Profession = parseEntityProfession(txt(data))
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseEntityType(txt(data))
|
|
case "weapon":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Weapon = append(obj.Weapon, parseEntityWeapon(txt(data)))
|
|
case "worship_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WorshipId = append(obj.WorshipId, num(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityEntityLink(p *util.XMLParser) (*EntityEntityLink, error) {
|
|
var (
|
|
obj = &EntityEntityLink{}
|
|
)
|
|
|
|
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 parseEntityEntityLinkPlus(p *util.XMLParser, obj *EntityEntityLink) (*EntityEntityLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityEntityLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "strength":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Strength = num(data)
|
|
case "target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Target = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseEntityEntityLinkType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityFormerPositionLink(p *util.XMLParser) (*EntityFormerPositionLink, error) {
|
|
var (
|
|
obj = &EntityFormerPositionLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "end_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EndYear = num(data)
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionProfileId = num(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityFormerPositionLinkPlus(p *util.XMLParser, obj *EntityFormerPositionLink) (*EntityFormerPositionLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityFormerPositionLink{}
|
|
}
|
|
|
|
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 parseEntityFormerSquadLink(p *util.XMLParser) (*EntityFormerSquadLink, error) {
|
|
var (
|
|
obj = &EntityFormerSquadLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "end_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EndYear = num(data)
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "squad_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SquadId = num(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityFormerSquadLinkPlus(p *util.XMLParser, obj *EntityFormerSquadLink) (*EntityFormerSquadLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityFormerSquadLink{}
|
|
}
|
|
|
|
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 parseEntityPopulation(p *util.XMLParser) (*EntityPopulation, error) {
|
|
var (
|
|
obj = &EntityPopulation{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPopulationPlus(p *util.XMLParser, obj *EntityPopulation) (*EntityPopulation, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityPopulation{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPosition(p *util.XMLParser) (*EntityPosition, error) {
|
|
var (
|
|
obj = &EntityPosition{}
|
|
)
|
|
|
|
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 parseEntityPositionPlus(p *util.XMLParser, obj *EntityPosition) (*EntityPosition, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityPosition{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "name_female":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NameFemale = txt(data)
|
|
case "name_male":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NameMale = txt(data)
|
|
case "spouse":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Spouse = txt(data)
|
|
case "spouse_female":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SpouseFemale = txt(data)
|
|
case "spouse_male":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SpouseMale = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPositionAssignment(p *util.XMLParser) (*EntityPositionAssignment, error) {
|
|
var (
|
|
obj = &EntityPositionAssignment{}
|
|
)
|
|
|
|
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 parseEntityPositionAssignmentPlus(p *util.XMLParser, obj *EntityPositionAssignment) (*EntityPositionAssignment, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityPositionAssignment{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "position_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionId = num(data)
|
|
case "squad_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SquadId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPositionLink(p *util.XMLParser) (*EntityPositionLink, error) {
|
|
var (
|
|
obj = &EntityPositionLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionProfileId = num(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityPositionLinkPlus(p *util.XMLParser, obj *EntityPositionLink) (*EntityPositionLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityPositionLink{}
|
|
}
|
|
|
|
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 parseEntityReputation(p *util.XMLParser) (*EntityReputation, error) {
|
|
var (
|
|
obj = &EntityReputation{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "first_ageless_season_count":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FirstAgelessSeasonCount = num(data)
|
|
case "first_ageless_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FirstAgelessYear = num(data)
|
|
case "rep_bard":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepBard = num(data)
|
|
case "rep_enemy_fighter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepEnemyFighter = num(data)
|
|
case "rep_hero":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHero = num(data)
|
|
case "rep_hunter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHunter = num(data)
|
|
case "rep_killer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepKiller = num(data)
|
|
case "rep_knowledge_preserver":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepKnowledgePreserver = num(data)
|
|
case "rep_poet":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepPoet = num(data)
|
|
case "rep_protector_of_weak":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepProtectorOfWeak = num(data)
|
|
case "rep_storyteller":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepStoryteller = num(data)
|
|
case "rep_thief":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepThief = num(data)
|
|
case "rep_treasure_hunter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepTreasureHunter = num(data)
|
|
case "unsolved_murders":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnsolvedMurders = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntityReputationPlus(p *util.XMLParser, obj *EntityReputation) (*EntityReputation, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntityReputation{}
|
|
}
|
|
|
|
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 parseEntitySquadLink(p *util.XMLParser) (*EntitySquadLink, error) {
|
|
var (
|
|
obj = &EntitySquadLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "squad_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SquadId = num(data)
|
|
case "squad_position":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SquadPosition = num(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseEntitySquadLinkPlus(p *util.XMLParser, obj *EntitySquadLink) (*EntitySquadLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &EntitySquadLink{}
|
|
}
|
|
|
|
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 parseFeature(p *util.XMLParser) (*Feature, error) {
|
|
var (
|
|
obj = &Feature{}
|
|
)
|
|
|
|
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 parseFeaturePlus(p *util.XMLParser, obj *Feature) (*Feature, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Feature{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "reference":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reference = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseFeatureType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHfLink(p *util.XMLParser) (*HfLink, error) {
|
|
var (
|
|
obj = &HfLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "link_strength":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkStrength = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseHfLinkLinkType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHfLinkPlus(p *util.XMLParser, obj *HfLink) (*HfLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HfLink{}
|
|
}
|
|
|
|
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 parseHfSkill(p *util.XMLParser) (*HfSkill, error) {
|
|
var (
|
|
obj = &HfSkill{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "skill":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Skill = txt(data)
|
|
case "total_ip":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TotalIp = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHfSkillPlus(p *util.XMLParser, obj *HfSkill) (*HfSkill, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HfSkill{}
|
|
}
|
|
|
|
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 parseHistoricalEra(p *util.XMLParser) (*HistoricalEra, error) {
|
|
var (
|
|
obj = &HistoricalEra{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEraPlus(p *util.XMLParser, obj *HistoricalEra) (*HistoricalEra, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEra{}
|
|
}
|
|
|
|
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 parseHistoricalEvent(p *util.XMLParser) (*HistoricalEvent, error) {
|
|
var (
|
|
obj = &HistoricalEvent{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Seconds72 = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch string(data) {
|
|
case "add hf entity honor":
|
|
obj.Details, err = parseHistoricalEventAddHfEntityHonor(p)
|
|
case "add hf entity link":
|
|
obj.Details, err = parseHistoricalEventAddHfEntityLink(p)
|
|
case "add hf hf link":
|
|
obj.Details, err = parseHistoricalEventAddHfHfLink(p)
|
|
case "add hf site link":
|
|
obj.Details, err = parseHistoricalEventAddHfSiteLink(p)
|
|
case "agreement formed":
|
|
obj.Details, err = parseHistoricalEventAgreementFormed(p)
|
|
case "agreement made":
|
|
obj.Details, err = parseHistoricalEventAgreementMade(p)
|
|
case "agreement rejected":
|
|
obj.Details, err = parseHistoricalEventAgreementRejected(p)
|
|
case "artifact claim formed":
|
|
obj.Details, err = parseHistoricalEventArtifactClaimFormed(p)
|
|
case "artifact copied":
|
|
obj.Details, err = parseHistoricalEventArtifactCopied(p)
|
|
case "artifact created":
|
|
obj.Details, err = parseHistoricalEventArtifactCreated(p)
|
|
case "artifact destroyed":
|
|
obj.Details, err = parseHistoricalEventArtifactDestroyed(p)
|
|
case "artifact found":
|
|
obj.Details, err = parseHistoricalEventArtifactFound(p)
|
|
case "artifact given":
|
|
obj.Details, err = parseHistoricalEventArtifactGiven(p)
|
|
case "artifact lost":
|
|
obj.Details, err = parseHistoricalEventArtifactLost(p)
|
|
case "artifact possessed":
|
|
obj.Details, err = parseHistoricalEventArtifactPossessed(p)
|
|
case "artifact recovered":
|
|
obj.Details, err = parseHistoricalEventArtifactRecovered(p)
|
|
case "artifact stored":
|
|
obj.Details, err = parseHistoricalEventArtifactStored(p)
|
|
case "artifact transformed":
|
|
obj.Details, err = parseHistoricalEventArtifactTransformed(p)
|
|
case "assume identity":
|
|
obj.Details, err = parseHistoricalEventAssumeIdentity(p)
|
|
case "attacked site":
|
|
obj.Details, err = parseHistoricalEventAttackedSite(p)
|
|
case "body abused":
|
|
obj.Details, err = parseHistoricalEventBodyAbused(p)
|
|
case "building profile acquired":
|
|
obj.Details, err = parseHistoricalEventBuildingProfileAcquired(p)
|
|
case "ceremony":
|
|
obj.Details, err = parseHistoricalEventCeremony(p)
|
|
case "change hf body state":
|
|
obj.Details, err = parseHistoricalEventChangeHfBodyState(p)
|
|
case "change hf job":
|
|
obj.Details, err = parseHistoricalEventChangeHfJob(p)
|
|
case "change hf state":
|
|
obj.Details, err = parseHistoricalEventChangeHfState(p)
|
|
case "changed creature type":
|
|
obj.Details, err = parseHistoricalEventChangedCreatureType(p)
|
|
case "competition":
|
|
obj.Details, err = parseHistoricalEventCompetition(p)
|
|
case "create entity position":
|
|
obj.Details, err = parseHistoricalEventCreateEntityPosition(p)
|
|
case "created site":
|
|
obj.Details, err = parseHistoricalEventCreatedSite(p)
|
|
case "created structure":
|
|
obj.Details, err = parseHistoricalEventCreatedStructure(p)
|
|
case "created world construction":
|
|
obj.Details, err = parseHistoricalEventCreatedWorldConstruction(p)
|
|
case "creature devoured":
|
|
obj.Details, err = parseHistoricalEventCreatureDevoured(p)
|
|
case "dance form created":
|
|
obj.Details, err = parseHistoricalEventDanceFormCreated(p)
|
|
case "destroyed site":
|
|
obj.Details, err = parseHistoricalEventDestroyedSite(p)
|
|
case "diplomat lost":
|
|
obj.Details, err = parseHistoricalEventDiplomatLost(p)
|
|
case "entity alliance formed":
|
|
obj.Details, err = parseHistoricalEventEntityAllianceFormed(p)
|
|
case "entity breach feature layer":
|
|
obj.Details, err = parseHistoricalEventEntityBreachFeatureLayer(p)
|
|
case "entity created":
|
|
obj.Details, err = parseHistoricalEventEntityCreated(p)
|
|
case "entity dissolved":
|
|
obj.Details, err = parseHistoricalEventEntityDissolved(p)
|
|
case "entity equipment purchase":
|
|
obj.Details, err = parseHistoricalEventEntityEquipmentPurchase(p)
|
|
case "entity expels hf":
|
|
obj.Details, err = parseHistoricalEventEntityExpelsHf(p)
|
|
case "entity fled site":
|
|
obj.Details, err = parseHistoricalEventEntityFledSite(p)
|
|
case "entity incorporated":
|
|
obj.Details, err = parseHistoricalEventEntityIncorporated(p)
|
|
case "entity law":
|
|
obj.Details, err = parseHistoricalEventEntityLaw(p)
|
|
case "entity overthrown":
|
|
obj.Details, err = parseHistoricalEventEntityOverthrown(p)
|
|
case "entity persecuted":
|
|
obj.Details, err = parseHistoricalEventEntityPersecuted(p)
|
|
case "entity primary criminals":
|
|
obj.Details, err = parseHistoricalEventEntityPrimaryCriminals(p)
|
|
case "entity rampaged in site":
|
|
obj.Details, err = parseHistoricalEventEntityRampagedInSite(p)
|
|
case "entity relocate":
|
|
obj.Details, err = parseHistoricalEventEntityRelocate(p)
|
|
case "entity searched site":
|
|
obj.Details, err = parseHistoricalEventEntitySearchedSite(p)
|
|
case "failed frame attempt":
|
|
obj.Details, err = parseHistoricalEventFailedFrameAttempt(p)
|
|
case "failed intrigue corruption":
|
|
obj.Details, err = parseHistoricalEventFailedIntrigueCorruption(p)
|
|
case "field battle":
|
|
obj.Details, err = parseHistoricalEventFieldBattle(p)
|
|
case "first contact":
|
|
obj.Details, err = parseHistoricalEventFirstContact(p)
|
|
case "gamble":
|
|
obj.Details, err = parseHistoricalEventGamble(p)
|
|
case "hf abducted":
|
|
obj.Details, err = parseHistoricalEventHfAbducted(p)
|
|
case "hf attacked site":
|
|
obj.Details, err = parseHistoricalEventHfAttackedSite(p)
|
|
case "hf confronted":
|
|
obj.Details, err = parseHistoricalEventHfConfronted(p)
|
|
case "hf convicted":
|
|
obj.Details, err = parseHistoricalEventHfConvicted(p)
|
|
case "hf destroyed site":
|
|
obj.Details, err = parseHistoricalEventHfDestroyedSite(p)
|
|
case "hf died":
|
|
obj.Details, err = parseHistoricalEventHfDied(p)
|
|
case "hf disturbed structure":
|
|
obj.Details, err = parseHistoricalEventHfDisturbedStructure(p)
|
|
case "hf does interaction":
|
|
obj.Details, err = parseHistoricalEventHfDoesInteraction(p)
|
|
case "hf enslaved":
|
|
obj.Details, err = parseHistoricalEventHfEnslaved(p)
|
|
case "hf equipment purchase":
|
|
obj.Details, err = parseHistoricalEventHfEquipmentPurchase(p)
|
|
case "hf freed":
|
|
obj.Details, err = parseHistoricalEventHfFreed(p)
|
|
case "hf gains secret goal":
|
|
obj.Details, err = parseHistoricalEventHfGainsSecretGoal(p)
|
|
case "hf interrogated":
|
|
obj.Details, err = parseHistoricalEventHfInterrogated(p)
|
|
case "hf learns secret":
|
|
obj.Details, err = parseHistoricalEventHfLearnsSecret(p)
|
|
case "hf new pet":
|
|
obj.Details, err = parseHistoricalEventHfNewPet(p)
|
|
case "hf performed horrible experiments":
|
|
obj.Details, err = parseHistoricalEventHfPerformedHorribleExperiments(p)
|
|
case "hf prayed inside structure":
|
|
obj.Details, err = parseHistoricalEventHfPrayedInsideStructure(p)
|
|
case "hf preach":
|
|
obj.Details, err = parseHistoricalEventHfPreach(p)
|
|
case "hf profaned structure":
|
|
obj.Details, err = parseHistoricalEventHfProfanedStructure(p)
|
|
case "hf ransomed":
|
|
obj.Details, err = parseHistoricalEventHfRansomed(p)
|
|
case "hf reach summit":
|
|
obj.Details, err = parseHistoricalEventHfReachSummit(p)
|
|
case "hf recruited unit type for entity":
|
|
obj.Details, err = parseHistoricalEventHfRecruitedUnitTypeForEntity(p)
|
|
case "hf relationship denied":
|
|
obj.Details, err = parseHistoricalEventHfRelationshipDenied(p)
|
|
case "hf reunion":
|
|
obj.Details, err = parseHistoricalEventHfReunion(p)
|
|
case "hf revived":
|
|
obj.Details, err = parseHistoricalEventHfRevived(p)
|
|
case "hf simple battle event":
|
|
obj.Details, err = parseHistoricalEventHfSimpleBattleEvent(p)
|
|
case "hf travel":
|
|
obj.Details, err = parseHistoricalEventHfTravel(p)
|
|
case "hf viewed artifact":
|
|
obj.Details, err = parseHistoricalEventHfViewedArtifact(p)
|
|
case "hf wounded":
|
|
obj.Details, err = parseHistoricalEventHfWounded(p)
|
|
case "hfs formed intrigue relationship":
|
|
obj.Details, err = parseHistoricalEventHfsFormedIntrigueRelationship(p)
|
|
case "hfs formed reputation relationship":
|
|
obj.Details, err = parseHistoricalEventHfsFormedReputationRelationship(p)
|
|
case "holy city declaration":
|
|
obj.Details, err = parseHistoricalEventHolyCityDeclaration(p)
|
|
case "insurrection started":
|
|
obj.Details, err = parseHistoricalEventInsurrectionStarted(p)
|
|
case "item stolen":
|
|
obj.Details, err = parseHistoricalEventItemStolen(p)
|
|
case "knowledge discovered":
|
|
obj.Details, err = parseHistoricalEventKnowledgeDiscovered(p)
|
|
case "masterpiece arch constructed":
|
|
obj.Details, err = parseHistoricalEventMasterpieceArchConstructed(p)
|
|
case "masterpiece engraving":
|
|
obj.Details, err = parseHistoricalEventMasterpieceEngraving(p)
|
|
case "masterpiece food":
|
|
obj.Details, err = parseHistoricalEventMasterpieceFood(p)
|
|
case "masterpiece item":
|
|
obj.Details, err = parseHistoricalEventMasterpieceItem(p)
|
|
case "masterpiece item improvement":
|
|
obj.Details, err = parseHistoricalEventMasterpieceItemImprovement(p)
|
|
case "masterpiece lost":
|
|
obj.Details, err = parseHistoricalEventMasterpieceLost(p)
|
|
case "merchant":
|
|
obj.Details, err = parseHistoricalEventMerchant(p)
|
|
case "modified building":
|
|
obj.Details, err = parseHistoricalEventModifiedBuilding(p)
|
|
case "musical form created":
|
|
obj.Details, err = parseHistoricalEventMusicalFormCreated(p)
|
|
case "new site leader":
|
|
obj.Details, err = parseHistoricalEventNewSiteLeader(p)
|
|
case "peace accepted":
|
|
obj.Details, err = parseHistoricalEventPeaceAccepted(p)
|
|
case "peace rejected":
|
|
obj.Details, err = parseHistoricalEventPeaceRejected(p)
|
|
case "performance":
|
|
obj.Details, err = parseHistoricalEventPerformance(p)
|
|
case "plundered site":
|
|
obj.Details, err = parseHistoricalEventPlunderedSite(p)
|
|
case "poetic form created":
|
|
obj.Details, err = parseHistoricalEventPoeticFormCreated(p)
|
|
case "procession":
|
|
obj.Details, err = parseHistoricalEventProcession(p)
|
|
case "razed structure":
|
|
obj.Details, err = parseHistoricalEventRazedStructure(p)
|
|
case "reclaim site":
|
|
obj.Details, err = parseHistoricalEventReclaimSite(p)
|
|
case "regionpop incorporated into entity":
|
|
obj.Details, err = parseHistoricalEventRegionpopIncorporatedIntoEntity(p)
|
|
case "remove hf entity link":
|
|
obj.Details, err = parseHistoricalEventRemoveHfEntityLink(p)
|
|
case "remove hf hf link":
|
|
obj.Details, err = parseHistoricalEventRemoveHfHfLink(p)
|
|
case "remove hf site link":
|
|
obj.Details, err = parseHistoricalEventRemoveHfSiteLink(p)
|
|
case "replaced structure":
|
|
obj.Details, err = parseHistoricalEventReplacedStructure(p)
|
|
case "site died":
|
|
obj.Details, err = parseHistoricalEventSiteDied(p)
|
|
case "site dispute":
|
|
obj.Details, err = parseHistoricalEventSiteDispute(p)
|
|
case "site retired":
|
|
obj.Details, err = parseHistoricalEventSiteRetired(p)
|
|
case "site surrendered":
|
|
obj.Details, err = parseHistoricalEventSiteSurrendered(p)
|
|
case "site taken over":
|
|
obj.Details, err = parseHistoricalEventSiteTakenOver(p)
|
|
case "site tribute forced":
|
|
obj.Details, err = parseHistoricalEventSiteTributeForced(p)
|
|
case "sneak into site":
|
|
obj.Details, err = parseHistoricalEventSneakIntoSite(p)
|
|
case "spotted leaving site":
|
|
obj.Details, err = parseHistoricalEventSpottedLeavingSite(p)
|
|
case "squad vs squad":
|
|
obj.Details, err = parseHistoricalEventSquadVsSquad(p)
|
|
case "tactical situation":
|
|
obj.Details, err = parseHistoricalEventTacticalSituation(p)
|
|
case "trade":
|
|
obj.Details, err = parseHistoricalEventTrade(p)
|
|
case "written content composed":
|
|
obj.Details, err = parseHistoricalEventWrittenContentComposed(p)
|
|
default:
|
|
p.Skip()
|
|
}
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return obj, nil
|
|
case "year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Year = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventPlus(p *util.XMLParser, obj *HistoricalEvent) (*HistoricalEvent, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEvent{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch string(data) {
|
|
case "add_hf_entity_link":
|
|
obj.Details, err = parseHistoricalEventAddHfEntityLinkPlus(p, obj.Details.(*HistoricalEventAddHfEntityLink))
|
|
case "add_hf_hf_link":
|
|
obj.Details, err = parseHistoricalEventAddHfHfLinkPlus(p, obj.Details.(*HistoricalEventAddHfHfLink))
|
|
case "add_hf_site_link":
|
|
obj.Details, err = parseHistoricalEventAddHfSiteLinkPlus(p, obj.Details.(*HistoricalEventAddHfSiteLink))
|
|
case "artifact_created":
|
|
obj.Details, err = parseHistoricalEventArtifactCreatedPlus(p, obj.Details.(*HistoricalEventArtifactCreated))
|
|
case "assume_identity":
|
|
obj.Details, err = parseHistoricalEventAssumeIdentityPlus(p, obj.Details.(*HistoricalEventAssumeIdentity))
|
|
case "body_abused":
|
|
obj.Details, err = parseHistoricalEventBodyAbusedPlus(p, obj.Details.(*HistoricalEventBodyAbused))
|
|
case "change_creature_type":
|
|
obj.Details, err = parseHistoricalEventChangedCreatureTypePlus(p, obj.Details.(*HistoricalEventChangedCreatureType))
|
|
case "change_hf_job":
|
|
obj.Details, err = parseHistoricalEventChangeHfJobPlus(p, obj.Details.(*HistoricalEventChangeHfJob))
|
|
case "change_hf_state":
|
|
obj.Details, err = parseHistoricalEventChangeHfStatePlus(p, obj.Details.(*HistoricalEventChangeHfState))
|
|
case "create_entity_position":
|
|
obj.Details, err = parseHistoricalEventCreateEntityPositionPlus(p, obj.Details.(*HistoricalEventCreateEntityPosition))
|
|
case "created_building":
|
|
obj.Details, err = parseHistoricalEventCreatedStructurePlus(p, obj.Details.(*HistoricalEventCreatedStructure))
|
|
case "creature_devoured":
|
|
obj.Details, err = parseHistoricalEventCreatureDevouredPlus(p, obj.Details.(*HistoricalEventCreatureDevoured))
|
|
case "diplomat_lost":
|
|
obj.Details, err = parseHistoricalEventDiplomatLostPlus(p, obj.Details.(*HistoricalEventDiplomatLost))
|
|
case "entity_action":
|
|
switch details := obj.Details.(type) {
|
|
case *HistoricalEventEntityPrimaryCriminals:
|
|
obj.Details, err = parseHistoricalEventEntityPrimaryCriminalsPlus(p, details)
|
|
case *HistoricalEventEntityRelocate:
|
|
obj.Details, err = parseHistoricalEventEntityRelocatePlus(p, details)
|
|
default:
|
|
fmt.Println("unknown subtype option", obj.Details)
|
|
p.Skip()
|
|
}
|
|
case "hf_act_on_building":
|
|
switch details := obj.Details.(type) {
|
|
case *HistoricalEventHfDisturbedStructure:
|
|
obj.Details, err = parseHistoricalEventHfDisturbedStructurePlus(p, details)
|
|
case *HistoricalEventHfPrayedInsideStructure:
|
|
obj.Details, err = parseHistoricalEventHfPrayedInsideStructurePlus(p, details)
|
|
case *HistoricalEventHfProfanedStructure:
|
|
obj.Details, err = parseHistoricalEventHfProfanedStructurePlus(p, details)
|
|
default:
|
|
fmt.Println("unknown subtype option", obj.Details)
|
|
p.Skip()
|
|
}
|
|
case "hf_does_interaction":
|
|
obj.Details, err = parseHistoricalEventHfDoesInteractionPlus(p, obj.Details.(*HistoricalEventHfDoesInteraction))
|
|
case "hf_learns_secret":
|
|
obj.Details, err = parseHistoricalEventHfLearnsSecretPlus(p, obj.Details.(*HistoricalEventHfLearnsSecret))
|
|
case "hist_figure_died":
|
|
obj.Details, err = parseHistoricalEventHfDiedPlus(p, obj.Details.(*HistoricalEventHfDied))
|
|
case "hist_figure_new_pet":
|
|
obj.Details, err = parseHistoricalEventHfNewPetPlus(p, obj.Details.(*HistoricalEventHfNewPet))
|
|
case "hist_figure_wounded":
|
|
obj.Details, err = parseHistoricalEventHfWoundedPlus(p, obj.Details.(*HistoricalEventHfWounded))
|
|
case "item_stolen":
|
|
obj.Details, err = parseHistoricalEventItemStolenPlus(p, obj.Details.(*HistoricalEventItemStolen))
|
|
case "masterpiece_created_arch_construct":
|
|
obj.Details, err = parseHistoricalEventMasterpieceArchConstructedPlus(p, obj.Details.(*HistoricalEventMasterpieceArchConstructed))
|
|
case "masterpiece_created_engraving":
|
|
obj.Details, err = parseHistoricalEventMasterpieceEngravingPlus(p, obj.Details.(*HistoricalEventMasterpieceEngraving))
|
|
case "masterpiece_created_item":
|
|
obj.Details, err = parseHistoricalEventMasterpieceItemPlus(p, obj.Details.(*HistoricalEventMasterpieceItem))
|
|
case "masterpiece_lost":
|
|
obj.Details, err = parseHistoricalEventMasterpieceLostPlus(p, obj.Details.(*HistoricalEventMasterpieceLost))
|
|
case "merchant":
|
|
obj.Details, err = parseHistoricalEventMerchantPlus(p, obj.Details.(*HistoricalEventMerchant))
|
|
case "remove_hf_entity_link":
|
|
obj.Details, err = parseHistoricalEventRemoveHfEntityLinkPlus(p, obj.Details.(*HistoricalEventRemoveHfEntityLink))
|
|
case "remove_hf_site_link":
|
|
obj.Details, err = parseHistoricalEventRemoveHfSiteLinkPlus(p, obj.Details.(*HistoricalEventRemoveHfSiteLink))
|
|
case "replaced_building":
|
|
obj.Details, err = parseHistoricalEventReplacedStructurePlus(p, obj.Details.(*HistoricalEventReplacedStructure))
|
|
case "war_peace_accepted":
|
|
obj.Details, err = parseHistoricalEventPeaceAcceptedPlus(p, obj.Details.(*HistoricalEventPeaceAccepted))
|
|
case "war_peace_rejected":
|
|
obj.Details, err = parseHistoricalEventPeaceRejectedPlus(p, obj.Details.(*HistoricalEventPeaceRejected))
|
|
default:
|
|
p.Skip()
|
|
}
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return obj, nil
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfEntityHonor(p *util.XMLParser) (*HistoricalEventAddHfEntityHonor, error) {
|
|
var (
|
|
obj = &HistoricalEventAddHfEntityHonor{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "honor_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HonorId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfEntityHonorPlus(p *util.XMLParser, obj *HistoricalEventAddHfEntityHonor) (*HistoricalEventAddHfEntityHonor, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAddHfEntityHonor{}
|
|
}
|
|
|
|
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 parseHistoricalEventAddHfEntityLink(p *util.XMLParser) (*HistoricalEventAddHfEntityLink, error) {
|
|
var (
|
|
obj = &HistoricalEventAddHfEntityLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "appointer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AppointerHfid = num(data)
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "link":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Link = parseHistoricalEventAddHfEntityLinkLink(txt(data))
|
|
case "position_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionId = num(data)
|
|
case "promise_to_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PromiseToHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfEntityLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfEntityLink) (*HistoricalEventAddHfEntityLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAddHfEntityLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "appointer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AppointerHfid = num(data)
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Link = parseHistoricalEventAddHfEntityLinkLink(txt(data))
|
|
case "position":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Position = txt(data)
|
|
case "promise_to_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PromiseToHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfHfLink(p *util.XMLParser) (*HistoricalEventAddHfHfLink, error) {
|
|
var (
|
|
obj = &HistoricalEventAddHfHfLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "hfid_target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfidTarget = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfHfLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfHfLink) (*HistoricalEventAddHfHfLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAddHfHfLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "hf_target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfidTarget = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseHistoricalEventAddHfHfLinkLinkType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAddHfSiteLink(p *util.XMLParser) (*HistoricalEventAddHfSiteLink, error) {
|
|
var (
|
|
obj = &HistoricalEventAddHfSiteLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventAddHfSiteLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfSiteLink) (*HistoricalEventAddHfSiteLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAddHfSiteLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Civ = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseHistoricalEventAddHfSiteLinkLinkType(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Structure = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAgreementFormed(p *util.XMLParser) (*HistoricalEventAgreementFormed, error) {
|
|
var (
|
|
obj = &HistoricalEventAgreementFormed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventAgreementFormedAction(txt(data))
|
|
case "agreement_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AgreementId = num(data)
|
|
case "agreement_subject_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AgreementSubjectId = num(data)
|
|
case "ally_defense_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AllyDefenseBonus = num(data)
|
|
case "coconspirator_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CoconspiratorBonus = num(data)
|
|
case "concluder_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConcluderHfid = num(data)
|
|
case "delegated":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Delegated = true
|
|
case "failed_judgment_test":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FailedJudgmentTest = true
|
|
case "method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Method = parseHistoricalEventAgreementFormedMethod(txt(data))
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventAgreementFormedReason(txt(data))
|
|
case "relevant_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantEntityId = num(data)
|
|
case "relevant_id_for_method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantIdForMethod = num(data)
|
|
case "relevant_position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantPositionProfileId = num(data)
|
|
case "successful":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Successful = true
|
|
case "top_facet":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacet = parseHistoricalEventAgreementFormedTopFacet(txt(data))
|
|
case "top_facet_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetModifier = num(data)
|
|
case "top_facet_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetRating = num(data)
|
|
case "top_relationship_factor":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipFactor = parseHistoricalEventAgreementFormedTopRelationshipFactor(txt(data))
|
|
case "top_relationship_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipModifier = num(data)
|
|
case "top_relationship_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipRating = num(data)
|
|
case "top_value":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValue = parseHistoricalEventAgreementFormedTopValue(txt(data))
|
|
case "top_value_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueModifier = num(data)
|
|
case "top_value_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueRating = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAgreementFormedPlus(p *util.XMLParser, obj *HistoricalEventAgreementFormed) (*HistoricalEventAgreementFormed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAgreementFormed{}
|
|
}
|
|
|
|
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 parseHistoricalEventAgreementMade(p *util.XMLParser) (*HistoricalEventAgreementMade, error) {
|
|
var (
|
|
obj = &HistoricalEventAgreementMade{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventAgreementMadePlus(p *util.XMLParser, obj *HistoricalEventAgreementMade) (*HistoricalEventAgreementMade, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAgreementMade{}
|
|
}
|
|
|
|
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 parseHistoricalEventAgreementRejected(p *util.XMLParser) (*HistoricalEventAgreementRejected, error) {
|
|
var (
|
|
obj = &HistoricalEventAgreementRejected{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventAgreementRejectedPlus(p *util.XMLParser, obj *HistoricalEventAgreementRejected) (*HistoricalEventAgreementRejected, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAgreementRejected{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactClaimFormed(p *util.XMLParser) (*HistoricalEventArtifactClaimFormed, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactClaimFormed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventArtifactClaimFormedCircumstance(txt(data))
|
|
case "claim":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Claim = parseHistoricalEventArtifactClaimFormedClaim(txt(data))
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionProfileId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactClaimFormedPlus(p *util.XMLParser, obj *HistoricalEventArtifactClaimFormed) (*HistoricalEventArtifactClaimFormed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactClaimFormed{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactCopied(p *util.XMLParser) (*HistoricalEventArtifactCopied, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactCopied{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "dest_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestEntityId = num(data)
|
|
case "dest_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestSiteId = num(data)
|
|
case "dest_structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestStructureId = num(data)
|
|
case "from_original":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FromOriginal = true
|
|
case "source_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SourceEntityId = num(data)
|
|
case "source_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SourceSiteId = num(data)
|
|
case "source_structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SourceStructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactCopiedPlus(p *util.XMLParser, obj *HistoricalEventArtifactCopied) (*HistoricalEventArtifactCopied, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactCopied{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactCreated(p *util.XMLParser) (*HistoricalEventArtifactCreated, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactCreated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "name_only":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NameOnly = true
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactCreatedPlus(p *util.XMLParser, obj *HistoricalEventArtifactCreated) (*HistoricalEventArtifactCreated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactCreated{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "circumstance":
|
|
v, _ := parseHistoricalEventArtifactCreatedCircumstancePlus(p, &HistoricalEventArtifactCreatedCircumstance{})
|
|
obj.Circumstance = v
|
|
case "creator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "creator_unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventArtifactCreatedReason(txt(data))
|
|
case "sanctify_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SanctifyHf = num(data)
|
|
case "site":
|
|
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 parseHistoricalEventArtifactCreatedCircumstance(p *util.XMLParser) (*HistoricalEventArtifactCreatedCircumstance, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactCreatedCircumstance{}
|
|
)
|
|
|
|
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 parseHistoricalEventArtifactCreatedCircumstancePlus(p *util.XMLParser, obj *HistoricalEventArtifactCreatedCircumstance) (*HistoricalEventArtifactCreatedCircumstance, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactCreatedCircumstance{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "defeated":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Defeated = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseHistoricalEventArtifactCreatedCircumstanceType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactDestroyed(p *util.XMLParser) (*HistoricalEventArtifactDestroyed, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactDestroyed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "destroyer_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestroyerEnid = 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 parseHistoricalEventArtifactDestroyedPlus(p *util.XMLParser, obj *HistoricalEventArtifactDestroyed) (*HistoricalEventArtifactDestroyed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactDestroyed{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactFound(p *util.XMLParser) (*HistoricalEventArtifactFound, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactFound{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactFoundPlus(p *util.XMLParser, obj *HistoricalEventArtifactFound) (*HistoricalEventArtifactFound, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactFound{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactGiven(p *util.XMLParser) (*HistoricalEventArtifactGiven, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactGiven{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "giver_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GiverEntityId = num(data)
|
|
case "giver_hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GiverHistFigureId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventArtifactGivenReason(txt(data))
|
|
case "receiver_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReceiverEntityId = num(data)
|
|
case "receiver_hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReceiverHistFigureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactGivenPlus(p *util.XMLParser, obj *HistoricalEventArtifactGiven) (*HistoricalEventArtifactGiven, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactGiven{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactLost(p *util.XMLParser) (*HistoricalEventArtifactLost, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactLost{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "site_property_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SitePropertyId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactLostPlus(p *util.XMLParser, obj *HistoricalEventArtifactLost) (*HistoricalEventArtifactLost, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactLost{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactPossessed(p *util.XMLParser) (*HistoricalEventArtifactPossessed, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactPossessed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventArtifactPossessedCircumstance(txt(data))
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventArtifactPossessedReason(txt(data))
|
|
case "reason_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReasonId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactPossessedPlus(p *util.XMLParser, obj *HistoricalEventArtifactPossessed) (*HistoricalEventArtifactPossessed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactPossessed{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactRecovered(p *util.XMLParser) (*HistoricalEventArtifactRecovered, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactRecovered{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactRecoveredPlus(p *util.XMLParser, obj *HistoricalEventArtifactRecovered) (*HistoricalEventArtifactRecovered, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactRecovered{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactStored(p *util.XMLParser) (*HistoricalEventArtifactStored, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactStored{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactStoredPlus(p *util.XMLParser, obj *HistoricalEventArtifactStored) (*HistoricalEventArtifactStored, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactStored{}
|
|
}
|
|
|
|
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 parseHistoricalEventArtifactTransformed(p *util.XMLParser) (*HistoricalEventArtifactTransformed, error) {
|
|
var (
|
|
obj = &HistoricalEventArtifactTransformed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "new_artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewArtifactId = num(data)
|
|
case "old_artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldArtifactId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "unit_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventArtifactTransformedPlus(p *util.XMLParser, obj *HistoricalEventArtifactTransformed) (*HistoricalEventArtifactTransformed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventArtifactTransformed{}
|
|
}
|
|
|
|
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 parseHistoricalEventAssumeIdentity(p *util.XMLParser) (*HistoricalEventAssumeIdentity, error) {
|
|
var (
|
|
obj = &HistoricalEventAssumeIdentity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "identity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityId = num(data)
|
|
case "target_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEnid = num(data)
|
|
case "trickster_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TricksterHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAssumeIdentityPlus(p *util.XMLParser, obj *HistoricalEventAssumeIdentity) (*HistoricalEventAssumeIdentity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAssumeIdentity{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "identity_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityCaste = txt(data)
|
|
case "identity_histfig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TricksterHfid = num(data)
|
|
case "identity_name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityName = txt(data)
|
|
case "identity_nemesis_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TricksterHfid = num(data)
|
|
case "identity_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityRace = txt(data)
|
|
case "target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEnid = num(data)
|
|
case "trickster":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TricksterHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventAttackedSite(p *util.XMLParser) (*HistoricalEventAttackedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventAttackedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "a_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ASupportMercEnid = num(data)
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "attacker_general_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerGeneralHfid = num(data)
|
|
case "attacker_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerMercEnid = num(data)
|
|
case "d_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSupportMercEnid = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "defender_general_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderGeneralHfid = num(data)
|
|
case "defender_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderMercEnid = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventAttackedSitePlus(p *util.XMLParser, obj *HistoricalEventAttackedSite) (*HistoricalEventAttackedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventAttackedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventBodyAbused(p *util.XMLParser) (*HistoricalEventBodyAbused, error) {
|
|
var (
|
|
obj = &HistoricalEventBodyAbused{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventBodyAbusedPlus(p *util.XMLParser, obj *HistoricalEventBodyAbused) (*HistoricalEventBodyAbused, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventBodyAbused{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "abuse_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AbuseType = parseHistoricalEventBodyAbusedAbuseType(txt(data))
|
|
case "bodies":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Bodies = append(obj.Bodies, num(data))
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Civ = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "interaction":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Interaction = num(data)
|
|
case "item_mat":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemMat = txt(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = parseHistoricalEventBodyAbusedItemSubtype(txt(data))
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = parseHistoricalEventBodyAbusedItemType(txt(data))
|
|
case "pile_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PileType = parseHistoricalEventBodyAbusedPileType(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Structure = num(data)
|
|
case "tree":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Tree = num(data)
|
|
case "victim_entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.VictimEntity = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventBuildingProfileAcquired(p *util.XMLParser) (*HistoricalEventBuildingProfileAcquired, error) {
|
|
var (
|
|
obj = &HistoricalEventBuildingProfileAcquired{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "acquirer_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AcquirerEnid = num(data)
|
|
case "acquirer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AcquirerHfid = num(data)
|
|
case "building_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuildingProfileId = num(data)
|
|
case "inherited":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Inherited = true
|
|
case "last_owner_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LastOwnerHfid = num(data)
|
|
case "purchased_unowned":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PurchasedUnowned = true
|
|
case "rebuilt_ruined":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RebuiltRuined = true
|
|
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 parseHistoricalEventBuildingProfileAcquiredPlus(p *util.XMLParser, obj *HistoricalEventBuildingProfileAcquired) (*HistoricalEventBuildingProfileAcquired, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventBuildingProfileAcquired{}
|
|
}
|
|
|
|
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 parseHistoricalEventCeremony(p *util.XMLParser) (*HistoricalEventCeremony, error) {
|
|
var (
|
|
obj = &HistoricalEventCeremony{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "occasion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionId = num(data)
|
|
case "schedule_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ScheduleId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCeremonyPlus(p *util.XMLParser, obj *HistoricalEventCeremony) (*HistoricalEventCeremony, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCeremony{}
|
|
}
|
|
|
|
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 parseHistoricalEventChangeHfBodyState(p *util.XMLParser) (*HistoricalEventChangeHfBodyState, error) {
|
|
var (
|
|
obj = &HistoricalEventChangeHfBodyState{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "body_state":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BodyState = parseHistoricalEventChangeHfBodyStateBodyState(txt(data))
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventChangeHfBodyStatePlus(p *util.XMLParser, obj *HistoricalEventChangeHfBodyState) (*HistoricalEventChangeHfBodyState, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventChangeHfBodyState{}
|
|
}
|
|
|
|
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 parseHistoricalEventChangeHfJob(p *util.XMLParser) (*HistoricalEventChangeHfJob, error) {
|
|
var (
|
|
obj = &HistoricalEventChangeHfJob{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventChangeHfJobPlus(p *util.XMLParser, obj *HistoricalEventChangeHfJob) (*HistoricalEventChangeHfJob, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventChangeHfJob{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "new_job":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewJob = txt(data)
|
|
case "old_job":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldJob = txt(data)
|
|
case "site":
|
|
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 parseHistoricalEventChangeHfState(p *util.XMLParser) (*HistoricalEventChangeHfState, error) {
|
|
var (
|
|
obj = &HistoricalEventChangeHfState{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "mood":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mood = parseHistoricalEventChangeHfStateMood(txt(data))
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventChangeHfStateReason(txt(data))
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "state":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.State = parseHistoricalEventChangeHfStateState(txt(data))
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventChangeHfStatePlus(p *util.XMLParser, obj *HistoricalEventChangeHfState) (*HistoricalEventChangeHfState, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventChangeHfState{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventChangeHfStateReason(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "state":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.State = parseHistoricalEventChangeHfStateState(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventChangedCreatureType(p *util.XMLParser) (*HistoricalEventChangedCreatureType, error) {
|
|
var (
|
|
obj = &HistoricalEventChangedCreatureType{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "changee_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ChangeeHfid = num(data)
|
|
case "changer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ChangerHfid = num(data)
|
|
case "new_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewCaste = txt(data)
|
|
case "new_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewRace = txt(data)
|
|
case "old_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldCaste = txt(data)
|
|
case "old_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldRace = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventChangedCreatureTypePlus(p *util.XMLParser, obj *HistoricalEventChangedCreatureType) (*HistoricalEventChangedCreatureType, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventChangedCreatureType{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "changee":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ChangeeHfid = num(data)
|
|
case "changer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ChangerHfid = num(data)
|
|
case "new_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewCaste = txt(data)
|
|
case "new_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewRace = txt(data)
|
|
case "old_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldCaste = txt(data)
|
|
case "old_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldRace = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollection(p *util.XMLParser) (*HistoricalEventCollection, error) {
|
|
var (
|
|
obj = &HistoricalEventCollection{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "end_seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EndSeconds72 = num(data)
|
|
case "end_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EndYear = num(data)
|
|
case "event":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Event = append(obj.Event, num(data))
|
|
case "eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Eventcol = append(obj.Eventcol, num(data))
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "start_seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartSeconds72 = num(data)
|
|
case "start_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StartYear = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch string(data) {
|
|
case "abduction":
|
|
obj.Details, err = parseHistoricalEventCollectionAbduction(p)
|
|
case "battle":
|
|
obj.Details, err = parseHistoricalEventCollectionBattle(p)
|
|
case "beast attack":
|
|
obj.Details, err = parseHistoricalEventCollectionBeastAttack(p)
|
|
case "ceremony":
|
|
obj.Details, err = parseHistoricalEventCollectionCeremony(p)
|
|
case "competition":
|
|
obj.Details, err = parseHistoricalEventCollectionCompetition(p)
|
|
case "duel":
|
|
obj.Details, err = parseHistoricalEventCollectionDuel(p)
|
|
case "entity overthrown":
|
|
obj.Details, err = parseHistoricalEventCollectionEntityOverthrown(p)
|
|
case "insurrection":
|
|
obj.Details, err = parseHistoricalEventCollectionInsurrection(p)
|
|
case "journey":
|
|
obj.Details, err = parseHistoricalEventCollectionJourney(p)
|
|
case "occasion":
|
|
obj.Details, err = parseHistoricalEventCollectionOccasion(p)
|
|
case "performance":
|
|
obj.Details, err = parseHistoricalEventCollectionPerformance(p)
|
|
case "persecution":
|
|
obj.Details, err = parseHistoricalEventCollectionPersecution(p)
|
|
case "procession":
|
|
obj.Details, err = parseHistoricalEventCollectionProcession(p)
|
|
case "purge":
|
|
obj.Details, err = parseHistoricalEventCollectionPurge(p)
|
|
case "raid":
|
|
obj.Details, err = parseHistoricalEventCollectionRaid(p)
|
|
case "site conquered":
|
|
obj.Details, err = parseHistoricalEventCollectionSiteConquered(p)
|
|
case "theft":
|
|
obj.Details, err = parseHistoricalEventCollectionTheft(p)
|
|
case "war":
|
|
obj.Details, err = parseHistoricalEventCollectionWar(p)
|
|
default:
|
|
p.Skip()
|
|
}
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return obj, nil
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionPlus(p *util.XMLParser, obj *HistoricalEventCollection) (*HistoricalEventCollection, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollection{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionAbduction(p *util.XMLParser) (*HistoricalEventCollectionAbduction, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionAbduction{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacking_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingEnid = num(data)
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "defending_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingEnid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "parent_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentEventcol = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionAbductionPlus(p *util.XMLParser, obj *HistoricalEventCollectionAbduction) (*HistoricalEventCollectionAbduction, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionAbduction{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionBattle(p *util.XMLParser) (*HistoricalEventCollectionBattle, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionBattle{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "a_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ASupportMercEnid = num(data)
|
|
case "a_support_merc_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ASupportMercHfid = append(obj.ASupportMercHfid, num(data))
|
|
case "attacking_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingHfid = append(obj.AttackingHfid, num(data))
|
|
case "attacking_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingMercEnid = num(data)
|
|
case "attacking_squad_animated":
|
|
|
|
case "attacking_squad_deaths":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingSquadDeaths = append(obj.AttackingSquadDeaths, num(data))
|
|
case "attacking_squad_entity_pop":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingSquadEntityPop = append(obj.AttackingSquadEntityPop, num(data))
|
|
case "attacking_squad_number":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingSquadNumber = append(obj.AttackingSquadNumber, num(data))
|
|
case "attacking_squad_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingSquadRace = append(obj.AttackingSquadRace, txt(data))
|
|
case "attacking_squad_site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingSquadSite = append(obj.AttackingSquadSite, num(data))
|
|
case "company_merc":
|
|
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "d_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSupportMercEnid = num(data)
|
|
case "d_support_merc_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSupportMercHfid = append(obj.DSupportMercHfid, num(data))
|
|
case "defending_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingHfid = append(obj.DefendingHfid, num(data))
|
|
case "defending_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingMercEnid = num(data)
|
|
case "defending_squad_animated":
|
|
|
|
case "defending_squad_deaths":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingSquadDeaths = append(obj.DefendingSquadDeaths, num(data))
|
|
case "defending_squad_entity_pop":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingSquadEntityPop = append(obj.DefendingSquadEntityPop, num(data))
|
|
case "defending_squad_number":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingSquadNumber = append(obj.DefendingSquadNumber, num(data))
|
|
case "defending_squad_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingSquadRace = append(obj.DefendingSquadRace, txt(data))
|
|
case "defending_squad_site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingSquadSite = append(obj.DefendingSquadSite, num(data))
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "individual_merc":
|
|
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "noncom_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NoncomHfid = append(obj.NoncomHfid, num(data))
|
|
case "outcome":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Outcome = parseHistoricalEventCollectionBattleOutcome(txt(data))
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "war_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WarEventcol = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionBattlePlus(p *util.XMLParser, obj *HistoricalEventCollectionBattle) (*HistoricalEventCollectionBattle, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionBattle{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionBeastAttack(p *util.XMLParser) (*HistoricalEventCollectionBeastAttack, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionBeastAttack{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "defending_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingEnid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "parent_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentEventcol = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionBeastAttackPlus(p *util.XMLParser, obj *HistoricalEventCollectionBeastAttack) (*HistoricalEventCollectionBeastAttack, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionBeastAttack{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionCeremony(p *util.XMLParser) (*HistoricalEventCollectionCeremony, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionCeremony{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionCeremonyPlus(p *util.XMLParser, obj *HistoricalEventCollectionCeremony) (*HistoricalEventCollectionCeremony, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionCeremony{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionCompetition(p *util.XMLParser) (*HistoricalEventCollectionCompetition, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionCompetition{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionCompetitionPlus(p *util.XMLParser, obj *HistoricalEventCollectionCompetition) (*HistoricalEventCollectionCompetition, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionCompetition{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionDuel(p *util.XMLParser) (*HistoricalEventCollectionDuel, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionDuel{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacking_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingHfid = num(data)
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "defending_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingHfid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "parent_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentEventcol = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionDuelPlus(p *util.XMLParser, obj *HistoricalEventCollectionDuel) (*HistoricalEventCollectionDuel, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionDuel{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionEntityOverthrown(p *util.XMLParser) (*HistoricalEventCollectionEntityOverthrown, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionEntityOverthrown{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "target_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEntityId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionEntityOverthrownPlus(p *util.XMLParser, obj *HistoricalEventCollectionEntityOverthrown) (*HistoricalEventCollectionEntityOverthrown, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionEntityOverthrown{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionInsurrection(p *util.XMLParser) (*HistoricalEventCollectionInsurrection, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionInsurrection{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "target_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEnid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionInsurrectionPlus(p *util.XMLParser, obj *HistoricalEventCollectionInsurrection) (*HistoricalEventCollectionInsurrection, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionInsurrection{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionJourney(p *util.XMLParser) (*HistoricalEventCollectionJourney, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionJourney{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionJourneyPlus(p *util.XMLParser, obj *HistoricalEventCollectionJourney) (*HistoricalEventCollectionJourney, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionJourney{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionOccasion(p *util.XMLParser) (*HistoricalEventCollectionOccasion, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionOccasion{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "occasion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionOccasionPlus(p *util.XMLParser, obj *HistoricalEventCollectionOccasion) (*HistoricalEventCollectionOccasion, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionOccasion{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionPerformance(p *util.XMLParser) (*HistoricalEventCollectionPerformance, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionPerformance{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionPerformancePlus(p *util.XMLParser, obj *HistoricalEventCollectionPerformance) (*HistoricalEventCollectionPerformance, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionPerformance{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionPersecution(p *util.XMLParser) (*HistoricalEventCollectionPersecution, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionPersecution{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "target_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEntityId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionPersecutionPlus(p *util.XMLParser, obj *HistoricalEventCollectionPersecution) (*HistoricalEventCollectionPersecution, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionPersecution{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionProcession(p *util.XMLParser) (*HistoricalEventCollectionProcession, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionProcession{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionProcessionPlus(p *util.XMLParser, obj *HistoricalEventCollectionProcession) (*HistoricalEventCollectionProcession, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionProcession{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionPurge(p *util.XMLParser) (*HistoricalEventCollectionPurge, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionPurge{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "adjective":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Adjective = parseHistoricalEventCollectionPurgeAdjective(txt(data))
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = 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 parseHistoricalEventCollectionPurgePlus(p *util.XMLParser, obj *HistoricalEventCollectionPurge) (*HistoricalEventCollectionPurge, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionPurge{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionRaid(p *util.XMLParser) (*HistoricalEventCollectionRaid, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionRaid{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacking_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingEnid = num(data)
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "defending_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingEnid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "parent_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentEventcol = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionRaidPlus(p *util.XMLParser, obj *HistoricalEventCollectionRaid) (*HistoricalEventCollectionRaid, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionRaid{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionSiteConquered(p *util.XMLParser) (*HistoricalEventCollectionSiteConquered, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionSiteConquered{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacking_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingEnid = num(data)
|
|
case "defending_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingEnid = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "war_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WarEventcol = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionSiteConqueredPlus(p *util.XMLParser, obj *HistoricalEventCollectionSiteConquered) (*HistoricalEventCollectionSiteConquered, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionSiteConquered{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionTheft(p *util.XMLParser) (*HistoricalEventCollectionTheft, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionTheft{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacking_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackingEnid = num(data)
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "defending_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefendingEnid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ordinal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ordinal = num(data)
|
|
case "parent_eventcol":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentEventcol = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionTheftPlus(p *util.XMLParser, obj *HistoricalEventCollectionTheft) (*HistoricalEventCollectionTheft, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionTheft{}
|
|
}
|
|
|
|
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 parseHistoricalEventCollectionWar(p *util.XMLParser) (*HistoricalEventCollectionWar, error) {
|
|
var (
|
|
obj = &HistoricalEventCollectionWar{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "aggressor_ent_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AggressorEntId = num(data)
|
|
case "defender_ent_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderEntId = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCollectionWarPlus(p *util.XMLParser, obj *HistoricalEventCollectionWar) (*HistoricalEventCollectionWar, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCollectionWar{}
|
|
}
|
|
|
|
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 parseHistoricalEventCompetition(p *util.XMLParser) (*HistoricalEventCompetition, error) {
|
|
var (
|
|
obj = &HistoricalEventCompetition{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "competitor_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CompetitorHfid = append(obj.CompetitorHfid, num(data))
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "occasion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionId = num(data)
|
|
case "schedule_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ScheduleId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "winner_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WinnerHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCompetitionPlus(p *util.XMLParser, obj *HistoricalEventCompetition) (*HistoricalEventCompetition, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCompetition{}
|
|
}
|
|
|
|
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 parseHistoricalEventCreateEntityPosition(p *util.XMLParser) (*HistoricalEventCreateEntityPosition, error) {
|
|
var (
|
|
obj = &HistoricalEventCreateEntityPosition{}
|
|
)
|
|
|
|
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 parseHistoricalEventCreateEntityPositionPlus(p *util.XMLParser, obj *HistoricalEventCreateEntityPosition) (*HistoricalEventCreateEntityPosition, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCreateEntityPosition{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Civ = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "position":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Position = txt(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventCreateEntityPositionReason(txt(data))
|
|
case "site_civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCiv = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCreatedSite(p *util.XMLParser) (*HistoricalEventCreatedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventCreatedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "builder_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuilderHfid = num(data)
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "resident_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ResidentCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventCreatedSitePlus(p *util.XMLParser, obj *HistoricalEventCreatedSite) (*HistoricalEventCreatedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCreatedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventCreatedStructure(p *util.XMLParser) (*HistoricalEventCreatedStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventCreatedStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "builder_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuilderHfid = num(data)
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "rebuilt":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Rebuilt = true
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCreatedStructurePlus(p *util.XMLParser, obj *HistoricalEventCreatedStructure) (*HistoricalEventCreatedStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCreatedStructure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "builder_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuilderHfid = num(data)
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "rebuild":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Rebuild = parseHistoricalEventCreatedStructureRebuild(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "site_civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Structure = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCreatedWorldConstruction(p *util.XMLParser) (*HistoricalEventCreatedWorldConstruction, error) {
|
|
var (
|
|
obj = &HistoricalEventCreatedWorldConstruction{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "master_wcid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MasterWcid = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "site_id1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId1 = num(data)
|
|
case "site_id2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId2 = num(data)
|
|
case "wcid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Wcid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCreatedWorldConstructionPlus(p *util.XMLParser, obj *HistoricalEventCreatedWorldConstruction) (*HistoricalEventCreatedWorldConstruction, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCreatedWorldConstruction{}
|
|
}
|
|
|
|
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 parseHistoricalEventCreatureDevoured(p *util.XMLParser) (*HistoricalEventCreatureDevoured, error) {
|
|
var (
|
|
obj = &HistoricalEventCreatureDevoured{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventCreatureDevouredPlus(p *util.XMLParser, obj *HistoricalEventCreatureDevoured) (*HistoricalEventCreatureDevoured, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventCreatureDevoured{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Caste = txt(data)
|
|
case "eater":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Eater = num(data)
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity = num(data)
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "victim":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Victim = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventDanceFormCreated(p *util.XMLParser) (*HistoricalEventDanceFormCreated, error) {
|
|
var (
|
|
obj = &HistoricalEventDanceFormCreated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventDanceFormCreatedCircumstance(txt(data))
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
case "form_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FormId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventDanceFormCreatedReason(txt(data))
|
|
case "reason_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReasonId = 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 parseHistoricalEventDanceFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventDanceFormCreated) (*HistoricalEventDanceFormCreated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventDanceFormCreated{}
|
|
}
|
|
|
|
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 parseHistoricalEventDestroyedSite(p *util.XMLParser) (*HistoricalEventDestroyedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventDestroyedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "no_defeat_mention":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NoDefeatMention = true
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventDestroyedSitePlus(p *util.XMLParser, obj *HistoricalEventDestroyedSite) (*HistoricalEventDestroyedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventDestroyedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventDiplomatLost(p *util.XMLParser) (*HistoricalEventDiplomatLost, error) {
|
|
var (
|
|
obj = &HistoricalEventDiplomatLost{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventDiplomatLostPlus(p *util.XMLParser, obj *HistoricalEventDiplomatLost) (*HistoricalEventDiplomatLost, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventDiplomatLost{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity = num(data)
|
|
case "involved":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Involved = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityAllianceFormed(p *util.XMLParser) (*HistoricalEventEntityAllianceFormed, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityAllianceFormed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "initiating_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InitiatingEnid = num(data)
|
|
case "joining_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JoiningEnid = append(obj.JoiningEnid, num(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityAllianceFormedPlus(p *util.XMLParser, obj *HistoricalEventEntityAllianceFormed) (*HistoricalEventEntityAllianceFormed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityAllianceFormed{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityBreachFeatureLayer(p *util.XMLParser) (*HistoricalEventEntityBreachFeatureLayer, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityBreachFeatureLayer{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivEntityId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteEntityId = 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 parseHistoricalEventEntityBreachFeatureLayerPlus(p *util.XMLParser, obj *HistoricalEventEntityBreachFeatureLayer) (*HistoricalEventEntityBreachFeatureLayer, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityBreachFeatureLayer{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityCreated(p *util.XMLParser) (*HistoricalEventEntityCreated, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityCreated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "creator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CreatorHfid = num(data)
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityCreatedPlus(p *util.XMLParser, obj *HistoricalEventEntityCreated) (*HistoricalEventEntityCreated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityCreated{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityDissolved(p *util.XMLParser) (*HistoricalEventEntityDissolved, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityDissolved{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventEntityDissolvedReason(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityDissolvedPlus(p *util.XMLParser, obj *HistoricalEventEntityDissolved) (*HistoricalEventEntityDissolved, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityDissolved{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityEquipmentPurchase(p *util.XMLParser) (*HistoricalEventEntityEquipmentPurchase, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityEquipmentPurchase{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = append(obj.Hfid, num(data))
|
|
case "new_equipment_level":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewEquipmentLevel = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityEquipmentPurchasePlus(p *util.XMLParser, obj *HistoricalEventEntityEquipmentPurchase) (*HistoricalEventEntityEquipmentPurchase, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityEquipmentPurchase{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityExpelsHf(p *util.XMLParser) (*HistoricalEventEntityExpelsHf, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityExpelsHf{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = 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 parseHistoricalEventEntityExpelsHfPlus(p *util.XMLParser, obj *HistoricalEventEntityExpelsHf) (*HistoricalEventEntityExpelsHf, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityExpelsHf{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityFledSite(p *util.XMLParser) (*HistoricalEventEntityFledSite, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityFledSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "fled_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FledCivId = 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 parseHistoricalEventEntityFledSitePlus(p *util.XMLParser, obj *HistoricalEventEntityFledSite) (*HistoricalEventEntityFledSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityFledSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityIncorporated(p *util.XMLParser) (*HistoricalEventEntityIncorporated, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityIncorporated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "joined_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JoinedEntityId = num(data)
|
|
case "joiner_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JoinerEntityId = num(data)
|
|
case "leader_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LeaderHfid = num(data)
|
|
case "partial_incorporation":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PartialIncorporation = true
|
|
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 parseHistoricalEventEntityIncorporatedPlus(p *util.XMLParser, obj *HistoricalEventEntityIncorporated) (*HistoricalEventEntityIncorporated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityIncorporated{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityLaw(p *util.XMLParser) (*HistoricalEventEntityLaw, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityLaw{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "law_add":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LawAdd = parseHistoricalEventEntityLawLawAdd(txt(data))
|
|
case "law_remove":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LawRemove = parseHistoricalEventEntityLawLawRemove(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityLawPlus(p *util.XMLParser, obj *HistoricalEventEntityLaw) (*HistoricalEventEntityLaw, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityLaw{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityOverthrown(p *util.XMLParser) (*HistoricalEventEntityOverthrown, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityOverthrown{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "conspirator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConspiratorHfid = append(obj.ConspiratorHfid, num(data))
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "instigator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InstigatorHfid = num(data)
|
|
case "overthrown_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OverthrownHfid = num(data)
|
|
case "pos_taker_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PosTakerHfid = num(data)
|
|
case "position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionProfileId = 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 parseHistoricalEventEntityOverthrownPlus(p *util.XMLParser, obj *HistoricalEventEntityOverthrown) (*HistoricalEventEntityOverthrown, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityOverthrown{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityPersecuted(p *util.XMLParser) (*HistoricalEventEntityPersecuted, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityPersecuted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "destroyed_structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestroyedStructureId = num(data)
|
|
case "expelled_creature":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExpelledCreature = append(obj.ExpelledCreature, num(data))
|
|
case "expelled_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExpelledHfid = append(obj.ExpelledHfid, num(data))
|
|
case "expelled_number":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExpelledNumber = append(obj.ExpelledNumber, num(data))
|
|
case "expelled_pop_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExpelledPopId = append(obj.ExpelledPopId, num(data))
|
|
case "persecutor_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PersecutorEnid = num(data)
|
|
case "persecutor_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PersecutorHfid = num(data)
|
|
case "property_confiscated_from_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PropertyConfiscatedFromHfid = append(obj.PropertyConfiscatedFromHfid, num(data))
|
|
case "shrine_amount_destroyed":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ShrineAmountDestroyed = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "target_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetEnid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityPersecutedPlus(p *util.XMLParser, obj *HistoricalEventEntityPersecuted) (*HistoricalEventEntityPersecuted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityPersecuted{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityPrimaryCriminals(p *util.XMLParser) (*HistoricalEventEntityPrimaryCriminals, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityPrimaryCriminals{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityPrimaryCriminalsPlus(p *util.XMLParser, obj *HistoricalEventEntityPrimaryCriminals) (*HistoricalEventEntityPrimaryCriminals, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityPrimaryCriminals{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventEntityPrimaryCriminalsAction(txt(data))
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityRampagedInSite(p *util.XMLParser) (*HistoricalEventEntityRampagedInSite, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityRampagedInSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "rampage_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RampageCivId = 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 parseHistoricalEventEntityRampagedInSitePlus(p *util.XMLParser, obj *HistoricalEventEntityRampagedInSite) (*HistoricalEventEntityRampagedInSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityRampagedInSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventEntityRelocate(p *util.XMLParser) (*HistoricalEventEntityRelocate, error) {
|
|
var (
|
|
obj = &HistoricalEventEntityRelocate{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntityRelocatePlus(p *util.XMLParser, obj *HistoricalEventEntityRelocate) (*HistoricalEventEntityRelocate, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntityRelocate{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventEntityRelocateAction(txt(data))
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventEntitySearchedSite(p *util.XMLParser) (*HistoricalEventEntitySearchedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventEntitySearchedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "result":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Result = parseHistoricalEventEntitySearchedSiteResult(txt(data))
|
|
case "searcher_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SearcherCivId = 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 parseHistoricalEventEntitySearchedSitePlus(p *util.XMLParser, obj *HistoricalEventEntitySearchedSite) (*HistoricalEventEntitySearchedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventEntitySearchedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventFailedFrameAttempt(p *util.XMLParser) (*HistoricalEventFailedFrameAttempt, error) {
|
|
var (
|
|
obj = &HistoricalEventFailedFrameAttempt{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "convicter_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConvicterEnid = num(data)
|
|
case "crime":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Crime = parseHistoricalEventFailedFrameAttemptCrime(txt(data))
|
|
case "fooled_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FooledHfid = num(data)
|
|
case "framer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FramerHfid = num(data)
|
|
case "plotter_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PlotterHfid = num(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventFailedFrameAttemptPlus(p *util.XMLParser, obj *HistoricalEventFailedFrameAttempt) (*HistoricalEventFailedFrameAttempt, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventFailedFrameAttempt{}
|
|
}
|
|
|
|
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 parseHistoricalEventFailedIntrigueCorruption(p *util.XMLParser) (*HistoricalEventFailedIntrigueCorruption, error) {
|
|
var (
|
|
obj = &HistoricalEventFailedIntrigueCorruption{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventFailedIntrigueCorruptionAction(txt(data))
|
|
case "ally_defense_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AllyDefenseBonus = num(data)
|
|
case "coconspirator_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CoconspiratorBonus = num(data)
|
|
case "corruptor_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptorHfid = num(data)
|
|
case "corruptor_identity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptorIdentity = num(data)
|
|
case "failed_judgment_test":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FailedJudgmentTest = true
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "lure_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LureHfid = num(data)
|
|
case "method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Method = parseHistoricalEventFailedIntrigueCorruptionMethod(txt(data))
|
|
case "relevant_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantEntityId = num(data)
|
|
case "relevant_id_for_method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantIdForMethod = num(data)
|
|
case "relevant_position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantPositionProfileId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
case "target_identity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetIdentity = num(data)
|
|
case "top_facet":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacet = parseHistoricalEventFailedIntrigueCorruptionTopFacet(txt(data))
|
|
case "top_facet_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetModifier = num(data)
|
|
case "top_facet_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetRating = num(data)
|
|
case "top_relationship_factor":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipFactor = parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(txt(data))
|
|
case "top_relationship_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipModifier = num(data)
|
|
case "top_relationship_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipRating = num(data)
|
|
case "top_value":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValue = parseHistoricalEventFailedIntrigueCorruptionTopValue(txt(data))
|
|
case "top_value_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueModifier = num(data)
|
|
case "top_value_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueRating = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventFailedIntrigueCorruptionPlus(p *util.XMLParser, obj *HistoricalEventFailedIntrigueCorruption) (*HistoricalEventFailedIntrigueCorruption, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventFailedIntrigueCorruption{}
|
|
}
|
|
|
|
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 parseHistoricalEventFieldBattle(p *util.XMLParser) (*HistoricalEventFieldBattle, error) {
|
|
var (
|
|
obj = &HistoricalEventFieldBattle{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "a_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ASupportMercEnid = num(data)
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "attacker_general_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerGeneralHfid = num(data)
|
|
case "attacker_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerMercEnid = num(data)
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "d_support_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSupportMercEnid = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "defender_general_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderGeneralHfid = num(data)
|
|
case "defender_merc_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderMercEnid = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventFieldBattlePlus(p *util.XMLParser, obj *HistoricalEventFieldBattle) (*HistoricalEventFieldBattle, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventFieldBattle{}
|
|
}
|
|
|
|
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 parseHistoricalEventFirstContact(p *util.XMLParser) (*HistoricalEventFirstContact, error) {
|
|
var (
|
|
obj = &HistoricalEventFirstContact{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "contacted_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ContactedEnid = num(data)
|
|
case "contactor_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ContactorEnid = 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 parseHistoricalEventFirstContactPlus(p *util.XMLParser, obj *HistoricalEventFirstContact) (*HistoricalEventFirstContact, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventFirstContact{}
|
|
}
|
|
|
|
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) {
|
|
var (
|
|
obj = &HistoricalEventGamble{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "gambler_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GamblerHfid = num(data)
|
|
case "new_account":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewAccount = num(data)
|
|
case "old_account":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldAccount = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventGamblePlus(p *util.XMLParser, obj *HistoricalEventGamble) (*HistoricalEventGamble, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventGamble{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfAbducted(p *util.XMLParser) (*HistoricalEventHfAbducted, error) {
|
|
var (
|
|
obj = &HistoricalEventHfAbducted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "snatcher_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SnatcherHfid = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfAbductedPlus(p *util.XMLParser, obj *HistoricalEventHfAbducted) (*HistoricalEventHfAbducted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfAbducted{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfAttackedSite(p *util.XMLParser) (*HistoricalEventHfAttackedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventHfAttackedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerHfid = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventHfAttackedSitePlus(p *util.XMLParser, obj *HistoricalEventHfAttackedSite) (*HistoricalEventHfAttackedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfAttackedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfConfronted(p *util.XMLParser) (*HistoricalEventHfConfronted, error) {
|
|
var (
|
|
obj = &HistoricalEventHfConfronted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = append(obj.Reason, parseHistoricalEventHfConfrontedReason(txt(data)))
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "situation":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Situation = parseHistoricalEventHfConfrontedSituation(txt(data))
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfConfrontedPlus(p *util.XMLParser, obj *HistoricalEventHfConfronted) (*HistoricalEventHfConfronted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfConfronted{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfConvicted(p *util.XMLParser) (*HistoricalEventHfConvicted, error) {
|
|
var (
|
|
obj = &HistoricalEventHfConvicted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "beating":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Beating = true
|
|
case "coconspirator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CoconspiratorHfid = num(data)
|
|
case "confessed_after_apb_arrest_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConfessedAfterApbArrestEnid = num(data)
|
|
case "contact_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ContactHfid = num(data)
|
|
case "convict_is_contact":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConvictIsContact = true
|
|
case "convicted_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConvictedHfid = num(data)
|
|
case "convicter_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ConvicterEnid = num(data)
|
|
case "corrupt_convicter_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptConvicterHfid = num(data)
|
|
case "crime":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Crime = parseHistoricalEventHfConvictedCrime(txt(data))
|
|
case "death_penalty":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DeathPenalty = true
|
|
case "did_not_reveal_all_in_interrogation":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DidNotRevealAllInInterrogation = true
|
|
case "exiled":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Exiled = true
|
|
case "fooled_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FooledHfid = num(data)
|
|
case "framer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FramerHfid = num(data)
|
|
case "hammerstrokes":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hammerstrokes = num(data)
|
|
case "held_firm_in_interrogation":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HeldFirmInInterrogation = true
|
|
case "implicated_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ImplicatedHfid = append(obj.ImplicatedHfid, num(data))
|
|
case "interrogator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InterrogatorHfid = num(data)
|
|
case "no_prison_available":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NoPrisonAvailable = true
|
|
case "plotter_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PlotterHfid = num(data)
|
|
case "prison_months":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PrisonMonths = num(data)
|
|
case "surveiled_coconspirator":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SurveiledCoconspirator = true
|
|
case "surveiled_contact":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SurveiledContact = true
|
|
case "surveiled_convicted":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SurveiledConvicted = true
|
|
case "surveiled_target":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SurveiledTarget = true
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
case "wrongful_conviction":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WrongfulConviction = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfConvictedPlus(p *util.XMLParser, obj *HistoricalEventHfConvicted) (*HistoricalEventHfConvicted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfConvicted{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfDestroyedSite(p *util.XMLParser) (*HistoricalEventHfDestroyedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventHfDestroyedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerHfid = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventHfDestroyedSitePlus(p *util.XMLParser, obj *HistoricalEventHfDestroyedSite) (*HistoricalEventHfDestroyedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfDestroyedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfDied(p *util.XMLParser) (*HistoricalEventHfDied, error) {
|
|
var (
|
|
obj = &HistoricalEventHfDied{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "cause":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Cause = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "slayer_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerCaste = txt(data)
|
|
case "slayer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerHfid = num(data)
|
|
case "slayer_item_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerItemId = num(data)
|
|
case "slayer_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerRace = txt(data)
|
|
case "slayer_shooter_item_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerShooterItemId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfDiedPlus(p *util.XMLParser, obj *HistoricalEventHfDied) (*HistoricalEventHfDied, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfDied{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerItemId = num(data)
|
|
case "death_cause":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DeathCause = parseHistoricalEventHfDiedDeathCause(txt(data))
|
|
case "item":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerItemId = num(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = parseHistoricalEventHfDiedItemSubtype(txt(data))
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = parseHistoricalEventHfDiedItemType(txt(data))
|
|
case "mat":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mat = parseHistoricalEventHfDiedMat(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "slayer_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerCaste = txt(data)
|
|
case "slayer_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerHfid = num(data)
|
|
case "slayer_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SlayerRace = txt(data)
|
|
case "victim_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfDisturbedStructure(p *util.XMLParser) (*HistoricalEventHfDisturbedStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventHfDisturbedStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hist_fig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfDisturbedStructurePlus(p *util.XMLParser, obj *HistoricalEventHfDisturbedStructure) (*HistoricalEventHfDisturbedStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfDisturbedStructure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventHfDisturbedStructureAction(txt(data))
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfDoesInteraction(p *util.XMLParser) (*HistoricalEventHfDoesInteraction, error) {
|
|
var (
|
|
obj = &HistoricalEventHfDoesInteraction{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "doer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DoerHfid = num(data)
|
|
case "interaction":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Interaction = txt(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfDoesInteractionPlus(p *util.XMLParser, obj *HistoricalEventHfDoesInteraction) (*HistoricalEventHfDoesInteraction, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfDoesInteraction{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "doer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DoerHfid = num(data)
|
|
case "interaction_action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InteractionAction = txt(data)
|
|
case "region":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Region = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "source":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Source = num(data)
|
|
case "target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfEnslaved(p *util.XMLParser) (*HistoricalEventHfEnslaved, error) {
|
|
var (
|
|
obj = &HistoricalEventHfEnslaved{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "enslaved_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EnslavedHfid = num(data)
|
|
case "moved_to_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MovedToSiteId = num(data)
|
|
case "payer_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PayerEntityId = num(data)
|
|
case "seller_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SellerHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfEnslavedPlus(p *util.XMLParser, obj *HistoricalEventHfEnslaved) (*HistoricalEventHfEnslaved, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfEnslaved{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfEquipmentPurchase(p *util.XMLParser) (*HistoricalEventHfEquipmentPurchase, error) {
|
|
var (
|
|
obj = &HistoricalEventHfEquipmentPurchase{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = num(data)
|
|
case "quality":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Quality = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfEquipmentPurchasePlus(p *util.XMLParser, obj *HistoricalEventHfEquipmentPurchase) (*HistoricalEventHfEquipmentPurchase, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfEquipmentPurchase{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfFreed(p *util.XMLParser) (*HistoricalEventHfFreed, error) {
|
|
var (
|
|
obj = &HistoricalEventHfFreed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "freeing_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FreeingHfid = num(data)
|
|
case "holding_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HoldingCivId = num(data)
|
|
case "rescued_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RescuedHfid = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventHfFreedPlus(p *util.XMLParser, obj *HistoricalEventHfFreed) (*HistoricalEventHfFreed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfFreed{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfGainsSecretGoal(p *util.XMLParser) (*HistoricalEventHfGainsSecretGoal, error) {
|
|
var (
|
|
obj = &HistoricalEventHfGainsSecretGoal{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "secret_goal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SecretGoal = parseHistoricalEventHfGainsSecretGoalSecretGoal(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfGainsSecretGoalPlus(p *util.XMLParser, obj *HistoricalEventHfGainsSecretGoal) (*HistoricalEventHfGainsSecretGoal, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfGainsSecretGoal{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfInterrogated(p *util.XMLParser) (*HistoricalEventHfInterrogated, error) {
|
|
var (
|
|
obj = &HistoricalEventHfInterrogated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "arresting_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArrestingEnid = num(data)
|
|
case "held_firm_in_interrogation":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HeldFirmInInterrogation = true
|
|
case "implicated_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ImplicatedHfid = num(data)
|
|
case "interrogator_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InterrogatorHfid = num(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
case "wanted_and_recognized":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WantedAndRecognized = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfInterrogatedPlus(p *util.XMLParser, obj *HistoricalEventHfInterrogated) (*HistoricalEventHfInterrogated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfInterrogated{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfLearnsSecret(p *util.XMLParser) (*HistoricalEventHfLearnsSecret, error) {
|
|
var (
|
|
obj = &HistoricalEventHfLearnsSecret{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "interaction":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Interaction = txt(data)
|
|
case "student_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StudentHfid = num(data)
|
|
case "teacher_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TeacherHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfLearnsSecretPlus(p *util.XMLParser, obj *HistoricalEventHfLearnsSecret) (*HistoricalEventHfLearnsSecret, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfLearnsSecret{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "secret_text":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SecretText = parseHistoricalEventHfLearnsSecretSecretText(txt(data))
|
|
case "student":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StudentHfid = num(data)
|
|
case "teacher":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TeacherHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfNewPet(p *util.XMLParser) (*HistoricalEventHfNewPet, error) {
|
|
var (
|
|
obj = &HistoricalEventHfNewPet{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfNewPetPlus(p *util.XMLParser, obj *HistoricalEventHfNewPet) (*HistoricalEventHfNewPet, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfNewPet{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "group":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = num(data)
|
|
case "pets":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Pets = txt(data)
|
|
case "site":
|
|
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 parseHistoricalEventHfPerformedHorribleExperiments(p *util.XMLParser) (*HistoricalEventHfPerformedHorribleExperiments, error) {
|
|
var (
|
|
obj = &HistoricalEventHfPerformedHorribleExperiments{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfPerformedHorribleExperimentsPlus(p *util.XMLParser, obj *HistoricalEventHfPerformedHorribleExperiments) (*HistoricalEventHfPerformedHorribleExperiments, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfPerformedHorribleExperiments{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfPrayedInsideStructure(p *util.XMLParser) (*HistoricalEventHfPrayedInsideStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventHfPrayedInsideStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hist_fig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfPrayedInsideStructurePlus(p *util.XMLParser, obj *HistoricalEventHfPrayedInsideStructure) (*HistoricalEventHfPrayedInsideStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfPrayedInsideStructure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventHfPrayedInsideStructureAction(txt(data))
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfPreach(p *util.XMLParser) (*HistoricalEventHfPreach, error) {
|
|
var (
|
|
obj = &HistoricalEventHfPreach{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity1 = num(data)
|
|
case "entity_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity2 = num(data)
|
|
case "site_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteHfid = num(data)
|
|
case "speaker_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SpeakerHfid = num(data)
|
|
case "topic":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Topic = parseHistoricalEventHfPreachTopic(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfPreachPlus(p *util.XMLParser, obj *HistoricalEventHfPreach) (*HistoricalEventHfPreach, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfPreach{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfProfanedStructure(p *util.XMLParser) (*HistoricalEventHfProfanedStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventHfProfanedStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hist_fig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfProfanedStructurePlus(p *util.XMLParser, obj *HistoricalEventHfProfanedStructure) (*HistoricalEventHfProfanedStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfProfanedStructure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventHfProfanedStructureAction(txt(data))
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfRansomed(p *util.XMLParser) (*HistoricalEventHfRansomed, error) {
|
|
var (
|
|
obj = &HistoricalEventHfRansomed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "moved_to_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MovedToSiteId = num(data)
|
|
case "payer_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PayerEntityId = num(data)
|
|
case "payer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PayerHfid = num(data)
|
|
case "ransomed_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RansomedHfid = num(data)
|
|
case "ransomer_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RansomerHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfRansomedPlus(p *util.XMLParser, obj *HistoricalEventHfRansomed) (*HistoricalEventHfRansomed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfRansomed{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfReachSummit(p *util.XMLParser) (*HistoricalEventHfReachSummit, error) {
|
|
var (
|
|
obj = &HistoricalEventHfReachSummit{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = append(obj.GroupHfid, num(data))
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfReachSummitPlus(p *util.XMLParser, obj *HistoricalEventHfReachSummit) (*HistoricalEventHfReachSummit, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfReachSummit{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfRecruitedUnitTypeForEntity(p *util.XMLParser) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) {
|
|
var (
|
|
obj = &HistoricalEventHfRecruitedUnitTypeForEntity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "unit_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UnitType = parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfRecruitedUnitTypeForEntityPlus(p *util.XMLParser, obj *HistoricalEventHfRecruitedUnitTypeForEntity) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfRecruitedUnitTypeForEntity{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfRelationshipDenied(p *util.XMLParser) (*HistoricalEventHfRelationshipDenied, error) {
|
|
var (
|
|
obj = &HistoricalEventHfRelationshipDenied{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventHfRelationshipDeniedReason(txt(data))
|
|
case "reason_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReasonId = num(data)
|
|
case "relationship":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Relationship = parseHistoricalEventHfRelationshipDeniedRelationship(txt(data))
|
|
case "seeker_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SeekerHfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfRelationshipDeniedPlus(p *util.XMLParser, obj *HistoricalEventHfRelationshipDenied) (*HistoricalEventHfRelationshipDenied, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfRelationshipDenied{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfReunion(p *util.XMLParser) (*HistoricalEventHfReunion, error) {
|
|
var (
|
|
obj = &HistoricalEventHfReunion{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_1_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Group1Hfid = num(data)
|
|
case "group_2_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Group2Hfid = append(obj.Group2Hfid, num(data))
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfReunionPlus(p *util.XMLParser, obj *HistoricalEventHfReunion) (*HistoricalEventHfReunion, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfReunion{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfRevived(p *util.XMLParser) (*HistoricalEventHfRevived, error) {
|
|
var (
|
|
obj = &HistoricalEventHfRevived{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "actor_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ActorHfid = num(data)
|
|
case "disturbance":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Disturbance = true
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "ghost":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ghost = parseHistoricalEventHfRevivedGhost(txt(data))
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "raised_before":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RaisedBefore = true
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfRevivedPlus(p *util.XMLParser, obj *HistoricalEventHfRevived) (*HistoricalEventHfRevived, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfRevived{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfSimpleBattleEvent(p *util.XMLParser) (*HistoricalEventHfSimpleBattleEvent, error) {
|
|
var (
|
|
obj = &HistoricalEventHfSimpleBattleEvent{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_1_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Group1Hfid = num(data)
|
|
case "group_2_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Group2Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Subtype = parseHistoricalEventHfSimpleBattleEventSubtype(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfSimpleBattleEventPlus(p *util.XMLParser, obj *HistoricalEventHfSimpleBattleEvent) (*HistoricalEventHfSimpleBattleEvent, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfSimpleBattleEvent{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfTravel(p *util.XMLParser) (*HistoricalEventHfTravel, error) {
|
|
var (
|
|
obj = &HistoricalEventHfTravel{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "group_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GroupHfid = append(obj.GroupHfid, num(data))
|
|
case "return":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Return = true
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfTravelPlus(p *util.XMLParser, obj *HistoricalEventHfTravel) (*HistoricalEventHfTravel, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfTravel{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfViewedArtifact(p *util.XMLParser) (*HistoricalEventHfViewedArtifact, error) {
|
|
var (
|
|
obj = &HistoricalEventHfViewedArtifact{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "hist_fig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfViewedArtifactPlus(p *util.XMLParser, obj *HistoricalEventHfViewedArtifact) (*HistoricalEventHfViewedArtifact, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfViewedArtifact{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfWounded(p *util.XMLParser) (*HistoricalEventHfWounded, error) {
|
|
var (
|
|
obj = &HistoricalEventHfWounded{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "was_torture":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WasTorture = true
|
|
case "woundee_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WoundeeHfid = num(data)
|
|
case "wounder_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WounderHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfWoundedPlus(p *util.XMLParser, obj *HistoricalEventHfWounded) (*HistoricalEventHfWounded, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfWounded{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "body_part":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BodyPart = num(data)
|
|
case "injury_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InjuryType = parseHistoricalEventHfWoundedInjuryType(txt(data))
|
|
case "part_lost":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PartLost = parseHistoricalEventHfWoundedPartLost(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "woundee":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WoundeeHfid = num(data)
|
|
case "woundee_caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WoundeeCaste = num(data)
|
|
case "woundee_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WoundeeRace = num(data)
|
|
case "wounder":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WounderHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfsFormedIntrigueRelationship(p *util.XMLParser) (*HistoricalEventHfsFormedIntrigueRelationship, error) {
|
|
var (
|
|
obj = &HistoricalEventHfsFormedIntrigueRelationship{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "action":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Action = parseHistoricalEventHfsFormedIntrigueRelationshipAction(txt(data))
|
|
case "ally_defense_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AllyDefenseBonus = num(data)
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(txt(data))
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
case "coconspirator_bonus":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CoconspiratorBonus = num(data)
|
|
case "corruptor_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptorHfid = num(data)
|
|
case "corruptor_identity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptorIdentity = num(data)
|
|
case "corruptor_seen_as":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CorruptorSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(txt(data))
|
|
case "failed_judgment_test":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FailedJudgmentTest = true
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "lure_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LureHfid = num(data)
|
|
case "method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Method = parseHistoricalEventHfsFormedIntrigueRelationshipMethod(txt(data))
|
|
case "relevant_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantEntityId = num(data)
|
|
case "relevant_id_for_method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantIdForMethod = num(data)
|
|
case "relevant_position_profile_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RelevantPositionProfileId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "successful":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Successful = true
|
|
case "target_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHfid = num(data)
|
|
case "target_identity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetIdentity = num(data)
|
|
case "target_seen_as":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(txt(data))
|
|
case "top_facet":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacet = parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(txt(data))
|
|
case "top_facet_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetModifier = num(data)
|
|
case "top_facet_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopFacetRating = num(data)
|
|
case "top_relationship_factor":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipFactor = parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(txt(data))
|
|
case "top_relationship_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipModifier = num(data)
|
|
case "top_relationship_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopRelationshipRating = num(data)
|
|
case "top_value":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValue = parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(txt(data))
|
|
case "top_value_modifier":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueModifier = num(data)
|
|
case "top_value_rating":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TopValueRating = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfsFormedIntrigueRelationshipPlus(p *util.XMLParser, obj *HistoricalEventHfsFormedIntrigueRelationship) (*HistoricalEventHfsFormedIntrigueRelationship, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfsFormedIntrigueRelationship{}
|
|
}
|
|
|
|
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 parseHistoricalEventHfsFormedReputationRelationship(p *util.XMLParser) (*HistoricalEventHfsFormedReputationRelationship, error) {
|
|
var (
|
|
obj = &HistoricalEventHfsFormedReputationRelationship{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "hf_rep_1_of_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfRep1Of2 = parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(txt(data))
|
|
case "hf_rep_2_of_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfRep2Of1 = parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(txt(data))
|
|
case "hfid1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid1 = num(data)
|
|
case "hfid2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid2 = num(data)
|
|
case "identity_id1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityId1 = num(data)
|
|
case "identity_id2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IdentityId2 = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventHfsFormedReputationRelationshipPlus(p *util.XMLParser, obj *HistoricalEventHfsFormedReputationRelationship) (*HistoricalEventHfsFormedReputationRelationship, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHfsFormedReputationRelationship{}
|
|
}
|
|
|
|
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 parseHistoricalEventHolyCityDeclaration(p *util.XMLParser) (*HistoricalEventHolyCityDeclaration, error) {
|
|
var (
|
|
obj = &HistoricalEventHolyCityDeclaration{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "religion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReligionId = 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 parseHistoricalEventHolyCityDeclarationPlus(p *util.XMLParser, obj *HistoricalEventHolyCityDeclaration) (*HistoricalEventHolyCityDeclaration, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventHolyCityDeclaration{}
|
|
}
|
|
|
|
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 parseHistoricalEventInsurrectionStarted(p *util.XMLParser) (*HistoricalEventInsurrectionStarted, error) {
|
|
var (
|
|
obj = &HistoricalEventInsurrectionStarted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "outcome":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Outcome = parseHistoricalEventInsurrectionStartedOutcome(txt(data))
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "target_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetCivId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventInsurrectionStartedPlus(p *util.XMLParser, obj *HistoricalEventInsurrectionStarted) (*HistoricalEventInsurrectionStarted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventInsurrectionStarted{}
|
|
}
|
|
|
|
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 parseHistoricalEventItemStolen(p *util.XMLParser) (*HistoricalEventItemStolen, error) {
|
|
var (
|
|
obj = &HistoricalEventItemStolen{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
v, _ := parseHistoricalEventItemStolenCircumstance(p)
|
|
obj.Circumstance = v
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventItemStolenPlus(p *util.XMLParser, obj *HistoricalEventItemStolen) (*HistoricalEventItemStolen, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventItemStolen{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
v, _ := parseHistoricalEventItemStolenCircumstancePlus(p, &HistoricalEventItemStolenCircumstance{})
|
|
obj.Circumstance = v
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "item":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Item = num(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = txt(data)
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = txt(data)
|
|
case "mat":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mat = txt(data)
|
|
case "matindex":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Matindex = num(data)
|
|
case "mattype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mattype = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "stash_site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StashSite = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Structure = num(data)
|
|
case "theft_method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TheftMethod = parseHistoricalEventItemStolenTheftMethod(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventItemStolenCircumstance(p *util.XMLParser) (*HistoricalEventItemStolenCircumstance, error) {
|
|
var (
|
|
obj = &HistoricalEventItemStolenCircumstance{}
|
|
)
|
|
|
|
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 parseHistoricalEventItemStolenCircumstancePlus(p *util.XMLParser, obj *HistoricalEventItemStolenCircumstance) (*HistoricalEventItemStolenCircumstance, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventItemStolenCircumstance{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "defeated":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Defeated = num(data)
|
|
case "hist_event_collection":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistEventCollection = num(data)
|
|
case "murdered":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Murdered = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseHistoricalEventItemStolenCircumstanceType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventKnowledgeDiscovered(p *util.XMLParser) (*HistoricalEventKnowledgeDiscovered, error) {
|
|
var (
|
|
obj = &HistoricalEventKnowledgeDiscovered{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "first":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.First = true
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "knowledge":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Knowledge = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventKnowledgeDiscoveredPlus(p *util.XMLParser, obj *HistoricalEventKnowledgeDiscovered) (*HistoricalEventKnowledgeDiscovered, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventKnowledgeDiscovered{}
|
|
}
|
|
|
|
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 parseHistoricalEventMasterpieceArchConstructed(p *util.XMLParser) (*HistoricalEventMasterpieceArchConstructed, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceArchConstructed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceArchConstructedPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceArchConstructed) (*HistoricalEventMasterpieceArchConstructed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceArchConstructed{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "building_custom":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuildingCustom = num(data)
|
|
case "building_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuildingSubtype = parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(txt(data))
|
|
case "building_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BuildingType = parseHistoricalEventMasterpieceArchConstructedBuildingType(txt(data))
|
|
case "maker":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Maker = num(data)
|
|
case "maker_entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MakerEntity = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(txt(data))
|
|
case "unk_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Unk2 = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceEngraving(p *util.XMLParser) (*HistoricalEventMasterpieceEngraving, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceEngraving{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = parseHistoricalEventMasterpieceEngravingSkillAtTime(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceEngravingPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceEngraving) (*HistoricalEventMasterpieceEngraving, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceEngraving{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "art_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtId = num(data)
|
|
case "art_subid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtSubid = num(data)
|
|
case "maker":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Maker = num(data)
|
|
case "maker_entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MakerEntity = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = parseHistoricalEventMasterpieceEngravingSkillAtTime(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceFood(p *util.XMLParser) (*HistoricalEventMasterpieceFood, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceFood{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceFoodPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceFood) (*HistoricalEventMasterpieceFood, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceFood{}
|
|
}
|
|
|
|
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 parseHistoricalEventMasterpieceItem(p *util.XMLParser) (*HistoricalEventMasterpieceItem, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceItem{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceItemPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceItem) (*HistoricalEventMasterpieceItem, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceItem{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "item_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemId = num(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = parseHistoricalEventMasterpieceItemItemSubtype(txt(data))
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = parseHistoricalEventMasterpieceItemItemType(txt(data))
|
|
case "maker":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Maker = num(data)
|
|
case "maker_entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MakerEntity = num(data)
|
|
case "mat":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Mat = txt(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceItemImprovement(p *util.XMLParser) (*HistoricalEventMasterpieceItemImprovement, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceItemImprovement{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "skill_at_time":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SkillAtTime = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMasterpieceItemImprovementPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceItemImprovement) (*HistoricalEventMasterpieceItemImprovement, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceItemImprovement{}
|
|
}
|
|
|
|
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 parseHistoricalEventMasterpieceLost(p *util.XMLParser) (*HistoricalEventMasterpieceLost, error) {
|
|
var (
|
|
obj = &HistoricalEventMasterpieceLost{}
|
|
)
|
|
|
|
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 parseHistoricalEventMasterpieceLostPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceLost) (*HistoricalEventMasterpieceLost, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMasterpieceLost{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "creation_event":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CreationEvent = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "method":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Method = parseHistoricalEventMasterpieceLostMethod(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMerchant(p *util.XMLParser) (*HistoricalEventMerchant, error) {
|
|
var (
|
|
obj = &HistoricalEventMerchant{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "depot_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DepotEntityId = num(data)
|
|
case "hardship":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hardship = true
|
|
case "lost_value":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LostValue = true
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "trader_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TraderEntityId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventMerchantPlus(p *util.XMLParser, obj *HistoricalEventMerchant) (*HistoricalEventMerchant, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMerchant{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "destination":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Destination = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "source":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Source = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventModifiedBuilding(p *util.XMLParser) (*HistoricalEventModifiedBuilding, error) {
|
|
var (
|
|
obj = &HistoricalEventModifiedBuilding{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "modification":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Modification = parseHistoricalEventModifiedBuildingModification(txt(data))
|
|
case "modifier_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ModifierHfid = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventModifiedBuildingPlus(p *util.XMLParser, obj *HistoricalEventModifiedBuilding) (*HistoricalEventModifiedBuilding, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventModifiedBuilding{}
|
|
}
|
|
|
|
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 parseHistoricalEventMusicalFormCreated(p *util.XMLParser) (*HistoricalEventMusicalFormCreated, error) {
|
|
var (
|
|
obj = &HistoricalEventMusicalFormCreated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventMusicalFormCreatedCircumstance(txt(data))
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
case "form_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FormId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventMusicalFormCreatedReason(txt(data))
|
|
case "reason_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReasonId = 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 parseHistoricalEventMusicalFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventMusicalFormCreated) (*HistoricalEventMusicalFormCreated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventMusicalFormCreated{}
|
|
}
|
|
|
|
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 parseHistoricalEventNewSiteLeader(p *util.XMLParser) (*HistoricalEventNewSiteLeader, error) {
|
|
var (
|
|
obj = &HistoricalEventNewSiteLeader{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "new_leader_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewLeaderHfid = num(data)
|
|
case "new_site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewSiteCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventNewSiteLeaderPlus(p *util.XMLParser, obj *HistoricalEventNewSiteLeader) (*HistoricalEventNewSiteLeader, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventNewSiteLeader{}
|
|
}
|
|
|
|
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 parseHistoricalEventPeaceAccepted(p *util.XMLParser) (*HistoricalEventPeaceAccepted, error) {
|
|
var (
|
|
obj = &HistoricalEventPeaceAccepted{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventPeaceAcceptedPlus(p *util.XMLParser, obj *HistoricalEventPeaceAccepted) (*HistoricalEventPeaceAccepted, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventPeaceAccepted{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "destination":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Destination = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "source":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Source = num(data)
|
|
case "topic":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Topic = parseHistoricalEventPeaceAcceptedTopic(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventPeaceRejected(p *util.XMLParser) (*HistoricalEventPeaceRejected, error) {
|
|
var (
|
|
obj = &HistoricalEventPeaceRejected{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventPeaceRejectedPlus(p *util.XMLParser, obj *HistoricalEventPeaceRejected) (*HistoricalEventPeaceRejected, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventPeaceRejected{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "destination":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Destination = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "source":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Source = num(data)
|
|
case "topic":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Topic = parseHistoricalEventPeaceRejectedTopic(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventPerformance(p *util.XMLParser) (*HistoricalEventPerformance, error) {
|
|
var (
|
|
obj = &HistoricalEventPerformance{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "occasion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionId = num(data)
|
|
case "schedule_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ScheduleId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventPerformancePlus(p *util.XMLParser, obj *HistoricalEventPerformance) (*HistoricalEventPerformance, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventPerformance{}
|
|
}
|
|
|
|
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 parseHistoricalEventPlunderedSite(p *util.XMLParser) (*HistoricalEventPlunderedSite, error) {
|
|
var (
|
|
obj = &HistoricalEventPlunderedSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "detected":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Detected = true
|
|
case "no_defeat_mention":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NoDefeatMention = true
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "took_items":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TookItems = true
|
|
case "took_livestock":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TookLivestock = true
|
|
case "was_raid":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WasRaid = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventPlunderedSitePlus(p *util.XMLParser, obj *HistoricalEventPlunderedSite) (*HistoricalEventPlunderedSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventPlunderedSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventPoeticFormCreated(p *util.XMLParser) (*HistoricalEventPoeticFormCreated, error) {
|
|
var (
|
|
obj = &HistoricalEventPoeticFormCreated{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventPoeticFormCreatedCircumstance(txt(data))
|
|
case "form_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FormId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = 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 parseHistoricalEventPoeticFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventPoeticFormCreated) (*HistoricalEventPoeticFormCreated, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventPoeticFormCreated{}
|
|
}
|
|
|
|
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 parseHistoricalEventProcession(p *util.XMLParser) (*HistoricalEventProcession, error) {
|
|
var (
|
|
obj = &HistoricalEventProcession{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "occasion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionId = num(data)
|
|
case "schedule_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ScheduleId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventProcessionPlus(p *util.XMLParser, obj *HistoricalEventProcession) (*HistoricalEventProcession, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventProcession{}
|
|
}
|
|
|
|
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 parseHistoricalEventRazedStructure(p *util.XMLParser) (*HistoricalEventRazedStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventRazedStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRazedStructurePlus(p *util.XMLParser, obj *HistoricalEventRazedStructure) (*HistoricalEventRazedStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRazedStructure{}
|
|
}
|
|
|
|
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 parseHistoricalEventReclaimSite(p *util.XMLParser) (*HistoricalEventReclaimSite, error) {
|
|
var (
|
|
obj = &HistoricalEventReclaimSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "unretire":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Unretire = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventReclaimSitePlus(p *util.XMLParser, obj *HistoricalEventReclaimSite) (*HistoricalEventReclaimSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventReclaimSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventRegionpopIncorporatedIntoEntity(p *util.XMLParser) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) {
|
|
var (
|
|
obj = &HistoricalEventRegionpopIncorporatedIntoEntity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "join_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JoinEntityId = num(data)
|
|
case "pop_flid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PopFlid = num(data)
|
|
case "pop_number_moved":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PopNumberMoved = num(data)
|
|
case "pop_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PopRace = num(data)
|
|
case "pop_srid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PopSrid = 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 parseHistoricalEventRegionpopIncorporatedIntoEntityPlus(p *util.XMLParser, obj *HistoricalEventRegionpopIncorporatedIntoEntity) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRegionpopIncorporatedIntoEntity{}
|
|
}
|
|
|
|
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 parseHistoricalEventRelationship(p *util.XMLParser) (*HistoricalEventRelationship, error) {
|
|
var (
|
|
obj = &HistoricalEventRelationship{}
|
|
)
|
|
|
|
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 parseHistoricalEventRelationshipPlus(p *util.XMLParser, obj *HistoricalEventRelationship) (*HistoricalEventRelationship, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRelationship{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "event":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Event = num(data)
|
|
case "relationship":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Relationship = parseHistoricalEventRelationshipRelationship(txt(data))
|
|
case "source_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SourceHf = num(data)
|
|
case "target_hf":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TargetHf = num(data)
|
|
case "year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Year = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRelationshipSupplement(p *util.XMLParser) (*HistoricalEventRelationshipSupplement, error) {
|
|
var (
|
|
obj = &HistoricalEventRelationshipSupplement{}
|
|
)
|
|
|
|
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 parseHistoricalEventRelationshipSupplementPlus(p *util.XMLParser, obj *HistoricalEventRelationshipSupplement) (*HistoricalEventRelationshipSupplement, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRelationshipSupplement{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "event":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Event = num(data)
|
|
case "occasion_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccasionType = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "unk_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Unk1 = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRemoveHfEntityLink(p *util.XMLParser) (*HistoricalEventRemoveHfEntityLink, error) {
|
|
var (
|
|
obj = &HistoricalEventRemoveHfEntityLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "link":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(txt(data))
|
|
case "position_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PositionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRemoveHfEntityLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfEntityLink) (*HistoricalEventRemoveHfEntityLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRemoveHfEntityLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(txt(data))
|
|
case "position":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Position = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRemoveHfHfLink(p *util.XMLParser) (*HistoricalEventRemoveHfHfLink, error) {
|
|
var (
|
|
obj = &HistoricalEventRemoveHfHfLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "hfid_target":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfidTarget = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventRemoveHfHfLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfHfLink) (*HistoricalEventRemoveHfHfLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRemoveHfHfLink{}
|
|
}
|
|
|
|
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 parseHistoricalEventRemoveHfSiteLink(p *util.XMLParser) (*HistoricalEventRemoveHfSiteLink, error) {
|
|
var (
|
|
obj = &HistoricalEventRemoveHfSiteLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
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 parseHistoricalEventRemoveHfSiteLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfSiteLink) (*HistoricalEventRemoveHfSiteLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventRemoveHfSiteLink{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Civ = num(data)
|
|
case "histfig":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Histfig = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseHistoricalEventRemoveHfSiteLinkLinkType(txt(data))
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Structure = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventReplacedStructure(p *util.XMLParser) (*HistoricalEventReplacedStructure, error) {
|
|
var (
|
|
obj = &HistoricalEventReplacedStructure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "new_ab_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewAbId = num(data)
|
|
case "old_ab_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldAbId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventReplacedStructurePlus(p *util.XMLParser, obj *HistoricalEventReplacedStructure) (*HistoricalEventReplacedStructure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventReplacedStructure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Civ = num(data)
|
|
case "new_structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewStructure = num(data)
|
|
case "old_structure":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OldStructure = num(data)
|
|
case "site":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Site = num(data)
|
|
case "site_civ":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCiv = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventSiteDied(p *util.XMLParser) (*HistoricalEventSiteDied, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteDied{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "abandoned":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Abandoned = true
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSiteDiedPlus(p *util.XMLParser, obj *HistoricalEventSiteDied) (*HistoricalEventSiteDied, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteDied{}
|
|
}
|
|
|
|
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 parseHistoricalEventSiteDispute(p *util.XMLParser) (*HistoricalEventSiteDispute, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteDispute{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "dispute":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Dispute = parseHistoricalEventSiteDisputeDispute(txt(data))
|
|
case "entity_id_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId1 = num(data)
|
|
case "entity_id_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId2 = num(data)
|
|
case "site_id_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId1 = num(data)
|
|
case "site_id_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId2 = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventSiteDisputePlus(p *util.XMLParser, obj *HistoricalEventSiteDispute) (*HistoricalEventSiteDispute, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteDispute{}
|
|
}
|
|
|
|
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 parseHistoricalEventSiteRetired(p *util.XMLParser) (*HistoricalEventSiteRetired, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteRetired{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "first":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.First = true
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSiteRetiredPlus(p *util.XMLParser, obj *HistoricalEventSiteRetired) (*HistoricalEventSiteRetired, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteRetired{}
|
|
}
|
|
|
|
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 parseHistoricalEventSiteSurrendered(p *util.XMLParser) (*HistoricalEventSiteSurrendered, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteSurrendered{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSiteSurrenderedPlus(p *util.XMLParser, obj *HistoricalEventSiteSurrendered) (*HistoricalEventSiteSurrendered, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteSurrendered{}
|
|
}
|
|
|
|
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 parseHistoricalEventSiteTakenOver(p *util.XMLParser) (*HistoricalEventSiteTakenOver, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteTakenOver{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "new_site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NewSiteCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSiteTakenOverPlus(p *util.XMLParser, obj *HistoricalEventSiteTakenOver) (*HistoricalEventSiteTakenOver, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteTakenOver{}
|
|
}
|
|
|
|
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 parseHistoricalEventSiteTributeForced(p *util.XMLParser) (*HistoricalEventSiteTributeForced, error) {
|
|
var (
|
|
obj = &HistoricalEventSiteTributeForced{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "season":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Season = parseHistoricalEventSiteTributeForcedSeason(txt(data))
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSiteTributeForcedPlus(p *util.XMLParser, obj *HistoricalEventSiteTributeForced) (*HistoricalEventSiteTributeForced, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSiteTributeForced{}
|
|
}
|
|
|
|
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 parseHistoricalEventSneakIntoSite(p *util.XMLParser) (*HistoricalEventSneakIntoSite, error) {
|
|
var (
|
|
obj = &HistoricalEventSneakIntoSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "attacker_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AttackerCivId = num(data)
|
|
case "defender_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DefenderCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = 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 parseHistoricalEventSneakIntoSitePlus(p *util.XMLParser, obj *HistoricalEventSneakIntoSite) (*HistoricalEventSneakIntoSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSneakIntoSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventSpottedLeavingSite(p *util.XMLParser) (*HistoricalEventSpottedLeavingSite, error) {
|
|
var (
|
|
obj = &HistoricalEventSpottedLeavingSite{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "leaver_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LeaverCivId = num(data)
|
|
case "site_civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteCivId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "spotter_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SpotterHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventSpottedLeavingSitePlus(p *util.XMLParser, obj *HistoricalEventSpottedLeavingSite) (*HistoricalEventSpottedLeavingSite, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSpottedLeavingSite{}
|
|
}
|
|
|
|
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 parseHistoricalEventSquadVsSquad(p *util.XMLParser) (*HistoricalEventSquadVsSquad, error) {
|
|
var (
|
|
obj = &HistoricalEventSquadVsSquad{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "a_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AHfid = append(obj.AHfid, num(data))
|
|
case "a_leader_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ALeaderHfid = num(data)
|
|
case "a_leadership_roll":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ALeadershipRoll = num(data)
|
|
case "a_squad_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ASquadId = num(data)
|
|
case "d_effect":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DEffect = num(data)
|
|
case "d_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DHfid = append(obj.DHfid, num(data))
|
|
case "d_interaction":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DInteraction = num(data)
|
|
case "d_leader_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DLeaderHfid = num(data)
|
|
case "d_leadership_roll":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DLeadershipRoll = num(data)
|
|
case "d_number":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DNumber = num(data)
|
|
case "d_race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DRace = num(data)
|
|
case "d_slain":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSlain = num(data)
|
|
case "d_squad_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DSquadId = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventSquadVsSquadPlus(p *util.XMLParser, obj *HistoricalEventSquadVsSquad) (*HistoricalEventSquadVsSquad, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventSquadVsSquad{}
|
|
}
|
|
|
|
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 parseHistoricalEventTacticalSituation(p *util.XMLParser) (*HistoricalEventTacticalSituation, error) {
|
|
var (
|
|
obj = &HistoricalEventTacticalSituation{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "a_tactician_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ATacticianHfid = num(data)
|
|
case "a_tactics_roll":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ATacticsRoll = num(data)
|
|
case "d_tactician_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DTacticianHfid = num(data)
|
|
case "d_tactics_roll":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DTacticsRoll = num(data)
|
|
case "feature_layer_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FeatureLayerId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "situation":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Situation = parseHistoricalEventTacticalSituationSituation(txt(data))
|
|
case "start":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Start = true
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventTacticalSituationPlus(p *util.XMLParser, obj *HistoricalEventTacticalSituation) (*HistoricalEventTacticalSituation, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventTacticalSituation{}
|
|
}
|
|
|
|
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 parseHistoricalEventTrade(p *util.XMLParser) (*HistoricalEventTrade, error) {
|
|
var (
|
|
obj = &HistoricalEventTrade{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "account_shift":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AccountShift = num(data)
|
|
case "allotment":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Allotment = num(data)
|
|
case "allotment_index":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AllotmentIndex = num(data)
|
|
case "dest_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DestSiteId = num(data)
|
|
case "production_zone_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ProductionZoneId = num(data)
|
|
case "source_site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SourceSiteId = num(data)
|
|
case "trader_entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TraderEntityId = num(data)
|
|
case "trader_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.TraderHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventTradePlus(p *util.XMLParser, obj *HistoricalEventTrade) (*HistoricalEventTrade, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventTrade{}
|
|
}
|
|
|
|
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 parseHistoricalEventWrittenContentComposed(p *util.XMLParser) (*HistoricalEventWrittenContentComposed, error) {
|
|
var (
|
|
obj = &HistoricalEventWrittenContentComposed{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "circumstance":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Circumstance = parseHistoricalEventWrittenContentComposedCircumstance(txt(data))
|
|
case "circumstance_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CircumstanceId = num(data)
|
|
case "hist_figure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistFigureId = num(data)
|
|
case "reason":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reason = parseHistoricalEventWrittenContentComposedReason(txt(data))
|
|
case "reason_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReasonId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "subregion_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubregionId = num(data)
|
|
case "wc_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WcId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalEventWrittenContentComposedPlus(p *util.XMLParser, obj *HistoricalEventWrittenContentComposed) (*HistoricalEventWrittenContentComposed, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalEventWrittenContentComposed{}
|
|
}
|
|
|
|
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 parseHistoricalFigure(p *util.XMLParser) (*HistoricalFigure, error) {
|
|
var (
|
|
obj = &HistoricalFigure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "active_interaction":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ActiveInteraction = append(obj.ActiveInteraction, txt(data))
|
|
case "adventurer":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Adventurer = true
|
|
case "animated":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Animated = true
|
|
case "animated_string":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AnimatedString = txt(data)
|
|
case "appeared":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Appeared = num(data)
|
|
case "associated_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AssociatedType = txt(data)
|
|
case "birth_seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BirthSeconds72 = num(data)
|
|
case "birth_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BirthYear = num(data)
|
|
case "breed_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BreedId = num(data)
|
|
case "caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Caste = txt(data)
|
|
case "current_identity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CurrentIdentityId = num(data)
|
|
case "death_seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DeathSeconds72 = num(data)
|
|
case "death_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DeathYear = num(data)
|
|
case "deity":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Deity = true
|
|
case "ent_pop_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntPopId = num(data)
|
|
case "entity_former_position_link":
|
|
v, _ := parseEntityFormerPositionLink(p)
|
|
obj.EntityFormerPositionLink = append(obj.EntityFormerPositionLink, v)
|
|
case "entity_former_squad_link":
|
|
v, _ := parseEntityFormerSquadLink(p)
|
|
obj.EntityFormerSquadLink = append(obj.EntityFormerSquadLink, v)
|
|
case "entity_link":
|
|
v, _ := parseHistoricalFigureEntityLink(p)
|
|
obj.EntityLink = append(obj.EntityLink, v)
|
|
case "entity_position_link":
|
|
v, _ := parseEntityPositionLink(p)
|
|
obj.EntityPositionLink = append(obj.EntityPositionLink, v)
|
|
case "entity_reputation":
|
|
v, _ := parseEntityReputation(p)
|
|
obj.EntityReputation = append(obj.EntityReputation, v)
|
|
case "entity_squad_link":
|
|
v, _ := parseEntitySquadLink(p)
|
|
obj.EntitySquadLink = v
|
|
case "force":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Force = true
|
|
case "ghost":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Ghost = true
|
|
case "goal":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Goal = append(obj.Goal, parseHistoricalFigureGoal(txt(data)))
|
|
case "hf_link":
|
|
v, _ := parseHfLink(p)
|
|
obj.HfLink = append(obj.HfLink, v)
|
|
case "hf_skill":
|
|
v, _ := parseHfSkill(p)
|
|
obj.HfSkill = append(obj.HfSkill, v)
|
|
case "holds_artifact":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HoldsArtifact = append(obj.HoldsArtifact, num(data))
|
|
case "honor_entity":
|
|
v, _ := parseHonorEntity(p)
|
|
obj.HonorEntity = append(obj.HonorEntity, v)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "interaction_knowledge":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.InteractionKnowledge = append(obj.InteractionKnowledge, txt(data))
|
|
case "intrigue_actor":
|
|
v, _ := parseIntrigueActor(p)
|
|
obj.IntrigueActor = append(obj.IntrigueActor, v)
|
|
case "intrigue_plot":
|
|
v, _ := parseIntriguePlot(p)
|
|
obj.IntriguePlot = append(obj.IntriguePlot, v)
|
|
case "journey_pet":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JourneyPet = append(obj.JourneyPet, txt(data))
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
case "relationship_profile_hf_historical":
|
|
v, _ := parseRelationshipProfileHfHistorical(p)
|
|
obj.RelationshipProfileHfHistorical = append(obj.RelationshipProfileHfHistorical, v)
|
|
case "relationship_profile_hf_identity":
|
|
v, _ := parseRelationshipProfileHfIdentity(p)
|
|
obj.RelationshipProfileHfIdentity = append(obj.RelationshipProfileHfIdentity, v)
|
|
case "relationship_profile_hf_visual":
|
|
v, _ := parseRelationshipProfileHfVisual(p)
|
|
obj.RelationshipProfileHfVisual = append(obj.RelationshipProfileHfVisual, v)
|
|
case "site_link":
|
|
v, _ := parseSiteLink(p)
|
|
obj.SiteLink = append(obj.SiteLink, v)
|
|
case "site_property":
|
|
v, _ := parseHistoricalFigureSiteProperty(p)
|
|
obj.SiteProperty = append(obj.SiteProperty, v)
|
|
case "sphere":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Sphere = append(obj.Sphere, txt(data))
|
|
case "used_identity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.UsedIdentityId = append(obj.UsedIdentityId, num(data))
|
|
case "vague_relationship":
|
|
v, _ := parseVagueRelationship(p)
|
|
obj.VagueRelationship = append(obj.VagueRelationship, v)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalFigurePlus(p *util.XMLParser, obj *HistoricalFigure) (*HistoricalFigure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalFigure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
case "sex":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Sex = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalFigureEntityLink(p *util.XMLParser) (*HistoricalFigureEntityLink, error) {
|
|
var (
|
|
obj = &HistoricalFigureEntityLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "link_strength":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkStrength = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseHistoricalFigureEntityLinkLinkType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHistoricalFigureEntityLinkPlus(p *util.XMLParser, obj *HistoricalFigureEntityLink) (*HistoricalFigureEntityLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalFigureEntityLink{}
|
|
}
|
|
|
|
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 parseHistoricalFigureSiteProperty(p *util.XMLParser) (*HistoricalFigureSiteProperty, error) {
|
|
var (
|
|
obj = &HistoricalFigureSiteProperty{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "property_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PropertyId = 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 parseHistoricalFigureSitePropertyPlus(p *util.XMLParser, obj *HistoricalFigureSiteProperty) (*HistoricalFigureSiteProperty, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HistoricalFigureSiteProperty{}
|
|
}
|
|
|
|
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 parseHonor(p *util.XMLParser) (*Honor, error) {
|
|
var (
|
|
obj = &Honor{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "exempt_epid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExemptEpid = num(data)
|
|
case "exempt_former_epid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ExemptFormerEpid = num(data)
|
|
case "gives_precedence":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GivesPrecedence = num(data)
|
|
case "granted_to_everybody":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.GrantedToEverybody = true
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "required_battles":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiredBattles = num(data)
|
|
case "required_kills":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiredKills = num(data)
|
|
case "required_skill":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiredSkill = parseHonorRequiredSkill(txt(data))
|
|
case "required_skill_ip_total":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiredSkillIpTotal = num(data)
|
|
case "required_years":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiredYears = num(data)
|
|
case "requires_any_melee_or_ranged_skill":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RequiresAnyMeleeOrRangedSkill = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHonorPlus(p *util.XMLParser, obj *Honor) (*Honor, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Honor{}
|
|
}
|
|
|
|
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 parseHonorEntity(p *util.XMLParser) (*HonorEntity, error) {
|
|
var (
|
|
obj = &HonorEntity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "battles":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Battles = num(data)
|
|
case "entity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Entity = num(data)
|
|
case "honor_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HonorId = append(obj.HonorId, num(data))
|
|
case "kills":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Kills = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseHonorEntityPlus(p *util.XMLParser, obj *HonorEntity) (*HonorEntity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &HonorEntity{}
|
|
}
|
|
|
|
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 parseIdentity(p *util.XMLParser) (*Identity, error) {
|
|
var (
|
|
obj = &Identity{}
|
|
)
|
|
|
|
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 parseIdentityPlus(p *util.XMLParser, obj *Identity) (*Identity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Identity{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "birth_second":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BirthSecond = num(data)
|
|
case "birth_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BirthYear = num(data)
|
|
case "caste":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Caste = txt(data)
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "histfig_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HistfigId = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "nemesis_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NemesisId = num(data)
|
|
case "profession":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Profession = parseIdentityProfession(txt(data))
|
|
case "race":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Race = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseIntrigueActor(p *util.XMLParser) (*IntrigueActor, error) {
|
|
var (
|
|
obj = &IntrigueActor{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "handle_actor_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HandleActorId = num(data)
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "local_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LocalId = num(data)
|
|
case "promised_actor_immortality":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PromisedActorImmortality = true
|
|
case "promised_me_immortality":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PromisedMeImmortality = true
|
|
case "role":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Role = parseIntrigueActorRole(txt(data))
|
|
case "strategy":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Strategy = parseIntrigueActorStrategy(txt(data))
|
|
case "strategy_enid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StrategyEnid = num(data)
|
|
case "strategy_eppid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StrategyEppid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseIntrigueActorPlus(p *util.XMLParser, obj *IntrigueActor) (*IntrigueActor, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &IntrigueActor{}
|
|
}
|
|
|
|
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 parseIntriguePlot(p *util.XMLParser) (*IntriguePlot, error) {
|
|
var (
|
|
obj = &IntriguePlot{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "actor_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ActorId = num(data)
|
|
case "artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtifactId = num(data)
|
|
case "delegated_plot_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DelegatedPlotHfid = num(data)
|
|
case "delegated_plot_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DelegatedPlotId = num(data)
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "local_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LocalId = num(data)
|
|
case "on_hold":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OnHold = true
|
|
case "parent_plot_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentPlotHfid = num(data)
|
|
case "parent_plot_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ParentPlotId = num(data)
|
|
case "plot_actor":
|
|
v, _ := parsePlotActor(p)
|
|
obj.PlotActor = append(obj.PlotActor, v)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseIntriguePlotType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseIntriguePlotPlus(p *util.XMLParser, obj *IntriguePlot) (*IntriguePlot, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &IntriguePlot{}
|
|
}
|
|
|
|
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 parseItem(p *util.XMLParser) (*Item, error) {
|
|
var (
|
|
obj = &Item{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "name_string":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.NameString = txt(data)
|
|
case "page_number":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PageNumber = num(data)
|
|
case "page_written_content_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PageWrittenContentId = num(data)
|
|
case "writing_written_content_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WritingWrittenContentId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseItemPlus(p *util.XMLParser, obj *Item) (*Item, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Item{}
|
|
}
|
|
|
|
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 parseLandmass(p *util.XMLParser) (*Landmass, error) {
|
|
var (
|
|
obj = &Landmass{}
|
|
)
|
|
|
|
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 parseLandmassPlus(p *util.XMLParser, obj *Landmass) (*Landmass, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Landmass{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coord_1":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coord1 = txt(data)
|
|
case "coord_2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coord2 = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseMountainPeak(p *util.XMLParser) (*MountainPeak, error) {
|
|
var (
|
|
obj = &MountainPeak{}
|
|
)
|
|
|
|
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 parseMountainPeakPlus(p *util.XMLParser, obj *MountainPeak) (*MountainPeak, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &MountainPeak{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "height":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Height = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "is_volcano":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.IsVolcano = true
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseMusicalForm(p *util.XMLParser) (*MusicalForm, error) {
|
|
var (
|
|
obj = &MusicalForm{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "description":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Description = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseMusicalFormPlus(p *util.XMLParser, obj *MusicalForm) (*MusicalForm, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &MusicalForm{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseOccasion(p *util.XMLParser) (*Occasion, error) {
|
|
var (
|
|
obj = &Occasion{}
|
|
)
|
|
|
|
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 parseOccasionPlus(p *util.XMLParser, obj *Occasion) (*Occasion, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Occasion{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "event":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Event = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "schedule":
|
|
v, _ := parseSchedulePlus(p, &Schedule{})
|
|
obj.Schedule = append(obj.Schedule, v)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parsePlotActor(p *util.XMLParser) (*PlotActor, error) {
|
|
var (
|
|
obj = &PlotActor{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "actor_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ActorId = num(data)
|
|
case "agreement_has_messenger":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AgreementHasMessenger = true
|
|
case "agreement_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AgreementId = num(data)
|
|
case "plot_role":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PlotRole = parsePlotActorPlotRole(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parsePlotActorPlus(p *util.XMLParser, obj *PlotActor) (*PlotActor, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &PlotActor{}
|
|
}
|
|
|
|
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 parsePoeticForm(p *util.XMLParser) (*PoeticForm, error) {
|
|
var (
|
|
obj = &PoeticForm{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "description":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Description = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parsePoeticFormPlus(p *util.XMLParser, obj *PoeticForm) (*PoeticForm, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &PoeticForm{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseReference(p *util.XMLParser) (*Reference, error) {
|
|
var (
|
|
obj = &Reference{}
|
|
)
|
|
|
|
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 parseReferencePlus(p *util.XMLParser, obj *Reference) (*Reference, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Reference{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseReferenceType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRegion(p *util.XMLParser) (*Region, error) {
|
|
var (
|
|
obj = &Region{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseRegionType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRegionPlus(p *util.XMLParser, obj *Region) (*Region, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Region{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "evilness":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Evilness = parseRegionEvilness(txt(data))
|
|
case "force_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ForceId = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRelationshipProfileHfHistorical(p *util.XMLParser) (*RelationshipProfileHfHistorical, error) {
|
|
var (
|
|
obj = &RelationshipProfileHfHistorical{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "fear":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Fear = num(data)
|
|
case "hf_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfId = num(data)
|
|
case "love":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Love = num(data)
|
|
case "loyalty":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Loyalty = num(data)
|
|
case "rep_enemy_fighter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepEnemyFighter = num(data)
|
|
case "rep_hero":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHero = num(data)
|
|
case "rep_hunter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHunter = num(data)
|
|
case "rep_killer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepKiller = num(data)
|
|
case "rep_psychopath":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepPsychopath = num(data)
|
|
case "rep_storyteller":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepStoryteller = num(data)
|
|
case "rep_violent":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepViolent = num(data)
|
|
case "respect":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Respect = num(data)
|
|
case "trust":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Trust = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRelationshipProfileHfHistoricalPlus(p *util.XMLParser, obj *RelationshipProfileHfHistorical) (*RelationshipProfileHfHistorical, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &RelationshipProfileHfHistorical{}
|
|
}
|
|
|
|
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 parseRelationshipProfileHfIdentity(p *util.XMLParser) (*RelationshipProfileHfIdentity, error) {
|
|
var (
|
|
obj = &RelationshipProfileHfIdentity{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "fear":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Fear = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "love":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Love = num(data)
|
|
case "loyalty":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Loyalty = num(data)
|
|
case "rep_psychopath":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepPsychopath = num(data)
|
|
case "respect":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Respect = num(data)
|
|
case "trust":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Trust = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRelationshipProfileHfIdentityPlus(p *util.XMLParser, obj *RelationshipProfileHfIdentity) (*RelationshipProfileHfIdentity, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &RelationshipProfileHfIdentity{}
|
|
}
|
|
|
|
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 parseRelationshipProfileHfVisual(p *util.XMLParser) (*RelationshipProfileHfVisual, error) {
|
|
var (
|
|
obj = &RelationshipProfileHfVisual{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "fear":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Fear = num(data)
|
|
case "hf_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.HfId = num(data)
|
|
case "known_identity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.KnownIdentityId = num(data)
|
|
case "last_meet_seconds72":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LastMeetSeconds72 = num(data)
|
|
case "last_meet_year":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LastMeetYear = num(data)
|
|
case "love":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Love = num(data)
|
|
case "loyalty":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Loyalty = num(data)
|
|
case "meet_count":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.MeetCount = num(data)
|
|
case "rep_bonded":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepBonded = num(data)
|
|
case "rep_comrade":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepComrade = num(data)
|
|
case "rep_flatterer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepFlatterer = num(data)
|
|
case "rep_friendly":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepFriendly = num(data)
|
|
case "rep_hero":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHero = num(data)
|
|
case "rep_hunter":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepHunter = num(data)
|
|
case "rep_information_source":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepInformationSource = num(data)
|
|
case "rep_killer":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepKiller = num(data)
|
|
case "rep_psychopath":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepPsychopath = num(data)
|
|
case "rep_quarreler":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepQuarreler = num(data)
|
|
case "rep_trade_partner":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.RepTradePartner = num(data)
|
|
case "respect":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Respect = num(data)
|
|
case "trust":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Trust = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseRelationshipProfileHfVisualPlus(p *util.XMLParser, obj *RelationshipProfileHfVisual) (*RelationshipProfileHfVisual, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &RelationshipProfileHfVisual{}
|
|
}
|
|
|
|
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 parseRiver(p *util.XMLParser) (*River, error) {
|
|
var (
|
|
obj = &River{}
|
|
)
|
|
|
|
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 parseRiverPlus(p *util.XMLParser, obj *River) (*River, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &River{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "end_pos":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EndPos = txt(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "path":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Path = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSchedule(p *util.XMLParser) (*Schedule, error) {
|
|
var (
|
|
obj = &Schedule{}
|
|
)
|
|
|
|
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 parseSchedulePlus(p *util.XMLParser, obj *Schedule) (*Schedule, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Schedule{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "feature":
|
|
v, _ := parseFeaturePlus(p, &Feature{})
|
|
obj.Feature = append(obj.Feature, v)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "item_subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemSubtype = parseScheduleItemSubtype(txt(data))
|
|
case "item_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ItemType = parseScheduleItemType(txt(data))
|
|
case "reference":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reference = num(data)
|
|
case "reference2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Reference2 = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseScheduleType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSite(p *util.XMLParser) (*Site, error) {
|
|
var (
|
|
obj = &Site{}
|
|
)
|
|
|
|
obj.SiteProperties = make(map[int]*SiteSiteProperty)
|
|
obj.Structures = make(map[int]*Structure)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "rectangle":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Rectangle = txt(data)
|
|
case "site_properties":
|
|
parseMap(p, &obj.SiteProperties, parseSiteSiteProperty)
|
|
case "structures":
|
|
parseMap(p, &obj.Structures, parseStructure)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseSiteType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSitePlus(p *util.XMLParser, obj *Site) (*Site, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Site{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "civ_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CivId = num(data)
|
|
case "cur_owner_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CurOwnerId = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "structures":
|
|
parseMapPlus(p, &obj.Structures, parseStructurePlus)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSiteLink(p *util.XMLParser) (*SiteLink, error) {
|
|
var (
|
|
obj = &SiteLink{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "link_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LinkType = parseSiteLinkLinkType(txt(data))
|
|
case "occupation_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OccupationId = num(data)
|
|
case "site_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SiteId = num(data)
|
|
case "sub_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SubId = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSiteLinkPlus(p *util.XMLParser, obj *SiteLink) (*SiteLink, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &SiteLink{}
|
|
}
|
|
|
|
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 parseSiteSiteProperty(p *util.XMLParser) (*SiteSiteProperty, error) {
|
|
var (
|
|
obj = &SiteSiteProperty{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "owner_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.OwnerHfid = num(data)
|
|
case "structure_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.StructureId = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseSiteSitePropertyType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseSiteSitePropertyPlus(p *util.XMLParser, obj *SiteSiteProperty) (*SiteSiteProperty, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &SiteSiteProperty{}
|
|
}
|
|
|
|
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 parseStructure(p *util.XMLParser) (*Structure, error) {
|
|
var (
|
|
obj = &Structure{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "copied_artifact_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.CopiedArtifactId = append(obj.CopiedArtifactId, num(data))
|
|
case "entity_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.EntityId = num(data)
|
|
case "local_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.LocalId = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "subtype":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Subtype = parseStructureSubtype(txt(data))
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseStructureType(txt(data))
|
|
case "worship_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WorshipHfid = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseStructurePlus(p *util.XMLParser, obj *Structure) (*Structure, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &Structure{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "deity":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Deity = num(data)
|
|
case "deity_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DeityType = num(data)
|
|
case "dungeon_type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.DungeonType = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "inhabitant":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Inhabitant = append(obj.Inhabitant, num(data))
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "name2":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name2 = txt(data)
|
|
case "religion":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Religion = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseStructureType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseUndergroundRegion(p *util.XMLParser) (*UndergroundRegion, error) {
|
|
var (
|
|
obj = &UndergroundRegion{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "depth":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Depth = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseUndergroundRegionType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseUndergroundRegionPlus(p *util.XMLParser, obj *UndergroundRegion) (*UndergroundRegion, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &UndergroundRegion{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseVagueRelationship(p *util.XMLParser) (*VagueRelationship, error) {
|
|
var (
|
|
obj = &VagueRelationship{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "artistic_buddy":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ArtisticBuddy = true
|
|
case "atheletic_rival":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AtheleticRival = true
|
|
case "athlete_buddy":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AthleteBuddy = true
|
|
case "business_rival":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.BusinessRival = true
|
|
case "childhood_friend":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ChildhoodFriend = true
|
|
case "grudge":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Grudge = true
|
|
case "hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Hfid = num(data)
|
|
case "jealous_obsession":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JealousObsession = true
|
|
case "jealous_relationship_grudge":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.JealousRelationshipGrudge = true
|
|
case "persecution_grudge":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PersecutionGrudge = true
|
|
case "religious_persecution_grudge":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ReligiousPersecutionGrudge = true
|
|
case "scholar_buddy":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.ScholarBuddy = true
|
|
case "supernatural_grudge":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.SupernaturalGrudge = true
|
|
case "war_buddy":
|
|
_, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.WarBuddy = true
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseVagueRelationshipPlus(p *util.XMLParser, obj *VagueRelationship) (*VagueRelationship, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &VagueRelationship{}
|
|
}
|
|
|
|
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 parseWorldConstruction(p *util.XMLParser) (*WorldConstruction, error) {
|
|
var (
|
|
obj = &WorldConstruction{}
|
|
)
|
|
|
|
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 parseWorldConstructionPlus(p *util.XMLParser, obj *WorldConstruction) (*WorldConstruction, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &WorldConstruction{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "coords":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Coords = txt(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "name":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Name_ = txt(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseWorldConstructionType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseWrittenContent(p *util.XMLParser) (*WrittenContent, error) {
|
|
var (
|
|
obj = &WrittenContent{}
|
|
)
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "author_hfid":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AuthorHfid = num(data)
|
|
case "author_roll":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AuthorRoll = num(data)
|
|
case "form":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Form = parseWrittenContentForm(txt(data))
|
|
case "form_id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.FormId = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "style":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Style = append(obj.Style, txt(data))
|
|
case "title":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Title = txt(data)
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|
|
func parseWrittenContentPlus(p *util.XMLParser, obj *WrittenContent) (*WrittenContent, error) {
|
|
var ()
|
|
if obj == nil {
|
|
obj = &WrittenContent{}
|
|
}
|
|
|
|
for {
|
|
t, n, err := p.Token()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
switch t {
|
|
case util.StartElement:
|
|
switch n {
|
|
case "author":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.AuthorHfid = num(data)
|
|
case "id":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Id_ = num(data)
|
|
case "page_end":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PageEnd = num(data)
|
|
case "page_start":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.PageStart = num(data)
|
|
case "reference":
|
|
v, _ := parseReferencePlus(p, &Reference{})
|
|
obj.Reference = append(obj.Reference, v)
|
|
case "style":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Style = append(obj.Style, txt(data))
|
|
case "title":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Title = txt(data)
|
|
case "type":
|
|
data, err := p.Value()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj.Type = parseWrittenContentType(txt(data))
|
|
default:
|
|
// fmt.Println("unknown field", n)
|
|
p.Skip()
|
|
}
|
|
|
|
case util.EndElement:
|
|
obj.CheckFields()
|
|
return obj, nil
|
|
}
|
|
}
|
|
}
|