diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-29 19:26:18 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-29 19:26:18 +0000 |
commit | d0397b495f1f18b904174f7ee174b75af608cbcc (patch) | |
tree | b36f20f369e59c566a1ae93efe33e34b2c8cb7be | |
parent | 8d78bf32411bff959e38cb94e9c9cdb383706a69 (diff) | |
download | hercules-d0397b495f1f18b904174f7ee174b75af608cbcc.tar.gz hercules-d0397b495f1f18b904174f7ee174b75af608cbcc.tar.bz2 hercules-d0397b495f1f18b904174f7ee174b75af608cbcc.tar.xz hercules-d0397b495f1f18b904174f7ee174b75af608cbcc.zip |
- Plagiarize can no longer copy skill levels beyond their max skill_db value.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12151 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/skill.c | 16 |
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); } } |