mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
add settings if they dont exist
add helper for spawnerinfo config data
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
#include "GeneralUtils.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
bool SpawnerNode::HasVar(const std::u16string_view view) {
|
||||
for (const auto* data : config) {
|
||||
if (data->GetKey() == view) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Spawner::Spawner(const SpawnerInfo info) {
|
||||
m_Info = info;
|
||||
m_Active = m_Info.activeOnLoad && info.spawnActivator;
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <functional>
|
||||
#include "LDFFormat.h"
|
||||
#include "EntityInfo.h"
|
||||
#include <string_view>
|
||||
|
||||
struct SpawnerNode {
|
||||
NiPoint3 position = NiPoint3Constant::ZERO;
|
||||
@@ -18,6 +19,8 @@ struct SpawnerNode {
|
||||
uint32_t nodeMax = 1;
|
||||
std::vector<LWOOBJID> entities;
|
||||
std::vector<LDFBaseData*> config;
|
||||
|
||||
bool HasVar(const std::u16string_view view);
|
||||
};
|
||||
|
||||
struct SpawnerInfo {
|
||||
|
Reference in New Issue
Block a user