summaryrefslogtreecommitdiff
path: root/src/char/int_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/char/int_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/char/int_guild.c')
-rw-r--r--src/char/int_guild.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index e8379c130..dac684391 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1317,7 +1317,7 @@ int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_positi
}
// ギルドスキルアップ要求
-int mapif_parse_GuildSkillUp(int fd, int guild_id, int skill_num, int account_id)
+int mapif_parse_GuildSkillUp(int fd, int guild_id, int skill_num, int account_id, int max)
{
struct guild *g = (struct guild*)idb_get(guild_db, guild_id);
int idx = skill_num - GD_SKILLBASE;
@@ -1325,7 +1325,7 @@ int mapif_parse_GuildSkillUp(int fd, int guild_id, int skill_num, int account_id
if (g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
return 0;
- if (g->skill_point > 0 && g->skill[idx].id > 0 && g->skill[idx].lv < 10) {
+ if (g->skill_point > 0 && g->skill[idx].id > 0 && g->skill[idx].lv < max) {
g->skill[idx].lv++;
g->skill_point--;
if (guild_calcinfo(g) == 0)
@@ -1551,7 +1551,7 @@ int inter_guild_parse_frommap(int fd)
case 0x3039: mapif_parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), (const char*)RFIFOP(fd,10), RFIFOW(fd,2)-10); break;
case 0x303A: mapif_parse_GuildMemberInfoChange(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOL(fd,12), RFIFOW(fd,16), (const char*)RFIFOP(fd,18), RFIFOW(fd,2)-18); break;
case 0x303B: mapif_parse_GuildPosition(fd, RFIFOL(fd,4), RFIFOL(fd,8), (struct guild_position *)RFIFOP(fd,12)); break;
- case 0x303C: mapif_parse_GuildSkillUp(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x303C: mapif_parse_GuildSkillUp(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14)); break;
case 0x303D: mapif_parse_GuildAlliance(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOB(fd,18)); break;
case 0x303E: mapif_parse_GuildNotice(fd, RFIFOL(fd,2), (const char*)RFIFOP(fd,6), (const char*)RFIFOP(fd,66)); break;
case 0x303F: mapif_parse_GuildEmblem(fd, RFIFOW(fd,2)-12, RFIFOL(fd,4), RFIFOL(fd,8), (const char*)RFIFOP(fd,12)); break;