summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-05 06:25:18 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-11 03:22:45 +0300
commit8c04536cf64dd3a7c233d9631eceb23f7207ad9c (patch)
tree69eb2fba19a5cb11d98da3eeb1a53955ea97af04 /src
parent68126f7d762e001b1a34cfe5e0a340db9c7d9da8 (diff)
downloadhercules-8c04536cf64dd3a7c233d9631eceb23f7207ad9c.tar.gz
hercules-8c04536cf64dd3a7c233d9631eceb23f7207ad9c.tar.bz2
hercules-8c04536cf64dd3a7c233d9631eceb23f7207ad9c.tar.xz
hercules-8c04536cf64dd3a7c233d9631eceb23f7207ad9c.zip
Replace short to int in most structs in pc.h
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 90e59edb2..a2971b4f8 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -117,22 +117,22 @@ BEGIN_ZEROED_BLOCK; // all the variables within this block get zero'ed in each c
int addrace2[RC2_MAX];
int addsize[3];
struct drain_data {
- short rate;
- short per;
- short value;
+ int rate;
+ int per;
+ int value;
unsigned type:1;
} hp_drain[RC_MAX], sp_drain[RC_MAX];
struct {
- short class_, rate;
+ int class_, rate;
} add_dmg[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} addele2[MAX_PC_BONUS];
END_ZEROED_BLOCK;
};
struct s_autospell {
- short id, lv, rate, flag;
+ int id, lv, rate, flag;
int card_id;
bool lock; // bAutoSpellOnSkill: blocks autospell from triggering again, while being executed
};
@@ -147,7 +147,7 @@ struct s_addeffect {
};
struct s_addeffectonskill {
enum sc_type id;
- short rate, skill;
+ int rate, skill;
unsigned char target;
};
struct s_add_drop {
@@ -156,11 +156,11 @@ struct s_add_drop {
int race, rate;
};
struct s_autobonus {
- short rate,atk_type;
+ int rate,atk_type;
unsigned int duration;
char *bonus_script, *other_script;
int active;
- unsigned short pos;
+ unsigned int pos;
};
enum npc_timeout_type {
NPCT_INPUT = 0,
@@ -219,11 +219,11 @@ struct map_session_data {
unsigned int changemap : 1;
unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
short pmap; // Previous map on Map Change
- unsigned short autoloot;
+ unsigned int autoloot;
int autolootid[AUTOLOOTITEM_SIZE]; // [Zephyrus]
- unsigned short autoloottype;
+ unsigned int autoloottype;
unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid
- unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
+ unsigned int autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
unsigned int gmaster_flag : 1;
unsigned int prevend : 1;//used to flag wheather you've spent 40sp to open the vending or not.
unsigned int warping : 1;//states whether you're in the middle of a warp processing
@@ -288,7 +288,7 @@ struct map_session_data {
int followtimer; // [MouseJstr]
int followtarget;
time_t emotionlasttime; // to limit flood with emotion packets
- short skillitem,skillitemlv;
+ int skillitem,skillitemlv;
uint16 skill_id_old,skill_lv_old;
uint16 skill_id_dance,skill_lv_dance;
short cook_mastery; // range: [0,1999] [Inkfish]
@@ -312,7 +312,7 @@ struct map_session_data {
int16 weapontype; ///< Weapon type considering both hands (@see enum weapon_type).
int16 weapontype1; ///< Weapon type in the right/primary hand (@see enum weapon_type).
int16 weapontype2; ///< Weapon type in the left/secondary hand (@see enum weapon_type).
- short disguise; // [Valaris]
+ int disguise; // [Valaris]
struct weapon_data right_weapon, left_weapon;
BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of status_calc_pc()
@@ -337,9 +337,9 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int expaddrace[RC_MAX];
int ignore_mdef[RC_MAX];
int ignore_def[RC_MAX];
- short sp_gain_race[RC_MAX];
- short sp_gain_race_attack[RC_MAX];
- short hp_gain_race_attack[RC_MAX];
+ int sp_gain_race[RC_MAX];
+ int sp_gain_race_attack[RC_MAX];
+ int hp_gain_race_attack[RC_MAX];
#ifdef RENEWAL
int race_tolerance[RC_MAX];
#endif
@@ -347,16 +347,16 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
struct s_addeffect addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS];
struct s_addeffectonskill addeff3[MAX_PC_BONUS];
struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills.
- unsigned short id;
- short val;
+ unsigned int id;
+ int val;
} skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate;
int tick;
} hp_loss, sp_loss, hp_regen, sp_regen;
struct {
- short class_, rate;
+ int class_, rate;
} add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS], add_mdmg[MAX_PC_BONUS];
struct s_add_drop add_drop[MAX_PC_BONUS];
struct {
@@ -364,11 +364,11 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int rate;
} itemhealrate[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} subele2[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate, tick;
} def_set_race[RC_MAX], mdef_set_race[RC_MAX];
struct {
@@ -394,17 +394,17 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
int shieldmdef;//royal guard's
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
- short splash_range, splash_add_range;
- short add_steal_rate;
- short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
- short hp_vanish_rate;
- short hp_vanish_per, hp_vanish_trigger;
- short sp_vanish_rate;
- short sp_vanish_per, sp_vanish_trigger;
- unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
- unsigned short unbreakable_equip; //100% break resistance on certain equipment
- unsigned short unstripable_equip;
+ int splash_range, splash_add_range;
+ int add_steal_rate;
+ int add_heal_rate, add_heal2_rate;
+ int sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
+ int hp_vanish_rate;
+ int hp_vanish_per, hp_vanish_trigger;
+ int sp_vanish_rate;
+ int sp_vanish_per, sp_vanish_trigger;
+ unsigned int unbreakable; // chance to prevent ANY equipment breaking [celest]
+ unsigned int unbreakable_equip; //100% break resistance on certain equipment
+ unsigned int unstripable_equip;
int fixcastrate,varcastrate;
int add_fixcast,add_varcast;
int ematk; // matk bonus from equipment
@@ -419,22 +419,22 @@ END_ZEROED_BLOCK;
int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
int itemid;
- short itemindex; //Used item's index in sd->inventory [Skotlex]
- short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo]
- short spiritball, spiritball_old;
+ int itemindex; //Used item's index in sd->inventory [Skotlex]
+ int catch_target_class;
+ int spiritball, spiritball_old;
int spirit_timer[MAX_SPIRITBALL];
- short charm_count;
+ int charm_count;
int charm_type;
int charm_timer[MAX_SPIRITCHARM];
unsigned char potion_success_counter; //Potion successes in row counter
unsigned char mission_count; //Stores the bounty kill count for TK_MISSION
- short mission_mobid; //Stores the target mob_id for TK_MISSION
+ int mission_mobid; //Stores the target mob_id for TK_MISSION
int die_counter; //Total number of times you've died
int devotion[MAX_PC_DEVOTION]; //Stores the account IDs of chars devoted to.
int trade_partner;
struct {
struct {
- short index, amount;
+ int index, amount;
} item[10];
int zeny, weight;
} deal;
@@ -465,18 +465,18 @@ END_ZEROED_BLOCK;
struct {
int m; //-1 - none, other: map index corresponding to map name.
- unsigned short index; //map index
+ unsigned int index; //map index
} feel_map[MAX_PC_FEELHATE];// 0 - Sun; 1 - Moon; 2 - Stars
- short hate_mob[MAX_PC_FEELHATE];
+ int hate_mob[MAX_PC_FEELHATE];
int pvp_timer;
- short pvp_point;
- unsigned short pvp_rank, pvp_lastusers;
- unsigned short pvp_won, pvp_lost;
+ int pvp_point;
+ unsigned int pvp_rank, pvp_lastusers;
+ unsigned int pvp_won, pvp_lost;
char eventqueue[MAX_EVENTQUEUE][EVENT_NAME_LENGTH];
int eventtimer[MAX_EVENTTIMER];
- unsigned short eventcount; // [celest]
+ unsigned int eventcount; // [celest]
int change_level_2nd; // job level when changing from 1st to 2nd class [jobchange_level in global_reg_value]
int change_level_3rd; // job level when changing from 2nd to 3rd class [jobchange_level_3rd in global_reg_value]
@@ -769,24 +769,24 @@ END_ZEROED_BLOCK;
#define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) )
struct skill_tree_requirement {
- short id;
+ int id;
unsigned short idx;
unsigned char lv;
};
struct skill_tree_entry {
- short id;
+ int id;
unsigned short idx;
unsigned char max;
unsigned char joblv;
- short inherited;
+ int inherited;
VECTOR_DECL(struct skill_tree_requirement) need;
}; // Celest
struct sg_data {
- short anger_id;
- short bless_id;
- short comfort_id;
+ int anger_id;
+ int bless_id;
+ int comfort_id;
char feel_var[NAME_LENGTH];
char hate_var[NAME_LENGTH];
bool (*day_func)(void);