OpenFusion/src/NPCManager.hpp
dongresource b79bc56b31 Implement NPC spawning.
Protected by a simplified GM system. Either everyone is a GM (local
servers) or nobody is (public servers).
2020-08-25 04:28:42 +02:00

27 lines
622 B
C++

#pragma once
#include "CNProtocol.hpp"
#include "PlayerManager.hpp"
#include "NPC.hpp"
#include <map>
#include <vector>
#define RESURRECT_HEIGHT 400
// this should really be called vec3 or something...
struct WarpLocation {
int x, y, z;
};
namespace NPCManager {
extern std::map<int32_t, BaseNPC> NPCs;
extern std::map<int32_t, WarpLocation> Warps;
extern std::vector<WarpLocation> RespawnPoints;
void init();
void updatePlayerNPCS(CNSocket* sock, PlayerView& plr);
void npcWarpHandler(CNSocket* sock, CNPacketData* data);
void npcSummonHandler(CNSocket* sock, CNPacketData* data);
}