summaryrefslogtreecommitdiff
path: root/src/map/pc.cpp
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2024-08-07 23:40:36 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-08-30 21:05:24 +0200
commit48ee77e4fdfc3741996df0ddaca49c090292fc10 (patch)
tree9c8b265ac18c45bf6e51745af32b471646422b26 /src/map/pc.cpp
parent2af706705bf6dd3d147eb3b7f84fba3d3713a498 (diff)
downloadtmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.gz
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.bz2
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.xz
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.zip
sc_phys_shield_item
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r--src/map/pc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index df5423e..9ef70fe 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -1553,8 +1553,8 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
/* Slow down if protected */
- if (sd->sc_data[StatusChange::SC_PHYS_SHIELD].timer)
- aspd_rate += sd->sc_data[StatusChange::SC_PHYS_SHIELD].val1;
+ if (sd->sc_data[StatusChange::SC_PHYS_SHIELD].timer || sd->sc_data[StatusChange::SC_PHYS_SHIELD_ITEM].timer)
+ aspd_rate += std::max(sd->sc_data[StatusChange::SC_PHYS_SHIELD].val1, sd->sc_data[StatusChange::SC_PHYS_SHIELD_ITEM].val1); // highest value is taken here but serverdata should make sure only one of those is active
if (sd->sc_data[StatusChange::SC_SLOWMOVE].timer)
speed_rate += sd->sc_data[StatusChange::SC_SLOWMOVE].val1;