From ef7452b497d24f6f475d214f1244ab589b304c7c Mon Sep 17 00:00:00 2001 From: zephyrus Date: Sat, 20 Jun 2009 17:56:01 +0000 Subject: - Instancing System (Thanks to Sirius White who did most of the code, with some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao. - Fixed a bug on areamobuseskill and changed it to make it as Aegis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index d07871951..ca40bdd98 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -45,6 +45,8 @@ struct item_data; #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MOBID_EMPERIUM 1288 +#define MAX_MAP_PER_INSTANCE 10 +#define MAX_INSTANCE 500 //The following system marks a different job ID system used by the map server, //which makes a lot more sense than the normal one. [Skotlex] @@ -475,6 +477,8 @@ struct map_data { int jexp; // map experience multiplicator int bexp; // map experience multiplicator int nocommand; //Blocks @/# commands for non-gms. [Skotlex] + int instance_id; + int instance_map[1000]; }; /// Stores information about a remote map (for multi-mapserver setups). @@ -487,6 +491,22 @@ struct map_data_other_server { uint16 port; }; +// Instancing +struct map_instance { + char name[61]; + unsigned int name_id; +// int m; + unsigned int instance_id; + int party_id; + int map[MAX_MAP_PER_INSTANCE]; + int num_map; + struct linkdb_node *ivar, *svar; + time_t progress_timeout, idle_timeout; + time_t progress_timeoutval, idle_timeoutval; + int progress_timer, idle_timer; + int users; +}; + int map_getcell(int,int,int,cell_chk); int map_getcellp(struct map_data*,int,int,cell_chk); void map_setcell(int m, int x, int y, cell_t cell, bool flag); @@ -494,6 +514,7 @@ void map_setgatcell(int m, int x, int y, int gat); extern struct map_data map[]; extern int map_num; +extern int map_instance_start; extern int autosave_interval; extern int minsave_interval; @@ -616,6 +637,21 @@ void map_spawnmobs(int); // [Wizputer] void map_removemobs(int); // [Wizputer] void do_reconnect_map(void); //Invoked on map-char reconnection [Skotlex] +// Instancing +int map_instance_map(const char *name, int instance_id); +void map_instance_del(int m); +int map_instance_create(int party_id, int name_id, const char *name); +void map_instance_init(int instance_id); +int map_instance_mapid2imapid(int m, int instance_id); +int map_instance_map2imap(int m, struct map_session_data *sd, int type); +void map_instance_destroy(int instance_id); +void map_instance_check_idle(int instance_id); +void map_instance_check_kick(struct map_session_data *sd); +char *map_instance_npcname(char *name, int instance_id); +void map_instance_set_timeout(int instance_id, unsigned int progress_timeout, unsigned int idle_timeout); + +extern struct map_instance instance[MAX_INSTANCE]; + extern char *INTER_CONF_NAME; extern char *LOG_CONF_NAME; extern char *MAP_CONF_NAME; -- cgit v1.2.3-70-g09d2