summaryrefslogtreecommitdiff
path: root/src/map/status.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.h')
-rw-r--r--src/map/status.h96
1 files changed, 30 insertions, 66 deletions
diff --git a/src/map/status.h b/src/map/status.h
index 1a8d7ef51..45a1300a0 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -5,10 +5,11 @@
#ifndef MAP_STATUS_H
#define MAP_STATUS_H
-#include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD
+#include "config/core.h" // defType, RENEWAL, RENEWAL_ASPD
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h" // NEW_CARTS
+#include "common/conf.h"
+#include "common/cbasetypes.h"
+#include "common/mmo.h" // NEW_CARTS
struct block_list;
struct elemental_data;
@@ -527,7 +528,7 @@ typedef enum sc_type {
SC_BEYOND_OF_WARCRY,
SC_UNLIMITED_HUMMING_VOICE, // 410
SC_SITDOWN_FORCE,
- //SC_NETHERWORLD,
+ SC_NETHERWORLD,
/**
* Sura
**/
@@ -1655,49 +1656,6 @@ enum {
OPT3_CONTRACT = 0x00020000,
};
-enum {
- OPTION_NOTHING = 0x00000000,
- OPTION_SIGHT = 0x00000001,
- OPTION_HIDE = 0x00000002,
- OPTION_CLOAK = 0x00000004,
- OPTION_FALCON = 0x00000010,
- OPTION_RIDING = 0x00000020,
- OPTION_INVISIBLE = 0x00000040,
- OPTION_ORCISH = 0x00000800,
- OPTION_WEDDING = 0x00001000,
- OPTION_RUWACH = 0x00002000,
- OPTION_CHASEWALK = 0x00004000,
- OPTION_FLYING = 0x00008000, //Note that clientside Flying and Xmas are 0x8000 for clients prior to 2007.
- OPTION_XMAS = 0x00010000,
- OPTION_TRANSFORM = 0x00020000,
- OPTION_SUMMER = 0x00040000,
- OPTION_DRAGON1 = 0x00080000,
- OPTION_WUG = 0x00100000,
- OPTION_WUGRIDER = 0x00200000,
- OPTION_MADOGEAR = 0x00400000,
- OPTION_DRAGON2 = 0x00800000,
- OPTION_DRAGON3 = 0x01000000,
- OPTION_DRAGON4 = 0x02000000,
- OPTION_DRAGON5 = 0x04000000,
- OPTION_HANBOK = 0x08000000,
- OPTION_OKTOBERFEST = 0x10000000,
-
-#ifndef NEW_CARTS
- OPTION_CART1 = 0x00000008,
- OPTION_CART2 = 0x00000080,
- OPTION_CART3 = 0x00000100,
- OPTION_CART4 = 0x00000200,
- OPTION_CART5 = 0x00000400,
-
- /* compound constant for older carts */
- OPTION_CART = OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5,
-#endif
-
- // compound constants
- OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,
- OPTION_COSTUME = OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER|OPTION_HANBOK|OPTION_OKTOBERFEST,
-};
-
//Defines for the manner system [Skotlex]
enum manner_flags
{
@@ -1868,6 +1826,7 @@ struct sc_display_entry {
struct status_change_entry {
int timer;
int val1,val2,val3,val4;
+ bool infinite_duration;
};
struct status_change {
@@ -1969,22 +1928,11 @@ struct s_refine_info {
int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
};
-/*=====================================
-* Interface : status.h
-* Generated by HerculesInterfaceMaker
-* created by Susu
-*-------------------------------------*/
-struct status_interface {
-
- /* vars */
- int current_equip_item_index;
- int current_equip_card_id;
- /* */
+struct s_status_dbs {
+BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */
int max_weight_base[CLASS_COUNT];
- int hp_coefficient[CLASS_COUNT];
- int hp_coefficient2[CLASS_COUNT];
- int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
- int sp_coefficient[CLASS_COUNT];
+ int HP_table[CLASS_COUNT][MAX_LEVEL + 1];
+ int SP_table[CLASS_COUNT][MAX_LEVEL + 1];
int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD
sc_type Skill2SCTable[MAX_SKILL]; // skill -> status
int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
@@ -1998,6 +1946,22 @@ struct status_interface {
int atkmods[3][MAX_WEAPON_TYPE];//ATK weapon modification for size (size_fix.txt)
char job_bonus[CLASS_COUNT][MAX_LEVEL];
sc_conf_type sc_conf[SC_MAX];
+END_ZEROED_BLOCK; /* End */
+};
+
+/*=====================================
+* Interface : status.h
+* Generated by HerculesInterfaceMaker
+* created by Susu
+*-------------------------------------*/
+struct status_interface {
+
+ /* vars */
+ int current_equip_item_index;
+ int current_equip_card_id;
+
+ struct s_status_dbs *dbs;
+
struct eri *data_ers; //For sc_data entries
struct status_data dummy;
int64 natural_heal_prev_tick;
@@ -2082,9 +2046,8 @@ struct status_interface {
void (*initDummyData) (void);
int (*base_amotion_pc) (struct map_session_data *sd, struct status_data *st);
unsigned short (*base_atk) (const struct block_list *bl, const struct status_data *st);
- void (*calc_sigma) (void);
- unsigned int (*base_pc_maxhp) (struct map_session_data *sd, struct status_data *st);
- unsigned int (*base_pc_maxsp) (struct map_session_data *sd, struct status_data *st);
+ unsigned int (*get_base_maxhp) (struct map_session_data *sd, struct status_data *st);
+ unsigned int (*get_base_maxsp) (struct map_session_data *sd, struct status_data *st);
int (*calc_npc_) (struct npc_data *nd, enum e_status_calc_opt opt);
unsigned short (*calc_str) (struct block_list *bl, struct status_change *sc, int str);
unsigned short (*calc_agi) (struct block_list *bl, struct status_change *sc, int agi);
@@ -2114,11 +2077,12 @@ struct status_interface {
void (*display_remove) (struct map_session_data *sd, enum sc_type type);
int (*natural_heal) (struct block_list *bl, va_list args);
int (*natural_heal_timer) (int tid, int64 tick, int id, intptr_t data);
- bool (*readdb_job1) (char *fields[], int columns, int current);
bool (*readdb_job2) (char *fields[], int columns, int current);
bool (*readdb_sizefix) (char *fields[], int columns, int current);
bool (*readdb_refine) (char *fields[], int columns, int current);
bool (*readdb_scconfig) (char *fields[], int columns, int current);
+ void (*read_job_db) (void);
+ void (*read_job_db_sub) (int idx, const char *name, config_setting_t *jdb);
};
struct status_interface *status;