summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-29 19:26:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-29 19:26:18 +0000
commitd0397b495f1f18b904174f7ee174b75af608cbcc (patch)
treeb36f20f369e59c566a1ae93efe33e34b2c8cb7be /src
parent8d78bf32411bff959e38cb94e9c9cdb383706a69 (diff)
downloadhercules-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
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c16
1 files changed, 11 insertions, 5 deletions
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);
}
}