Fix saving monster thrash number

This commit is contained in:
2025-05-14 10:21:20 -05:00
parent 3dfa2b8ad4
commit 9b2773bec1
2 changed files with 14 additions and 6 deletions

View File

@@ -824,13 +824,17 @@ void writeTownToXml(ticpp::Printer&& data, cTown& town) {
data.CloseElement("timer");
}
data.OpenElement("flags");
data.OpenElement("chop");
if(town.town_chop_time > 0) {
data.OpenElement("chop");
data.PushAttribute("day", town.town_chop_time);
data.PushAttribute("event", town.town_chop_key);
data.PushAttribute("kills", town.max_num_monst);
data.CloseElement("chop");
}
if(town.town_chop_key > 0) {
data.PushAttribute("event", town.town_chop_key);
}
data.PushAttribute("kills", town.max_num_monst);
data.CloseElement("chop");
if(town.strong_barriers)
data.PushElement("strong-barriers", true);
if(town.defy_mapping)