summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-03 18:31:21 -0200
committershennetsind <ind@henn.et>2013-02-03 18:31:21 -0200
commitcc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1 (patch)
treeb422b4aa329582a2b54f2008ac3519b54637cfef /src/map/status.c
parent453d6cebeb3cde5fc58ed95c574e3a325d59b289 (diff)
downloadhercules-cc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1.tar.gz
hercules-cc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1.tar.bz2
hercules-cc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1.tar.xz
hercules-cc8e005f27f3be0d7bcf8916cb40b2dd0e6a3ae1.zip
item_noequip overhaul / Fixed Bug #7048
Items are no longer unequipped when disabled by item_noequip.txt, instead their effects are nullified -- however cards in them, unless also disabled, wont have its effect nullified. Consumables will be consumed even while disabled, unless you modify the new config item_restricted_consumption_type http://hercules.ws/board/tracker/issue-7048-requestreport-regarding-to-item-noequiptxt/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index ce792cd75..7840a7a7f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2443,6 +2443,20 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
if(!sd->inventory_data[index])
continue;
+ if(sd->inventory_data[index]->flag.no_equip) { // Items may be equipped, their effects however are nullified.
+ if(map[sd->bl.m].flag.restricted && sd->inventory_data[index]->flag.no_equip&(8*map[sd->bl.m].zone))
+ continue;
+ if(!map_flag_vs(sd->bl.m) && sd->inventory_data[index]->flag.no_equip&1)
+ continue;
+ if(map[sd->bl.m].flag.pvp && sd->inventory_data[index]->flag.no_equip&2)
+ continue;
+ if(map_flag_gvg(sd->bl.m) && sd->inventory_data[index]->flag.no_equip&4)
+ continue;
+ if(map[sd->bl.m].flag.battleground && sd->inventory_data[index]->flag.no_equip&8)
+ continue;
+ }
+
+
status->def += sd->inventory_data[index]->def;
if(first && sd->inventory_data[index]->equip_script)