summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-16 12:35:03 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-16 12:35:03 +0000
commit9a8fab9f29c7284c23b54e67bdb85a05de9b36eb (patch)
treedc9df2dfdb5ef4282a4127e6395fef9f0e7187f9 /src/map/guild.c
parentfc9e4a729a2555c0af3abbc78e4f0f5bcc1d8d13 (diff)
downloadhercules-9a8fab9f29c7284c23b54e67bdb85a05de9b36eb.tar.gz
hercules-9a8fab9f29c7284c23b54e67bdb85a05de9b36eb.tar.bz2
hercules-9a8fab9f29c7284c23b54e67bdb85a05de9b36eb.tar.xz
hercules-9a8fab9f29c7284c23b54e67bdb85a05de9b36eb.zip
Fixed an exploit that makes guild skill get higher level than the max defined in guild_skill_tree. (bugreport:3241)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13894 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 365461593..0eb7af712 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1229,6 +1229,7 @@ int guild_skillup(TBL_PC* sd, int skill_num)
{
struct guild* g;
int idx = skill_num - GD_SKILLBASE;
+ int max = guild_skill_get_max(skill_num);
nullpo_retr(0, sd);
@@ -1239,8 +1240,8 @@ int guild_skillup(TBL_PC* sd, int skill_num)
if( g->skill_point > 0 &&
g->skill[idx].id != 0 &&
- g->skill[idx].lv < guild_skill_get_max(skill_num) )
- intif_guild_skillup(g->guild_id, skill_num, sd->status.account_id);
+ g->skill[idx].lv < max )
+ intif_guild_skillup(g->guild_id, skill_num, sd->status.account_id, max);
return 0;
}