From 1c1752f40aac20bf9a5e56817951a013c2219bed Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 10 Jun 2014 15:31:24 -0700 Subject: Generate the map server protocol Sigh, map server will have no smart filters yet --- src/map/npc.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/map/npc.hpp') diff --git a/src/map/npc.hpp b/src/map/npc.hpp index 011ea50..2c91dbd 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -31,14 +31,17 @@ # include "../net/timer.t.hpp" +# include "../proto2/fwd.hpp" + # include "map.hpp" constexpr BlockId START_NPC_NUM = wrap(110000000); // TODO make these species, see npc_class in npc_data -constexpr int WARP_CLASS = 45; -constexpr int WARP_DEBUG_CLASS = 722; -constexpr int INVISIBLE_CLASS = 32767; +constexpr Species WARP_CLASS = wrap(45); +constexpr Species FAKE_NPC_CLASS = wrap(127); +constexpr Species WARP_DEBUG_CLASS = wrap(722); +constexpr Species INVISIBLE_CLASS = wrap(32767); int npc_event_dequeue(dumb_ptr sd); int npc_event(dumb_ptr sd, NpcEvent npcname, int); @@ -48,8 +51,8 @@ int npc_touch_areanpc(dumb_ptr, map_local *, int, int); int npc_click(dumb_ptr, BlockId); int npc_scriptcont(dumb_ptr, BlockId); int npc_buysellsel(dumb_ptr, BlockId, int); -int npc_buylist(dumb_ptr, int, const uint16_t *); -int npc_selllist(dumb_ptr, int, const uint16_t *); +int npc_buylist(dumb_ptr, const std::vector>&); +int npc_selllist(dumb_ptr, const std::vector>&); int npc_parse_warp(XString w1, XString, NpcName w3, XString w4); int npc_enable(NpcName name, bool flag); @@ -63,7 +66,7 @@ BlockId npc_get_new_npc_id(void); * \param message The message to speak. If message is NULL, the NPC will not do anything at all. */ dumb_ptr npc_spawn_text(map_local *m, int x, int y, - int class_, NpcName name, AString message); + Species class_, NpcName name, AString message); /** * Uninstalls and frees an NPC -- cgit v1.2.3-60-g2f50