summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 5835b5abc..5c4c6d59d 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -352,6 +352,7 @@ STATIC_ASSERT(((MAPID_1_1_MAX - 1) | MAPID_BASEMASK) == MAPID_BASEMASK, "First c
|| map->list[m].flag.gvg \
|| ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
|| map->list[m].flag.battleground \
+ || map->list[m].flag.cvc \
)
// Specifies maps that have special GvG/WoE restrictions
#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
@@ -531,6 +532,7 @@ struct flooritem_data {
int first_get_charid,second_get_charid,third_get_charid;
int64 first_get_tick,second_get_tick,third_get_tick;
struct item item_data;
+ bool showdropeffect;
};
enum status_point_types { //we better clean up this enum and change it name [Hemagx]
@@ -736,6 +738,7 @@ enum map_zone_merge_type {
#define MAP_ZONE_PVP_NAME "PvP"
#define MAP_ZONE_GVG_NAME "GvG"
#define MAP_ZONE_BG_NAME "Battlegrounds"
+#define MAP_ZONE_CVC_NAME "CvC"
#define MAP_ZONE_PK_NAME "PK Mode"
#define MAP_ZONE_MAPFLAG_LENGTH 50
@@ -822,6 +825,7 @@ struct map_data {
unsigned gvg_dungeon : 1; // Celest
unsigned gvg_noparty : 1;
unsigned battleground : 2; // [BattleGround System]
+ unsigned cvc : 1;
unsigned nozenypenalty : 1;
unsigned notrade : 1;
unsigned noskill : 1;
@@ -905,7 +909,10 @@ struct map_data {
/* */
int (*getcellp)(struct map_data* m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk);
void (*setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag);
- char *cellPos;
+ struct {
+ uint8 *data;
+ int len;
+ } cell_buf;
/* ShowEvent Data Cache */
struct questinfo *qi_data;
@@ -1060,20 +1067,20 @@ struct charid2nick {
struct charid_request* requests;// requests of notification on this nick
};
-// This is the main header found at the very beginning of the map cache
-struct map_cache_main_header {
- uint32 file_size;
- uint16 map_count;
-};
-
-// This is the header appended before every compressed map cells info in the map cache
-struct map_cache_map_info {
- char name[MAP_NAME_LENGTH];
+// New mcache file format header
+#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
+#pragma pack(push, 1)
+#endif // not NetBSD < 6 / Solaris
+struct map_cache_header {
+ int16 version;
+ uint8 md5_checksum[16];
int16 xs;
int16 ys;
int32 len;
-};
-
+} __attribute__((packed));
+#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
+#pragma pack(pop)
+#endif // not NetBSD < 6 / Solaris
/*=====================================
* Interface : map.h
@@ -1163,7 +1170,6 @@ END_ZEROED_BLOCK;
struct map_data *list;
/* [Ind/Hercules] */
struct eri *iterator_ers;
- char *cache_buffer; // Has the uncompressed gat data of all maps, so just one allocation has to be made
/* */
struct eri *flooritem_ers;
/* */
@@ -1208,7 +1214,7 @@ END_ZEROED_BLOCK;
int (*clearflooritem_timer) (int tid, int64 tick, int id, intptr_t data);
int (*removemobs_timer) (int tid, int64 tick, int id, intptr_t data);
void (*clearflooritem) (struct block_list* bl);
- int (*addflooritem) (const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags);
+ int (*addflooritem) (const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags, bool showdropeffect);
// player to map session
void (*addnickdb) (int charid, const char* nick);
void (*delnickdb) (int charid, const char* nick);
@@ -1313,8 +1319,8 @@ END_ZEROED_BLOCK;
void (*iwall_nextxy) (int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1);
struct DBData (*create_map_data_other_server) (union DBKey key, va_list args);
int (*eraseallipport_sub) (union DBKey key, struct DBData *data, va_list va);
- char* (*init_mapcache) (FILE *fp);
- int (*readfromcache) (struct map_data *m, char *buffer);
+ bool (*readfromcache) (struct map_data *m);
+ bool (*readfromcache_v1) (FILE *fp, struct map_data *m, unsigned int file_size);
int (*addmap) (const char *mapname);
void (*delmapid) (int id);
void (*zone_db_clear) (void);