summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-20 00:44:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-20 00:44:52 +0000
commit797848cc6647ae1dd682fae3749b7adf80a5fa21 (patch)
tree0aeb4f683f4c8adfbf1a529e5c2ac3bb5e3f2405 /src/map/status.c
parent8e4eaa86391a730bb4e8f4e256e59073dfbf9756 (diff)
downloadhercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.gz
hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.bz2
hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.xz
hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.zip
- Fixed SC_STRIPWEAPON failing on two-handed weapons.
- Minor changes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9529 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c
index aee10e721..dab6861ea 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4931,18 +4931,25 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_STRIPWEAPON:
if (sd) {
int i;
+ opt_flag = 0; //Reuse to check success condition.
if(sd->unstripable_equip&EQP_WEAPON)
return 0;
i = sd->equip_index[EQI_HAND_L];
if (i>=0 && sd->inventory_data[i] &&
sd->inventory_data[i]->type == IT_WEAPON)
+ {
+ opt_flag|=1;
pc_unequipitem(sd,i,3); //L-hand weapon
+ }
i = sd->equip_index[EQI_HAND_R];
- if (i<0 || !sd->inventory_data[i] ||
- sd->inventory_data[i]->type != IT_WEAPON)
- return 0;
- pc_unequipitem(sd,i,3);
+ if (i>=0 && sd->inventory_data[i] &&
+ sd->inventory_data[i]->type == IT_WEAPON)
+ {
+ opt_flag|=2;
+ pc_unequipitem(sd,i,3);
+ }
+ if (!opt_flag) return 0;
} else //Watk reduction
val2 = 5*val1;
break;