diff options
author | Haru <haru@dotalux.com> | 2017-09-17 23:52:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-17 23:52:02 +0200 |
commit | d4723731ed75151e0194a0a082db0a906d06502c (patch) | |
tree | 2c134cba7d9c55a5940a136c710396e8ff5de404 /src/map/pc.h | |
parent | 74d54ad2c3e7a5bff9f0d35c3fb94bc0b77fd7e2 (diff) | |
parent | 5e23e5019a54fe30762471c18272bbc322c442b6 (diff) | |
download | hercules-d4723731ed75151e0194a0a082db0a906d06502c.tar.gz hercules-d4723731ed75151e0194a0a082db0a906d06502c.tar.bz2 hercules-d4723731ed75151e0194a0a082db0a906d06502c.tar.xz hercules-d4723731ed75151e0194a0a082db0a906d06502c.zip |
Merge pull request #1828 from HerculesWS/item_viewid
Item DB: replace numbers with constants and split View into Subtype and ViewSprite
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index c94ec6099..8615f00f2 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -308,7 +308,10 @@ struct map_session_data { short nameid; int64 tick; } item_delay[MAX_ITEMDELAYS]; // [Paradox924X] - short weapontype1,weapontype2; + bool has_shield; ///< Whether the character is wearing a shield. + 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] struct weapon_data right_weapon, left_weapon; @@ -685,8 +688,13 @@ END_ZEROED_BLOCK; #define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl)) //Weapon check considering dual wielding. -#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_SINGLE_WEAPON_TYPE? \ - 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon))) +#define pc_check_weapontype(sd, type) ( \ + (type) & ( \ + (sd)->weapontype < MAX_SINGLE_WEAPON_TYPE ? \ + 1 << (sd)->weapontype : \ + (1 << (sd)->weapontype1) | (1 << (sd)->weapontype2) \ + ) \ + ) // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL |