mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
fix: optional party phrases (#1377)
* fix: optional party phrases Don't return early if there are no party phrases * Update VanityUtilities.cpp
This commit is contained in:
parent
e54faa3820
commit
18feea5fed
@ -294,21 +294,20 @@ void VanityUtilities::ParseXML(const std::string& file) {
|
|||||||
auto* partyPhrases = npcs->FirstChildElement("partyphrases");
|
auto* partyPhrases = npcs->FirstChildElement("partyphrases");
|
||||||
|
|
||||||
if (partyPhrases == nullptr) {
|
if (partyPhrases == nullptr) {
|
||||||
LOG("Failed to parse party phrases");
|
LOG("No party phrases found");
|
||||||
return;
|
} else {
|
||||||
}
|
for (auto* phrase = partyPhrases->FirstChildElement("phrase"); phrase != nullptr;
|
||||||
|
phrase = phrase->NextSiblingElement("phrase")) {
|
||||||
|
// Get the phrase
|
||||||
|
auto* text = phrase->GetText();
|
||||||
|
|
||||||
for (auto* phrase = partyPhrases->FirstChildElement("phrase"); phrase != nullptr;
|
if (text == nullptr) {
|
||||||
phrase = phrase->NextSiblingElement("phrase")) {
|
LOG("Failed to parse party phrase");
|
||||||
// Get the phrase
|
continue;
|
||||||
auto* text = phrase->GetText();
|
}
|
||||||
|
|
||||||
if (text == nullptr) {
|
m_PartyPhrases.push_back(text);
|
||||||
LOG("Failed to parse party phrase");
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PartyPhrases.push_back(text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto* npc = npcs->FirstChildElement("npc"); npc != nullptr; npc = npc->NextSiblingElement("npc")) {
|
for (auto* npc = npcs->FirstChildElement("npc"); npc != nullptr; npc = npc->NextSiblingElement("npc")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user