diff options
author | Haru <haru@dotalux.com> | 2016-07-02 18:58:46 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-07-02 18:58:46 +0200 |
commit | 0b7498bd5c252094fd429b46be847dcd24066a2e (patch) | |
tree | 59d0ceef77cbd87d1dcbf09ae821b7924351cfa0 | |
parent | 71c24ded34b1805899d98850b826d00edff3b693 (diff) | |
download | hercules-0b7498bd5c252094fd429b46be847dcd24066a2e.tar.gz hercules-0b7498bd5c252094fd429b46be847dcd24066a2e.tar.bz2 hercules-0b7498bd5c252094fd429b46be847dcd24066a2e.tar.xz hercules-0b7498bd5c252094fd429b46be847dcd24066a2e.zip |
Removed a duplicate check from inter_guild_tosql()
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/char/int_guild.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 21f38d049..d2507a2f9 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -146,22 +146,17 @@ int inter_guild_tosql(struct guild *g,int flag) *t_info = '\0'; // Insert a new guild the guild - if (flag&GS_BASIC && g->guild_id == -1) - { + if (flag&GS_BASIC && g->guild_id == -1) { strcat(t_info, " guild_create"); // Create a new guild - if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` " - "(`name`,`master`,`guild_lv`,`max_member`,`average_lv`,`char_id`) " - "VALUES ('%s', '%s', '%d', '%d', '%d', '%d')", - guild_db, esc_name, esc_master, g->guild_lv, g->max_member, g->average_lv, g->member[0].char_id) ) - { + if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` " + "(`name`,`master`,`guild_lv`,`max_member`,`average_lv`,`char_id`) " + "VALUES ('%s', '%s', '%d', '%d', '%d', '%d')", + guild_db, esc_name, esc_master, g->guild_lv, g->max_member, g->average_lv, g->member[0].char_id)) { Sql_ShowDebug(inter->sql_handle); - if (g->guild_id == -1) - return 0; //Failed to create guild! - } - else - { + return 0; //Failed to create guild! + } else { g->guild_id = (int)SQL->LastInsertId(inter->sql_handle); new_guild = 1; } |