summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.h5
-rw-r--r--src/map/status.c5
-rw-r--r--src/map/status.h9
3 files changed, 10 insertions, 9 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 235eb7dfd..a2bf8d455 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -10,6 +10,7 @@
#include "../common/db.h"
#include "itemdb.h" // MAX_ITEMGROUP
+#include "status.h" // SC_MAX
//Uncomment to enable the Cell Stack Limit mod.
//It's only config is the battle_config cell_stack_limit.
@@ -33,7 +34,7 @@
#define LIFETIME_FLOORITEM 60
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
-#define MAX_STATUSCHANGE 300
+//#define MAX_STATUSCHANGE 300
//Quick defines to know which are the min-max common ailments. [Skotlex]
//Because of the way the headers are included.. these must be replaced for actual values.
//Remember to update as needed! Min is SC_STONE and max is SC_DPOISON currently.
@@ -384,7 +385,7 @@ struct status_change_entry {
};
struct status_change {
- struct status_change_entry data[MAX_STATUSCHANGE];
+ struct status_change_entry data[SC_MAX];
short count;
unsigned short opt1,opt2;
unsigned int opt3, option; //Note that older packet versions use short here.
diff --git a/src/map/status.c b/src/map/status.c
index 5ba30b62a..841b40867 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7415,11 +7415,6 @@ int status_readdb(void) {
*/
int do_init_status(void)
{
- if (SC_MAX > MAX_STATUSCHANGE)
- {
- ShowDebug("status.h defines %d status changes, but the MAX_STATUSCHANGE is %d! Fix it.\n", SC_MAX, MAX_STATUSCHANGE);
- exit(1);
- }
add_timer_func_list(status_change_timer,"status_change_timer");
add_timer_func_list(kaahi_heal_timer,"kaahi_heal_timer");
add_timer_func_list(status_natural_heal_timer,"status_natural_heal_timer");
diff --git a/src/map/status.h b/src/map/status.h
index 4f51c61ab..0ea31cdec 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -4,7 +4,12 @@
#ifndef _STATUS_H_
#define _STATUS_H_
-#include "map.h"
+// forward declarations from map.h
+struct block_list;
+struct mob_data;
+struct pet_data;
+struct homun_data;
+struct status_change;
//Use this to refer the max refinery level [Skotlex]
#define MAX_REFINE 10
@@ -258,7 +263,7 @@ enum {
SC_INCAGIRATE,
SC_INCDEXRATE,
SC_JAILED,
- SC_ENCHANTARMS,
+ SC_ENCHANTARMS, //250
SC_MAGICALATTACK,
SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
};