summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-15 17:13:04 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-15 17:13:04 +0000
commitc25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead (patch)
treeb55395038c48dc99235e7385fbd43df5645e464a /src/map/map.h
parent86b35597e549392cf2db3974fc140a50e021b5a0 (diff)
downloadhercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.gz
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.bz2
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.xz
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.zip
* Some serious code cleanups
- adjusted @reloadbattleconf to not depend on variable ordering - changed all battle vars to 'int' (removes pointless duplicit coding) - added min, max and default columns to battle config data structure - added properly bounded values for these columns (or at least tried to) - battle-conf loading will now complain if it finds unknown settings, and will reject values that are outside of the allowed range - added CHATROOM_TITLE_SIZE and CHATROOM_PASS_SIZE - partially cleaned up chatroom manipulation code * Fixed 'Job_Professer' typo in mage jobchange quest git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/map/map.h b/src/map/map.h
index f63e2b10c..7d5340373 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -35,7 +35,6 @@
#define MAX_NPC_PER_MAP 512
#define BLOCK_SIZE 8
#define AREA_SIZE battle_config.area_size
-#define LIFETIME_FLOORITEM 60
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
//Quick defines to know which are the min-max common ailments. [Skotlex]
@@ -169,7 +168,10 @@ enum {
//String length you can write in the 'talking box'
#define CHATBOX_SIZE 70
//Talk max size: <name> : <message of 70> [Skotlex]
-#define CHAT_SIZE (NAME_LENGTH + 3 + CHATBOX_SIZE)
+#define CHAT_SIZE (NAME_LENGTH + 3 + CHATBOX_SIZE)
+//Chatroom-related string sizes
+#define CHATROOM_TITLE_SIZE (36 + 1)
+#define CHATROOM_PASS_SIZE (8 + 1)
#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
@@ -188,7 +190,7 @@ enum bl_type {
BL_PC = 0x001,
BL_MOB = 0x002,
BL_PET = 0x004,
- BL_HOM = 0x008, //[blackhole89]
+ BL_HOM = 0x008,
BL_ITEM = 0x010,
BL_SKILL = 0x020,
BL_NPC = 0x040,
@@ -1108,16 +1110,18 @@ struct map_data {
struct spawn_data *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
int mob_delete_timer; // [Skotlex]
- int zone; // [Komurka]
+ int zone; // zone number (for item/skill restrictions)
int jexp; // map experience multiplicator
int bexp; // map experience multiplicator
int nocommand; //Blocks @/# commands for non-gms. [Skotlex]
};
+/// Stores information about a remote map (for multi-mapserver setups).
+/// Beginning of data structure matches 'map_data', to allow typecasting.
struct map_data_other_server {
char name[MAP_NAME_LENGTH];
unsigned short index; //Index is the map index used by the mapindex* functions.
- unsigned char *gat; // NULLŒÅ’è‚É‚µ‚Ä”»’f
+ unsigned char *gat; // If this is NULL‚ the map is not on this map-server
uint32 ip;
uint16 port;
};
@@ -1131,6 +1135,19 @@ struct flooritem_data {
struct item item_data;
};
+struct chat_data {
+ struct block_list bl; // data for this map object
+ char title[CHATROOM_TITLE_SIZE]; // room title
+ char pass[CHATROOM_PASS_SIZE]; // password
+ bool pub; // private/public flag
+ unsigned char users; // current users
+ unsigned char limit; // join limit
+ unsigned char trigger; // number of users needed to trigger event
+ struct map_session_data *usersd[20];
+ struct block_list **owner;
+ char npc_event[50];
+};
+
enum _sp {
SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7
SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15
@@ -1249,21 +1266,6 @@ enum {
CELL_CLRICEWALL,
};
-struct chat_data {
- struct block_list bl;
-
- char pass[8+1]; /* password */
- char title[60+1]; /* room title */
- unsigned char limit; /* join limit */
- unsigned char trigger;
- unsigned char users; /* current users */
- unsigned char pub; /* room attribute */
- struct map_session_data *usersd[20];
- struct block_list *owner_;
- struct block_list **owner;
- char npc_event[50];
-};
-
extern struct map_data map[];
extern int map_num;
extern int autosave_interval;