summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/skill.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index bfd2c1a87..5350caf68 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2008/01/29
+ * Plagiarize can no longer copy skill levels beyond their max skill_db
+ value.
* Modified pc_dead so that the src is passed on to the master when it is a
pet or homunculus. [Skotlex]
2008/01/26
diff --git a/src/map/skill.c b/src/map/skill.c
index b8107ffaa..d579cff5e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1592,19 +1592,25 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
if ((!tsd->status.skill[skillid].id || tsd->status.skill[skillid].flag >= 13) &&
can_copy(tsd,skillid)) // Split all the check into their own function [Aru]
{
+ int lv = skilllv;
if (tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == 13){
tsd->status.skill[tsd->cloneskill_id].id = 0;
tsd->status.skill[tsd->cloneskill_id].lv = 0;
tsd->status.skill[tsd->cloneskill_id].flag = 0;
}
+
+ if ((type = pc_checkskill(tsd,RG_PLAGIARISM)) < lv)
+ lv = type;
+ //kRO Update makes it impossible to copy skills beyond the skill_db max.
+ if ((type = skill_get_max(RG_PLAGIARISM)) < lv)
+ lv = type;
+
tsd->cloneskill_id = skillid;
tsd->status.skill[skillid].id = skillid;
- tsd->status.skill[skillid].lv = skilllv;
- if ((type = pc_checkskill(tsd,RG_PLAGIARISM)) < skilllv)
- tsd->status.skill[skillid].lv = type;
+ tsd->status.skill[skillid].lv = lv;
tsd->status.skill[skillid].flag = 13;//cloneskill flag
- pc_setglobalreg(tsd, "CLONE_SKILL", tsd->cloneskill_id);
- pc_setglobalreg(tsd, "CLONE_SKILL_LV", tsd->status.skill[skillid].lv);
+ pc_setglobalreg(tsd, "CLONE_SKILL", skillid);
+ pc_setglobalreg(tsd, "CLONE_SKILL_LV", lv);
clif_skillinfoblock(tsd);
}
}