summaryrefslogtreecommitdiff
path: root/src/map/npc.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-24 21:20:48 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-24 21:20:48 +0000
commit3731a2ee949a424941f46a653525fcd4bfca0e3f (patch)
treeac45f75a34541d2cd66f785881b9259f82e77fcf /src/map/npc.h
parent947c9789ff8c6dd1c7c5c615f102fbd761dcbaf9 (diff)
downloadhercules-3731a2ee949a424941f46a653525fcd4bfca0e3f.tar.gz
hercules-3731a2ee949a424941f46a653525fcd4bfca0e3f.tar.bz2
hercules-3731a2ee949a424941f46a653525fcd4bfca0e3f.tar.xz
hercules-3731a2ee949a424941f46a653525fcd4bfca0e3f.zip
* 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
Diffstat (limited to 'src/map/npc.h')
-rw-r--r--src/map/npc.h57
1 files changed, 56 insertions, 1 deletions
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