From 7ad5e84ef5c3c3d1192f07ee77a5a7d04a94c3bf Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 20 Jul 2006 21:05:12 +0000 Subject: - Added pc_check_weapontype to do a proper skill weapon check that takes into account dual-wielding. That is, if a skill can be used with daggers/axes, you'll be able to use the skill when dual-wielding them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7779 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index b6d34a873..056aeb401 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -97,6 +97,9 @@ enum { #define pc_stop_attack(sd) { if (sd->ud.attacktimer!=-1) { unit_stop_attack(&sd->bl); sd->ud.target = 0; } } #define pc_stop_walking(sd, type) { if (sd->ud.walktimer!=-1) unit_stop_walking(&sd->bl, type); } +//Weapon check considering dual wielding. +#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \ + 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2))) //Checks if the given class value corresponds to a player class. [Skotlex] #define pcdb_checkid(class_) (class_ <= JOB_XMAS || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_SOUL_LINKER)) -- cgit v1.2.3-70-g09d2