2020-08-23 17:14:54 +00:00
|
|
|
#pragma once
|
2020-08-19 22:21:35 +00:00
|
|
|
|
|
|
|
#include "CNProtocol.hpp"
|
2020-08-20 21:43:48 +00:00
|
|
|
#include "PlayerManager.hpp"
|
|
|
|
#include "NPC.hpp"
|
2020-08-19 22:21:35 +00:00
|
|
|
|
|
|
|
#include <map>
|
2020-08-25 01:34:53 +00:00
|
|
|
#include <vector>
|
2020-08-19 22:21:35 +00:00
|
|
|
|
2020-08-25 01:34:53 +00:00
|
|
|
#define RESURRECT_HEIGHT 400
|
|
|
|
|
|
|
|
// this should really be called vec3 or something...
|
2020-08-23 16:26:25 +00:00
|
|
|
struct WarpLocation {
|
|
|
|
int x, y, z;
|
|
|
|
};
|
|
|
|
|
2020-08-19 22:21:35 +00:00
|
|
|
namespace NPCManager {
|
2020-08-20 21:43:48 +00:00
|
|
|
extern std::map<int32_t, BaseNPC> NPCs;
|
2020-08-23 16:26:25 +00:00
|
|
|
extern std::map<int32_t, WarpLocation> Warps;
|
2020-08-25 01:34:53 +00:00
|
|
|
extern std::vector<WarpLocation> RespawnPoints;
|
2020-08-19 22:21:35 +00:00
|
|
|
void init();
|
|
|
|
|
2020-08-29 11:14:21 +00:00
|
|
|
void npcBarkHandler(CNSocket* sock, CNPacketData* data);
|
2020-08-25 02:28:42 +00:00
|
|
|
void npcSummonHandler(CNSocket* sock, CNPacketData* data);
|
2020-08-29 11:14:21 +00:00
|
|
|
void npcWarpHandler(CNSocket* sock, CNPacketData* data);
|
|
|
|
|
2020-09-09 01:15:25 +00:00
|
|
|
void npcVendorStart(CNSocket* sock, CNPacketData* data);
|
|
|
|
void npcVendorTable(CNSocket* sock, CNPacketData* data);
|
|
|
|
void npcVendorBuy(CNSocket* sock, CNPacketData* data);
|
|
|
|
|
2020-08-29 11:14:21 +00:00
|
|
|
void updatePlayerNPCS(CNSocket* sock, PlayerView& plr);
|
2020-08-19 22:21:35 +00:00
|
|
|
}
|