From 69238eddfc6374ad54a63f14fd29fd7b4dfbba48 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Feb 2018 20:17:00 +0300 Subject: Store clan names into each player being. --- src/resources/claninfo.h | 2 ++ src/resources/db/clandb.cpp | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/resources') diff --git a/src/resources/claninfo.h b/src/resources/claninfo.h index fd96ecf51..2e85eed15 100644 --- a/src/resources/claninfo.h +++ b/src/resources/claninfo.h @@ -31,12 +31,14 @@ struct ClanInfo final { ClanInfo() : stats(), + name(), id(0) { } A_DELETE_COPY(ClanInfo) STD_VECTOR stats; + std::string name; int id; }; diff --git a/src/resources/db/clandb.cpp b/src/resources/db/clandb.cpp index e4cf691dd..c613067e3 100644 --- a/src/resources/db/clandb.cpp +++ b/src/resources/db/clandb.cpp @@ -31,6 +31,7 @@ #include "utils/checkutils.h" #include "utils/dtor.h" +#include "utils/gettext.h" #include "utils/itemxmlutils.h" #include "debug.h" @@ -96,6 +97,9 @@ void ClanDb::loadXmlFile(const std::string &fileName, clanInfo = new ClanInfo; clanInfo->id = id; + clanInfo->name = XML::langProperty( + // TRANSLATORS: unknown clan name + clanNode, "name", _("unnamed")); readItemStatsVector(clanInfo->stats, clanNode, -- cgit v1.2.3-70-g09d2