Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
aronwk-aaron committed Nov 11, 2023
1 parent 4c3949e commit 175b354
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions dGame/dUtilities/VanityUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,22 @@ void VanityUtilities::SpawnVanity() {
}

const uint32_t zoneID = Game::server->GetZoneID();
if (!m_NPCs.empty()){
for (auto& npc : m_NPCs) {
if (npc.m_ID == LWOOBJID_EMPTY) continue;
if (npc.m_LOT == 176){
Game::zoneManager->RemoveSpawner(npc.m_ID);
} else{
auto* entity = Game::entityManager->GetEntity(npc.m_ID);
if (!entity) continue;
entity->Smash(LWOOBJID_EMPTY, eKillType::VIOLENT);
}

for (const auto& npc : m_NPCs) {
if (npc.m_ID == LWOOBJID_EMPTY) continue;
if (npc.m_LOT == 176){
Game::zoneManager->RemoveSpawner(npc.m_ID);
} else{
auto* entity = Game::entityManager->GetEntity(npc.m_ID);
if (!entity) continue;
entity->Smash(LWOOBJID_EMPTY, eKillType::VIOLENT);
}
m_NPCs.clear();
}

if (!m_Parties.empty()){
m_Parties.clear();
}
if (!m_PartyPhrases.empty()){
m_PartyPhrases.clear();
}

m_NPCs.clear();
m_Parties.clear();
m_PartyPhrases.clear();

ParseXML((BinaryPathFinder::GetBinaryDir() / "vanity/NPC.xml").string());

// Loop through all parties
Expand Down

0 comments on commit 175b354

Please sign in to comment.