Skip to content

Commit

Permalink
Fixed skills from equipment not being properly removed in modern clients
Browse files Browse the repository at this point in the history
  • Loading branch information
csnv committed Oct 12, 2024
1 parent 1917af8 commit bd7e296
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -2378,11 +2378,13 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o

if (memcmp(b_skill, sd->status.skill, sizeof(sd->status.skill))) {
#if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
// Client doesn't delete unavailable skills even if we refresh
// the skill tree, individually delete them.
// Client doesn't delete unavailable skills even if we refresh the skill tree, individually delete/update them.
for (i = 0; i < MAX_SKILL_DB; i++) {
if (b_skill[i].id != 0 && sd->status.skill[i].id == 0) {
clif->deleteskill(sd, b_skill[i].id, true);
if (pc->is_own_skill(sd, b_skill[i].id))
clif->skillinfo(sd, b_skill[i].id, 0);
else
clif->deleteskill(sd, b_skill[i].id, true);
}
}
#endif
Expand Down

0 comments on commit bd7e296

Please sign in to comment.