From b0012eeae07498801e69fbdc371e2bca5cd50f03 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 10 May 2018 20:02:53 +0200 Subject: [PATCH] familiars do not need the default value in XML (bad XML). --- res/e3a/races.xml | 14 +++++++------- res/eressea/races.xml | 24 ++++++++++++------------ res/races/aquarian.xml | 2 +- res/races/cat.xml | 2 +- res/races/demon.xml | 2 +- res/races/dwarf.xml | 2 +- res/races/elf.xml | 2 +- res/races/goblin-3.xml | 2 +- res/races/goblin.xml | 2 +- res/races/halfling.xml | 2 +- res/races/human.xml | 2 +- res/races/insect.xml | 2 +- res/races/orc.xml | 2 +- res/races/troll.xml | 2 +- src/xmlreader.c | 8 +------- 15 files changed, 32 insertions(+), 38 deletions(-) diff --git a/res/e3a/races.xml b/res/e3a/races.xml index 7bb80edc0..2386a5ea9 100644 --- a/res/e3a/races.xml +++ b/res/e3a/races.xml @@ -40,7 +40,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -186,7 +186,7 @@ - + diff --git a/res/eressea/races.xml b/res/eressea/races.xml index b1f105f98..67d84c763 100644 --- a/res/eressea/races.xml +++ b/res/eressea/races.xml @@ -20,7 +20,7 @@ - + @@ -749,7 +749,7 @@ - + @@ -774,7 +774,7 @@ - + @@ -806,7 +806,7 @@ - + @@ -834,7 +834,7 @@ - + @@ -864,7 +864,7 @@ - + @@ -894,7 +894,7 @@ - + @@ -918,7 +918,7 @@ - + @@ -1109,7 +1109,7 @@ - + @@ -1135,7 +1135,7 @@ - + @@ -1166,7 +1166,7 @@ - + @@ -1196,7 +1196,7 @@ - + diff --git a/res/races/aquarian.xml b/res/races/aquarian.xml index 19fd3aee7..4950d60d1 100644 --- a/res/races/aquarian.xml +++ b/res/races/aquarian.xml @@ -10,7 +10,7 @@ - + diff --git a/res/races/cat.xml b/res/races/cat.xml index 5986c223c..2e0f73dcf 100644 --- a/res/races/cat.xml +++ b/res/races/cat.xml @@ -17,7 +17,7 @@ - + diff --git a/res/races/demon.xml b/res/races/demon.xml index 69d98145f..21a1f289d 100644 --- a/res/races/demon.xml +++ b/res/races/demon.xml @@ -27,7 +27,7 @@ recruitethereal="yes" equipment="yes" healing="1.5"> - + diff --git a/res/races/dwarf.xml b/res/races/dwarf.xml index 043b76aa7..4f2719649 100644 --- a/res/races/dwarf.xml +++ b/res/races/dwarf.xml @@ -23,7 +23,7 @@ - + diff --git a/res/races/elf.xml b/res/races/elf.xml index 683ee823b..968ad22f2 100644 --- a/res/races/elf.xml +++ b/res/races/elf.xml @@ -18,7 +18,7 @@ - + diff --git a/res/races/goblin-3.xml b/res/races/goblin-3.xml index 636f8cc29..ad83ee7f0 100644 --- a/res/races/goblin-3.xml +++ b/res/races/goblin-3.xml @@ -21,7 +21,7 @@ getitem="yes" equipment="yes" healing="2.0"> - + diff --git a/res/races/goblin.xml b/res/races/goblin.xml index 84d2c5079..ec224a0c7 100644 --- a/res/races/goblin.xml +++ b/res/races/goblin.xml @@ -21,7 +21,7 @@ healing="2.0"> - + diff --git a/res/races/halfling.xml b/res/races/halfling.xml index 3628d2b35..5c17e4a4f 100644 --- a/res/races/halfling.xml +++ b/res/races/halfling.xml @@ -24,7 +24,7 @@ - + diff --git a/res/races/human.xml b/res/races/human.xml index f91ba7daf..00c11f8a6 100644 --- a/res/races/human.xml +++ b/res/races/human.xml @@ -7,7 +7,7 @@ - + diff --git a/res/races/insect.xml b/res/races/insect.xml index 75e16f7af..b783f047a 100644 --- a/res/races/insect.xml +++ b/res/races/insect.xml @@ -20,7 +20,7 @@ - + diff --git a/res/races/orc.xml b/res/races/orc.xml index a0033759a..47754152a 100644 --- a/res/races/orc.xml +++ b/res/races/orc.xml @@ -22,7 +22,7 @@ - + diff --git a/res/races/troll.xml b/res/races/troll.xml index 9168a6d0e..7d3f18551 100644 --- a/res/races/troll.xml +++ b/res/races/troll.xml @@ -27,7 +27,7 @@ healing="1.5"> - + diff --git a/src/xmlreader.c b/src/xmlreader.c index 7f51a7853..0f7b40b93 100644 --- a/src/xmlreader.c +++ b/src/xmlreader.c @@ -1464,13 +1464,7 @@ static int parse_races(xmlDocPtr doc) assert(propValue != NULL); frc = rc_get_or_create((const char *)propValue); frc->flags |= RCF_FAMILIAR; - if (xml_bvalue(node, "default", false)) { - rc->familiars[k] = rc->familiars[0]; - rc->familiars[0] = frc; - } - else { - rc->familiars[k] = frc; - } + rc->familiars[k] = frc; xmlFree(propValue); } else {