summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-22 16:46:09 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-22 16:46:09 +0000
commitfad0a74cd53f827e4c006b497b658baca2065a3d (patch)
treefd896b3f74145cf3b2f43077b96fadb3f49ae514 /src/map/pc.c
parent782af771684f613e20111bd498ccd1b885978551 (diff)
downloadhercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.gz
hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.bz2
hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.xz
hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.zip
- Removed unused bIgnoreDefMob
- Removed unneeded sd variables cart_max_weight and cart_max_num - Made ignore_mdef_ele/ignore_mdef_race/ignore_def_ele/ignore_def_race unsigned chars rather than ints. - Made pc_dropitem check for inventory_data, to guarantee that the item will be deleted from the inventory after dropping it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10051 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 1f90b52f5..4c057d849 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1865,12 +1865,6 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(!sd->state.lr_flag)
sd->sp_gain_value += val;
break;
- case SP_IGNORE_DEF_MOB: // 0:normal monsters only, 1:affects boss monsters as well
- if(!sd->state.lr_flag)
- sd->right_weapon.ignore_def_mob |= 1<<val;
- else if(sd->state.lr_flag == 1)
- sd->left_weapon.ignore_def_mob |= 1<<val;
- break;
case SP_HP_GAIN_VALUE:
if(!sd->state.lr_flag)
sd->hp_gain_value += val;
@@ -2796,10 +2790,12 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
if(amount <= 0)
return 0;
- if (sd->status.inventory[n].nameid <= 0 ||
- sd->status.inventory[n].amount < amount ||
- sd->trade_partner != 0 || sd->vender_id != 0 ||
- sd->status.inventory[n].amount <= 0)
+ if(sd->status.inventory[n].nameid <= 0 ||
+ sd->status.inventory[n].amount < amount ||
+ sd->trade_partner != 0 || sd->vender_id != 0 ||
+ sd->status.inventory[n].amount <= 0 ||
+ !sd->inventory_data[n] //pc_delitem would fail on this case.
+ )
return 0;
if (map[sd->bl.m].flag.nodrop) {
@@ -3060,7 +3056,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
return 1;
}
- if((w=data->weight*amount) + sd->cart_weight > sd->cart_max_weight)
+ if((w=data->weight*amount) + sd->cart_weight > battle_config.max_cart_weight)
return 1;
i=MAX_CART;