summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-20 17:56:01 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-20 17:56:01 +0000
commitef7452b497d24f6f475d214f1244ab589b304c7c (patch)
treec24bedb42ecf633efada0475417d7f0592d2e1ab /src/map/map.h
parent6f700c626efe9253ce77865667d1d5e598daab65 (diff)
downloadhercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.gz
hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.bz2
hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.xz
hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.zip
- 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
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h36
1 files changed, 36 insertions, 0 deletions
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;