From 3731a2ee949a424941f46a653525fcd4bfca0e3f Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 24 Mar 2008 21:20:48 +0000 Subject: * Reorganized the contents of the mapserver's header files. - map.h is no longer a generic dumping spot of all the shared structs, and instead, each such structure now resides in its logical component - map.h now only holds mostly map-related things (needs more cleaning) - there's still a lot of room for improvement (reorganization within individual header files, etc...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12429 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'src/map/npc.h') diff --git a/src/map/npc.h b/src/map/npc.h index d2e87df5d..f75ede9c5 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -4,11 +4,66 @@ #ifndef _NPC_H_ #define _NPC_H_ -//#include "map.h" +#include "map.h" // struct block_list +#include "status.h" // struct status_change +#include "unit.h" // struct unit_data struct block_list; struct npc_data; struct view_data; + +struct npc_timerevent_list { + int timer,pos; +}; +struct npc_label_list { + char name[NAME_LENGTH]; + int pos; +}; +struct npc_item_list { + unsigned int nameid,value; +}; + +struct npc_data { + struct block_list bl; + struct unit_data ud; //Because they need to be able to move.... + struct view_data *vd; + struct status_change sc; //They can't have status changes, but.. they want the visual opt values. + struct npc_data *master_nd; + short class_; + short speed; + char name[NAME_LENGTH+1];// display name + char exname[NAME_LENGTH+1];// unique npc name + int chat_id; + unsigned int next_walktime; + + void* chatdb; // pointer to a npc_parse struct (see npc_chat.c) + enum npc_subtype subtype; + union { + struct { + struct script_code *script; + short xs,ys; // OnTouch area radius + int guild_id; + int timer,timerid,timeramount,rid; + unsigned int timertick; + struct npc_timerevent_list *timer_event; + int label_list_num; + struct npc_label_list *label_list; + int src_id; + } scr; + struct { + struct npc_item_list* shop_item; + int count; + } shop; + struct { + short xs,ys; // OnTouch area radius + short x,y; // destination coords + unsigned short mapindex; // destination map + } warp; + } u; +}; + + + #define START_NPC_NUM 110000000 #define WARP_CLASS 45 -- cgit v1.2.3-60-g2f50