I am currently facing a significant issue on my server, which involves both rogue and stalkers with skill Plagiarism.
Example: The problem arises when a Stalker with a level 10 Double Strafe skill plagiarizes a level 5 Double Strafe skill. The level 5 skill replaces the original level 10 skill. However, the copied skill does not appear in the appropriate tab. Furthermore, if the Stalker undergoes a skill reset or plagiarizes another skill, the Double Strafe skill completely disappears, resetting to level 0 and causing the Stalker to lose skill points. It's important to note that there are no modifications made to this section of the script. Here is the relevant part of the script for reference:
int cidx, idx, lv = 0;
cidx = skill->get_index(copy_skill);
switch(can_copy(tsd, copy_skill)) {
case 1: // Plagiarism
{
if (tsd->cloneskill_id) {
idx = skill->get_index(tsd->cloneskill_id);
if (tsd->status.skill[idx].flag == SKILL_FLAG_PLAGIARIZED) {
tsd->status.skill[idx].id = 0;
tsd->status.skill[idx].lv = 0;
tsd->status.skill[idx].flag = 0;
clif->deleteskill(tsd, tsd->cloneskill_id);
}
}
lv = min(skill_lv, pc->checkskill(tsd, RG_PLAGIARISM));
tsd->cloneskill_id = copy_skill;
pc_setglobalreg(tsd, script->add_variable("CLONE_SKILL"), copy_skill);
pc_setglobalreg(tsd, script->add_variable("CLONE_SKILL_LV"), lv);
tsd->status.skill[cidx].id = copy_skill;
tsd->status.skill[cidx].lv = lv;
tsd->status.skill[cidx].flag = SKILL_FLAG_PLAGIARIZED;
clif->addskill(tsd, copy_skill);
}
Do you have any suggestions or potential solutions for this issue? I am willing to compensate anyone who can provide a fix for it.