summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-23 16:42:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-23 16:42:42 +0000
commitd3ee2f6695aa3197ebba9df12aaf5a3a6e1859f3 (patch)
treedc7cc87352d853c0a5f334643ab11450cf8a431a /src
parentd56f5afd4540115e4ea43208d367b4f09c18623c (diff)
downloadhercules-d3ee2f6695aa3197ebba9df12aaf5a3a6e1859f3.tar.gz
hercules-d3ee2f6695aa3197ebba9df12aaf5a3a6e1859f3.tar.bz2
hercules-d3ee2f6695aa3197ebba9df12aaf5a3a6e1859f3.tar.xz
hercules-d3ee2f6695aa3197ebba9df12aaf5a3a6e1859f3.zip
- Some minor cleanups.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8455 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/int_guild.c8
-rw-r--r--src/map/skill.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index d7f4ea5fa..b0549800c 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -411,10 +411,12 @@ struct guild * inter_guild_fromsql(int guild_id)
strncpy(g->master,sql_row[1],NAME_LENGTH-1);
g->guild_lv=atoi(sql_row[2]);
g->connect_member=atoi(sql_row[3]);
- if (atoi(sql_row[4]) > MAX_GUILD) // Fix reduction of MAX_GUILD [PoW]
+ g->max_member = atoi(sql_row[4]);
+ if (g->max_member > MAX_GUILD)
+ { // Fix reduction of MAX_GUILD [PoW]
+ ShowWarning("Guild %d:%s specifies higher capacity (%d) than MAX_GUILD (%d)\n", guild_id, g->name, g->max_member, MAX_GUILD);
g->max_member = MAX_GUILD;
- else
- g->max_member = atoi(sql_row[4]);
+ }
g->average_lv=atoi(sql_row[5]);
g->exp=(unsigned int)atof(sql_row[6]);
g->next_exp=(unsigned int)atof(sql_row[7]);
diff --git a/src/map/skill.c b/src/map/skill.c
index 209116db8..a25a523a2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8343,7 +8343,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
return 0;
}
if(ammo) { //Skill requires stuff equipped in the arrow slot.
- if((i=sd->equip_index[10]) < 0 ||
+ if((i=sd->equip_index[EQI_AMMO]) < 0 ||
!sd->inventory_data[i] ||
sd->status.inventory[i].amount < ammo_qty
) {