summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-28 01:40:18 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-01 04:49:41 +0200
commit31234f79616a9da1d2cd7c3ef92116e448656a43 (patch)
treef465d27ee1c55c7dfa59ffc8dfad35aebe228536 /src/map
parent1cccfca3dd708354bf808068c1210ce353957f2e (diff)
downloadhercules-31234f79616a9da1d2cd7c3ef92116e448656a43.tar.gz
hercules-31234f79616a9da1d2cd7c3ef92116e448656a43.tar.bz2
hercules-31234f79616a9da1d2cd7c3ef92116e448656a43.tar.xz
hercules-31234f79616a9da1d2cd7c3ef92116e448656a43.zip
Move equipment check from pc_setpos() to clif_parse_LoadEndAck()
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/pc.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a0ec1fdf6..3eddaf649 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10850,6 +10850,12 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
clif->updatestatus(sd, SP_SKILLPOINT);
clif->initialstatus(sd);
+ // Unequip items which can't be equipped by the character.
+ for (int i = 0; i < EQI_MAX; i++) {
+ if (sd->equip_index[i] >= 0 && pc->isequip(sd , sd->equip_index[i]) == 0)
+ pc->unequipitem(sd, sd->equip_index[i], PCUNEQUIPITEM_FORCE);
+ }
+
if (pc_isfalcon(sd)) {
int sc_icn = status->get_sc_icon(SC_FALCON);
int sc_typ = status->get_sc_relevant_bl_types(SC_FALCON);
diff --git a/src/map/pc.c b/src/map/pc.c
index 5faadf76a..35c28c94e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5858,11 +5858,6 @@ static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int
status_change_end(&sd->bl, SC_CLOAKINGEXCEED, INVALID_TIMER);
}
- for (int i = 0; i < EQI_MAX; i++) {
- if (sd->equip_index[i] >= 0 && pc->isequip(sd , sd->equip_index[i]) == 0)
- pc->unequipitem(sd, sd->equip_index[i], PCUNEQUIPITEM_FORCE);
- }
-
if ((battle_config.clear_unit_onwarp & BL_PC) != 0)
skill->clear_unitgroup(&sd->bl);