DarkflameServer/dGame/dUtilities/VanityUtilities.h
David Markowitz aa7c3b9061
better vanity checks (#1666)
tested that vanity npcs now chat when close, and then on a cooldown
2024-12-08 16:27:04 -06:00

39 lines
831 B
C++

#pragma once
#include "dCommonVars.h"
#include "Entity.h"
#include <map>
#include <set>
struct VanityObjectLocation {
float m_Chance = 1.0f;
NiPoint3 m_Position;
NiQuaternion m_Rotation;
float m_Scale = 1.0f;
};
struct VanityObject {
LWOOBJID m_ID = LWOOBJID_EMPTY;
std::string m_Name;
LOT m_LOT = LOT_NULL;
std::vector<LOT> m_Equipment;
std::vector<std::string> m_Phrases;
std::map<uint32_t, std::vector<VanityObjectLocation>> m_Locations;
std::vector<LDFBaseData*> m_Config;
};
namespace VanityUtilities {
void SpawnVanity();
VanityObject* GetObject(const std::string& name);
std::string ParseMarkdown(
const std::string& file
);
void OnProximityUpdate(Entity* entity, Entity* other, const std::string& proxName, const std::string& name);
void OnTimerDone(Entity* entity, const std::string& name);
};