mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 01:18:07 +00:00
Merge branch 'main' into components-wheeeee
This commit is contained in:
@@ -119,7 +119,7 @@ void VanityUtilities::SpawnVanity() {
|
||||
|
||||
auto* scriptComponent = npcEntity->GetComponent<ScriptComponent>();
|
||||
|
||||
if (scriptComponent != nullptr) {
|
||||
if (scriptComponent && !npc.m_Script.empty()) {
|
||||
scriptComponent->SetScript(npc.m_Script);
|
||||
|
||||
for (const auto& npc : npc.m_Flags) {
|
||||
@@ -162,7 +162,7 @@ Entity* VanityUtilities::SpawnNPC(LOT lot, const std::string& name, const NiPoin
|
||||
|
||||
auto* inventoryComponent = entity->GetComponent<InventoryComponent>();
|
||||
|
||||
if (inventoryComponent != nullptr) {
|
||||
if (inventoryComponent && !inventory.empty()) {
|
||||
inventoryComponent->SetNPCItems(inventory);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user