mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-21 12:10:17 +00:00
Initial changes.
* Recorder to recall player actions. * Server precondtions to manage entity visiblity.
This commit is contained in:
38
dGame/dUtilities/ServerPreconditions.hpp
Normal file
38
dGame/dUtilities/ServerPreconditions.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
#include "dCommonVars.h"
|
||||
#include "Preconditions.h"
|
||||
|
||||
class Entity;
|
||||
|
||||
namespace ServerPreconditions
|
||||
{
|
||||
|
||||
extern std::unordered_map<LOT, std::vector<std::pair<bool, PreconditionExpression>>> m_Preconditions;
|
||||
|
||||
extern std::unordered_map<LWOOBJID, LWOOBJID> m_SoloActors;
|
||||
|
||||
extern std::unordered_map<LWOOBJID, std::unordered_set<LWOOBJID>> m_ExcludeForPlayer;
|
||||
|
||||
void LoadPreconditions(std::string file);
|
||||
|
||||
bool CheckPreconditions(Entity* target, Entity* entity);
|
||||
|
||||
bool IsSoloActor(LWOOBJID actor);
|
||||
|
||||
bool IsActingFor(LWOOBJID actor, LWOOBJID target);
|
||||
|
||||
void AddSoloActor(LWOOBJID actor, LWOOBJID target);
|
||||
|
||||
void RemoveSoloActor(LWOOBJID actor);
|
||||
|
||||
void AddExcludeFor(LWOOBJID player, LWOOBJID target);
|
||||
|
||||
void RemoveExcludeFor(LWOOBJID player, LWOOBJID target);
|
||||
|
||||
bool IsExcludedFor(LWOOBJID player, LWOOBJID target);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user