summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-02 21:36:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-02 21:36:51 +0000
commit3286a16fe958ce6aa85ddb07958aca9e2467efac (patch)
tree7e131cac868794aae0eac8b8fb2dac595ae3c18d /src/map/pc.c
parent99f61d4e885129cafec8b3abb66283816bc19f7f (diff)
downloadhercules-3286a16fe958ce6aa85ddb07958aca9e2467efac.tar.gz
hercules-3286a16fe958ce6aa85ddb07958aca9e2467efac.tar.bz2
hercules-3286a16fe958ce6aa85ddb07958aca9e2467efac.tar.xz
hercules-3286a16fe958ce6aa85ddb07958aca9e2467efac.zip
- Modified item-granded status resistance reduction to behave as explained by Vicious (Ragnarok Monthly magazine)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8921 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 822581272..2b2037e9b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1902,8 +1902,10 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
ShowWarning("pc_bonus2 (Resist Effect): %d is not supported.\n", type2);
break;
}
- if(sd->state.lr_flag != 2)
- sd->reseff[type2-SC_COMMON_MIN]+=val;
+ if(sd->state.lr_flag == 2)
+ break;
+ i = sd->reseff[type2-SC_COMMON_MIN]+val;
+ sd->reseff[type2-SC_COMMON_MIN]= cap_value(i, 0, 10000);
break;
case SP_MAGIC_ADDELE:
if(type2 >= ELE_MAX) {